diff --git a/.buildkite/ftr_oblt_stateful_configs.yml b/.buildkite/ftr_oblt_stateful_configs.yml index 55f3c1b603fca..eb8382eacce89 100644 --- a/.buildkite/ftr_oblt_stateful_configs.yml +++ b/.buildkite/ftr_oblt_stateful_configs.yml @@ -25,6 +25,7 @@ defaultQueue: 'n2-4-spot' enabled: - x-pack/test/alerting_api_integration/observability/config.ts - x-pack/test/api_integration/apis/logs_ui/config.ts + - x-pack/test/api_integration/apis/logs_shared/config.ts - x-pack/test/api_integration/apis/metrics_ui/config.ts - x-pack/test/api_integration/apis/osquery/config.ts - x-pack/test/api_integration/apis/synthetics/config.ts diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5529c027ca47c..c3cab77ee6951 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -395,6 +395,7 @@ x-pack/plugins/encrypted_saved_objects @elastic/kibana-security x-pack/plugins/enterprise_search @elastic/search-kibana x-pack/plugins/observability_solution/entities_data_access @elastic/obs-entities x-pack/packages/kbn-entities-schema @elastic/obs-entities +x-pack/test/api_integration/apis/entity_manager/fixture_plugin @elastic/obs-entities x-pack/plugins/observability_solution/entity_manager @elastic/obs-entities examples/error_boundary @elastic/appex-sharedux packages/kbn-es @elastic/kibana-operations @@ -515,6 +516,7 @@ test/interactive_setup_api_integration/plugins/test_endpoints @elastic/kibana-se packages/kbn-interpreter @elastic/kibana-visualizations x-pack/plugins/observability_solution/investigate_app @elastic/obs-ux-management-team x-pack/plugins/observability_solution/investigate @elastic/obs-ux-management-team +packages/kbn-investigation-shared @elastic/obs-ux-management-team packages/kbn-io-ts-utils @elastic/obs-knowledge-team packages/kbn-ipynb @elastic/search-kibana packages/kbn-jest-serializers @elastic/kibana-operations diff --git a/.github/codeql/codeql-config.yml b/.github/codeql/codeql-config.yml index 461d850e4203c..d21bd48caf760 100644 --- a/.github/codeql/codeql-config.yml +++ b/.github/codeql/codeql-config.yml @@ -29,6 +29,7 @@ paths-ignore: - packages/kbn-eslint-plugin-disable - packages/kbn-eslint-plugin-eslint - packages/kbn-eslint-plugin-imports + - packages/*/scripts - packages/kbn-expect - packages/kbn-failed-test-reporter-cli - packages/kbn-find-used-node-modules @@ -70,5 +71,20 @@ paths-ignore: - packages/kbn-ts-type-check-cli - packages/kbn-web-worker-stub - packages/kbn-yarn-lock-validator + - scripts - test + - x-pack/plugins/canvas/scripts + - x-pack/plugins/cloud_security_posture/common/scripts + - x-pack/plugins/elastic_assistant/scripts + - x-pack/plugins/event_log/scripts + - x-pack/plugins/fleet/scripts + - x-pack/plugins/lists/scripts + - x-pack/plugins/lists/server/scripts + - x-pack/plugins/ml/scripts + - x-pack/plugins/observability_solution/*/scripts + - x-pack/plugins/osquery/scripts + - x-pack/plugins/rule_registry/scripts + - x-pack/plugins/security_solution/scripts + - x-pack/plugins/threat_intelligence/scripts + - x-pack/scripts - x-pack/test diff --git a/.github/workflows/alert-failed-test.yml b/.github/workflows/alert-failed-test.yml index 92916629d80f3..4d465b03dd43f 100644 --- a/.github/workflows/alert-failed-test.yml +++ b/.github/workflows/alert-failed-test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout kibana-operations - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: repository: 'elastic/kibana-operations' ref: main diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c4819f86fa1f9..66f99a95a3b2c 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: ref: ${{ matrix.branch }} diff --git a/.github/workflows/fix-version-gaps.yml b/.github/workflows/fix-version-gaps.yml index 77a56a268f20d..d3eb1be40f6d2 100644 --- a/.github/workflows/fix-version-gaps.yml +++ b/.github/workflows/fix-version-gaps.yml @@ -16,8 +16,9 @@ jobs: && !( contains(github.event.pull_request.labels.*.name, 'backport:prev-minor') || contains(github.event.pull_request.labels.*.name, 'backport:prev-major') + || contains(github.event.pull_request.labels.*.name, 'backport:current-major') || contains(github.event.pull_request.labels.*.name, 'backport:all-open') - || contains(github.event.pull_request.labels.*.name, 'backport:auto-version') + || contains(github.event.pull_request.labels.*.name, 'backport:version') ) && !( (github.event.action == 'labeled' && github.event.label.name == 'auto-backport') @@ -26,7 +27,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Actions - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: repository: 'elastic/kibana-github-actions' ref: main diff --git a/.github/workflows/label-failed-test.yml b/.github/workflows/label-failed-test.yml index ec5114803639e..358ff08edecd1 100644 --- a/.github/workflows/label-failed-test.yml +++ b/.github/workflows/label-failed-test.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout kibana-operations - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: repository: 'elastic/kibana-operations' ref: main diff --git a/.github/workflows/label-qa-fixed-in.yml b/.github/workflows/label-qa-fixed-in.yml index 99803c2c4e880..ed2dcced8e724 100644 --- a/.github/workflows/label-qa-fixed-in.yml +++ b/.github/workflows/label-qa-fixed-in.yml @@ -46,7 +46,7 @@ jobs: prnumber: ${{ github.event.number }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: sergeysova/jq-action@v2 + - uses: sergeysova/jq-action@a3f0d4ff59cc1dddf023fc0b325dd75b10deec58 # v2.3.0 id: issues_to_label with: # Map to the issues' node id @@ -54,7 +54,7 @@ jobs: multiline: true env: CLOSING_ISSUES: ${{ steps.closing_issues.outputs.data }} - - uses: sergeysova/jq-action@v2 + - uses: sergeysova/jq-action@a3f0d4ff59cc1dddf023fc0b325dd75b10deec58 # v2.3.0 id: label_ids with: # Get list of version labels on pull request and map to label's node id, append 'QA:Ready For Testing' id ("MDU6TGFiZWwyNTQ1NjcwOTI4") diff --git a/.github/workflows/launchdarkly-code-references.yml b/.github/workflows/launchdarkly-code-references.yml index ab888da06c97a..3f6c4b1ead69f 100644 --- a/.github/workflows/launchdarkly-code-references.yml +++ b/.github/workflows/launchdarkly-code-references.yml @@ -16,7 +16,7 @@ jobs: if: github.event.repository.fork == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: fetch-depth: 11 # This value must be set if the lookback configuration option is not disabled for find-code-references. Read more: https://github.com/launchdarkly/ld-find-code-refs#searching-for-unused-flags-extinctions - name: LaunchDarkly Code References diff --git a/.github/workflows/on-merge.yml b/.github/workflows/on-merge.yml index b02129edb6fe0..ae1b80bd94dc4 100644 --- a/.github/workflows/on-merge.yml +++ b/.github/workflows/on-merge.yml @@ -16,15 +16,16 @@ jobs: github.event.action == 'labeled' && ( github.event.label.name == 'backport:prev-minor' || github.event.label.name == 'backport:prev-major' + || github.event.label.name == 'backport:current-major' || github.event.label.name == 'backport:all-open' - || github.event.label.name == 'backport:auto-version' + || github.event.label.name == 'backport:version' ) ) || (github.event.action == 'closed') ) steps: - name: Checkout Actions - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: repository: 'elastic/kibana-github-actions' ref: main diff --git a/.github/workflows/skip-failed-test.yml b/.github/workflows/skip-failed-test.yml index 4c6d7c94b808d..913ba7b9648d4 100644 --- a/.github/workflows/skip-failed-test.yml +++ b/.github/workflows/skip-failed-test.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Actions - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: repository: 'elastic/kibana-github-actions' ref: main @@ -30,7 +30,7 @@ jobs: token: ${{secrets.KIBANAMACHINE_TOKEN}} - name: Checkout kibana-operations - uses: actions/checkout@v4 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: repository: 'elastic/kibana-operations' ref: main diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 376cae6330988..a8be5d17b1aff 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-08-13 +date: 2024-08-15 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 5ba3be3fdddea..3407e422ae59e 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-08-13 +date: 2024-08-15 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 83538a8be72a9..73691eb54232e 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-08-13 +date: 2024-08-15 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 dc65359c5a512..051abb9ff37d1 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-08-13 +date: 2024-08-15 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 c21ee2adb5977..cbdff68927f4c 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-08-13 +date: 2024-08-15 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 de97ed081bb60..481c284f2a1af 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-08-13 +date: 2024-08-15 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 8d479f6097950..3c4333654b9fa 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess'] --- import apmDataAccessObj from './apm_data_access.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index ce091df4face9..12cd8523b76f2 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-08-13 +date: 2024-08-15 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 eccc05133d19e..093f51c342cbe 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-08-13 +date: 2024-08-15 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 3a9b5928b10a8..8529737ec93e6 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-08-13 +date: 2024-08-15 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 1c0657b61bff4..35554b418a4d4 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-08-13 +date: 2024-08-15 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 aef73f9c2f7d4..299bffbc18671 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-08-13 +date: 2024-08-15 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 86fa27e8c1eeb..b0400b3e4032d 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-08-13 +date: 2024-08-15 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 7f58833be2f7e..003bf7e3d712f 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-08-13 +date: 2024-08-15 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 4bf7861489f30..bfb652b05fb8c 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-08-13 +date: 2024-08-15 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 7339bfac3b532..1276cae5255d9 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-08-13 +date: 2024-08-15 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 786cde845545e..ae4cbfb1c4dbb 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-08-13 +date: 2024-08-15 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 2888b9a1a5d1b..17eaaab8fb752 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-08-13 +date: 2024-08-15 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 d2bf7df6aabdb..c5b417ba1302a 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; diff --git a/api_docs/controls.devdocs.json b/api_docs/controls.devdocs.json index f7972270d0906..1c04186ae091e 100644 --- a/api_docs/controls.devdocs.json +++ b/api_docs/controls.devdocs.json @@ -6615,6 +6615,8 @@ "section": "def-public.HasSaveNotification", "text": "HasSaveNotification" }, + " & ", + "PublishesReload", "> & { asyncResetUnsavedChanges: () => Promise; autoApplySelections$: ", { "pluginId": "@kbn/presentation-publishing", diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 9e148bae9c74d..70d984e4078db 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-08-13 +date: 2024-08-15 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 0dbcac8e3bec1..88af3dbd6a7bc 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-08-13 +date: 2024-08-15 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 bdec93ab7029d..3e4ad439d53e5 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-08-13 +date: 2024-08-15 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 380a7d97f38ae..e883c92cce4d6 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-08-13 +date: 2024-08-15 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 5d863188f7515..ddd3dadd1e525 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-08-13 +date: 2024-08-15 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 a2ca69f6adac7..4941edfa36c5e 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-08-13 +date: 2024-08-15 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 43ac14a224454..7404cd6f29345 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-08-13 +date: 2024-08-15 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 2ad6347415278..879502859240c 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-08-13 +date: 2024-08-15 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 96e8bb71bd72f..0a5d0ca470f5a 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-08-13 +date: 2024-08-15 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 72961d68285e4..d0cc5922004e2 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-08-13 +date: 2024-08-15 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 d18a8290dec45..67a8406b8b0f3 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-08-13 +date: 2024-08-15 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 f9aa15e86f9e7..0d5249f4b27ae 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-08-13 +date: 2024-08-15 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 e6f74c9090c85..73ca7bbf5636a 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/dataset_quality.devdocs.json b/api_docs/dataset_quality.devdocs.json index 4e12827e79f3f..cf7d2839e6336 100644 --- a/api_docs/dataset_quality.devdocs.json +++ b/api_docs/dataset_quality.devdocs.json @@ -94,7 +94,62 @@ "DatasetQualityPublicState", "> | undefined; }" ], - "path": "x-pack/plugins/observability_solution/dataset_quality/public/controller/create_controller.ts", + "path": "x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/create_controller.ts", + "deprecated": false, + "trackAdoption": false + } + ] + }, + { + "parentPluginId": "datasetQuality", + "id": "def-public.DatasetQualityPluginStart.DatasetQualityDetails", + "type": "CompoundType", + "tags": [], + "label": "DatasetQualityDetails", + "description": [], + "signature": [ + "React.ComponentClass<", + "DatasetQualityDetailsProps", + ", any> | React.FunctionComponent<", + "DatasetQualityDetailsProps", + ">" + ], + "path": "x-pack/plugins/observability_solution/dataset_quality/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "datasetQuality", + "id": "def-public.DatasetQualityPluginStart.createDatasetQualityDetailsController", + "type": "Function", + "tags": [], + "label": "createDatasetQualityDetailsController", + "description": [], + "signature": [ + "({ initialState, }: { initialState: ", + "DatasetQualityDetailsPublicStateUpdate", + "; }) => Promise<", + "DatasetQualityDetailsController", + ">" + ], + "path": "x-pack/plugins/observability_solution/dataset_quality/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "datasetQuality", + "id": "def-public.DatasetQualityPluginStart.createDatasetQualityDetailsController.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "{ initialState: ", + "DatasetQualityDetailsPublicStateUpdate", + "; }" + ], + "path": "x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/create_controller.ts", "deprecated": false, "trackAdoption": false } @@ -115,7 +170,41 @@ }, "common": { "classes": [], - "functions": [], + "functions": [ + { + "parentPluginId": "datasetQuality", + "id": "def-common.indexNameToDataStreamParts", + "type": "Function", + "tags": [], + "label": "indexNameToDataStreamParts", + "description": [], + "signature": [ + "(dataStreamName: string) => { type: \"metrics\" | \"synthetics\" | \"traces\" | \"logs\" | \"profiling\"; dataset: string; namespace: string; }" + ], + "path": "x-pack/plugins/observability_solution/dataset_quality/common/utils/dataset_name.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "datasetQuality", + "id": "def-common.indexNameToDataStreamParts.$1", + "type": "string", + "tags": [], + "label": "dataStreamName", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/observability_solution/dataset_quality/common/utils/dataset_name.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], "interfaces": [ { "parentPluginId": "datasetQuality", @@ -169,7 +258,7 @@ "StringC", "; }>; }> | undefined; handler: ({}: ", "DatasetQualityRouteHandlerResources", - " & { params: { path: { dataStream: string; }; }; }) => Promise<{ createdOn?: number | null | undefined; integration?: string | undefined; }>; } & ", + " & { params: { path: { dataStream: string; }; }; }) => Promise<{ createdOn?: number | null | undefined; integration?: string | undefined; datasetUserPrivileges?: ({ canMonitor: boolean; } & { canRead: boolean; canViewIntegrations: boolean; }) | undefined; }>; } & ", "DatasetQualityRouteCreateOptions", "; \"GET /internal/dataset_quality/data_streams/{dataStream}/details\": { endpoint: \"GET /internal/dataset_quality/data_streams/{dataStream}/details\"; params?: ", "TypeC", @@ -330,7 +419,7 @@ "StringC", "; }>; }> | undefined; handler: ({}: ", "DatasetQualityRouteHandlerResources", - " & { params: { path: { dataStream: string; }; }; }) => Promise<{ createdOn?: number | null | undefined; integration?: string | undefined; }>; } & ", + " & { params: { path: { dataStream: string; }; }; }) => Promise<{ createdOn?: number | null | undefined; integration?: string | undefined; datasetUserPrivileges?: ({ canMonitor: boolean; } & { canRead: boolean; canViewIntegrations: boolean; }) | undefined; }>; } & ", "DatasetQualityRouteCreateOptions", "; \"GET /internal/dataset_quality/data_streams/{dataStream}/details\": { endpoint: \"GET /internal/dataset_quality/data_streams/{dataStream}/details\"; params?: ", "TypeC", diff --git a/api_docs/dataset_quality.mdx b/api_docs/dataset_quality.mdx index 0e60971c4aad2..6dc265610218c 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'datasetQuality'] --- import datasetQualityObj from './dataset_quality.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 10 | 0 | 10 | 5 | +| 15 | 0 | 15 | 8 | ## Client @@ -36,6 +36,9 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux ## Common +### Functions + + ### Interfaces diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 58740a94a8b1a..825e2cf537b53 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index e1313157fc429..f837fdc079b96 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index c62e1fcad0428..c905752aa40ed 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 0f758fff0cedd..325e40d4ad810 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-08-13 +date: 2024-08-15 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 a6229dc26ee4c..f164dd45da3c8 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-08-13 +date: 2024-08-15 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 96ca93547b4ff..4bbb7f8b4c03e 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-08-13 +date: 2024-08-15 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 632d98a437919..e0b24b861225a 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-08-13 +date: 2024-08-15 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 293c820e3902f..ab47bd0560b2b 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-08-13 +date: 2024-08-15 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 ded8151082441..c97bac86ed8b5 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant'] --- import elasticAssistantObj from './elastic_assistant.devdocs.json'; diff --git a/api_docs/embeddable.devdocs.json b/api_docs/embeddable.devdocs.json index 2f366ce07e0ae..a8f0320e4e8a1 100644 --- a/api_docs/embeddable.devdocs.json +++ b/api_docs/embeddable.devdocs.json @@ -8980,7 +8980,7 @@ "section": "def-public.PresentationPanelProps", "text": "PresentationPanelProps" }, - ", \"showShadow\" | \"showBorder\" | \"showBadges\" | \"showNotifications\" | \"hideHeader\" | \"hideInspector\"> | undefined; hidePanelChrome?: boolean | undefined; onAnyStateChange?: ((state: ", + ", \"showShadow\" | \"showBorder\" | \"showBadges\" | \"showNotifications\" | \"hideLoader\" | \"hideHeader\" | \"hideInspector\"> | undefined; hidePanelChrome?: boolean | undefined; onAnyStateChange?: ((state: ", { "pluginId": "@kbn/presentation-containers", "scope": "public", @@ -9094,7 +9094,7 @@ "section": "def-public.PresentationPanelProps", "text": "PresentationPanelProps" }, - ", \"showShadow\" | \"showBorder\" | \"showBadges\" | \"showNotifications\" | \"hideHeader\" | \"hideInspector\"> | undefined" + ", \"showShadow\" | \"showBorder\" | \"showBadges\" | \"showNotifications\" | \"hideLoader\" | \"hideHeader\" | \"hideInspector\"> | undefined" ], "path": "src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx", "deprecated": false, diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index c701319d815d6..089bff25c5441 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-08-13 +date: 2024-08-15 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 760dd758bf879..7e03efed2b51d 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-08-13 +date: 2024-08-15 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 cb93739528eaa..c44105c486f33 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-08-13 +date: 2024-08-15 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 5a6e174bdabd3..39896455ddad5 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/entities_data_access.mdx b/api_docs/entities_data_access.mdx index 3996eaff90388..acdab44aa03d9 100644 --- a/api_docs/entities_data_access.mdx +++ b/api_docs/entities_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/entitiesDataAccess title: "entitiesDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the entitiesDataAccess plugin -date: 2024-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'entitiesDataAccess'] --- import entitiesDataAccessObj from './entities_data_access.devdocs.json'; diff --git a/api_docs/entity_manager.mdx b/api_docs/entity_manager.mdx index 36bc7eb0b03f7..fb2ff6ef1dd2e 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-08-13 +date: 2024-08-15 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 a0f07816ca255..809d3fa5c1ad0 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-08-13 +date: 2024-08-15 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 599c03ce44486..f8fe0a30c64ec 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-08-13 +date: 2024-08-15 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 ff97001c178b1..2a234664e1c54 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-08-13 +date: 2024-08-15 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 c0b3024d72b2f..c88934a752a09 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-08-13 +date: 2024-08-15 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 3d4f05cb34940..c102640fef0a9 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-08-13 +date: 2024-08-15 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 fc0fc9eed9b2c..f5bf7edd88290 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-08-13 +date: 2024-08-15 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 5864abef22ee1..7f35ba69046a2 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-08-13 +date: 2024-08-15 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 236e56c0beedb..ac71f5e0d0bb1 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-08-13 +date: 2024-08-15 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 9ac2ce647f34a..539928511bc26 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-08-13 +date: 2024-08-15 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 1e48f53073f58..364df4568be09 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-08-13 +date: 2024-08-15 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 ec55c303986b6..7dbf2e8b9f6e4 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-08-13 +date: 2024-08-15 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 85318c7729d93..5e269b0ce9249 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-08-13 +date: 2024-08-15 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 b4ff3e068eb84..5458009e6139a 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-08-13 +date: 2024-08-15 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 8ec9d0d2f1381..2a6327874838f 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-08-13 +date: 2024-08-15 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 8eb6a404182d5..17cf44b8c2fa4 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-08-13 +date: 2024-08-15 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 1c2763abe7a90..75ae8e864f342 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-08-13 +date: 2024-08-15 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 0db176891591a..5f809b2a1a036 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-08-13 +date: 2024-08-15 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 6af24bd56e4df..9718cc8318411 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-08-13 +date: 2024-08-15 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 1442420c76923..ecfb01c30a6a0 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-08-13 +date: 2024-08-15 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 0b1e03168df16..c1027ecc9425a 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-08-13 +date: 2024-08-15 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 701ba590ee0de..649e6b0b151e3 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-08-13 +date: 2024-08-15 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 f5a8b1e9d588c..18539f8008afa 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-08-13 +date: 2024-08-15 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 a5a80403a9bab..31807710c8a91 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/fields_metadata.devdocs.json b/api_docs/fields_metadata.devdocs.json index b328d61dc2d34..fb8dbbf87b1f8 100644 --- a/api_docs/fields_metadata.devdocs.json +++ b/api_docs/fields_metadata.devdocs.json @@ -336,7 +336,7 @@ "label": "pick", "description": [], "signature": [ - "(props: (\"source\" | \"type\" | \"normalize\" | \"short\" | \"format\" | \"name\" | \"index\" | \"description\" | \"pattern\" | \"doc_values\" | \"ignore_above\" | \"beta\" | \"required\" | \"level\" | \"allowed_values\" | \"dashed_name\" | \"example\" | \"expected_values\" | \"flat_name\" | \"input_format\" | \"multi_fields\" | \"object_type\" | \"original_fieldset\" | \"output_format\" | \"output_precision\" | \"scaling_factor\" | \"documentation_url\")[]) => { name?: string | undefined; } & { allowed_values?: ({ description: string; name: string; } & { expected_event_types?: string[] | undefined; beta?: string | undefined; })[] | undefined; beta?: string | undefined; dashed_name?: string | undefined; description?: string | undefined; doc_values?: boolean | undefined; example?: unknown; expected_values?: string[] | undefined; flat_name?: string | undefined; format?: string | undefined; ignore_above?: number | undefined; index?: boolean | undefined; input_format?: string | undefined; level?: string | undefined; multi_fields?: { flat_name: string; name: string; type: string; }[] | undefined; normalize?: string[] | undefined; object_type?: string | undefined; original_fieldset?: string | undefined; output_format?: string | undefined; output_precision?: number | undefined; pattern?: string | undefined; required?: boolean | undefined; scaling_factor?: number | undefined; short?: string | undefined; source?: \"unknown\" | \"ecs\" | \"integration\" | \"metadata\" | undefined; type?: string | undefined; documentation_url?: string | undefined; }" + "(props: (\"source\" | \"type\" | \"normalize\" | \"short\" | \"format\" | \"name\" | \"index\" | \"description\" | \"pattern\" | \"doc_values\" | \"ignore_above\" | \"required\" | \"beta\" | \"level\" | \"allowed_values\" | \"dashed_name\" | \"example\" | \"expected_values\" | \"flat_name\" | \"input_format\" | \"multi_fields\" | \"object_type\" | \"original_fieldset\" | \"output_format\" | \"output_precision\" | \"scaling_factor\" | \"documentation_url\")[]) => { name?: string | undefined; } & { allowed_values?: ({ description: string; name: string; } & { expected_event_types?: string[] | undefined; beta?: string | undefined; })[] | undefined; beta?: string | undefined; dashed_name?: string | undefined; description?: string | undefined; doc_values?: boolean | undefined; example?: unknown; expected_values?: string[] | undefined; flat_name?: string | undefined; format?: string | undefined; ignore_above?: number | undefined; index?: boolean | undefined; input_format?: string | undefined; level?: string | undefined; multi_fields?: { flat_name: string; name: string; type: string; }[] | undefined; normalize?: string[] | undefined; object_type?: string | undefined; original_fieldset?: string | undefined; output_format?: string | undefined; output_precision?: number | undefined; pattern?: string | undefined; required?: boolean | undefined; scaling_factor?: number | undefined; short?: string | undefined; source?: \"unknown\" | \"ecs\" | \"integration\" | \"metadata\" | undefined; type?: string | undefined; documentation_url?: string | undefined; }" ], "path": "x-pack/plugins/fields_metadata/common/fields_metadata/models/field_metadata.ts", "deprecated": false, @@ -350,7 +350,7 @@ "label": "props", "description": [], "signature": [ - "(\"source\" | \"type\" | \"normalize\" | \"short\" | \"format\" | \"name\" | \"index\" | \"description\" | \"pattern\" | \"doc_values\" | \"ignore_above\" | \"beta\" | \"required\" | \"level\" | \"allowed_values\" | \"dashed_name\" | \"example\" | \"expected_values\" | \"flat_name\" | \"input_format\" | \"multi_fields\" | \"object_type\" | \"original_fieldset\" | \"output_format\" | \"output_precision\" | \"scaling_factor\" | \"documentation_url\")[]" + "(\"source\" | \"type\" | \"normalize\" | \"short\" | \"format\" | \"name\" | \"index\" | \"description\" | \"pattern\" | \"doc_values\" | \"ignore_above\" | \"required\" | \"beta\" | \"level\" | \"allowed_values\" | \"dashed_name\" | \"example\" | \"expected_values\" | \"flat_name\" | \"input_format\" | \"multi_fields\" | \"object_type\" | \"original_fieldset\" | \"output_format\" | \"output_precision\" | \"scaling_factor\" | \"documentation_url\")[]" ], "path": "x-pack/plugins/fields_metadata/common/fields_metadata/models/field_metadata.ts", "deprecated": false, @@ -454,7 +454,7 @@ "label": "pick", "description": [], "signature": [ - "(attributes: (\"source\" | \"type\" | \"normalize\" | \"short\" | \"format\" | \"name\" | \"index\" | \"description\" | \"pattern\" | \"doc_values\" | \"ignore_above\" | \"beta\" | \"required\" | \"level\" | \"allowed_values\" | \"dashed_name\" | \"example\" | \"expected_values\" | \"flat_name\" | \"input_format\" | \"multi_fields\" | \"object_type\" | \"original_fieldset\" | \"output_format\" | \"output_precision\" | \"scaling_factor\" | \"documentation_url\")[]) => Record" + "(attributes: (\"source\" | \"type\" | \"normalize\" | \"short\" | \"format\" | \"name\" | \"index\" | \"description\" | \"pattern\" | \"doc_values\" | \"ignore_above\" | \"required\" | \"beta\" | \"level\" | \"allowed_values\" | \"dashed_name\" | \"example\" | \"expected_values\" | \"flat_name\" | \"input_format\" | \"multi_fields\" | \"object_type\" | \"original_fieldset\" | \"output_format\" | \"output_precision\" | \"scaling_factor\" | \"documentation_url\")[]) => Record" ], "path": "x-pack/plugins/fields_metadata/common/fields_metadata/models/fields_metadata_dictionary.ts", "deprecated": false, @@ -468,7 +468,7 @@ "label": "attributes", "description": [], "signature": [ - "(\"source\" | \"type\" | \"normalize\" | \"short\" | \"format\" | \"name\" | \"index\" | \"description\" | \"pattern\" | \"doc_values\" | \"ignore_above\" | \"beta\" | \"required\" | \"level\" | \"allowed_values\" | \"dashed_name\" | \"example\" | \"expected_values\" | \"flat_name\" | \"input_format\" | \"multi_fields\" | \"object_type\" | \"original_fieldset\" | \"output_format\" | \"output_precision\" | \"scaling_factor\" | \"documentation_url\")[]" + "(\"source\" | \"type\" | \"normalize\" | \"short\" | \"format\" | \"name\" | \"index\" | \"description\" | \"pattern\" | \"doc_values\" | \"ignore_above\" | \"required\" | \"beta\" | \"level\" | \"allowed_values\" | \"dashed_name\" | \"example\" | \"expected_values\" | \"flat_name\" | \"input_format\" | \"multi_fields\" | \"object_type\" | \"original_fieldset\" | \"output_format\" | \"output_precision\" | \"scaling_factor\" | \"documentation_url\")[]" ], "path": "x-pack/plugins/fields_metadata/common/fields_metadata/models/fields_metadata_dictionary.ts", "deprecated": false, @@ -605,7 +605,7 @@ "label": "FieldAttribute", "description": [], "signature": [ - "\"source\" | \"type\" | \"normalize\" | \"short\" | \"format\" | \"name\" | \"index\" | \"description\" | \"pattern\" | \"doc_values\" | \"ignore_above\" | \"beta\" | \"required\" | \"level\" | \"allowed_values\" | \"dashed_name\" | \"example\" | \"expected_values\" | \"flat_name\" | \"input_format\" | \"multi_fields\" | \"object_type\" | \"original_fieldset\" | \"output_format\" | \"output_precision\" | \"scaling_factor\" | \"documentation_url\"" + "\"source\" | \"type\" | \"normalize\" | \"short\" | \"format\" | \"name\" | \"index\" | \"description\" | \"pattern\" | \"doc_values\" | \"ignore_above\" | \"required\" | \"beta\" | \"level\" | \"allowed_values\" | \"dashed_name\" | \"example\" | \"expected_values\" | \"flat_name\" | \"input_format\" | \"multi_fields\" | \"object_type\" | \"original_fieldset\" | \"output_format\" | \"output_precision\" | \"scaling_factor\" | \"documentation_url\"" ], "path": "x-pack/plugins/fields_metadata/common/fields_metadata/types.ts", "deprecated": false, diff --git a/api_docs/fields_metadata.mdx b/api_docs/fields_metadata.mdx index 6849becd68478..0ae64143be8a7 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-08-13 +date: 2024-08-15 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 96cf3d3554172..c6db63febadab 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-08-13 +date: 2024-08-15 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 f431f3d76190a..e9681161e8066 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-08-13 +date: 2024-08-15 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 41326b48ca9ec..069b17b7330fe 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index 54f1b16567154..fed34bc34fc5d 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -1608,6 +1608,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy.output_id", + "type": "CompoundType", + "tags": [], + "label": "output_id", + "description": [], + "signature": [ + "string | null | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "fleet", "id": "def-public.NewPackagePolicy.package", @@ -2908,7 +2922,7 @@ "The updated Integration Policy to be merged back and included in the API call" ], "signature": [ - "{ id?: string | number | undefined; name?: string | undefined; description?: string | undefined; namespace?: string | undefined; enabled?: boolean | undefined; is_managed?: boolean | undefined; policy_id?: string | undefined; policy_ids?: string[] | undefined; package?: ", + "{ id?: string | number | undefined; name?: string | undefined; description?: string | undefined; namespace?: string | undefined; enabled?: boolean | undefined; is_managed?: boolean | undefined; policy_id?: string | undefined; policy_ids?: string[] | undefined; output_id?: string | null | undefined; package?: ", { "pluginId": "fleet", "scope": "common", @@ -6308,7 +6322,15 @@ "section": "def-server.SavedObjectsClientContract", "text": "SavedObjectsClientContract" }, - ", id: string, options?: { standalone: boolean; } | undefined) => Promise<", + ", id: string, options?: { standalone?: boolean | undefined; agentPolicy?: ", + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.AgentPolicy", + "text": "AgentPolicy" + }, + " | undefined; } | undefined) => Promise<", { "pluginId": "fleet", "scope": "common", @@ -6362,7 +6384,15 @@ "label": "options", "description": [], "signature": [ - "{ standalone: boolean; } | undefined" + "{ standalone?: boolean | undefined; agentPolicy?: ", + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.AgentPolicy", + "text": "AgentPolicy" + }, + " | undefined; } | undefined" ], "path": "x-pack/plugins/fleet/server/services/agent_policy.ts", "deprecated": false, @@ -6530,7 +6560,7 @@ }, ", { perPage, kuery }?: ", "FetchAllAgentPolicyIdsOptions", - ") => AsyncIterable" + ") => Promise>" ], "path": "x-pack/plugins/fleet/server/services/index.ts", "deprecated": false, @@ -6591,7 +6621,7 @@ }, ", { perPage, kuery, sortOrder, sortField, fields, }?: ", "FetchAllAgentPoliciesOptions", - ") => AsyncIterable<", + ") => Promise" + "[]>>" ], "path": "x-pack/plugins/fleet/server/services/index.ts", "deprecated": false, @@ -11683,6 +11713,98 @@ ], "returnComment": [] }, + { + "parentPluginId": "fleet", + "id": "def-server.PackagePolicyClient.removeOutputFromAll", + "type": "Function", + "tags": [], + "label": "removeOutputFromAll", + "description": [ + "\nRemove an output from all package policies that are using it, and replace the output by the default ones." + ], + "signature": [ + "(soClient: ", + { + "pluginId": "@kbn/core-saved-objects-api-server", + "scope": "server", + "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", + "section": "def-server.SavedObjectsClientContract", + "text": "SavedObjectsClientContract" + }, + ", esClient: ", + { + "pluginId": "@kbn/core-elasticsearch-server", + "scope": "server", + "docId": "kibKbnCoreElasticsearchServerPluginApi", + "section": "def-server.ElasticsearchClient", + "text": "ElasticsearchClient" + }, + ", outputId: string) => Promise" + ], + "path": "x-pack/plugins/fleet/server/services/package_policy_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-server.PackagePolicyClient.removeOutputFromAll.$1", + "type": "Object", + "tags": [], + "label": "soClient", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-saved-objects-api-server", + "scope": "server", + "docId": "kibKbnCoreSavedObjectsApiServerPluginApi", + "section": "def-server.SavedObjectsClientContract", + "text": "SavedObjectsClientContract" + } + ], + "path": "x-pack/plugins/fleet/server/services/package_policy_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "fleet", + "id": "def-server.PackagePolicyClient.removeOutputFromAll.$2", + "type": "Object", + "tags": [], + "label": "esClient", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-elasticsearch-server", + "scope": "server", + "docId": "kibKbnCoreElasticsearchServerPluginApi", + "section": "def-server.ElasticsearchClient", + "text": "ElasticsearchClient" + } + ], + "path": "x-pack/plugins/fleet/server/services/package_policy_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "fleet", + "id": "def-server.PackagePolicyClient.removeOutputFromAll.$3", + "type": "string", + "tags": [], + "label": "outputId", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/fleet/server/services/package_policy_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, { "parentPluginId": "fleet", "id": "def-server.PackagePolicyClient.fetchAllItemIds", @@ -11703,7 +11825,7 @@ }, ", options?: ", "PackagePolicyClientFetchAllItemIdsOptions", - " | undefined) => AsyncIterable" + " | undefined) => Promise>" ], "path": "x-pack/plugins/fleet/server/services/package_policy_service.ts", "deprecated": false, @@ -11769,7 +11891,7 @@ }, ", options?: ", "PackagePolicyClientFetchAllItemsOptions", - " | undefined) => AsyncIterable<", + " | undefined) => Promise" + "[]>>" ], "path": "x-pack/plugins/fleet/server/services/package_policy_service.ts", "deprecated": false, @@ -16133,7 +16255,7 @@ "section": "def-common.PackagePolicyPackage", "text": "PackagePolicyPackage" }, - " | undefined; policy_id?: string | undefined; policy_ids?: string[] | undefined; statusCode?: number | undefined; body?: { message: string; } | undefined; }>, soClient: ", + " | undefined; policy_id?: string | undefined; policy_ids?: string[] | undefined; output_id?: string | undefined; statusCode?: number | undefined; body?: { message: string; } | undefined; }>, soClient: ", { "pluginId": "@kbn/core-saved-objects-api-server", "scope": "server", @@ -16189,7 +16311,7 @@ "section": "def-common.PackagePolicyPackage", "text": "PackagePolicyPackage" }, - " | undefined; policy_id?: string | undefined; policy_ids?: string[] | undefined; statusCode?: number | undefined; body?: { message: string; } | undefined; }>" + " | undefined; policy_id?: string | undefined; policy_ids?: string[] | undefined; output_id?: string | undefined; statusCode?: number | undefined; body?: { message: string; } | undefined; }>" ], "path": "x-pack/plugins/fleet/server/types/extensions.ts", "deprecated": false, @@ -23088,6 +23210,20 @@ "path": "x-pack/plugins/fleet/common/types/rest_spec/common.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.ListWithKuery.fields", + "type": "Array", + "tags": [], + "label": "fields", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/rest_spec/common.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -23646,6 +23782,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "fleet", + "id": "def-common.NewPackagePolicy.output_id", + "type": "CompoundType", + "tags": [], + "label": "output_id", + "description": [], + "signature": [ + "string | null | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "fleet", "id": "def-common.NewPackagePolicy.package", @@ -26335,7 +26485,7 @@ "label": "AGENT_POLICY_SAVED_OBJECT_TYPE", "description": [], "signature": [ - "\"ingest-agent-policies\"" + "\"fleet-agent-policies\"" ], "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", "deprecated": false, @@ -27361,6 +27511,36 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-common.LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE", + "type": "string", + "tags": [], + "label": "LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE", + "description": [], + "signature": [ + "\"ingest-agent-policies\"" + ], + "path": "x-pack/plugins/fleet/common/constants/agent_policy.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE", + "type": "string", + "tags": [], + "label": "LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE", + "description": [], + "signature": [ + "\"ingest-package-policies\"" + ], + "path": "x-pack/plugins/fleet/common/constants/package_policy.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-common.MESSAGE_SIGNING_KEYS_SAVED_OBJECT_TYPE", @@ -27461,21 +27641,6 @@ "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "fleet", - "id": "def-common.PACKAGE_POLICY_SAVED_OBJECT_TYPE", - "type": "string", - "tags": [], - "label": "PACKAGE_POLICY_SAVED_OBJECT_TYPE", - "description": [], - "signature": [ - "\"ingest-package-policies\"" - ], - "path": "x-pack/plugins/fleet/common/constants/package_policy.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "fleet", "id": "def-common.PackageInfo", @@ -27678,7 +27843,7 @@ "section": "def-common.PackagePolicyPackage", "text": "PackagePolicyPackage" }, - " | undefined; policy_id?: string | undefined; policy_ids?: string[] | undefined; statusCode?: number | undefined; body?: { message: string; } | undefined; }[]" + " | undefined; policy_id?: string | undefined; policy_ids?: string[] | undefined; output_id?: string | undefined; statusCode?: number | undefined; body?: { message: string; } | undefined; }[]" ], "path": "x-pack/plugins/fleet/common/types/rest_spec/package_policy.ts", "deprecated": false, diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index cf22b14ad2050..5c1ef9f450425 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1351 | 5 | 1229 | 74 | +| 1359 | 5 | 1236 | 74 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 3afb22a11f62f..1874619388d74 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-08-13 +date: 2024-08-15 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 4653bc0915eeb..16c8b85d3d0a6 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-08-13 +date: 2024-08-15 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 3d64f3f540188..66289d83653a5 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-08-13 +date: 2024-08-15 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 97ac2017c59e1..bd7fd20b8fa3a 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-08-13 +date: 2024-08-15 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 73b45d99f05d0..c452efde292a5 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-08-13 +date: 2024-08-15 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 6fef9bea3945b..000af797ae8c7 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/inference.mdx b/api_docs/inference.mdx index 9faa6ec278d77..f49f40f936df9 100644 --- a/api_docs/inference.mdx +++ b/api_docs/inference.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inference title: "inference" image: https://source.unsplash.com/400x175/?github description: API docs for the inference plugin -date: 2024-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inference'] --- import inferenceObj from './inference.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index fcf10fc4624f2..af3177c66e2ea 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-08-13 +date: 2024-08-15 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 645d0f025cb1f..c48bd7c4b4005 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-08-13 +date: 2024-08-15 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 154fd95d522d6..3b19df67ba2c8 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-08-13 +date: 2024-08-15 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 078b906e7e5b7..c71d4f7c36c54 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-08-13 +date: 2024-08-15 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 618ed41885dc7..cadb9ac2670bb 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/investigate.devdocs.json b/api_docs/investigate.devdocs.json index 9fa79e2fc3c7b..6661ec5358168 100644 --- a/api_docs/investigate.devdocs.json +++ b/api_docs/investigate.devdocs.json @@ -1152,24 +1152,6 @@ } ], "returnComment": [] - }, - { - "parentPluginId": "investigate", - "id": "def-public.InvestigatePublicStart.useInvestigateWidget", - "type": "Function", - "tags": [], - "label": "useInvestigateWidget", - "description": [], - "signature": [ - "() => ", - "UseInvestigateWidgetApi", - "<{}, {}> | undefined" - ], - "path": "x-pack/plugins/observability_solution/investigate/public/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [], - "returnComment": [] } ], "lifecycle": "start", @@ -1789,19 +1771,10 @@ { "parentPluginId": "investigate", "id": "def-common.InvestigationNote.createdBy", - "type": "Object", + "type": "string", "tags": [], "label": "createdBy", "description": [], - "signature": [ - { - "pluginId": "@kbn/core-security-common", - "scope": "common", - "docId": "kibKbnCoreSecurityCommonPluginApi", - "section": "def-common.AuthenticatedUser", - "text": "AuthenticatedUser" - } - ], "path": "x-pack/plugins/observability_solution/investigate/common/types.ts", "deprecated": false, "trackAdoption": false diff --git a/api_docs/investigate.mdx b/api_docs/investigate.mdx index 130dd073cb09d..1f0264be631eb 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'investigate'] --- import investigateObj from './investigate.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 112 | 0 | 112 | 6 | +| 111 | 0 | 111 | 5 | ## Client diff --git a/api_docs/investigate_app.devdocs.json b/api_docs/investigate_app.devdocs.json index d8b91a87450ee..b667febacd1a2 100644 --- a/api_docs/investigate_app.devdocs.json +++ b/api_docs/investigate_app.devdocs.json @@ -50,7 +50,7 @@ "label": "InvestigateAppServerRouteRepository", "description": [], "signature": [ - "{ \"GET /api/observability/investigations/{id} 2023-10-31\": { endpoint: \"GET /api/observability/investigations/{id} 2023-10-31\"; params?: ", + "{ \"GET /api/observability/investigations/{id}/notes 2023-10-31\": { endpoint: \"GET /api/observability/investigations/{id}/notes 2023-10-31\"; params?: ", "TypeC", "<{ path: ", "TypeC", @@ -58,19 +58,55 @@ "StringC", "; }>; }> | undefined; handler: ({}: ", "InvestigateAppRouteHandlerResources", - " & { params: { path: { id: string; }; }; }) => Promise<{ id: string; title: string; createdAt: number; createdBy: string; parameters: { timeRange: { from: number; to: number; }; }; }>; } & ", + " & { params: { path: { id: string; }; }; }) => Promise<{ id: string; content: string; createdAt: number; createdBy: string; }[]>; } & ", + "InvestigateAppRouteCreateOptions", + "; \"POST /api/observability/investigations/{id}/notes 2023-10-31\": { endpoint: \"POST /api/observability/investigations/{id}/notes 2023-10-31\"; params?: ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ id: ", + "StringC", + "; }>; body: ", + "TypeC", + "<{ content: ", + "StringC", + "; }>; }> | undefined; handler: ({}: ", + "InvestigateAppRouteHandlerResources", + " & { params: { path: { id: string; }; body: { content: string; }; }; }) => Promise<{ id: string; content: string; createdAt: number; createdBy: string; }>; } & ", + "InvestigateAppRouteCreateOptions", + "; \"DELETE /api/observability/investigations/{id} 2023-10-31\": { endpoint: \"DELETE /api/observability/investigations/{id} 2023-10-31\"; params?: ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ id: ", + "StringC", + "; }>; }> | undefined; handler: ({}: ", + "InvestigateAppRouteHandlerResources", + " & { params: { path: { id: string; }; }; }) => Promise; } & ", + "InvestigateAppRouteCreateOptions", + "; \"GET /api/observability/investigations/{id} 2023-10-31\": { endpoint: \"GET /api/observability/investigations/{id} 2023-10-31\"; params?: ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ id: ", + "StringC", + "; }>; }> | undefined; handler: ({}: ", + "InvestigateAppRouteHandlerResources", + " & { params: { path: { id: string; }; }; }) => Promise<{ id: string; title: string; createdAt: number; createdBy: string; params: { timeRange: { from: number; to: number; }; }; origin: { type: \"alert\"; id: string; } | { type: \"blank\"; }; status: \"closed\" | \"ongoing\"; notes: { id: string; content: string; createdAt: number; createdBy: string; }[]; }>; } & ", "InvestigateAppRouteCreateOptions", "; \"GET /api/observability/investigations 2023-10-31\": { endpoint: \"GET /api/observability/investigations 2023-10-31\"; params?: ", "PartialC", "<{ query: ", "PartialC", - "<{ page: ", + "<{ alertId: ", + "StringC", + "; page: ", "StringC", "; perPage: ", "StringC", "; }>; }> | undefined; handler: ({}: ", "InvestigateAppRouteHandlerResources", - " & { params?: { query?: { page?: string | undefined; perPage?: string | undefined; } | undefined; } | undefined; }) => Promise<{ page: number; perPage: number; total: number; results: { id: string; title: string; createdAt: number; createdBy: string; parameters: { timeRange: { from: number; to: number; }; }; }[]; }>; } & ", + " & { params?: { query?: { alertId?: string | undefined; page?: string | undefined; perPage?: string | undefined; } | undefined; } | undefined; }) => Promise<{ page: number; perPage: number; total: number; results: { id: string; title: string; createdAt: number; createdBy: string; params: { timeRange: { from: number; to: number; }; }; origin: { type: \"alert\"; id: string; } | { type: \"blank\"; }; status: \"closed\" | \"ongoing\"; notes: { id: string; content: string; createdAt: number; createdBy: string; }[]; }[]; }>; } & ", "InvestigateAppRouteCreateOptions", "; \"POST /api/observability/investigations 2023-10-31\": { endpoint: \"POST /api/observability/investigations 2023-10-31\"; params?: ", "TypeC", @@ -80,7 +116,7 @@ "StringC", "; title: ", "StringC", - "; parameters: ", + "; params: ", "TypeC", "<{ timeRange: ", "TypeC", @@ -88,9 +124,21 @@ "NumberC", "; to: ", "NumberC", - "; }>; }>; }>; }> | undefined; handler: ({}: ", + "; }>; }>; origin: ", + "UnionC", + "<[", + "TypeC", + "<{ type: ", + "LiteralC", + "<\"alert\">; id: ", + "StringC", + "; }>, ", + "TypeC", + "<{ type: ", + "LiteralC", + "<\"blank\">; }>]>; }>; }> | undefined; handler: ({}: ", "InvestigateAppRouteHandlerResources", - " & { params: { body: { id: string; title: string; parameters: { timeRange: { from: number; to: number; }; }; }; }; }) => Promise<{ id: string; title: string; createdAt: number; createdBy: string; parameters: { timeRange: { from: number; to: number; }; }; }>; } & ", + " & { params: { body: { id: string; title: string; params: { timeRange: { from: number; to: number; }; }; origin: { type: \"alert\"; id: string; } | { type: \"blank\"; }; }; }; }) => Promise<{ id: string; title: string; createdAt: number; createdBy: string; params: { timeRange: { from: number; to: number; }; }; origin: { type: \"alert\"; id: string; } | { type: \"blank\"; }; status: \"closed\" | \"ongoing\"; notes: { id: string; content: string; createdAt: number; createdBy: string; }[]; }>; } & ", "InvestigateAppRouteCreateOptions", "; }" ], diff --git a/api_docs/investigate_app.mdx b/api_docs/investigate_app.mdx index 2ded9a82ea8cf..3ce17c994dee4 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-08-13 +date: 2024-08-15 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 cdc2792fa40ab..f1d88e2e477be 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-08-13 +date: 2024-08-15 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 ed5ebcf25f557..70f8ffdf6132c 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-08-13 +date: 2024-08-15 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 542918da9f1a0..2232a3f758396 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-08-13 +date: 2024-08-15 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 ed57937b0cf5b..28baab631e413 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-08-13 +date: 2024-08-15 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 3a0c74bbc0964..743a01780020c 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-08-13 +date: 2024-08-15 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 1137cf9c64c68..3cda36fbe9c43 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-08-13 +date: 2024-08-15 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 9e1ee306f1d93..14e81d7a33399 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-08-13 +date: 2024-08-15 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 f2c8c1dc72404..b06310ba64812 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-08-13 +date: 2024-08-15 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 510c7ea5cb2e8..ec4df07be8bbf 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-08-13 +date: 2024-08-15 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 a0657b7db873b..58778877423c2 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-08-13 +date: 2024-08-15 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 59e2c1ab0f795..51491f2540f6c 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-08-13 +date: 2024-08-15 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 6cdcf9603462d..115bac7bcc6a8 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-08-13 +date: 2024-08-15 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 24eb89c0d47c8..3e8be9f50a124 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-08-13 +date: 2024-08-15 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 98a1bc2b75fa0..745266ed04439 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-08-13 +date: 2024-08-15 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 d3182382f1f42..15e6490e05ce4 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-08-13 +date: 2024-08-15 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 43b48226ba025..94145af23bf92 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_apm_synthtrace.devdocs.json index 26ccc25ade717..d1fa4a2a3ee91 100644 --- a/api_docs/kbn_apm_synthtrace.devdocs.json +++ b/api_docs/kbn_apm_synthtrace.devdocs.json @@ -704,6 +704,40 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace", + "id": "def-server.LogsSynthtraceEsClient.createIndexTemplate", + "type": "Function", + "tags": [], + "label": "createIndexTemplate", + "description": [], + "signature": [ + "(name: ", + "IndexTemplateName", + ") => Promise" + ], + "path": "packages/kbn-apm-synthtrace/src/lib/logs/logs_synthtrace_es_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace", + "id": "def-server.LogsSynthtraceEsClient.createIndexTemplate.$1", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "signature": [ + "IndexTemplateName" + ], + "path": "packages/kbn-apm-synthtrace/src/lib/logs/logs_synthtrace_es_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] } ], "initialIsOpen": false diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 048a7a3a98561..8365c41d1f6d2 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/te | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 49 | 0 | 49 | 8 | +| 51 | 0 | 51 | 9 | ## Server diff --git a/api_docs/kbn_apm_synthtrace_client.devdocs.json b/api_docs/kbn_apm_synthtrace_client.devdocs.json index 2c1979907d982..d7755119aa2c2 100644 --- a/api_docs/kbn_apm_synthtrace_client.devdocs.json +++ b/api_docs/kbn_apm_synthtrace_client.devdocs.json @@ -3158,13 +3158,28 @@ "label": "create", "description": [], "signature": [ - "() => Log" + "(logsOptions?: LogsOptions) => Log" ], "path": "packages/kbn-apm-synthtrace-client/src/lib/logs/index.ts", "deprecated": false, "trackAdoption": false, "returnComment": [], - "children": [] + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace-client", + "id": "def-common.log.create.$1", + "type": "Object", + "tags": [], + "label": "logsOptions", + "description": [], + "signature": [ + "LogsOptions" + ], + "path": "packages/kbn-apm-synthtrace-client/src/lib/logs/index.ts", + "deprecated": false, + "trackAdoption": false + } + ] } ], "initialIsOpen": false diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index 46d2e3a0ac5a5..40418c168cea8 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/te | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 200 | 0 | 200 | 31 | +| 201 | 0 | 201 | 31 | ## Common diff --git a/api_docs/kbn_apm_types.mdx b/api_docs/kbn_apm_types.mdx index 20c1ba84b2626..95724c9d7f9c0 100644 --- a/api_docs/kbn_apm_types.mdx +++ b/api_docs/kbn_apm_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-types title: "@kbn/apm-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-types plugin -date: 2024-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-types'] --- import kbnApmTypesObj from './kbn_apm_types.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index bd98b9b341dad..682c252447d0c 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-08-13 +date: 2024-08-15 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 dae824e8ed83b..a4b8d87d84a76 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-08-13 +date: 2024-08-15 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 d93729dcb0a34..38cf1e308b7bb 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-08-13 +date: 2024-08-15 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 96cf71f3c6915..eae1d643c316e 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-08-13 +date: 2024-08-15 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 534145519e1e5..e29b294938d8e 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-08-13 +date: 2024-08-15 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 ee902bf913cff..a571fe2f55d04 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-08-13 +date: 2024-08-15 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 b2db8826d9d43..37e0e14c47474 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-08-13 +date: 2024-08-15 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 aa481e25ff4db..5d94b6f6fecd3 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-08-13 +date: 2024-08-15 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 456a532903c35..ad7404c3d0ada 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-08-13 +date: 2024-08-15 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 9c178f608fef1..f0dee65a16a9a 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-08-13 +date: 2024-08-15 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 e94dc6e2ba9b6..e39e633807858 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-08-13 +date: 2024-08-15 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 0aca1331424f3..6ea2ce0ba619d 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-08-13 +date: 2024-08-15 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 6320631423b76..c57dcf0912d0f 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-08-13 +date: 2024-08-15 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.mdx b/api_docs/kbn_cli_dev_mode.mdx index be96f8e305ea0..805c04b79449c 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 0c1d7541e3e9f..0fffb2bc9c5a2 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-08-13 +date: 2024-08-15 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 e02b9efb02cae..c9f4c252c855d 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-08-13 +date: 2024-08-15 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 092cbc2124129..936d57ab7cc6b 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-08-13 +date: 2024-08-15 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 d6aba34b8969c..3cc245ee7766a 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index a3c9b92a91940..9702db387af5a 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index fd4d2a83a3d11..640e4bcf23982 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.devdocs.json b/api_docs/kbn_config_schema.devdocs.json index bf268d7f43e1e..409941bbe1c88 100644 --- a/api_docs/kbn_config_schema.devdocs.json +++ b/api_docs/kbn_config_schema.devdocs.json @@ -1056,7 +1056,7 @@ { "parentPluginId": "@kbn/config-schema", "id": "def-common.Type.internalSchema", - "type": "Object", + "type": "CompoundType", "tags": [ "type" ], @@ -1066,6 +1066,28 @@ ], "signature": [ "AnySchema", + " | ", + "ArraySchema", + " | ", + "AlternativesSchema", + " | ", + "BinarySchema", + " | ", + "BooleanSchema", + " | ", + "DateSchema", + " | ", + "FunctionSchema", + " | ", + "NumberSchema", + " | ", + "ObjectSchema", + " | ", + "StringSchema", + " | ", + "LinkSchema", + " | ", + "SymbolSchema", "" ], "path": "packages/kbn-config-schema/src/types/type.ts", @@ -1089,12 +1111,12 @@ { "parentPluginId": "@kbn/config-schema", "id": "def-common.Type.Unnamed.$1", - "type": "Object", + "type": "CompoundType", "tags": [], "label": "schema", "description": [], "signature": [ - "AnySchema", + "Schema", "" ], "path": "packages/kbn-config-schema/src/types/type.ts", @@ -1268,7 +1290,7 @@ "description": [], "signature": [ "() => ", - "AnySchema", + "Schema", "" ], "path": "packages/kbn-config-schema/src/types/type.ts", diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index bfb0e14c27cb7..6a773925e067c 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-08-13 +date: 2024-08-15 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 2d18ef4ddc5a3..437a73729733e 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-08-13 +date: 2024-08-15 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_favorites_public.devdocs.json b/api_docs/kbn_content_management_favorites_public.devdocs.json new file mode 100644 index 0000000000000..9d7837ee1cfd2 --- /dev/null +++ b/api_docs/kbn_content_management_favorites_public.devdocs.json @@ -0,0 +1,702 @@ +{ + "id": "@kbn/content-management-favorites-public", + "client": { + "classes": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClient", + "type": "Class", + "tags": [], + "label": "FavoritesClient", + "description": [], + "signature": [ + { + "pluginId": "@kbn/content-management-favorites-public", + "scope": "public", + "docId": "kibKbnContentManagementFavoritesPublicPluginApi", + "section": "def-public.FavoritesClient", + "text": "FavoritesClient" + }, + " implements ", + { + "pluginId": "@kbn/content-management-favorites-public", + "scope": "public", + "docId": "kibKbnContentManagementFavoritesPublicPluginApi", + "section": "def-public.FavoritesClientPublic", + "text": "FavoritesClientPublic" + } + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClient.Unnamed", + "type": "Function", + "tags": [], + "label": "Constructor", + "description": [], + "signature": [ + "any" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClient.Unnamed.$1", + "type": "string", + "tags": [], + "label": "favoriteObjectType", + "description": [], + "signature": [ + "string" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClient.Unnamed.$2", + "type": "Object", + "tags": [], + "label": "deps", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClient.Unnamed.$2.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "public", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-public.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClient.getFavorites", + "type": "Function", + "tags": [], + "label": "getFavorites", + "description": [], + "signature": [ + "() => Promise<", + { + "pluginId": "@kbn/content-management-favorites-server", + "scope": "server", + "docId": "kibKbnContentManagementFavoritesServerPluginApi", + "section": "def-server.GetFavoritesResponse", + "text": "GetFavoritesResponse" + }, + ">" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClient.addFavorite", + "type": "Function", + "tags": [], + "label": "addFavorite", + "description": [], + "signature": [ + "({ id }: { id: string; }) => Promise<", + { + "pluginId": "@kbn/content-management-favorites-server", + "scope": "server", + "docId": "kibKbnContentManagementFavoritesServerPluginApi", + "section": "def-server.GetFavoritesResponse", + "text": "GetFavoritesResponse" + }, + ">" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClient.addFavorite.$1", + "type": "Object", + "tags": [], + "label": "{ id }", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClient.addFavorite.$1.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClient.removeFavorite", + "type": "Function", + "tags": [], + "label": "removeFavorite", + "description": [], + "signature": [ + "({ id }: { id: string; }) => Promise<", + { + "pluginId": "@kbn/content-management-favorites-server", + "scope": "server", + "docId": "kibKbnContentManagementFavoritesServerPluginApi", + "section": "def-server.GetFavoritesResponse", + "text": "GetFavoritesResponse" + }, + ">" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClient.removeFavorite.$1", + "type": "Object", + "tags": [], + "label": "{ id }", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClient.removeFavorite.$1.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClient.getFavoriteType", + "type": "Function", + "tags": [], + "label": "getFavoriteType", + "description": [], + "signature": [ + "() => string" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "functions": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.cssFavoriteHoverWithinEuiTableRow", + "type": "Function", + "tags": [], + "label": "cssFavoriteHoverWithinEuiTableRow", + "description": [ + "\nCSS to apply to euiTable to show the favorite button on hover or when active" + ], + "signature": [ + "(euiTheme: ", + "EuiThemeComputed", + "<{}>) => ", + "SerializedStyles" + ], + "path": "packages/content-management/favorites/favorites_public/src/components/favorite_button.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.cssFavoriteHoverWithinEuiTableRow.$1", + "type": "CompoundType", + "tags": [], + "label": "euiTheme", + "description": [], + "signature": [ + "EuiThemeComputed", + "<{}>" + ], + "path": "packages/content-management/favorites/favorites_public/src/components/favorite_button.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoriteButton", + "type": "Function", + "tags": [], + "label": "FavoriteButton", + "description": [], + "signature": [ + "({ id, className }: ", + { + "pluginId": "@kbn/content-management-favorites-public", + "scope": "public", + "docId": "kibKbnContentManagementFavoritesPublicPluginApi", + "section": "def-public.FavoriteButtonProps", + "text": "FavoriteButtonProps" + }, + ") => JSX.Element | null" + ], + "path": "packages/content-management/favorites/favorites_public/src/components/favorite_button.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoriteButton.$1", + "type": "Object", + "tags": [], + "label": "{ id, className }", + "description": [], + "signature": [ + { + "pluginId": "@kbn/content-management-favorites-public", + "scope": "public", + "docId": "kibKbnContentManagementFavoritesPublicPluginApi", + "section": "def-public.FavoriteButtonProps", + "text": "FavoriteButtonProps" + } + ], + "path": "packages/content-management/favorites/favorites_public/src/components/favorite_button.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesContextProvider", + "type": "Function", + "tags": [], + "label": "FavoritesContextProvider", + "description": [], + "signature": [ + "({ favoritesClient, notifyError, children, }: React.PropsWithChildren) => JSX.Element" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_context.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesContextProvider.$1", + "type": "CompoundType", + "tags": [], + "label": "{\n favoritesClient,\n notifyError,\n children,\n}", + "description": [], + "signature": [ + "React.PropsWithChildren" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_context.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesEmptyState", + "type": "Function", + "tags": [], + "label": "FavoritesEmptyState", + "description": [], + "signature": [ + "({ emptyStateType, entityNamePlural, entityName, }: { emptyStateType: \"noItems\" | \"noMatchingItems\"; entityNamePlural?: string | undefined; entityName?: string | undefined; }) => JSX.Element" + ], + "path": "packages/content-management/favorites/favorites_public/src/components/favorites_empty_state.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesEmptyState.$1", + "type": "Object", + "tags": [], + "label": "{\n emptyStateType = 'noItems',\n entityNamePlural = i18n.translate('contentManagement.favorites.defaultEntityNamePlural', {\n defaultMessage: 'items',\n }),\n entityName = i18n.translate('contentManagement.favorites.defaultEntityName', {\n defaultMessage: 'item',\n }),\n}", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/components/favorites_empty_state.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesEmptyState.$1.emptyStateType", + "type": "CompoundType", + "tags": [], + "label": "emptyStateType", + "description": [], + "signature": [ + "\"noItems\" | \"noMatchingItems\"" + ], + "path": "packages/content-management/favorites/favorites_public/src/components/favorites_empty_state.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesEmptyState.$1.entityNamePlural", + "type": "string", + "tags": [], + "label": "entityNamePlural", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/content-management/favorites/favorites_public/src/components/favorites_empty_state.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesEmptyState.$1.entityName", + "type": "string", + "tags": [], + "label": "entityName", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/content-management/favorites/favorites_public/src/components/favorites_empty_state.tsx", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.useFavorites", + "type": "Function", + "tags": [], + "label": "useFavorites", + "description": [], + "signature": [ + "({ enabled }?: { enabled?: boolean | undefined; }) => ", + "UseQueryResult", + "<", + { + "pluginId": "@kbn/content-management-favorites-server", + "scope": "server", + "docId": "kibKbnContentManagementFavoritesServerPluginApi", + "section": "def-server.GetFavoritesResponse", + "text": "GetFavoritesResponse" + }, + ", unknown>" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_query.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.useFavorites.$1", + "type": "Object", + "tags": [], + "label": "{ enabled = true }", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/favorites_query.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.useFavorites.$1.enabled", + "type": "CompoundType", + "tags": [], + "label": "enabled", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_query.tsx", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoriteButtonProps", + "type": "Interface", + "tags": [], + "label": "FavoriteButtonProps", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/components/favorite_button.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoriteButtonProps.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/components/favorite_button.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoriteButtonProps.className", + "type": "string", + "tags": [], + "label": "className", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/content-management/favorites/favorites_public/src/components/favorite_button.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClientPublic", + "type": "Interface", + "tags": [], + "label": "FavoritesClientPublic", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClientPublic.getFavorites", + "type": "Function", + "tags": [], + "label": "getFavorites", + "description": [], + "signature": [ + "() => Promise<", + { + "pluginId": "@kbn/content-management-favorites-server", + "scope": "server", + "docId": "kibKbnContentManagementFavoritesServerPluginApi", + "section": "def-server.GetFavoritesResponse", + "text": "GetFavoritesResponse" + }, + ">" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClientPublic.addFavorite", + "type": "Function", + "tags": [], + "label": "addFavorite", + "description": [], + "signature": [ + "({ id }: { id: string; }) => Promise<", + { + "pluginId": "@kbn/content-management-favorites-server", + "scope": "server", + "docId": "kibKbnContentManagementFavoritesServerPluginApi", + "section": "def-server.GetFavoritesResponse", + "text": "GetFavoritesResponse" + }, + ">" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClientPublic.addFavorite.$1", + "type": "Object", + "tags": [], + "label": "{ id }", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClientPublic.addFavorite.$1.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClientPublic.removeFavorite", + "type": "Function", + "tags": [], + "label": "removeFavorite", + "description": [], + "signature": [ + "({ id }: { id: string; }) => Promise<", + { + "pluginId": "@kbn/content-management-favorites-server", + "scope": "server", + "docId": "kibKbnContentManagementFavoritesServerPluginApi", + "section": "def-server.GetFavoritesResponse", + "text": "GetFavoritesResponse" + }, + ">" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClientPublic.removeFavorite.$1", + "type": "Object", + "tags": [], + "label": "{ id }", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClientPublic.removeFavorite.$1.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/content-management-favorites-public", + "id": "def-public.FavoritesClientPublic.getFavoriteType", + "type": "Function", + "tags": [], + "label": "getFavoriteType", + "description": [], + "signature": [ + "() => string" + ], + "path": "packages/content-management/favorites/favorites_public/src/favorites_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_content_management_favorites_public.mdx b/api_docs/kbn_content_management_favorites_public.mdx new file mode 100644 index 0000000000000..60674defb8cc7 --- /dev/null +++ b/api_docs/kbn_content_management_favorites_public.mdx @@ -0,0 +1,36 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnContentManagementFavoritesPublicPluginApi +slug: /kibana-dev-docs/api/kbn-content-management-favorites-public +title: "@kbn/content-management-favorites-public" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/content-management-favorites-public plugin +date: 2024-08-15 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-favorites-public'] +--- +import kbnContentManagementFavoritesPublicObj from './kbn_content_management_favorites_public.devdocs.json'; + + + +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 39 | 0 | 38 | 0 | + +## Client + +### Functions + + +### Classes + + +### Interfaces + + diff --git a/api_docs/kbn_content_management_favorites_server.devdocs.json b/api_docs/kbn_content_management_favorites_server.devdocs.json new file mode 100644 index 0000000000000..2ddd581cc7caa --- /dev/null +++ b/api_docs/kbn_content_management_favorites_server.devdocs.json @@ -0,0 +1,145 @@ +{ + "id": "@kbn/content-management-favorites-server", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [ + { + "parentPluginId": "@kbn/content-management-favorites-server", + "id": "def-server.registerFavorites", + "type": "Function", + "tags": [], + "label": "registerFavorites", + "description": [], + "signature": [ + "({ logger, core }: { core: ", + { + "pluginId": "@kbn/core-lifecycle-server", + "scope": "server", + "docId": "kibKbnCoreLifecycleServerPluginApi", + "section": "def-server.CoreSetup", + "text": "CoreSetup" + }, + "; logger: ", + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.Logger", + "text": "Logger" + }, + "; }) => void" + ], + "path": "packages/content-management/favorites/favorites_server/src/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-server", + "id": "def-server.registerFavorites.$1", + "type": "Object", + "tags": [], + "label": "{ logger, core }", + "description": [], + "path": "packages/content-management/favorites/favorites_server/src/index.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-server", + "id": "def-server.registerFavorites.$1.core", + "type": "Object", + "tags": [], + "label": "core", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-lifecycle-server", + "scope": "server", + "docId": "kibKbnCoreLifecycleServerPluginApi", + "section": "def-server.CoreSetup", + "text": "CoreSetup" + }, + "" + ], + "path": "packages/content-management/favorites/favorites_server/src/index.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/content-management-favorites-server", + "id": "def-server.registerFavorites.$1.logger", + "type": "Object", + "tags": [], + "label": "logger", + "description": [], + "signature": [ + { + "pluginId": "@kbn/logging", + "scope": "common", + "docId": "kibKbnLoggingPluginApi", + "section": "def-common.Logger", + "text": "Logger" + } + ], + "path": "packages/content-management/favorites/favorites_server/src/index.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + } + ], + "interfaces": [ + { + "parentPluginId": "@kbn/content-management-favorites-server", + "id": "def-server.GetFavoritesResponse", + "type": "Interface", + "tags": [], + "label": "GetFavoritesResponse", + "description": [], + "path": "packages/content-management/favorites/favorites_server/src/favorites_routes.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/content-management-favorites-server", + "id": "def-server.GetFavoritesResponse.favoriteIds", + "type": "Array", + "tags": [], + "label": "favoriteIds", + "description": [], + "signature": [ + "string[]" + ], + "path": "packages/content-management/favorites/favorites_server/src/favorites_routes.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_content_management_favorites_server.mdx b/api_docs/kbn_content_management_favorites_server.mdx new file mode 100644 index 0000000000000..ed434dd604b14 --- /dev/null +++ b/api_docs/kbn_content_management_favorites_server.mdx @@ -0,0 +1,33 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnContentManagementFavoritesServerPluginApi +slug: /kibana-dev-docs/api/kbn-content-management-favorites-server +title: "@kbn/content-management-favorites-server" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/content-management-favorites-server plugin +date: 2024-08-15 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-favorites-server'] +--- +import kbnContentManagementFavoritesServerObj from './kbn_content_management_favorites_server.devdocs.json'; + + + +Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 6 | 0 | 6 | 0 | + +## Server + +### Functions + + +### Interfaces + + 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 1169d45d35f32..de3424174fe9c 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-08-13 +date: 2024-08-15 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 5369bd27e1c9b..5831583a11c32 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-08-13 +date: 2024-08-15 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 79ab293f3e5a6..f632f313075a5 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_content_management_table_list_view_table.devdocs.json index 62a0a06a9bdd3..4159e15e02447 100644 --- a/api_docs/kbn_content_management_table_list_view_table.devdocs.json +++ b/api_docs/kbn_content_management_table_list_view_table.devdocs.json @@ -325,6 +325,29 @@ "trackAdoption": false } ] + }, + { + "parentPluginId": "@kbn/content-management-table-list-view-table", + "id": "def-public.TableListViewKibanaDependencies.favorites", + "type": "Object", + "tags": [], + "label": "favorites", + "description": [ + "\nThe favorites client to enable the favorites feature." + ], + "signature": [ + { + "pluginId": "@kbn/content-management-favorites-public", + "scope": "public", + "docId": "kibKbnContentManagementFavoritesPublicPluginApi", + "section": "def-public.FavoritesClientPublic", + "text": "FavoritesClientPublic" + }, + " | undefined" + ], + "path": "packages/content-management/table_list_view_table/src/services.tsx", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false 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 c26cfd260e21a..988b7c66dcfa5 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] --- import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 49 | 0 | 33 | 3 | +| 50 | 0 | 33 | 3 | ## Client diff --git a/api_docs/kbn_content_management_user_profiles.mdx b/api_docs/kbn_content_management_user_profiles.mdx index f6d19803316c2..2a56bbd371dfd 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-08-13 +date: 2024-08-15 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 c94d244872be4..6bd715094701d 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-08-13 +date: 2024-08-15 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 be420264c5a57..9fe1b7bb34f1e 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-08-13 +date: 2024-08-15 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 b10005daba4ba..585fc02c35f33 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-08-13 +date: 2024-08-15 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 324802bc0b7d6..42b420b74320f 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-08-13 +date: 2024-08-15 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 af52877a69a8a..a4ffdb2eecc4b 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-08-13 +date: 2024-08-15 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 76ca2cb51b4ca..db9a5802d8829 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-08-13 +date: 2024-08-15 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 734c564f9c7b4..5520f2e12714a 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-08-13 +date: 2024-08-15 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 b7fe1816900ca..24811235ab208 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-08-13 +date: 2024-08-15 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 f67becd25697c..4258e7e1367b5 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-08-13 +date: 2024-08-15 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 ca61572cd06cc..d4805afd8a0bf 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-08-13 +date: 2024-08-15 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 3ef1c708d0615..a905054f86ae6 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-08-13 +date: 2024-08-15 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 2376b136fbcfc..c0236806cea00 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-08-13 +date: 2024-08-15 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 5383f1b4c2a39..163baff216a3b 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-08-13 +date: 2024-08-15 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 2c940027278ed..27188981b0304 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-08-13 +date: 2024-08-15 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 8a69dbbc38169..a9c4e4c159614 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-08-13 +date: 2024-08-15 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 1bf3f3f2a9a97..d669c6ce0d2fe 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-08-13 +date: 2024-08-15 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 b307253dacc98..32469b9a342b9 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-08-13 +date: 2024-08-15 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.mdx b/api_docs/kbn_core_base_server_mocks.mdx index 94c3fd6edbbe3..f4aca90c7e8bc 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-08-13 +date: 2024-08-15 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 d83ad3a9635b8..03dc80220fc71 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-08-13 +date: 2024-08-15 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 56868728c7663..c2c27cc508954 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-08-13 +date: 2024-08-15 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 b3ac4cb0ed24b..36a20daf2dae2 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-08-13 +date: 2024-08-15 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 ad0c4ccb4d47f..5e0d6eef8eade 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-08-13 +date: 2024-08-15 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 adbadae65dcf3..1c7235ab59ab2 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-08-13 +date: 2024-08-15 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 fec37d30512fa..09d587ee6a742 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-08-13 +date: 2024-08-15 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.mdx b/api_docs/kbn_core_config_server_internal.mdx index 88e7c1dd66f08..29d716b7ee7ae 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-08-13 +date: 2024-08-15 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 92d611ac1ae1e..9f7d9e5c52c68 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-08-13 +date: 2024-08-15 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 c78fa715a805a..26d2bc7acb8f6 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-08-13 +date: 2024-08-15 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 829ece52c2ffd..dc107a236e79d 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-08-13 +date: 2024-08-15 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 ab092edf05e98..31955a7d57531 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-08-13 +date: 2024-08-15 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 3102462837689..db1361bd25ee2 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-08-13 +date: 2024-08-15 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 48c2992125ea2..4bd9975550e77 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-08-13 +date: 2024-08-15 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 97f7c02fdb485..0afe7bf3b4bf2 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-08-13 +date: 2024-08-15 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 886f6ec68b166..63508664c0b36 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-08-13 +date: 2024-08-15 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 5f8f961b0bddc..45417f97145d6 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-08-13 +date: 2024-08-15 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 49d336af1c95c..ba05df095cbf4 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-08-13 +date: 2024-08-15 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 adba87eccbc24..b4f0ab5cc733e 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-08-13 +date: 2024-08-15 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 4a87bf68b7e15..1cbab0e962a99 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-08-13 +date: 2024-08-15 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 3a58b33389d3b..460c50524de17 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-08-13 +date: 2024-08-15 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 e871f173424ca..c4dbe8e0c15ef 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-08-13 +date: 2024-08-15 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 06c32e4c8d3cb..511dd09f5ed2a 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-08-13 +date: 2024-08-15 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 f33965e2c26e1..de80940d3b04e 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-08-13 +date: 2024-08-15 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 65980f0f2328e..568f7e531a431 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-08-13 +date: 2024-08-15 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 e4f99058797a5..8f714a161dc9c 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-08-13 +date: 2024-08-15 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 c05a164248f74..aa85932951c1c 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-08-13 +date: 2024-08-15 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 9370059001d6a..4251a25631dd8 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-08-13 +date: 2024-08-15 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 98a478c7c2378..23d11920aec2f 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-08-13 +date: 2024-08-15 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 9ae0e73f8f2bc..a12fcedb6c572 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-08-13 +date: 2024-08-15 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 e8c0cc581eaec..b27242b0314b2 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-08-13 +date: 2024-08-15 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 4837d9d2b45c9..6f653fd811763 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-08-13 +date: 2024-08-15 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 1b2482574ce83..0316c8ebc01ba 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-08-13 +date: 2024-08-15 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 fc0b4d9bae024..be47bdee7196d 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-08-13 +date: 2024-08-15 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 1a62c026525cf..b984ab56aefbb 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-08-13 +date: 2024-08-15 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 d7d3211501ace..7cd5ce73a5a6b 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-08-13 +date: 2024-08-15 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 9b72d67c10b66..6c61641da4e65 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-08-13 +date: 2024-08-15 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 a85ba35ceb70f..1f15f50c89e33 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-08-13 +date: 2024-08-15 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 763074f6a7dbe..0fc620c849f9b 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-08-13 +date: 2024-08-15 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 3455462bce96f..0453318f8938e 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-08-13 +date: 2024-08-15 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 231c15570f3fc..07040d76239a4 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-08-13 +date: 2024-08-15 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 7c96aa26fbdab..7a96167de4a91 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-08-13 +date: 2024-08-15 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 78723341ccb82..65ba45aa291f6 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-08-13 +date: 2024-08-15 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 56f6f1acd5885..bd18a7f10523c 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-08-13 +date: 2024-08-15 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 378f84cf0730a..3d355d9c42bc0 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-08-13 +date: 2024-08-15 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 8a5444d376acb..594ffeaa48884 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-08-13 +date: 2024-08-15 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 c7c9fde2d9515..7c01d1b4a4352 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-08-13 +date: 2024-08-15 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 fc94c59176960..8521e80353e5b 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-08-13 +date: 2024-08-15 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 3f01ff71c8c35..18bba970f69f8 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-08-13 +date: 2024-08-15 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 9338818e39293..74ad66217992c 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-08-13 +date: 2024-08-15 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 646ff4e7cf130..957ef9a30cbbd 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-08-13 +date: 2024-08-15 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 b2455165b8527..40955486aa66e 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-08-13 +date: 2024-08-15 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 9e6d054eae56d..13063069da100 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-08-13 +date: 2024-08-15 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 cc5185b0ceb81..ed5a5ef7e30bb 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -3698,6 +3698,10 @@ "plugin": "actions", "path": "x-pack/plugins/actions/server/routes/legacy/list_action_types.ts" }, + { + "plugin": "@kbn/content-management-favorites-server", + "path": "packages/content-management/favorites/favorites_server/src/favorites_routes.ts" + }, { "plugin": "share", "path": "src/plugins/share/server/url_service/http/short_urls/register_get_route.ts" @@ -6360,6 +6364,14 @@ "plugin": "actions", "path": "x-pack/plugins/actions/server/routes/get_global_execution_kpi.ts" }, + { + "plugin": "@kbn/content-management-favorites-server", + "path": "packages/content-management/favorites/favorites_server/src/favorites_routes.ts" + }, + { + "plugin": "@kbn/content-management-favorites-server", + "path": "packages/content-management/favorites/favorites_server/src/favorites_routes.ts" + }, { "plugin": "contentManagement", "path": "src/plugins/content_management/server/rpc/routes/routes.ts" @@ -7384,10 +7396,6 @@ "plugin": "contentManagement", "path": "src/plugins/content_management/server/plugin.test.ts" }, - { - "plugin": "contentManagement", - "path": "src/plugins/content_management/server/plugin.test.ts" - }, { "plugin": "dataViewManagement", "path": "src/plugins/data_view_management/server/routes/preview_scripted_field.ts" @@ -8594,6 +8602,10 @@ "plugin": "observability", "path": "x-pack/plugins/observability_solution/observability/server/lib/annotations/register_annotation_apis.ts" }, + { + "plugin": "logsShared", + "path": "x-pack/plugins/observability_solution/logs_shared/server/routes/deprecations/migrate_log_view_settings.ts" + }, { "plugin": "enterpriseSearch", "path": "x-pack/plugins/enterprise_search/server/routes/enterprise_search/crawler/crawler_extraction_rules.ts" diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 454e27dd989ec..cc10e6f5ac551 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_core_http_server_internal.devdocs.json index 255b6d7785d10..836cd9c2eff11 100644 --- a/api_docs/kbn_core_http_server_internal.devdocs.json +++ b/api_docs/kbn_core_http_server_internal.devdocs.json @@ -1470,7 +1470,7 @@ "label": "HttpConfigType", "description": [], "signature": [ - "{ readonly uuid?: string | undefined; readonly basePath?: string | undefined; readonly publicBaseUrl?: string | undefined; readonly name: string; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; redirectHttpFromPort?: number | undefined; } & { enabled: boolean; keystore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; truststore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; readonly host: string; readonly http2: Readonly<{} & { allowUnsecure: boolean; }>; readonly protocol: \"http1\" | \"http2\"; readonly port: number; readonly compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; readonly cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; readonly versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; readonly autoListen: boolean; readonly shutdownTimeout: moment.Duration; readonly cdn: Readonly<{ url?: string | null | undefined; } & {}>; readonly oas: Readonly<{} & { enabled: boolean; }>; readonly securityResponseHeaders: Readonly<{ permissionsPolicyReportOnly?: string | null | undefined; } & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; readonly customResponseHeaders: Record; readonly maxPayload: ", + "{ readonly uuid?: string | undefined; readonly basePath?: string | undefined; readonly publicBaseUrl?: string | undefined; readonly name: string; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; redirectHttpFromPort?: number | undefined; } & { enabled: boolean; keystore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; truststore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"required\" | \"optional\"; }>; readonly host: string; readonly http2: Readonly<{} & { allowUnsecure: boolean; }>; readonly protocol: \"http1\" | \"http2\"; readonly port: number; readonly compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; readonly cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; readonly versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; readonly autoListen: boolean; readonly shutdownTimeout: moment.Duration; readonly cdn: Readonly<{ url?: string | null | undefined; } & {}>; readonly oas: Readonly<{} & { enabled: boolean; }>; readonly securityResponseHeaders: Readonly<{ permissionsPolicyReportOnly?: string | null | undefined; } & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; readonly customResponseHeaders: Record; readonly maxPayload: ", { "pluginId": "@kbn/config-schema", "scope": "common", diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 6bca3cec91dd5..c0894045efbbf 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_core_http_server_mocks.devdocs.json index 085616047e523..235e68eaeb05e 100644 --- a/api_docs/kbn_core_http_server_mocks.devdocs.json +++ b/api_docs/kbn_core_http_server_mocks.devdocs.json @@ -19,7 +19,7 @@ "label": "createConfigService", "description": [], "signature": [ - "({ server, externalUrl, csp, }?: Partial<{ server: Partial; truststore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; host: string; http2: Readonly<{} & { allowUnsecure: boolean; }>; protocol: \"http1\" | \"http2\"; port: number; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; cdn: Readonly<{ url?: string | null | undefined; } & {}>; oas: Readonly<{} & { enabled: boolean; }>; securityResponseHeaders: Readonly<{ permissionsPolicyReportOnly?: string | null | undefined; } & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", + "({ server, externalUrl, csp, }?: Partial<{ server: Partial; truststore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"required\" | \"optional\"; }>; host: string; http2: Readonly<{} & { allowUnsecure: boolean; }>; protocol: \"http1\" | \"http2\"; port: number; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; cdn: Readonly<{ url?: string | null | undefined; } & {}>; oas: Readonly<{} & { enabled: boolean; }>; securityResponseHeaders: Readonly<{ permissionsPolicyReportOnly?: string | null | undefined; } & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -56,7 +56,7 @@ "label": "{\n server,\n externalUrl,\n csp,\n}", "description": [], "signature": [ - "Partial<{ server: Partial; truststore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; host: string; http2: Readonly<{} & { allowUnsecure: boolean; }>; protocol: \"http1\" | \"http2\"; port: number; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; cdn: Readonly<{ url?: string | null | undefined; } & {}>; oas: Readonly<{} & { enabled: boolean; }>; securityResponseHeaders: Readonly<{ permissionsPolicyReportOnly?: string | null | undefined; } & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", + "Partial<{ server: Partial; truststore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"required\" | \"optional\"; }>; host: string; http2: Readonly<{} & { allowUnsecure: boolean; }>; protocol: \"http1\" | \"http2\"; port: number; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; cdn: Readonly<{ url?: string | null | undefined; } & {}>; oas: Readonly<{} & { enabled: boolean; }>; securityResponseHeaders: Readonly<{ permissionsPolicyReportOnly?: string | null | undefined; } & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", { "pluginId": "@kbn/config-schema", "scope": "common", diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index 0a5bb5b866858..57b699a217657 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-08-13 +date: 2024-08-15 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 9b529d5e61c90..6e7ea960f7d22 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-08-13 +date: 2024-08-15 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 d14289cd2f0b9..c7aa26cd32651 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-08-13 +date: 2024-08-15 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 501a63ab0b81d..ae5ab23e9ca02 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-08-13 +date: 2024-08-15 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 9bde7aeb989bc..30724f650911c 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-08-13 +date: 2024-08-15 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 1561b5ae61336..32dd050ab70cf 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-08-13 +date: 2024-08-15 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 f30aa23213eb9..c20767d1c7bb5 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-08-13 +date: 2024-08-15 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 c92240965c8a0..a5a16eab25bee 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-08-13 +date: 2024-08-15 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 32a5bd62e9ea1..979166f9c11ed 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-08-13 +date: 2024-08-15 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 c37343354d95e..d7c11d27d31eb 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-08-13 +date: 2024-08-15 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 f58209823d2a0..41912a18a7bfe 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-08-13 +date: 2024-08-15 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 b144eef1a6ea0..9dd1dd3acddd4 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-08-13 +date: 2024-08-15 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 100635dcdeb68..ce5b95c549585 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-08-13 +date: 2024-08-15 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 161bf511477e0..9255162360c38 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-08-13 +date: 2024-08-15 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 acf081afd6581..9050ce43abf80 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-08-13 +date: 2024-08-15 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 6425469eaa51b..678266d01f408 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-08-13 +date: 2024-08-15 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 95ba2dea60654..1ad13b66d6456 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-08-13 +date: 2024-08-15 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 e5aea7db502a5..6593541071bf1 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-08-13 +date: 2024-08-15 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 d6575061d2322..1d3acfc1f43ef 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-08-13 +date: 2024-08-15 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 24e1a3b7ec3af..c924a510cee15 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-08-13 +date: 2024-08-15 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 06b7f6d63f75e..8516531054d93 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-08-13 +date: 2024-08-15 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 123c9cfd0e669..315ca60ee7491 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-08-13 +date: 2024-08-15 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 b6d81db6726a0..bbb1073f9f502 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-08-13 +date: 2024-08-15 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 a540b585b8554..72f9287621785 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-08-13 +date: 2024-08-15 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 8496f68d59dc0..8730ba1a3a584 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-08-13 +date: 2024-08-15 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 b72f508c3482c..9807d6670255e 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-08-13 +date: 2024-08-15 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 513f2fe5d4813..38f998c178a7a 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-08-13 +date: 2024-08-15 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 8eb69e23d84b4..be3d3249c6895 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-08-13 +date: 2024-08-15 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 72401fa521683..3652c9510d8ec 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-08-13 +date: 2024-08-15 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 013d6853afe9b..21e1c3fe17293 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-08-13 +date: 2024-08-15 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.mdx b/api_docs/kbn_core_overlays_browser.mdx index b3c9990dc89d9..ca12fd4740bef 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-08-13 +date: 2024-08-15 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 57e645d0ac1c6..d0997424d08d0 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-08-13 +date: 2024-08-15 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 d2b7194698d72..e625bf751cbaf 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-08-13 +date: 2024-08-15 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.mdx b/api_docs/kbn_core_plugins_browser.mdx index ca9a39a8ae3af..f27b5910fe6f6 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-08-13 +date: 2024-08-15 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.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index e656d8c02d3fd..d785f5aea36c6 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-08-13 +date: 2024-08-15 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 a57ee698049e2..1e49cb09b7738 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-08-13 +date: 2024-08-15 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 a760f2570d319..5def6b77f19de 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-08-13 +date: 2024-08-15 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.mdx b/api_docs/kbn_core_plugins_server.mdx index 9c5613e4c6f3b..56ecb856b4703 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-08-13 +date: 2024-08-15 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 3ada523d295f9..66806e68e60df 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-08-13 +date: 2024-08-15 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 8eb0068159a47..f72f88c4ee9d2 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-08-13 +date: 2024-08-15 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 1f50c5380f86a..69387391124ce 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-08-13 +date: 2024-08-15 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 e57684f238b1e..aa0d580a7b072 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-08-13 +date: 2024-08-15 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 9af53f2ca4446..cf55716b6ea25 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-08-13 +date: 2024-08-15 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 43cde1bc25351..bda8cdcfc754b 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-08-13 +date: 2024-08-15 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.mdx b/api_docs/kbn_core_root_server_internal.mdx index f2f62cea816c1..98ddd1f3f18bf 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-08-13 +date: 2024-08-15 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 3b2901fba55c7..658f26d645529 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-08-13 +date: 2024-08-15 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 2464923855556..6641c50d5d763 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-08-13 +date: 2024-08-15 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 cbf4110956c7a..b18f6435b19a8 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-08-13 +date: 2024-08-15 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 fb9d0a1e2864e..96765b5c37180 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-08-13 +date: 2024-08-15 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 c256183580c98..b1265ca4603e3 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-08-13 +date: 2024-08-15 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 ab4bfcd5132fc..862d960d90e74 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-08-13 +date: 2024-08-15 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 32adc2847e7ce..41bac6c101ade 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-08-13 +date: 2024-08-15 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 d94162c91f7b6..13ca2ffd42aac 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-08-13 +date: 2024-08-15 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 1cef778cb8ac5..8bbf4bfe74cf2 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-08-13 +date: 2024-08-15 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 d88bca74f2e4a..5bbcc48abf9ef 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-08-13 +date: 2024-08-15 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 baf9abcda34f4..6717129be6f1e 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-08-13 +date: 2024-08-15 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 6161a810dc760..05f2375931e74 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-08-13 +date: 2024-08-15 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 5650b47721c31..796275c72efd0 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-08-13 +date: 2024-08-15 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 b58f4a9b18f35..4110f16924db5 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-08-13 +date: 2024-08-15 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 73ee7b3225f99..b394045ab54cf 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-08-13 +date: 2024-08-15 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 37b4a5e17e15d..3ec9286f045ba 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-08-13 +date: 2024-08-15 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 68b5bd587cdd5..c440cd03b4940 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-08-13 +date: 2024-08-15 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 e31700ac67a3f..36a80f84fd8e6 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-08-13 +date: 2024-08-15 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 32ee071a053f2..add8d93fd7210 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-08-13 +date: 2024-08-15 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 f259fc7665ddf..ba2c9890b6644 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-08-13 +date: 2024-08-15 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 a714b77455f1f..83f09922b8b41 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-08-13 +date: 2024-08-15 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 f4cf4b9a17716..56acb3d73e3f6 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-08-13 +date: 2024-08-15 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 e0a1572bc5a53..21fc77f8d9f4f 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-08-13 +date: 2024-08-15 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 127e1923fb734..572ace4ef0edb 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-08-13 +date: 2024-08-15 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 3334c22eb97e7..e356e651ae119 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-08-13 +date: 2024-08-15 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 38ff6e4cbfae3..f1ce47298ae15 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-08-13 +date: 2024-08-15 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 f030118ebec76..00b9cc40d48e2 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-08-13 +date: 2024-08-15 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 3fb30c8bc7704..0192ec25b301f 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-08-13 +date: 2024-08-15 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 509f07e997215..f8c86e17dc616 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-08-13 +date: 2024-08-15 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.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 7ca2adf366272..d417246949781 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-08-13 +date: 2024-08-15 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 9e2ff19a7d0b6..657df776244a4 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-08-13 +date: 2024-08-15 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 05149aa98d4dd..feb0266abb28a 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-08-13 +date: 2024-08-15 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 59273e2d9b0d9..27cf725d8fdaa 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-08-13 +date: 2024-08-15 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 bb3bdd6e7511f..263d7c396f3cf 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-08-13 +date: 2024-08-15 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 5cbb5993e2ed8..83325b855f2cf 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-08-13 +date: 2024-08-15 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 92b0d2347b772..3aa805d580146 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-08-13 +date: 2024-08-15 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 0d1b1cca82fa6..27fcf4534441c 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_core_ui_settings_browser.devdocs.json index c938dfe76cea1..4a500591da24b 100644 --- a/api_docs/kbn_core_ui_settings_browser.devdocs.json +++ b/api_docs/kbn_core_ui_settings_browser.devdocs.json @@ -597,7 +597,7 @@ "section": "def-common.GetUiSettingsContext", "text": "GetUiSettingsContext" }, - " | undefined) => Promise) | undefined; category?: string[] | undefined; metric?: { type: string; name: string; } | undefined; optionLabels?: Record | undefined; requiresPageReload?: boolean | undefined; readonly?: boolean | undefined; readonlyMode?: ", + " | undefined) => Promise) | undefined; category?: string[] | undefined; metric?: { type: string; name: string; } | undefined; readonly?: boolean | undefined; optionLabels?: Record | undefined; requiresPageReload?: boolean | undefined; readonlyMode?: ", { "pluginId": "@kbn/core-ui-settings-common", "scope": "common", diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index 609ea7ae47e43..c3b46d68158bd 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-08-13 +date: 2024-08-15 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 166d80f3487fb..b4dc479e50eec 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-08-13 +date: 2024-08-15 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 50d8a3111f856..3b24b6bd44168 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_core_ui_settings_common.devdocs.json index 83a41545ecaf4..7e6ddbebbc0c5 100644 --- a/api_docs/kbn_core_ui_settings_common.devdocs.json +++ b/api_docs/kbn_core_ui_settings_common.devdocs.json @@ -657,7 +657,7 @@ "\nUI element type to represent the settings." ], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"undefined\" | \"color\" | \"image\" | \"select\" | \"json\" | \"array\" | \"markdown\"" + "\"string\" | \"number\" | \"boolean\" | \"undefined\" | \"color\" | \"array\" | \"image\" | \"select\" | \"json\" | \"markdown\"" ], "path": "packages/core/ui-settings/core-ui-settings-common/src/ui_settings.ts", "deprecated": false, diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 57971b668ba1a..970e8be656de7 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-08-13 +date: 2024-08-15 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 345a4c47a9e5f..600d22ac8a7bd 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-08-13 +date: 2024-08-15 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.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index 0be932141af21..f700b3e2b5ae2 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-08-13 +date: 2024-08-15 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 d5694598379a4..efc8cd12ba44e 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_core_usage_data_server.devdocs.json index 3071e12fefa09..4ba0e9204206d 100644 --- a/api_docs/kbn_core_usage_data_server.devdocs.json +++ b/api_docs/kbn_core_usage_data_server.devdocs.json @@ -47,7 +47,7 @@ "label": "http", "description": [], "signature": [ - "{ basePathConfigured: boolean; maxPayloadInBytes: number; rewriteBasePath: boolean; keepaliveTimeout: number; socketTimeout: number; compression: { enabled: boolean; referrerWhitelistConfigured: boolean; }; xsrf: { disableProtection: boolean; allowlistConfigured: boolean; }; requestId: { allowFromAnyIp: boolean; ipAllowlistConfigured: boolean; }; ssl: { certificateAuthoritiesConfigured: boolean; certificateConfigured: boolean; cipherSuites: string[]; keyConfigured: boolean; keystoreConfigured: boolean; truststoreConfigured: boolean; redirectHttpFromPortConfigured: boolean; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }; securityResponseHeaders: { strictTransportSecurity: string; xContentTypeOptions: string; referrerPolicy: string; permissionsPolicyConfigured: boolean; disableEmbedding: boolean; crossOriginOpenerPolicy: string; }; }" + "{ basePathConfigured: boolean; maxPayloadInBytes: number; rewriteBasePath: boolean; keepaliveTimeout: number; socketTimeout: number; compression: { enabled: boolean; referrerWhitelistConfigured: boolean; }; xsrf: { disableProtection: boolean; allowlistConfigured: boolean; }; requestId: { allowFromAnyIp: boolean; ipAllowlistConfigured: boolean; }; ssl: { certificateAuthoritiesConfigured: boolean; certificateConfigured: boolean; cipherSuites: string[]; keyConfigured: boolean; keystoreConfigured: boolean; truststoreConfigured: boolean; redirectHttpFromPortConfigured: boolean; supportedProtocols: string[]; clientAuthentication: \"none\" | \"required\" | \"optional\"; }; securityResponseHeaders: { strictTransportSecurity: string; xContentTypeOptions: string; referrerPolicy: string; permissionsPolicyConfigured: boolean; disableEmbedding: boolean; crossOriginOpenerPolicy: string; }; }" ], "path": "packages/core/usage-data/core-usage-data-server/src/core_usage_data.ts", "deprecated": false, diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index 3ad37f27820cf..533c23b74dc27 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-08-13 +date: 2024-08-15 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 add7721e4acd7..fae397313e700 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-08-13 +date: 2024-08-15 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 96425600d436f..fac8740b8a65f 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-08-13 +date: 2024-08-15 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 730fff8139ebe..51e2fedac785c 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-08-13 +date: 2024-08-15 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 513cb7fa82b5f..4ab85cfb132d9 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-08-13 +date: 2024-08-15 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 df5812d5a1ca9..0e86960d5c88a 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-08-13 +date: 2024-08-15 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 48c6efb46861d..c2658dc24360f 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-08-13 +date: 2024-08-15 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 c1fb04e3ff2a5..cc54f960c0ed4 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-08-13 +date: 2024-08-15 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 bf74375d939a0..9c91ef028044a 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-08-13 +date: 2024-08-15 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 60b1cbf6dc364..8d2e2f9027481 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-08-13 +date: 2024-08-15 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 ca63b32a13e88..30ea82fcdf973 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-08-13 +date: 2024-08-15 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 01fb3562ed8db..411c6aa4bfd38 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-08-13 +date: 2024-08-15 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 14c7e16e2f50b..ba7caf225b077 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-08-13 +date: 2024-08-15 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 5ff6efb8f47ba..49014266640a0 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-08-13 +date: 2024-08-15 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 3d587a90914db..c9f86604d9fe6 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-08-13 +date: 2024-08-15 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 b9b134888c6fc..447ccd14c2695 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-08-13 +date: 2024-08-15 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 5780a8e006b21..3825ac55d2611 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-08-13 +date: 2024-08-15 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 416fce221a550..3c16ae4691a42 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-08-13 +date: 2024-08-15 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 51a652693d3fc..3d480bdc2573b 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-08-13 +date: 2024-08-15 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 53343bb44cd18..e146b1a6187bd 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-08-13 +date: 2024-08-15 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 b4bcbcfcca4e8..153195e7e9ddd 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-08-13 +date: 2024-08-15 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 340be6a423fe5..51a37cbbe08da 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-08-13 +date: 2024-08-15 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 2a5f5161e0c1a..0113e2cfc6fa2 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-08-13 +date: 2024-08-15 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 755f7fb0a4c3e..0889e48dc4201 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-08-13 +date: 2024-08-15 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 3895391e07aaf..c77fd008c1b13 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-08-13 +date: 2024-08-15 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 983687cc473b4..a57e9a0268b87 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-08-13 +date: 2024-08-15 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 d83f373770c4a..4a04b0593fea6 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-08-13 +date: 2024-08-15 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 e5048161c0914..cc63969ae07fa 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-08-13 +date: 2024-08-15 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 1b84d351fcf3f..2e5bf313c03b1 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-08-13 +date: 2024-08-15 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 66021cce05cba..d51f677efd393 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-08-13 +date: 2024-08-15 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 62a2f49c9b08d..cb779ae836302 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-08-13 +date: 2024-08-15 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 a96c52d674900..d0c0cd046fa0f 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-08-13 +date: 2024-08-15 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 68bbb081224fd..70d6fcfa2be6e 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-08-13 +date: 2024-08-15 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 eaf9f2ab82406..f9f6226b32931 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-08-13 +date: 2024-08-15 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 e00cb006fe341..1bc110494ab32 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-08-13 +date: 2024-08-15 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 58ba8b182a9c0..dd6da8022fc52 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-08-13 +date: 2024-08-15 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 e686df0c03e68..1ca06bf23c115 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-08-13 +date: 2024-08-15 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 05c299e2af3a7..a271495aa95f8 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-08-13 +date: 2024-08-15 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 613ccfb9d97d6..eae5a94bde335 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-08-13 +date: 2024-08-15 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 73bdd6f3fe45b..ce64f002fdfe5 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-08-13 +date: 2024-08-15 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 5ee137bd46c50..4729c4fe06840 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-08-13 +date: 2024-08-15 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 da728207f9fc7..28dbf01cf402d 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-08-13 +date: 2024-08-15 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 95901d9f55ea9..0b62bfd8d7afd 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-08-13 +date: 2024-08-15 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_tools.mdx b/api_docs/kbn_ebt_tools.mdx index 80274482552ef..af077931fc52f 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-08-13 +date: 2024-08-15 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 5567ea6a5bce7..4a8110f693268 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-08-13 +date: 2024-08-15 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 b1b1b3c78ef95..b339e159d99f8 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-08-13 +date: 2024-08-15 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 560b8133c3559..1da99b4b69f08 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-08-13 +date: 2024-08-15 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 a161eac32e14b..1ceb9433f4974 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_entities_schema.devdocs.json index 2d1ad602d26cc..ec4d41a68b2b7 100644 --- a/api_docs/kbn_entities_schema.devdocs.json +++ b/api_docs/kbn_entities_schema.devdocs.json @@ -119,7 +119,43 @@ "initialIsOpen": false } ], - "interfaces": [], + "interfaces": [ + { + "parentPluginId": "@kbn/entities-schema", + "id": "def-common.MetadataRecord", + "type": "Interface", + "tags": [], + "label": "MetadataRecord", + "description": [], + "path": "x-pack/packages/kbn-entities-schema/src/schema/entity.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/entities-schema", + "id": "def-common.MetadataRecord.Unnamed", + "type": "IndexSignature", + "tags": [], + "label": "[key: string]: string | string[] | MetadataRecord", + "description": [], + "signature": [ + "[key: string]: string | string[] | ", + { + "pluginId": "@kbn/entities-schema", + "scope": "common", + "docId": "kibKbnEntitiesSchemaPluginApi", + "section": "def-common.MetadataRecord", + "text": "MetadataRecord" + } + ], + "path": "x-pack/packages/kbn-entities-schema/src/schema/entity.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], "enums": [ { "parentPluginId": "@kbn/entities-schema", @@ -135,6 +171,36 @@ } ], "misc": [ + { + "parentPluginId": "@kbn/entities-schema", + "id": "def-common.CreateEntityDefinitionQuery", + "type": "Type", + "tags": [], + "label": "CreateEntityDefinitionQuery", + "description": [], + "signature": [ + "{ installOnly: boolean; }" + ], + "path": "x-pack/packages/kbn-entities-schema/src/rest_spec/create.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/entities-schema", + "id": "def-common.DeleteEntityDefinitionQuery", + "type": "Type", + "tags": [], + "label": "DeleteEntityDefinitionQuery", + "description": [], + "signature": [ + "{ deleteData?: boolean | undefined; }" + ], + "path": "x-pack/packages/kbn-entities-schema/src/rest_spec/delete.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/entities-schema", "id": "def-common.ENTITY_BASE_PREFIX", @@ -343,6 +409,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/entities-schema", + "id": "def-common.createEntityDefinitionQuerySchema", + "type": "Object", + "tags": [], + "label": "createEntityDefinitionQuerySchema", + "description": [], + "signature": [ + "Zod.ZodObject<{ installOnly: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { installOnly: boolean; }, { installOnly?: boolean | undefined; }>" + ], + "path": "x-pack/packages/kbn-entities-schema/src/rest_spec/create.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/entities-schema", "id": "def-common.deleteEntityDefinitionParamsSchema", @@ -403,6 +484,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/entities-schema", + "id": "def-common.entityBaseSchema", + "type": "Object", + "tags": [], + "label": "entityBaseSchema", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; type: Zod.ZodString; identityFields: Zod.ZodArray; displayName: Zod.ZodString; metrics: Zod.ZodRecord; definitionVersion: Zod.ZodString; schemaVersion: Zod.ZodString; definitionId: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; type: string; metrics: Record; displayName: string; identityFields: string[]; definitionVersion: string; schemaVersion: string; definitionId: string; }, { id: string; type: string; metrics: Record; displayName: string; identityFields: string[]; definitionVersion: string; schemaVersion: string; definitionId: string; }>" + ], + "path": "x-pack/packages/kbn-entities-schema/src/schema/entity.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/entities-schema", "id": "def-common.entityDefinitionSchema", @@ -482,7 +578,22 @@ "label": "entityHistorySchema", "description": [], "signature": [ - "Zod.ZodIntersection; displayName: Zod.ZodString; metrics: Zod.ZodRecord; }, \"strip\", Zod.ZodTypeAny, { id: string; metrics: Record; displayName: string; identityFields: string[]; }, { id: string; metrics: Record; displayName: string; identityFields: string[]; }>; }, { \"@timestamp\": Zod.ZodString; }>, \"strip\", Zod.ZodTypeAny, { \"@timestamp\": string; entity: { id: string; metrics: Record; displayName: string; identityFields: string[]; }; }, { \"@timestamp\": string; entity: { id: string; metrics: Record; displayName: string; identityFields: string[]; }; }>, Zod.ZodRecord>>" + "Zod.ZodIntersection; displayName: Zod.ZodString; metrics: Zod.ZodRecord; definitionVersion: Zod.ZodString; schemaVersion: Zod.ZodString; definitionId: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { id: string; type: string; metrics: Record; displayName: string; identityFields: string[]; definitionVersion: string; schemaVersion: string; definitionId: string; }, { id: string; type: string; metrics: Record; displayName: string; identityFields: string[]; definitionVersion: string; schemaVersion: string; definitionId: string; }>; }, \"strip\", Zod.ZodTypeAny, { '@timestamp': string; entity: { id: string; type: string; metrics: Record; displayName: string; identityFields: string[]; definitionVersion: string; schemaVersion: string; definitionId: string; }; }, { '@timestamp': string; entity: { id: string; type: string; metrics: Record; displayName: string; identityFields: string[]; definitionVersion: string; schemaVersion: string; definitionId: string; }; }>, Zod.ZodType>" + ], + "path": "x-pack/packages/kbn-entities-schema/src/schema/entity.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/entities-schema", + "id": "def-common.entityLatestSchema", + "type": "Object", + "tags": [], + "label": "entityLatestSchema", + "description": [], + "signature": [ + "Zod.ZodIntersection; displayName: Zod.ZodString; metrics: Zod.ZodRecord; definitionVersion: Zod.ZodString; schemaVersion: Zod.ZodString; definitionId: Zod.ZodString; }, { lastSeenTimestamp: Zod.ZodString; firstSeenTimestamp: Zod.ZodString; }>, \"strip\", Zod.ZodTypeAny, { id: string; type: string; metrics: Record; displayName: string; identityFields: string[]; definitionVersion: string; schemaVersion: string; definitionId: string; lastSeenTimestamp: string; firstSeenTimestamp: string; }, { id: string; type: string; metrics: Record; displayName: string; identityFields: string[]; definitionVersion: string; schemaVersion: string; definitionId: string; lastSeenTimestamp: string; firstSeenTimestamp: string; }>; }, \"strip\", Zod.ZodTypeAny, { entity: { id: string; type: string; metrics: Record; displayName: string; identityFields: string[]; definitionVersion: string; schemaVersion: string; definitionId: string; lastSeenTimestamp: string; firstSeenTimestamp: string; }; }, { entity: { id: string; type: string; metrics: Record; displayName: string; identityFields: string[]; definitionVersion: string; schemaVersion: string; definitionId: string; lastSeenTimestamp: string; firstSeenTimestamp: string; }; }>, Zod.ZodType>" ], "path": "x-pack/packages/kbn-entities-schema/src/schema/entity.ts", "deprecated": false, @@ -491,13 +602,13 @@ }, { "parentPluginId": "@kbn/entities-schema", - "id": "def-common.entitySummarySchema", + "id": "def-common.entityMetadataSchema", "type": "Object", "tags": [], - "label": "entitySummarySchema", + "label": "entityMetadataSchema", "description": [], "signature": [ - "Zod.ZodIntersection; displayName: Zod.ZodString; metrics: Zod.ZodRecord; }, \"strip\", Zod.ZodTypeAny, { id: string; metrics: Record; displayName: string; identityFields: string[]; }, { id: string; metrics: Record; displayName: string; identityFields: string[]; }>; }, { lastSeenTimestamp: Zod.ZodString; firstSeenTimestamp: Zod.ZodString; }>, \"strip\", Zod.ZodTypeAny, { entity: { id: string; metrics: Record; displayName: string; identityFields: string[]; }; lastSeenTimestamp: string; firstSeenTimestamp: string; }, { entity: { id: string; metrics: Record; displayName: string; identityFields: string[]; }; lastSeenTimestamp: string; firstSeenTimestamp: string; }>, Zod.ZodRecord>>" + "Zod.ZodType" ], "path": "x-pack/packages/kbn-entities-schema/src/schema/entity.ts", "deprecated": false, diff --git a/api_docs/kbn_entities_schema.mdx b/api_docs/kbn_entities_schema.mdx index 6e73310b002c1..68aaf59a832c6 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/entities-schema'] --- import kbnEntitiesSchemaObj from './kbn_entities_schema.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-entities](https://github.com/orgs/elastic/teams/obs-entiti | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 34 | 0 | 34 | 0 | +| 41 | 0 | 41 | 0 | ## Common @@ -31,6 +31,9 @@ Contact [@elastic/obs-entities](https://github.com/orgs/elastic/teams/obs-entiti ### Functions +### Interfaces + + ### Enums diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index bdf16473979b7..b40c2a6ffe559 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-08-13 +date: 2024-08-15 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 aa4d1a3038bdd..6f1479b4fa791 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-08-13 +date: 2024-08-15 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 3526ac30fa8ca..41f40094951bc 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-08-13 +date: 2024-08-15 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 94f278abcd8b6..61f904c7034ce 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-08-13 +date: 2024-08-15 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 312242bb63102..d817bc3739c2c 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-08-13 +date: 2024-08-15 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 3c95cfb656934..3df0008960def 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-08-13 +date: 2024-08-15 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 942fb1e78105c..e57e1087edaf9 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-ast'] --- import kbnEsqlAstObj from './kbn_esql_ast.devdocs.json'; diff --git a/api_docs/kbn_esql_utils.mdx b/api_docs/kbn_esql_utils.mdx index 6481988470387..150fb0079a5db 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; diff --git a/api_docs/kbn_esql_validation_autocomplete.devdocs.json b/api_docs/kbn_esql_validation_autocomplete.devdocs.json index 9c4af05a18969..fb68172942ca5 100644 --- a/api_docs/kbn_esql_validation_autocomplete.devdocs.json +++ b/api_docs/kbn_esql_validation_autocomplete.devdocs.json @@ -3193,7 +3193,7 @@ "label": "type", "description": [], "signature": [ - "\"boolean\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"keyword\" | \"text\" | \"date\" | \"version\" | \"integer\" | \"long\" | \"double\" | \"unsigned_long\" | \"cartesian_point\" | \"cartesian_shape\" | \"counter_integer\" | \"counter_long\" | \"counter_double\" | \"unsupported\"" + "\"boolean\" | \"geo_point\" | \"geo_shape\" | \"ip\" | \"keyword\" | \"text\" | \"date\" | \"date_nanos\" | \"version\" | \"integer\" | \"long\" | \"double\" | \"unsigned_long\" | \"cartesian_point\" | \"cartesian_shape\" | \"counter_integer\" | \"counter_long\" | \"counter_double\" | \"unsupported\"" ], "path": "packages/kbn-esql-validation-autocomplete/src/validation/types.ts", "deprecated": false, diff --git a/api_docs/kbn_esql_validation_autocomplete.mdx b/api_docs/kbn_esql_validation_autocomplete.mdx index 17b7f5339a54e..59643c1de8a0c 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-08-13 +date: 2024-08-15 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 cdc6a56c30418..cf03e9301ffed 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-08-13 +date: 2024-08-15 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 c2a3d051d1433..a8b07858c8522 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-08-13 +date: 2024-08-15 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 09ed95d586d20..f1bdf10b14c3f 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-08-13 +date: 2024-08-15 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 10252a25783aa..937ba6f1307c6 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-08-13 +date: 2024-08-15 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 44627f484752b..e4a4ebe600ca0 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-08-13 +date: 2024-08-15 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 062468566b7cc..215c040e9d623 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-08-13 +date: 2024-08-15 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 684ee4a7e953c..0f499f4443685 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/formatters'] --- import kbnFormattersObj from './kbn_formatters.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.devdocs.json b/api_docs/kbn_ftr_common_functional_services.devdocs.json index 9c00accd18000..e7b25e08d24cd 100644 --- a/api_docs/kbn_ftr_common_functional_services.devdocs.json +++ b/api_docs/kbn_ftr_common_functional_services.devdocs.json @@ -787,6 +787,96 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/ftr-common-functional-services", + "id": "def-common.SamlAuthProviderType", + "type": "Type", + "tags": [], + "label": "SamlAuthProviderType", + "description": [], + "signature": [ + { + "pluginId": "@kbn/test", + "scope": "common", + "docId": "kibKbnTestPluginApi", + "section": "def-common.AsyncInstance", + "text": "AsyncInstance" + }, + "<{ getInteractiveUserSessionCookieWithRoleScope(role: string): Promise; getM2MApiCredentialsWithRoleScope(role: string): Promise<{ Cookie: string; }>; getEmail(role: string): Promise; getUserData(role: string): Promise<", + "UserProfile", + ">; createM2mApiKeyWithDefaultRoleScope(): Promise<", + { + "pluginId": "@kbn/ftr-common-functional-services", + "scope": "common", + "docId": "kibKbnFtrCommonFunctionalServicesPluginApi", + "section": "def-common.RoleCredentials", + "text": "RoleCredentials" + }, + ">; createM2mApiKeyWithRoleScope(role: string): Promise<", + { + "pluginId": "@kbn/ftr-common-functional-services", + "scope": "common", + "docId": "kibKbnFtrCommonFunctionalServicesPluginApi", + "section": "def-common.RoleCredentials", + "text": "RoleCredentials" + }, + ">; invalidateM2mApiKeyWithRoleScope(roleCredentials: ", + { + "pluginId": "@kbn/ftr-common-functional-services", + "scope": "common", + "docId": "kibKbnFtrCommonFunctionalServicesPluginApi", + "section": "def-common.RoleCredentials", + "text": "RoleCredentials" + }, + "): Promise; getCommonRequestHeader(): { 'kbn-xsrf': string; }; getInternalRequestHeader(): ", + { + "pluginId": "@kbn/ftr-common-functional-services", + "scope": "common", + "docId": "kibKbnFtrCommonFunctionalServicesPluginApi", + "section": "def-common.InternalRequestHeader", + "text": "InternalRequestHeader" + }, + "; DEFAULT_ROLE: string; }> & { getInteractiveUserSessionCookieWithRoleScope(role: string): Promise; getM2MApiCredentialsWithRoleScope(role: string): Promise<{ Cookie: string; }>; getEmail(role: string): Promise; getUserData(role: string): Promise<", + "UserProfile", + ">; createM2mApiKeyWithDefaultRoleScope(): Promise<", + { + "pluginId": "@kbn/ftr-common-functional-services", + "scope": "common", + "docId": "kibKbnFtrCommonFunctionalServicesPluginApi", + "section": "def-common.RoleCredentials", + "text": "RoleCredentials" + }, + ">; createM2mApiKeyWithRoleScope(role: string): Promise<", + { + "pluginId": "@kbn/ftr-common-functional-services", + "scope": "common", + "docId": "kibKbnFtrCommonFunctionalServicesPluginApi", + "section": "def-common.RoleCredentials", + "text": "RoleCredentials" + }, + ">; invalidateM2mApiKeyWithRoleScope(roleCredentials: ", + { + "pluginId": "@kbn/ftr-common-functional-services", + "scope": "common", + "docId": "kibKbnFtrCommonFunctionalServicesPluginApi", + "section": "def-common.RoleCredentials", + "text": "RoleCredentials" + }, + "): Promise; getCommonRequestHeader(): { 'kbn-xsrf': string; }; getInternalRequestHeader(): ", + { + "pluginId": "@kbn/ftr-common-functional-services", + "scope": "common", + "docId": "kibKbnFtrCommonFunctionalServicesPluginApi", + "section": "def-common.InternalRequestHeader", + "text": "InternalRequestHeader" + }, + "; DEFAULT_ROLE: string; }" + ], + "path": "packages/kbn-ftr-common-functional-services/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/ftr-common-functional-services", "id": "def-common.SupertestWithoutAuthProviderType", diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index 4b515071f16e9..e67fad7385309 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kiban | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 46 | 0 | 31 | 1 | +| 47 | 0 | 32 | 1 | ## Common diff --git a/api_docs/kbn_ftr_common_functional_ui_services.mdx b/api_docs/kbn_ftr_common_functional_ui_services.mdx index 6d6798db77b89..1518d73203060 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-08-13 +date: 2024-08-15 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 f91f44f1a0f1a..8f905a95ccf28 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-08-13 +date: 2024-08-15 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 2e0bcf419ed65..61c21ba338178 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-08-13 +date: 2024-08-15 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 01c6d07e0cd17..267ff37229616 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-08-13 +date: 2024-08-15 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 ed4e11bf3417e..8c38007ef7923 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-08-13 +date: 2024-08-15 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 c06c8e4dd8a49..1e8c3b8998d3e 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-08-13 +date: 2024-08-15 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 fd3824c2b92a8..75ed79d3d22a3 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-08-13 +date: 2024-08-15 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 6fc3388a3d03e..32fdaf741e592 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-08-13 +date: 2024-08-15 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 6a59919415a70..44c58caf63a81 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-08-13 +date: 2024-08-15 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 99f96a82d28cb..c46fb794426ba 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-08-13 +date: 2024-08-15 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 1f67e02b17f2d..4b0ce9df4d025 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-08-13 +date: 2024-08-15 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 08ef5c393fabc..90b554c3c8f66 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-08-13 +date: 2024-08-15 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 2fafd6c475c70..47dab9db4a33f 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-08-13 +date: 2024-08-15 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 542b1a60c3348..f253217d81d40 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-08-13 +date: 2024-08-15 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 e9a08e6208a1e..de78583ba1bd7 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-08-13 +date: 2024-08-15 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 a24c9fc307702..670319687e4ca 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-08-13 +date: 2024-08-15 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 f997865a18c40..e92410b6edfee 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-08-13 +date: 2024-08-15 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 43da73eb913f9..a33e1a738e596 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_investigation_shared.devdocs.json b/api_docs/kbn_investigation_shared.devdocs.json new file mode 100644 index 0000000000000..e735dbaca9c86 --- /dev/null +++ b/api_docs/kbn_investigation_shared.devdocs.json @@ -0,0 +1,643 @@ +{ + "id": "@kbn/investigation-shared", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [ + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.CreateInvestigationInput", + "type": "Type", + "tags": [], + "label": "CreateInvestigationInput", + "description": [], + "signature": [ + "{ id: string; title: string; params: { timeRange: { from: number; to: number; }; }; origin: { type: \"alert\"; id: string; } | { type: \"blank\"; }; }" + ], + "path": "packages/kbn-investigation-shared/src/schema/create.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.CreateInvestigationNoteInput", + "type": "Type", + "tags": [], + "label": "CreateInvestigationNoteInput", + "description": [], + "signature": [ + "{ content: string; }" + ], + "path": "packages/kbn-investigation-shared/src/schema/create_notes.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.CreateInvestigationNoteParams", + "type": "Type", + "tags": [], + "label": "CreateInvestigationNoteParams", + "description": [], + "signature": [ + "{ content: string; }" + ], + "path": "packages/kbn-investigation-shared/src/schema/create_notes.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.CreateInvestigationNoteResponse", + "type": "Type", + "tags": [], + "label": "CreateInvestigationNoteResponse", + "description": [], + "signature": [ + "{ id: string; content: string; createdAt: number; createdBy: string; }" + ], + "path": "packages/kbn-investigation-shared/src/schema/create_notes.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.CreateInvestigationParams", + "type": "Type", + "tags": [], + "label": "CreateInvestigationParams", + "description": [], + "signature": [ + "{ id: string; title: string; params: { timeRange: { from: number; to: number; }; }; origin: { type: \"alert\"; id: string; } | { type: \"blank\"; }; }" + ], + "path": "packages/kbn-investigation-shared/src/schema/create.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.CreateInvestigationResponse", + "type": "Type", + "tags": [], + "label": "CreateInvestigationResponse", + "description": [], + "signature": [ + "{ id: string; title: string; createdAt: number; createdBy: string; params: { timeRange: { from: number; to: number; }; }; origin: { type: \"alert\"; id: string; } | { type: \"blank\"; }; status: \"closed\" | \"ongoing\"; notes: { id: string; content: string; createdAt: number; createdBy: string; }[]; }" + ], + "path": "packages/kbn-investigation-shared/src/schema/create.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.DeleteInvestigationParams", + "type": "Type", + "tags": [], + "label": "DeleteInvestigationParams", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "packages/kbn-investigation-shared/src/schema/delete.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.FindInvestigationsParams", + "type": "Type", + "tags": [], + "label": "FindInvestigationsParams", + "description": [], + "signature": [ + "{ alertId?: string | undefined; page?: string | undefined; perPage?: string | undefined; }" + ], + "path": "packages/kbn-investigation-shared/src/schema/find.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.FindInvestigationsResponse", + "type": "Type", + "tags": [], + "label": "FindInvestigationsResponse", + "description": [], + "signature": [ + "{ page: number; perPage: number; total: number; results: { id: string; title: string; createdAt: number; createdBy: string; params: { timeRange: { from: number; to: number; }; }; origin: { type: \"alert\"; id: string; } | { type: \"blank\"; }; status: \"closed\" | \"ongoing\"; notes: { id: string; content: string; createdAt: number; createdBy: string; }[]; }[]; }" + ], + "path": "packages/kbn-investigation-shared/src/schema/find.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.GetInvestigationNotesResponse", + "type": "Type", + "tags": [], + "label": "GetInvestigationNotesResponse", + "description": [], + "signature": [ + "{ id: string; content: string; createdAt: number; createdBy: string; }[]" + ], + "path": "packages/kbn-investigation-shared/src/schema/get_notes.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.GetInvestigationParams", + "type": "Type", + "tags": [], + "label": "GetInvestigationParams", + "description": [], + "signature": [ + "{ id: string; }" + ], + "path": "packages/kbn-investigation-shared/src/schema/get.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.GetInvestigationResponse", + "type": "Type", + "tags": [], + "label": "GetInvestigationResponse", + "description": [], + "signature": [ + "{ id: string; title: string; createdAt: number; createdBy: string; params: { timeRange: { from: number; to: number; }; }; origin: { type: \"alert\"; id: string; } | { type: \"blank\"; }; status: \"closed\" | \"ongoing\"; notes: { id: string; content: string; createdAt: number; createdBy: string; }[]; }" + ], + "path": "packages/kbn-investigation-shared/src/schema/get.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [ + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.alertOriginSchema", + "type": "Object", + "tags": [], + "label": "alertOriginSchema", + "description": [], + "signature": [ + "TypeC", + "<{ type: ", + "LiteralC", + "<\"alert\">; id: ", + "StringC", + "; }>" + ], + "path": "packages/kbn-investigation-shared/src/schema/origin.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.blankOriginSchema", + "type": "Object", + "tags": [], + "label": "blankOriginSchema", + "description": [], + "signature": [ + "TypeC", + "<{ type: ", + "LiteralC", + "<\"blank\">; }>" + ], + "path": "packages/kbn-investigation-shared/src/schema/origin.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.createInvestigationNoteParamsSchema", + "type": "Object", + "tags": [], + "label": "createInvestigationNoteParamsSchema", + "description": [], + "signature": [ + "TypeC", + "<{ path: ", + "TypeC", + "<{ id: ", + "StringC", + "; }>; body: ", + "TypeC", + "<{ content: ", + "StringC", + "; }>; }>" + ], + "path": "packages/kbn-investigation-shared/src/schema/create_notes.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.createInvestigationNoteResponseSchema", + "type": "Object", + "tags": [], + "label": "createInvestigationNoteResponseSchema", + "description": [], + "signature": [ + "TypeC", + "<{ id: ", + "StringC", + "; content: ", + "StringC", + "; createdAt: ", + "NumberC", + "; createdBy: ", + "StringC", + "; }>" + ], + "path": "packages/kbn-investigation-shared/src/schema/create_notes.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.createInvestigationParamsSchema", + "type": "Object", + "tags": [], + "label": "createInvestigationParamsSchema", + "description": [], + "signature": [ + "TypeC", + "<{ body: ", + "TypeC", + "<{ id: ", + "StringC", + "; title: ", + "StringC", + "; params: ", + "TypeC", + "<{ timeRange: ", + "TypeC", + "<{ from: ", + "NumberC", + "; to: ", + "NumberC", + "; }>; }>; origin: ", + "UnionC", + "<[", + "TypeC", + "<{ type: ", + "LiteralC", + "<\"alert\">; id: ", + "StringC", + "; }>, ", + "TypeC", + "<{ type: ", + "LiteralC", + "<\"blank\">; }>]>; }>; }>" + ], + "path": "packages/kbn-investigation-shared/src/schema/create.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.createInvestigationResponseSchema", + "type": "Object", + "tags": [], + "label": "createInvestigationResponseSchema", + "description": [], + "signature": [ + "TypeC", + "<{ id: ", + "StringC", + "; title: ", + "StringC", + "; createdAt: ", + "NumberC", + "; createdBy: ", + "StringC", + "; params: ", + "TypeC", + "<{ timeRange: ", + "TypeC", + "<{ from: ", + "NumberC", + "; to: ", + "NumberC", + "; }>; }>; origin: ", + "UnionC", + "<[", + "TypeC", + "<{ type: ", + "LiteralC", + "<\"alert\">; id: ", + "StringC", + "; }>, ", + "TypeC", + "<{ type: ", + "LiteralC", + "<\"blank\">; }>]>; status: ", + "UnionC", + "<[", + "LiteralC", + "<\"ongoing\">, ", + "LiteralC", + "<\"closed\">]>; notes: ", + "ArrayC", + "<", + "TypeC", + "<{ id: ", + "StringC", + "; content: ", + "StringC", + "; createdAt: ", + "NumberC", + "; createdBy: ", + "StringC", + "; }>>; }>" + ], + "path": "packages/kbn-investigation-shared/src/schema/create.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.deleteInvestigationParamsSchema", + "type": "Object", + "tags": [], + "label": "deleteInvestigationParamsSchema", + "description": [], + "signature": [ + "TypeC", + "<{ path: ", + "TypeC", + "<{ id: ", + "StringC", + "; }>; }>" + ], + "path": "packages/kbn-investigation-shared/src/schema/delete.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.findInvestigationsParamsSchema", + "type": "Object", + "tags": [], + "label": "findInvestigationsParamsSchema", + "description": [], + "signature": [ + "PartialC", + "<{ query: ", + "PartialC", + "<{ alertId: ", + "StringC", + "; page: ", + "StringC", + "; perPage: ", + "StringC", + "; }>; }>" + ], + "path": "packages/kbn-investigation-shared/src/schema/find.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.findInvestigationsResponseSchema", + "type": "Object", + "tags": [], + "label": "findInvestigationsResponseSchema", + "description": [], + "signature": [ + "TypeC", + "<{ page: ", + "NumberC", + "; perPage: ", + "NumberC", + "; total: ", + "NumberC", + "; results: ", + "ArrayC", + "<", + "TypeC", + "<{ id: ", + "StringC", + "; title: ", + "StringC", + "; createdAt: ", + "NumberC", + "; createdBy: ", + "StringC", + "; params: ", + "TypeC", + "<{ timeRange: ", + "TypeC", + "<{ from: ", + "NumberC", + "; to: ", + "NumberC", + "; }>; }>; origin: ", + "UnionC", + "<[", + "TypeC", + "<{ type: ", + "LiteralC", + "<\"alert\">; id: ", + "StringC", + "; }>, ", + "TypeC", + "<{ type: ", + "LiteralC", + "<\"blank\">; }>]>; status: ", + "UnionC", + "<[", + "LiteralC", + "<\"ongoing\">, ", + "LiteralC", + "<\"closed\">]>; notes: ", + "ArrayC", + "<", + "TypeC", + "<{ id: ", + "StringC", + "; content: ", + "StringC", + "; createdAt: ", + "NumberC", + "; createdBy: ", + "StringC", + "; }>>; }>>; }>" + ], + "path": "packages/kbn-investigation-shared/src/schema/find.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.getInvestigationNotesParamsSchema", + "type": "Object", + "tags": [], + "label": "getInvestigationNotesParamsSchema", + "description": [], + "signature": [ + "TypeC", + "<{ path: ", + "TypeC", + "<{ id: ", + "StringC", + "; }>; }>" + ], + "path": "packages/kbn-investigation-shared/src/schema/get_notes.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.getInvestigationNotesResponseSchema", + "type": "Object", + "tags": [], + "label": "getInvestigationNotesResponseSchema", + "description": [], + "signature": [ + "ArrayC", + "<", + "TypeC", + "<{ id: ", + "StringC", + "; content: ", + "StringC", + "; createdAt: ", + "NumberC", + "; createdBy: ", + "StringC", + "; }>>" + ], + "path": "packages/kbn-investigation-shared/src/schema/get_notes.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.getInvestigationParamsSchema", + "type": "Object", + "tags": [], + "label": "getInvestigationParamsSchema", + "description": [], + "signature": [ + "TypeC", + "<{ path: ", + "TypeC", + "<{ id: ", + "StringC", + "; }>; }>" + ], + "path": "packages/kbn-investigation-shared/src/schema/get.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/investigation-shared", + "id": "def-common.getInvestigationResponseSchema", + "type": "Object", + "tags": [], + "label": "getInvestigationResponseSchema", + "description": [], + "signature": [ + "TypeC", + "<{ id: ", + "StringC", + "; title: ", + "StringC", + "; createdAt: ", + "NumberC", + "; createdBy: ", + "StringC", + "; params: ", + "TypeC", + "<{ timeRange: ", + "TypeC", + "<{ from: ", + "NumberC", + "; to: ", + "NumberC", + "; }>; }>; origin: ", + "UnionC", + "<[", + "TypeC", + "<{ type: ", + "LiteralC", + "<\"alert\">; id: ", + "StringC", + "; }>, ", + "TypeC", + "<{ type: ", + "LiteralC", + "<\"blank\">; }>]>; status: ", + "UnionC", + "<[", + "LiteralC", + "<\"ongoing\">, ", + "LiteralC", + "<\"closed\">]>; notes: ", + "ArrayC", + "<", + "TypeC", + "<{ id: ", + "StringC", + "; content: ", + "StringC", + "; createdAt: ", + "NumberC", + "; createdBy: ", + "StringC", + "; }>>; }>" + ], + "path": "packages/kbn-investigation-shared/src/schema/get.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ] + } +} \ No newline at end of file diff --git a/api_docs/kbn_investigation_shared.mdx b/api_docs/kbn_investigation_shared.mdx new file mode 100644 index 0000000000000..e5ca0fbebd5f0 --- /dev/null +++ b/api_docs/kbn_investigation_shared.mdx @@ -0,0 +1,33 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnInvestigationSharedPluginApi +slug: /kibana-dev-docs/api/kbn-investigation-shared +title: "@kbn/investigation-shared" +image: https://source.unsplash.com/400x175/?github +description: API docs for the @kbn/investigation-shared plugin +date: 2024-08-15 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/investigation-shared'] +--- +import kbnInvestigationSharedObj from './kbn_investigation_shared.devdocs.json'; + + + +Contact [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 25 | 0 | 25 | 0 | + +## Common + +### Objects + + +### Consts, variables and types + + diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index cf8e4bccf0e87..15984097fe263 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-08-13 +date: 2024-08-15 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 efe60ae06a16a..faa55b25498c2 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-08-13 +date: 2024-08-15 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 9d60deb8b07b8..524a4409ca51d 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-08-13 +date: 2024-08-15 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 b7a4099472178..d2149d3e2441a 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-08-13 +date: 2024-08-15 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 2f1f56b336798..29bb865884d14 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-08-13 +date: 2024-08-15 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 80762f93aef46..df156e7f716c2 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-08-13 +date: 2024-08-15 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 c4b9b49fa7f2d..9fd817e0e2624 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-08-13 +date: 2024-08-15 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 c8cc838c2406f..49ac88b1225b8 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-08-13 +date: 2024-08-15 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 77c658e2ad004..6eb45c17284c2 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-08-13 +date: 2024-08-15 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 c92327dea1109..0c1a8a85bded4 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-08-13 +date: 2024-08-15 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 df46900a272fe..e60fce82c5d66 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-08-13 +date: 2024-08-15 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 a5270c073e49c..995be23725ff8 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-08-13 +date: 2024-08-15 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 83ec892633314..4f55b92c0cd4d 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-08-13 +date: 2024-08-15 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 33af1fbf89db1..441716d9ac2d9 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-08-13 +date: 2024-08-15 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 30b4ff4ed628c..3e3e9c6eaef53 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-08-13 +date: 2024-08-15 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 4bfbf337a9ba6..5aa9ce28bcd4f 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-08-13 +date: 2024-08-15 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 879d90104c5b0..3c3c99c68ac44 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-08-13 +date: 2024-08-15 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 aedf774a4a397..c9336ae614eb5 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-08-13 +date: 2024-08-15 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 49bda8512cc4f..39add44529f50 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-08-13 +date: 2024-08-15 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 b68e3607f47a3..c5cd11b557d4a 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-08-13 +date: 2024-08-15 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 ad62a70dbe9ca..fda41972a85c7 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-08-13 +date: 2024-08-15 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 436c3eb3376f9..cbfe4fbf6644f 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-08-13 +date: 2024-08-15 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 3ba9be22f4bf8..529a1cad863e3 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_management_settings_types.devdocs.json index 4ae9026a187f5..590f1a7c44d3f 100644 --- a/api_docs/kbn_management_settings_types.devdocs.json +++ b/api_docs/kbn_management_settings_types.devdocs.json @@ -1613,7 +1613,7 @@ "\nThis is a local type equivalent to {@link UiSettingsType} for flexibility." ], "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"undefined\" | \"color\" | \"image\" | \"select\" | \"json\" | \"array\" | \"markdown\"" + "\"string\" | \"number\" | \"boolean\" | \"undefined\" | \"color\" | \"array\" | \"image\" | \"select\" | \"json\" | \"markdown\"" ], "path": "packages/kbn-management/settings/types/setting_type.ts", "deprecated": false, diff --git a/api_docs/kbn_management_settings_types.mdx b/api_docs/kbn_management_settings_types.mdx index 382a0bf579349..890020fbda152 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-08-13 +date: 2024-08-15 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 c5a6c06c431a4..2f3c58149cc66 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-08-13 +date: 2024-08-15 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 ebb73aaf8de94..f6f27762367ed 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-08-13 +date: 2024-08-15 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 5c475de623e2b..574548502f45a 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-08-13 +date: 2024-08-15 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 744f9f5947cfb..673032349eeb6 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-08-13 +date: 2024-08-15 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 4e841ab61c601..93e7c9e74604e 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-08-13 +date: 2024-08-15 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 bfe278ae2a5cc..8edb05cc54e52 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-08-13 +date: 2024-08-15 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 b740895a5e25f..a2e75df8bf9bd 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-08-13 +date: 2024-08-15 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 82bf3471692bc..445fc5d5567ac 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-08-13 +date: 2024-08-15 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 63cf1fe68d00b..fc8e993f3f1de 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-08-13 +date: 2024-08-15 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 2a0b223ba0aaa..b134e8b600c31 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-08-13 +date: 2024-08-15 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 5e4971ca287fa..0e4ab1a1682e5 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-08-13 +date: 2024-08-15 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 4c2fa8bb6fc1a..98914a550fca8 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-08-13 +date: 2024-08-15 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 4a19e697546f2..f9671e50ad036 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-08-13 +date: 2024-08-15 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 3957a946390ce..914b97c50c4c7 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-08-13 +date: 2024-08-15 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 90207c1a887ea..141ced30732c1 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-08-13 +date: 2024-08-15 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 0214f06d10c91..389f45ffb3a68 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-08-13 +date: 2024-08-15 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 408dbb0274570..1fcb7cb078713 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-08-13 +date: 2024-08-15 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 e4ddde67b49ea..51b9483a9dc1c 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-08-13 +date: 2024-08-15 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 c81c6fc97f29e..18bdaef348d0d 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-08-13 +date: 2024-08-15 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 6dc361edf7592..6a4c690c5109e 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-08-13 +date: 2024-08-15 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 18b78b10f466d..cc81559e712d3 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-08-13 +date: 2024-08-15 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 0590f2d12339a..8a522daddffc2 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-08-13 +date: 2024-08-15 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 a6bafab1e8ecc..5c0c84fb8714c 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-08-13 +date: 2024-08-15 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 e41e9085a801e..63d199dcc380c 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-08-13 +date: 2024-08-15 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 59cb72a78ee26..6bfa465cffd05 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-08-13 +date: 2024-08-15 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 12e87b0e86069..73f046f6bfa85 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-08-13 +date: 2024-08-15 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 25fa65b77b8b6..702520407ed65 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-08-13 +date: 2024-08-15 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 d20c81e8b52b5..cc6862d15c4d5 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-08-13 +date: 2024-08-15 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 b462b6f6d95da..01cf7087f2701 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_ml_url_state.devdocs.json index b95b497f7b691..23d6834de272a 100644 --- a/api_docs/kbn_ml_url_state.devdocs.json +++ b/api_docs/kbn_ml_url_state.devdocs.json @@ -350,7 +350,15 @@ "\nHook for managing the URL state of the page." ], "signature": [ - "(pageKey: T[\"pageKey\"], defaultState?: T[\"pageUrlState\"] | undefined) => [T[\"pageUrlState\"], (update: Partial, replaceState?: boolean | undefined) => void, ", + "(pageKey: T[\"pageKey\"], defaultState?: T[\"pageUrlState\"] | undefined) => [T[\"pageUrlState\"], (update: Partial, replaceState?: boolean | undefined) => void, ", { "pluginId": "@kbn/ml-url-state", "scope": "common", @@ -492,6 +500,145 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/ml-url-state", + "id": "def-common.ListingPageUrlState", + "type": "Interface", + "tags": [], + "label": "ListingPageUrlState", + "description": [], + "path": "x-pack/packages/ml/url_state/src/url_state.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-url-state", + "id": "def-common.ListingPageUrlState.pageSize", + "type": "number", + "tags": [], + "label": "pageSize", + "description": [], + "path": "x-pack/packages/ml/url_state/src/url_state.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ml-url-state", + "id": "def-common.ListingPageUrlState.pageIndex", + "type": "number", + "tags": [], + "label": "pageIndex", + "description": [], + "path": "x-pack/packages/ml/url_state/src/url_state.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ml-url-state", + "id": "def-common.ListingPageUrlState.sortField", + "type": "string", + "tags": [], + "label": "sortField", + "description": [], + "path": "x-pack/packages/ml/url_state/src/url_state.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ml-url-state", + "id": "def-common.ListingPageUrlState.sortDirection", + "type": "string", + "tags": [], + "label": "sortDirection", + "description": [], + "path": "x-pack/packages/ml/url_state/src/url_state.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ml-url-state", + "id": "def-common.ListingPageUrlState.queryText", + "type": "string", + "tags": [], + "label": "queryText", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/ml/url_state/src/url_state.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ml-url-state", + "id": "def-common.ListingPageUrlState.showPerPageOptions", + "type": "CompoundType", + "tags": [], + "label": "showPerPageOptions", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/packages/ml/url_state/src/url_state.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ml-url-state", + "id": "def-common.ListingPageUrlState.showAll", + "type": "CompoundType", + "tags": [], + "label": "showAll", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/packages/ml/url_state/src/url_state.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/ml-url-state", + "id": "def-common.PageUrlState", + "type": "Interface", + "tags": [], + "label": "PageUrlState", + "description": [], + "path": "x-pack/packages/ml/url_state/src/url_state.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/ml-url-state", + "id": "def-common.PageUrlState.pageKey", + "type": "string", + "tags": [], + "label": "pageKey", + "description": [], + "path": "x-pack/packages/ml/url_state/src/url_state.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/ml-url-state", + "id": "def-common.PageUrlState.pageUrlState", + "type": "Uncategorized", + "tags": [], + "label": "pageUrlState", + "description": [], + "signature": [ + "object" + ], + "path": "x-pack/packages/ml/url_state/src/url_state.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false } ], "enums": [], diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index ea777a6bcd088..2d5c23d4868ce 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 31 | 1 | 24 | 1 | +| 42 | 1 | 35 | 1 | ## Common diff --git a/api_docs/kbn_mock_idp_utils.mdx b/api_docs/kbn_mock_idp_utils.mdx index 3e505e4ce78ea..ad2a05efa0aa6 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-08-13 +date: 2024-08-15 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 0cfc722c68e40..4e83d057a4f57 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-08-13 +date: 2024-08-15 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 03a9ab4ab50fe..a4c3e45e207d7 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-08-13 +date: 2024-08-15 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 6d4067f6fac40..9d44f56a4f7ff 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-08-13 +date: 2024-08-15 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 c48c9828b0f60..6693ea834d17c 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-08-13 +date: 2024-08-15 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 e6edc7dc25c2a..4751f248ec25d 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-08-13 +date: 2024-08-15 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 9cda74e583c1b..e998b8c1af0c8 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-08-13 +date: 2024-08-15 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.mdx b/api_docs/kbn_openapi_bundler.mdx index 94f9953d71735..2f17186e20b61 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-08-13 +date: 2024-08-15 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 d7e7f5e94d304..9a2694738dd5c 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-08-13 +date: 2024-08-15 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 5d67c98d35968..9d1566cdf3586 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-08-13 +date: 2024-08-15 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 13bb2ea518ca0..94164f45a6802 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-08-13 +date: 2024-08-15 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 634c1d153c815..5f2d38ccd2781 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-08-13 +date: 2024-08-15 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 330f40bfb3e77..811d8fbb333a3 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-08-13 +date: 2024-08-15 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 e434a94037a4b..95e19957d21af 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-08-13 +date: 2024-08-15 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 26c39990ca54a..10bd25429645f 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-08-13 +date: 2024-08-15 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 ff568fcdf02ee..59598a0be899f 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-08-13 +date: 2024-08-15 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 94408a7af1001..364e39c4f38a3 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-08-13 +date: 2024-08-15 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 270776b8fabf2..eed5824864a92 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-08-13 +date: 2024-08-15 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 fdd2efd8c8d0e..b621499926456 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-publishing'] --- import kbnPresentationPublishingObj from './kbn_presentation_publishing.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kib | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 216 | 0 | 181 | 5 | +| 216 | 0 | 181 | 6 | ## Client diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index 729647568d8e6..6f423e586fb7e 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-08-13 +date: 2024-08-15 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 498ff2f870429..776fab4a3396c 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-08-13 +date: 2024-08-15 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 c17e751f50033..7372d2616615d 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-08-13 +date: 2024-08-15 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 e3d9e8920d92f..883ee45a5346c 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-08-13 +date: 2024-08-15 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 592dc014fc2fd..036660a6040e0 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-08-13 +date: 2024-08-15 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 3bf289fb2ed82..0bbaadb8144d1 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-08-13 +date: 2024-08-15 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 561b10585fa8b..8f7635949d76a 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-08-13 +date: 2024-08-15 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 17336b7a8f98c..89bf712f34877 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-08-13 +date: 2024-08-15 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 47ab9e60bdebb..f9412b68c333f 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-08-13 +date: 2024-08-15 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 ac60fdcf8e741..8aa315ed7da4d 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-08-13 +date: 2024-08-15 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 126b8f0919b48..f910c2dae3284 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-08-13 +date: 2024-08-15 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 060d8761345cf..f31df5c4f75ca 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-08-13 +date: 2024-08-15 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 5566802ac6748..0cb1f458b8758 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-08-13 +date: 2024-08-15 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 f8cb696a31928..b74902374b810 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-08-13 +date: 2024-08-15 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 c757eb3ba899d..73fc3323528e8 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-08-13 +date: 2024-08-15 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 59f86676b8a9d..2f4ce58c2e20c 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-08-13 +date: 2024-08-15 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 ee69fd33b2b4c..0cbd1e446349c 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-08-13 +date: 2024-08-15 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 70380b6cd6723..30ba68e643d29 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-08-13 +date: 2024-08-15 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 0cf0f2491c02a..c1c287f94e7ae 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-08-13 +date: 2024-08-15 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 6bb1d6772bb2d..93b2a92fa9b5f 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-08-13 +date: 2024-08-15 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 50ae6200ce512..f130b69048e40 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-08-13 +date: 2024-08-15 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 06ea6298a69d1..c6f9bc9d5f0da 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-08-13 +date: 2024-08-15 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 1fac755729697..ff2df41bcd9f8 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-08-13 +date: 2024-08-15 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 55525836e6b7d..208d832df65b4 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-08-13 +date: 2024-08-15 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 405dbe6048a44..a16e0f4ca4529 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-08-13 +date: 2024-08-15 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 bf7451ec001b0..c273ea02079ac 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-08-13 +date: 2024-08-15 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 27d597db32db8..0f5beff3a171c 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-08-13 +date: 2024-08-15 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 d9aa178c58a6a..d27add58b259d 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-08-13 +date: 2024-08-15 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 0f11ee14b9bcc..3b3a8cea827d1 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-08-13 +date: 2024-08-15 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 f7cae1f21d76b..1a02b0531545a 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-08-13 +date: 2024-08-15 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 562442c5b045b..342bb73e45566 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-08-13 +date: 2024-08-15 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 9eabe63a5d7a7..2785697b2964c 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-08-13 +date: 2024-08-15 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 80db1cdc5647d..625a925fc2ad1 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-08-13 +date: 2024-08-15 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 4ab1dd9ca6ff0..1f5444f68dedf 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-08-13 +date: 2024-08-15 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 092391055dfd8..9614ba3d2db99 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-08-13 +date: 2024-08-15 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 45715ff0da962..195710712b72c 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-08-13 +date: 2024-08-15 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 895bb6e23f5cd..f2c40b9dbf431 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-08-13 +date: 2024-08-15 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 00f3200d26053..4783ea38c0dab 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-08-13 +date: 2024-08-15 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 b9f221ffeaa37..953ed757aa63c 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-08-13 +date: 2024-08-15 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 11383f58d2d0f..587b90a96a2f5 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-08-13 +date: 2024-08-15 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 b618a3da908c2..1f39ac44f3bea 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-08-13 +date: 2024-08-15 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 f7ed62820f260..97fc2384810d5 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-08-13 +date: 2024-08-15 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 fc09d475ae933..0ba6877b449b4 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-08-13 +date: 2024-08-15 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 1ef88b3993dab..f71ee0e5fa905 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-08-13 +date: 2024-08-15 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 4f27989abd918..2262307b01017 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-08-13 +date: 2024-08-15 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 0d6b0ce9f2831..f14ae58e92cc8 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-08-13 +date: 2024-08-15 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.mdx b/api_docs/kbn_security_plugin_types_server.mdx index 8b1d34276a6d3..1c5f0ff50dad0 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-08-13 +date: 2024-08-15 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 a851b6ff3eade..154a2437b09fb 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_security_solution_features.devdocs.json index 2d455423f1ffd..e0e229df45a39 100644 --- a/api_docs/kbn_security_solution_features.devdocs.json +++ b/api_docs/kbn_security_solution_features.devdocs.json @@ -221,7 +221,9 @@ " | ", "ProductFeatureCasesKey", " | ", - "ProductFeatureAssistantKey" + "ProductFeatureAssistantKey", + " | ", + "ProductFeatureAttackDiscoveryKey" ], "path": "x-pack/packages/security-solution/features/src/product_features_keys.ts", "deprecated": false, @@ -301,6 +303,31 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/security-solution-features", + "id": "def-common.ProductFeaturesAttackDiscoveryConfig", + "type": "Type", + "tags": [], + "label": "ProductFeaturesAttackDiscoveryConfig", + "description": [], + "signature": [ + "Map<", + "ProductFeatureAttackDiscoveryKey", + ", ", + { + "pluginId": "@kbn/security-solution-features", + "scope": "common", + "docId": "kibKbnSecuritySolutionFeaturesPluginApi", + "section": "def-common.ProductFeatureKibanaConfig", + "text": "ProductFeatureKibanaConfig" + }, + ">" + ], + "path": "x-pack/packages/security-solution/features/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/security-solution-features", "id": "def-common.ProductFeaturesCasesConfig", diff --git a/api_docs/kbn_security_solution_features.mdx b/api_docs/kbn_security_solution_features.mdx index ca6c124d57880..f6103656ba6e9 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-features'] --- import kbnSecuritySolutionFeaturesObj from './kbn_security_solution_features.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-threat-hunting-explore](https://github.com/orgs/elast | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 14 | 0 | 14 | 6 | +| 15 | 0 | 15 | 7 | ## Common diff --git a/api_docs/kbn_security_solution_navigation.mdx b/api_docs/kbn_security_solution_navigation.mdx index c600b9cc68bd3..1346d52bd8d95 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-08-13 +date: 2024-08-15 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 8823433314c28..6db38a4394ea3 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-08-13 +date: 2024-08-15 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 364347119eaa8..42ba4a12240cf 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-08-13 +date: 2024-08-15 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 9232c579a46f5..fa2acf7d07eaf 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-08-13 +date: 2024-08-15 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 2d103f506aba8..0f2f28c0a0ba0 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-08-13 +date: 2024-08-15 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 6eb26dee43205..537c86df9854a 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-08-13 +date: 2024-08-15 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 926070beb9299..70b6921040fc3 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-08-13 +date: 2024-08-15 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 fed6b030a59ca..837605845079c 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-08-13 +date: 2024-08-15 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 89b8086dc4872..f2ebf28414584 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-08-13 +date: 2024-08-15 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 e0350cdc6e205..bc16c1f4950c9 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-08-13 +date: 2024-08-15 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 1ea4f01ffeae2..a987534d79e8c 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-08-13 +date: 2024-08-15 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 be6baed4d200f..4d4db4aed4dd7 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-08-13 +date: 2024-08-15 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 2879d680bb4f9..a87526b86714b 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-08-13 +date: 2024-08-15 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 6701c0fb50eae..af35bddc30e67 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-08-13 +date: 2024-08-15 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 9491d896550c3..cfbd71aa5653a 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-08-13 +date: 2024-08-15 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 1b6a63cff9578..2d996153b1632 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-08-13 +date: 2024-08-15 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 d5bae56d218df..94ae1c065dd5c 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-08-13 +date: 2024-08-15 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 962cce6162607..34221ff3ac8cd 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-08-13 +date: 2024-08-15 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 f16d3259243bf..482f1c5cd43ce 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-08-13 +date: 2024-08-15 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 4325a3c236a30..fbd48aaa7cabb 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_server_http_tools.devdocs.json index c5fb8122cb494..241ce4eaf16b7 100644 --- a/api_docs/kbn_server_http_tools.devdocs.json +++ b/api_docs/kbn_server_http_tools.devdocs.json @@ -1268,7 +1268,7 @@ "section": "def-common.Type", "text": "Type" }, - "<\"none\" | \"optional\" | \"required\">; }>" + "<\"none\" | \"required\" | \"optional\">; }>" ], "path": "packages/kbn-server-http-tools/src/ssl/ssl_config.ts", "deprecated": false, diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index 67713c32ecc0f..3b30d7c5c959c 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_server_route_repository.devdocs.json index 131bad8a5f347..68fa7221f6e1c 100644 --- a/api_docs/kbn_server_route_repository.devdocs.json +++ b/api_docs/kbn_server_route_repository.devdocs.json @@ -60,7 +60,7 @@ "label": "decodeRequestParams", "description": [], "signature": [ - "(params: KibanaRequestParams, paramsRt: T) => ", + "(params: Partial<{ path: any; query: any; body: any; }>, paramsRt: T) => ", "OutputOf", "" ], @@ -76,7 +76,7 @@ "label": "params", "description": [], "signature": [ - "KibanaRequestParams" + "Partial<{ path: any; query: any; body: any; }>" ], "path": "packages/kbn-server-route-repository/src/decode_request_params.ts", "deprecated": false, @@ -314,6 +314,39 @@ ], "returnComment": [], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/server-route-repository", + "id": "def-server.stripNullishRequestParameters", + "type": "Function", + "tags": [], + "label": "stripNullishRequestParameters", + "description": [], + "signature": [ + "(params: KibanaRequestParams) => Partial<{ path: any; body: any; query: any; }>" + ], + "path": "packages/kbn-server-route-repository/src/strip_nullish_request_parameters.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/server-route-repository", + "id": "def-server.stripNullishRequestParameters.$1", + "type": "Object", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "KibanaRequestParams" + ], + "path": "packages/kbn-server-route-repository/src/strip_nullish_request_parameters.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false } ], "interfaces": [ @@ -528,6 +561,27 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/server-route-repository", + "id": "def-server.IoTsParamsObject", + "type": "Type", + "tags": [], + "label": "IoTsParamsObject", + "description": [], + "signature": [ + "Omit<", + "Type", + "<{ path?: any; query?: any; body?: any; }, { path?: any; query?: any; body?: any; }, unknown>, \"encode\" | \"asEncoder\"> & { encode: ", + "Encode", + "; asEncoder: () => ", + "Encoder", + "; }" + ], + "path": "packages/kbn-server-route-repository-utils/src/typings.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/server-route-repository", "id": "def-server.ReturnOf", @@ -577,13 +631,21 @@ "label": "RouteParamsRT", "description": [], "signature": [ - "Omit<", - "Type", - "<{ path?: any; query?: any; body?: any; }, { path?: any; query?: any; body?: any; }, unknown>, \"encode\" | \"asEncoder\"> & { encode: ", - "Encode", - "; asEncoder: () => ", - "Encoder", - "; }" + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.IoTsParamsObject", + "text": "IoTsParamsObject" + }, + " | ", + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.ZodParamsObject", + "text": "ZodParamsObject" + } ], "path": "packages/kbn-server-route-repository-utils/src/typings.ts", "deprecated": false, @@ -727,77 +789,54 @@ "objects": [ { "parentPluginId": "@kbn/server-route-repository", - "id": "def-server.routeValidationObject", + "id": "def-server.passThroughValidationObject", "type": "Object", "tags": [], - "label": "routeValidationObject", + "label": "passThroughValidationObject", "description": [], - "path": "packages/kbn-server-route-repository/src/route_validation_object.ts", + "path": "packages/kbn-server-route-repository/src/validation_objects.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "@kbn/server-route-repository", - "id": "def-server.routeValidationObject.body", + "id": "def-server.passThroughValidationObject.body", "type": "Object", "tags": [], "label": "body", - "description": [ - "// `body` can be null, but `validate` expects non-nullable types\n// if any validation is defined. Not having validation currently\n// means we don't get the payload. See\n// https://github.com/elastic/kibana/issues/50179" - ], + "description": [], "signature": [ - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.Type", - "text": "Type" - }, - " | null>" + "Zod.ZodAny" ], - "path": "packages/kbn-server-route-repository/src/route_validation_object.ts", + "path": "packages/kbn-server-route-repository/src/validation_objects.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/server-route-repository", - "id": "def-server.routeValidationObject.params", + "id": "def-server.passThroughValidationObject.params", "type": "Object", "tags": [], "label": "params", "description": [], "signature": [ - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.ObjectType", - "text": "ObjectType" - }, - "<{}>" + "Zod.ZodAny" ], - "path": "packages/kbn-server-route-repository/src/route_validation_object.ts", + "path": "packages/kbn-server-route-repository/src/validation_objects.ts", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "@kbn/server-route-repository", - "id": "def-server.routeValidationObject.query", + "id": "def-server.passThroughValidationObject.query", "type": "Object", "tags": [], "label": "query", "description": [], "signature": [ - { - "pluginId": "@kbn/config-schema", - "scope": "common", - "docId": "kibKbnConfigSchemaPluginApi", - "section": "def-common.ObjectType", - "text": "ObjectType" - }, - "<{}>" + "Zod.ZodAny" ], - "path": "packages/kbn-server-route-repository/src/route_validation_object.ts", + "path": "packages/kbn-server-route-repository/src/validation_objects.ts", "deprecated": false, "trackAdoption": false } diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 7b1afbe14fd5e..b79bb9d202374 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 35 | 0 | 34 | 0 | +| 38 | 0 | 38 | 0 | ## Server diff --git a/api_docs/kbn_server_route_repository_client.mdx b/api_docs/kbn_server_route_repository_client.mdx index e1cb9181782e3..1a76de61883cf 100644 --- a/api_docs/kbn_server_route_repository_client.mdx +++ b/api_docs/kbn_server_route_repository_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository-client title: "@kbn/server-route-repository-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository-client plugin -date: 2024-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository-client'] --- import kbnServerRouteRepositoryClientObj from './kbn_server_route_repository_client.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository_utils.devdocs.json b/api_docs/kbn_server_route_repository_utils.devdocs.json index b46edcb83eca7..8795640805fec 100644 --- a/api_docs/kbn_server_route_repository_utils.devdocs.json +++ b/api_docs/kbn_server_route_repository_utils.devdocs.json @@ -334,6 +334,27 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/server-route-repository-utils", + "id": "def-common.IoTsParamsObject", + "type": "Type", + "tags": [], + "label": "IoTsParamsObject", + "description": [], + "signature": [ + "Omit<", + "Type", + "<{ path?: any; query?: any; body?: any; }, { path?: any; query?: any; body?: any; }, unknown>, \"encode\" | \"asEncoder\"> & { encode: ", + "Encode", + "; asEncoder: () => ", + "Encoder", + "; }" + ], + "path": "packages/kbn-server-route-repository-utils/src/typings.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/server-route-repository-utils", "id": "def-common.ReturnOf", @@ -383,13 +404,21 @@ "label": "RouteParamsRT", "description": [], "signature": [ - "Omit<", - "Type", - "<{ path?: any; query?: any; body?: any; }, { path?: any; query?: any; body?: any; }, unknown>, \"encode\" | \"asEncoder\"> & { encode: ", - "Encode", - "; asEncoder: () => ", - "Encoder", - "; }" + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.IoTsParamsObject", + "text": "IoTsParamsObject" + }, + " | ", + { + "pluginId": "@kbn/server-route-repository-utils", + "scope": "common", + "docId": "kibKbnServerRouteRepositoryUtilsPluginApi", + "section": "def-common.ZodParamsObject", + "text": "ZodParamsObject" + } ], "path": "packages/kbn-server-route-repository-utils/src/typings.ts", "deprecated": false, @@ -558,6 +587,21 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/server-route-repository-utils", + "id": "def-common.ZodParamsObject", + "type": "Type", + "tags": [], + "label": "ZodParamsObject", + "description": [], + "signature": [ + "Zod.ZodObject<{ path?: any; query?: any; body?: any; }, Zod.UnknownKeysParam, Zod.ZodTypeAny, { query?: any; path?: any; body?: any; }, { query?: any; path?: any; body?: any; }>" + ], + "path": "packages/kbn-server-route-repository-utils/src/typings.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [] diff --git a/api_docs/kbn_server_route_repository_utils.mdx b/api_docs/kbn_server_route_repository_utils.mdx index 55cae997a02bb..8715114fae2e3 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository-utils'] --- import kbnServerRouteRepositoryUtilsObj from './kbn_server_route_repository_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 24 | 0 | 24 | 0 | +| 26 | 0 | 26 | 0 | ## Common diff --git a/api_docs/kbn_serverless_common_settings.mdx b/api_docs/kbn_serverless_common_settings.mdx index 9e1f6fd6c8b83..eeeeb710e1749 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-08-13 +date: 2024-08-15 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 e31492c0f0398..aca4dbd29ab5e 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-08-13 +date: 2024-08-15 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 5ff38e0f7e541..e31bf7b19d48b 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-08-13 +date: 2024-08-15 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 a9ce7979f8cbd..94079fcd83405 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-08-13 +date: 2024-08-15 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 ab061c3bda9d4..90eeb85341a6f 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-08-13 +date: 2024-08-15 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 3b9f91cec010d..1f0e45650cf5c 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-08-13 +date: 2024-08-15 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 8094b1ae54467..d2f5e98bab782 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-08-13 +date: 2024-08-15 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 d7d0259fd6adc..4f6228a40d490 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-08-13 +date: 2024-08-15 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 67ad9a86b9a3f..d68d92f464d59 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-08-13 +date: 2024-08-15 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 d678b5def7da1..18790f9046301 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-08-13 +date: 2024-08-15 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 88b952d28af48..32993eeed6b7a 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-08-13 +date: 2024-08-15 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 275aba9cd1fe1..86d4bf56de1db 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-08-13 +date: 2024-08-15 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 2fca574453f6c..f4571cd02c02f 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-08-13 +date: 2024-08-15 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 58119e326bd44..fb337976b8e9c 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-08-13 +date: 2024-08-15 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 c73e3499e2f8b..f20d94c7bd978 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-08-13 +date: 2024-08-15 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 8c6bb079344da..f28eaf6b5ecf6 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-08-13 +date: 2024-08-15 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 3835a3c5d5da0..d801309be37eb 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-08-13 +date: 2024-08-15 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 bad71ff9d92df..6dba4d849d93f 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-08-13 +date: 2024-08-15 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 76cd05d42c054..955b2f5373ef6 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-08-13 +date: 2024-08-15 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 ef5f0e8d56a0b..64993c4406222 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-08-13 +date: 2024-08-15 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 0ef7f4b06ecc7..14e7e55d559fc 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-08-13 +date: 2024-08-15 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 78151af2cbdad..1aa3b6f893ba9 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-08-13 +date: 2024-08-15 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 0f620da40aec4..fd081f10c751c 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-08-13 +date: 2024-08-15 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 184789f1a0a5c..95d0185b9d0cc 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-08-13 +date: 2024-08-15 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 9b5fe440fd2ff..b060510d6b348 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-08-13 +date: 2024-08-15 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 b525cbcd953f2..79408ba5a81e1 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-08-13 +date: 2024-08-15 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 ed6736a4eb895..1f612440d1ffb 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-08-13 +date: 2024-08-15 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 c18311285c098..f2c552faf21dd 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-08-13 +date: 2024-08-15 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 e880bbd4ffbbb..fc441cdcd92ef 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-08-13 +date: 2024-08-15 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 5088220949ff8..9c080568c09c7 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-08-13 +date: 2024-08-15 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 21c25fd468c1c..575cfa442857a 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-08-13 +date: 2024-08-15 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 38644737955d0..ef6f4d2b6e612 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-08-13 +date: 2024-08-15 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 2693a0396f414..1b5c94db29c66 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-08-13 +date: 2024-08-15 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 4af4a5273402c..e0b44ba18494b 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-08-13 +date: 2024-08-15 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 63d2f8d1e9398..3a39853992cf5 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-08-13 +date: 2024-08-15 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 64dd18d4516e7..84952d64994ee 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-08-13 +date: 2024-08-15 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 4fd0f4a8b5e9b..4ec0b99a13f8f 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-08-13 +date: 2024-08-15 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 15efbf8ba7087..fcfa1677a6129 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-08-13 +date: 2024-08-15 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 d05b5fe0bdc5f..b1a36c6f016e1 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-08-13 +date: 2024-08-15 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 0a9c9e69657d1..e6e7a1e002cba 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-08-13 +date: 2024-08-15 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 70aa720f79dbe..d4780bd7f58a0 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-08-13 +date: 2024-08-15 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 2b9203447027c..3920b6fb19e9d 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-08-13 +date: 2024-08-15 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 2fba70866d1d0..41c2c507bf0df 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-08-13 +date: 2024-08-15 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 8ed6aff8c0101..13c2f5891b327 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-08-13 +date: 2024-08-15 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 607d97923ce0e..ebaa04522b1e2 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-08-13 +date: 2024-08-15 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 97be1dec2c3ed..cf6b44cdc10a2 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-08-13 +date: 2024-08-15 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 0a8476ce9b2a5..afb343f4d518d 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-08-13 +date: 2024-08-15 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 1fb29e48df7a5..0a1ebf94c74f5 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-08-13 +date: 2024-08-15 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 25051d9c402a2..24d16946667b8 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-08-13 +date: 2024-08-15 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 5ba6aef8449c1..e6bb9e9a0189b 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-08-13 +date: 2024-08-15 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 a8cffc915af91..0790c81d48084 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-08-13 +date: 2024-08-15 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 a68585cd0a1ec..5bcbf041598c6 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-08-13 +date: 2024-08-15 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 08127126de198..4c7c05c31376a 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/synthetics-e2e'] --- import kbnSyntheticsE2eObj from './kbn_synthetics_e2e.devdocs.json'; diff --git a/api_docs/kbn_synthetics_private_location.mdx b/api_docs/kbn_synthetics_private_location.mdx index ad1aa9c4e7ca8..57f4e18a7ce4a 100644 --- a/api_docs/kbn_synthetics_private_location.mdx +++ b/api_docs/kbn_synthetics_private_location.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-synthetics-private-location title: "@kbn/synthetics-private-location" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/synthetics-private-location plugin -date: 2024-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/synthetics-private-location'] --- import kbnSyntheticsPrivateLocationObj from './kbn_synthetics_private_location.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 042c5aa7b952e..dd1137e376e3b 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-08-13 +date: 2024-08-15 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 3d0d0aae85656..ec5f87b6ea006 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-08-13 +date: 2024-08-15 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 1f818361d4460..659dab5751433 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-08-13 +date: 2024-08-15 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 4df4ca6070c72..b3639cc061ce1 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-08-13 +date: 2024-08-15 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 0ad381590d82e..355d1d01f79bc 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-08-13 +date: 2024-08-15 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 e50a8486e0ef2..03380103ef705 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-08-13 +date: 2024-08-15 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 c748e44405b1f..7719b55544215 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-08-13 +date: 2024-08-15 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 5c40b14c2f1c5..1e4f472e0c236 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-08-13 +date: 2024-08-15 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 3f76184409218..11782afb5831f 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_try_in_console.devdocs.json index 272e1b8129dce..a414e8b39ec76 100644 --- a/api_docs/kbn_try_in_console.devdocs.json +++ b/api_docs/kbn_try_in_console.devdocs.json @@ -40,7 +40,7 @@ "id": "def-common.TryInConsoleButton.$1", "type": "Object", "tags": [], - "label": "{\n request,\n application,\n consolePlugin,\n sharePlugin,\n content = TRY_IN_CONSOLE,\n showIcon = true,\n type = 'emptyButton',\n}", + "label": "{\n request,\n application,\n consolePlugin,\n sharePlugin,\n content = RUN_IN_CONSOLE,\n showIcon = true,\n type = 'emptyButton',\n}", "description": [], "signature": [ "TryInConsoleButtonProps" diff --git a/api_docs/kbn_try_in_console.mdx b/api_docs/kbn_try_in_console.mdx index ce7ae41a93652..9d1389714d651 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-08-13 +date: 2024-08-15 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 a523d76de8db8..453101422725e 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-08-13 +date: 2024-08-15 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 ca309079834fc..612e48a13b486 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-08-13 +date: 2024-08-15 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 bac7dce74e9ec..a52d832377284 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-08-13 +date: 2024-08-15 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 05f3f6f83c7f9..56801eb450e2d 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-08-13 +date: 2024-08-15 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 703003a99f72a..0a61e6bc84937 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-08-13 +date: 2024-08-15 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 f66aaf6f0ba31..c12e0a4b2fdf9 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-08-13 +date: 2024-08-15 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 4adac97cd3f37..bb73c56617e3f 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-08-13 +date: 2024-08-15 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 9b647cb4d297e..5a69b3390e40d 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-08-13 +date: 2024-08-15 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 df1470bb16e46..31df27c08635d 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-08-13 +date: 2024-08-15 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 23ae1600a6861..fdd79100de001 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-08-13 +date: 2024-08-15 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 5743e26f76519..0ceabdea21eb2 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-08-13 +date: 2024-08-15 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 b2ede4e7643e8..019c8ce094e66 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-08-13 +date: 2024-08-15 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 894b9fbde9bee..c35a1138f6dfb 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-08-13 +date: 2024-08-15 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 bcc5e4633c040..9525f3e4e530e 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-08-13 +date: 2024-08-15 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 021cb393cc133..8e6c0004ff8e2 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-08-13 +date: 2024-08-15 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 f4a04c12917d3..ff078d8513c33 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-08-13 +date: 2024-08-15 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 ff345dccb6ee6..de50ac7f5882d 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-08-13 +date: 2024-08-15 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 08d8683673209..dbc94a76d0abf 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-08-13 +date: 2024-08-15 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 fe6f02c0bc232..98df9d1e87746 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-08-13 +date: 2024-08-15 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.devdocs.json b/api_docs/kbn_zod.devdocs.json index 1c160258f9b56..7687287d2a6dd 100644 --- a/api_docs/kbn_zod.devdocs.json +++ b/api_docs/kbn_zod.devdocs.json @@ -13452,7 +13452,7 @@ "label": "getParsedType", "description": [], "signature": [ - "(data: any) => \"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"unknown\" | \"date\" | \"integer\" | \"float\" | \"map\" | \"set\" | \"null\" | \"nan\" | \"array\" | \"promise\" | \"void\" | \"never\"" + "(data: any) => \"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"unknown\" | \"date\" | \"integer\" | \"float\" | \"map\" | \"set\" | \"array\" | \"promise\" | \"null\" | \"nan\" | \"void\" | \"never\"" ], "path": "node_modules/zod/lib/helpers/util.d.ts", "deprecated": false, @@ -15025,7 +15025,7 @@ "label": "parsedType", "description": [], "signature": [ - "\"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"unknown\" | \"date\" | \"integer\" | \"float\" | \"map\" | \"set\" | \"null\" | \"nan\" | \"array\" | \"promise\" | \"void\" | \"never\"" + "\"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"unknown\" | \"date\" | \"integer\" | \"float\" | \"map\" | \"set\" | \"array\" | \"promise\" | \"null\" | \"nan\" | \"void\" | \"never\"" ], "path": "node_modules/zod/lib/helpers/parseUtil.d.ts", "deprecated": false, @@ -16352,7 +16352,7 @@ "label": "expected", "description": [], "signature": [ - "\"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"unknown\" | \"date\" | \"integer\" | \"float\" | \"map\" | \"set\" | \"null\" | \"nan\" | \"array\" | \"promise\" | \"void\" | \"never\"" + "\"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"unknown\" | \"date\" | \"integer\" | \"float\" | \"map\" | \"set\" | \"array\" | \"promise\" | \"null\" | \"nan\" | \"void\" | \"never\"" ], "path": "node_modules/zod/lib/ZodError.d.ts", "deprecated": false, @@ -16366,7 +16366,7 @@ "label": "received", "description": [], "signature": [ - "\"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"unknown\" | \"date\" | \"integer\" | \"float\" | \"map\" | \"set\" | \"null\" | \"nan\" | \"array\" | \"promise\" | \"void\" | \"never\"" + "\"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"unknown\" | \"date\" | \"integer\" | \"float\" | \"map\" | \"set\" | \"array\" | \"promise\" | \"null\" | \"nan\" | \"void\" | \"never\"" ], "path": "node_modules/zod/lib/ZodError.d.ts", "deprecated": false, @@ -19198,7 +19198,7 @@ "label": "ZodFirstPartySchemaTypes", "description": [], "signature": [ - "Zod.ZodString | Zod.ZodBoolean | Zod.ZodNumber | Zod.ZodUnknown | Zod.ZodUndefined | Zod.ZodAny | Zod.ZodBigInt | Zod.ZodDate | Zod.ZodSymbol | Zod.ZodNull | Zod.ZodNever | Zod.ZodVoid | Zod.ZodTuple | Zod.ZodNaN | Zod.ZodArray | Zod.ZodObject | Zod.ZodUnion | Zod.ZodDiscriminatedUnion | Zod.ZodIntersection | Zod.ZodRecord | Zod.ZodMap | Zod.ZodSet | Zod.ZodFunction | Zod.ZodLazy | Zod.ZodLiteral | Zod.ZodEnum | Zod.ZodEffects | Zod.ZodNativeEnum | Zod.ZodOptional | Zod.ZodNullable | Zod.ZodDefault | Zod.ZodCatch | Zod.ZodPromise | Zod.ZodBranded | Zod.ZodPipeline | Zod.ZodReadonly" + "Zod.ZodString | Zod.ZodBoolean | Zod.ZodNumber | Zod.ZodUnknown | Zod.ZodUndefined | Zod.ZodAny | Zod.ZodNull | Zod.ZodBigInt | Zod.ZodDate | Zod.ZodSymbol | Zod.ZodNever | Zod.ZodVoid | Zod.ZodTuple | Zod.ZodNaN | Zod.ZodArray | Zod.ZodObject | Zod.ZodUnion | Zod.ZodDiscriminatedUnion | Zod.ZodIntersection | Zod.ZodRecord | Zod.ZodMap | Zod.ZodSet | Zod.ZodFunction | Zod.ZodLazy | Zod.ZodLiteral | Zod.ZodEnum | Zod.ZodEffects | Zod.ZodNativeEnum | Zod.ZodOptional | Zod.ZodNullable | Zod.ZodDefault | Zod.ZodCatch | Zod.ZodPromise | Zod.ZodBranded | Zod.ZodPipeline | Zod.ZodReadonly" ], "path": "node_modules/zod/lib/types.d.ts", "deprecated": false, @@ -19348,7 +19348,7 @@ "label": "ZodParsedType", "description": [], "signature": [ - "\"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"unknown\" | \"date\" | \"integer\" | \"float\" | \"map\" | \"set\" | \"null\" | \"nan\" | \"array\" | \"promise\" | \"void\" | \"never\"" + "\"string\" | \"number\" | \"bigint\" | \"boolean\" | \"symbol\" | \"undefined\" | \"object\" | \"function\" | \"unknown\" | \"date\" | \"integer\" | \"float\" | \"map\" | \"set\" | \"array\" | \"promise\" | \"null\" | \"nan\" | \"void\" | \"never\"" ], "path": "node_modules/zod/lib/helpers/util.d.ts", "deprecated": false, diff --git a/api_docs/kbn_zod.mdx b/api_docs/kbn_zod.mdx index 37a1f6b4131c4..ec5957980265c 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-08-13 +date: 2024-08-15 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 71b4195879588..eb488540186c4 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-08-13 +date: 2024-08-15 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 06865bc0f1bc8..5dfe2657f1450 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-08-13 +date: 2024-08-15 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 ba8efcd7f5aec..dbe3f07e9e582 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-08-13 +date: 2024-08-15 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 d1223dce63497..211440abb4c03 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-08-13 +date: 2024-08-15 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 0a58a43b46c48..7eaed39923a72 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-08-13 +date: 2024-08-15 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 9063175dfeace..77730877c7ad5 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-08-13 +date: 2024-08-15 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 42e42a39bd04e..72c3fdde66b2a 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-08-13 +date: 2024-08-15 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 7f908233af092..81bfc5818cc66 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-08-13 +date: 2024-08-15 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 e17650fa5118d..7d7e61e29fd5f 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-08-13 +date: 2024-08-15 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 69d38d8dbeedc..168fb62625f41 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-08-13 +date: 2024-08-15 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 1583c709a76b8..44d0ee954d234 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-08-13 +date: 2024-08-15 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 8a82c52795795..e874325432b92 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-08-13 +date: 2024-08-15 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 92a32972763c2..528c931aba36e 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-08-13 +date: 2024-08-15 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 f031fc1784893..d7b089ed0d9b5 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-08-13 +date: 2024-08-15 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 0b6ec624af331..538256c91d3cb 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-08-13 +date: 2024-08-15 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 4efdbab6d8241..3c79a1a32e711 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-08-13 +date: 2024-08-15 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 175ce071011a2..dd3a2d2f70a4e 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/metrics_data_access.devdocs.json b/api_docs/metrics_data_access.devdocs.json index 786c41c318074..e4bb3a666e6b9 100644 --- a/api_docs/metrics_data_access.devdocs.json +++ b/api_docs/metrics_data_access.devdocs.json @@ -745,7 +745,7 @@ "label": "hostSnapshotMetricTypes", "description": [], "signature": [ - "(\"memory\" | \"logRate\" | \"rx\" | \"normalizedLoad1m\" | \"memoryFree\" | \"tx\" | \"cpu\" | \"cpuTotal\" | \"diskLatency\" | \"diskSpaceUsage\" | \"load\" | \"memoryTotal\" | \"rxV2\" | \"txV2\")[]" + "(\"memory\" | \"logRate\" | \"rx\" | \"normalizedLoad1m\" | \"memoryFree\" | \"tx\" | \"cpu\" | \"cpuV2\" | \"diskLatency\" | \"diskSpaceUsage\" | \"load\" | \"memoryTotal\" | \"rxV2\" | \"txV2\")[]" ], "path": "x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/host/metrics/index.ts", "deprecated": false, @@ -1522,7 +1522,7 @@ "label": "SnapshotMetricType", "description": [], "signature": [ - "\"count\" | \"memory\" | \"custom\" | \"logRate\" | \"rx\" | \"normalizedLoad1m\" | \"memoryFree\" | \"tx\" | \"cpu\" | \"s3BucketSize\" | \"s3NumberOfObjects\" | \"s3TotalRequests\" | \"s3UploadBytes\" | \"s3DownloadBytes\" | \"cpuTotal\" | \"diskLatency\" | \"diskSpaceUsage\" | \"load\" | \"memoryTotal\" | \"rxV2\" | \"txV2\" | \"diskIOReadBytes\" | \"diskIOWriteBytes\" | \"rdsLatency\" | \"rdsConnections\" | \"rdsQueriesExecuted\" | \"rdsActiveTransactions\" | \"sqsMessagesVisible\" | \"sqsMessagesDelayed\" | \"sqsMessagesEmpty\" | \"sqsMessagesSent\" | \"sqsOldestMessage\"" + "\"count\" | \"memory\" | \"custom\" | \"logRate\" | \"rx\" | \"normalizedLoad1m\" | \"memoryFree\" | \"tx\" | \"cpu\" | \"s3BucketSize\" | \"s3NumberOfObjects\" | \"s3TotalRequests\" | \"s3UploadBytes\" | \"s3DownloadBytes\" | \"cpuV2\" | \"diskLatency\" | \"diskSpaceUsage\" | \"load\" | \"memoryTotal\" | \"rxV2\" | \"txV2\" | \"diskIOReadBytes\" | \"diskIOWriteBytes\" | \"rdsLatency\" | \"rdsConnections\" | \"rdsQueriesExecuted\" | \"rdsActiveTransactions\" | \"sqsMessagesVisible\" | \"sqsMessagesDelayed\" | \"sqsMessagesEmpty\" | \"sqsMessagesSent\" | \"sqsOldestMessage\"" ], "path": "x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/types.ts", "deprecated": false, @@ -2066,10 +2066,10 @@ }, { "parentPluginId": "metricsDataAccess", - "id": "def-common.SnapshotMetricTypeKeys.cpuTotal", + "id": "def-common.SnapshotMetricTypeKeys.cpuV2", "type": "Uncategorized", "tags": [], - "label": "cpuTotal", + "label": "cpuV2", "description": [], "signature": [ "null" @@ -2510,7 +2510,7 @@ "description": [], "signature": [ "KeyofC", - "<{ count: null; cpuTotal: null; cpu: null; diskLatency: null; diskSpaceUsage: null; load: null; memory: null; memoryFree: null; memoryTotal: null; normalizedLoad1m: null; tx: null; rx: null; txV2: null; rxV2: null; logRate: null; diskIOReadBytes: null; diskIOWriteBytes: null; s3TotalRequests: null; s3NumberOfObjects: null; s3BucketSize: null; s3DownloadBytes: null; s3UploadBytes: null; rdsConnections: null; rdsQueriesExecuted: null; rdsActiveTransactions: null; rdsLatency: null; sqsMessagesVisible: null; sqsMessagesDelayed: null; sqsMessagesSent: null; sqsMessagesEmpty: null; sqsOldestMessage: null; custom: null; }>" + "<{ count: null; cpuV2: null; cpu: null; diskLatency: null; diskSpaceUsage: null; load: null; memory: null; memoryFree: null; memoryTotal: null; normalizedLoad1m: null; tx: null; rx: null; txV2: null; rxV2: null; logRate: null; diskIOReadBytes: null; diskIOWriteBytes: null; s3TotalRequests: null; s3NumberOfObjects: null; s3BucketSize: null; s3DownloadBytes: null; s3UploadBytes: null; rdsConnections: null; rdsQueriesExecuted: null; rdsActiveTransactions: null; rdsLatency: null; sqsMessagesVisible: null; sqsMessagesDelayed: null; sqsMessagesSent: null; sqsMessagesEmpty: null; sqsOldestMessage: null; custom: null; }>" ], "path": "x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/types.ts", "deprecated": false, diff --git a/api_docs/metrics_data_access.mdx b/api_docs/metrics_data_access.mdx index e3737d7c4700c..1d96943b445bb 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-08-13 +date: 2024-08-15 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 0b43721cc248d..849f86411c3f3 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-08-13 +date: 2024-08-15 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 9ea43f964d9a2..0c0d31350cd8c 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-08-13 +date: 2024-08-15 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 465d4e46f6f17..adefbcfe90132 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-08-13 +date: 2024-08-15 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 20c634c7002d5..a2767b4367285 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-08-13 +date: 2024-08-15 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 110ea9762b72f..87e63a37b8186 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-08-13 +date: 2024-08-15 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 a5ae95b119700..c574d4aa12591 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-08-13 +date: 2024-08-15 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 bfd28f52a8be5..ce1348dd51d83 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-08-13 +date: 2024-08-15 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 3419aad60f055..55811a2da35a6 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index 75b56890e1f3b..9ff3f59805dff 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -3821,6 +3821,27 @@ "path": "x-pack/plugins/observability_solution/observability/public/plugin.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "observability", + "id": "def-public.ObservabilityPublicPluginsStart.investigate", + "type": "Object", + "tags": [], + "label": "investigate", + "description": [], + "signature": [ + { + "pluginId": "investigate", + "scope": "public", + "docId": "kibInvestigatePluginApi", + "section": "def-public.InvestigatePublicStart", + "text": "InvestigatePublicStart" + }, + " | undefined" + ], + "path": "x-pack/plugins/observability_solution/observability/public/plugin.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 5be2a8fa0d37a..0e8587ca1d642 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 701 | 2 | 694 | 22 | +| 702 | 2 | 695 | 22 | ## Client diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index 9bbec0085989c..b6b2f7f270895 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-08-13 +date: 2024-08-15 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 859b13e85eda4..63e489f15f877 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-08-13 +date: 2024-08-15 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 1e7d8058cbe21..c32ec8ed7d654 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-08-13 +date: 2024-08-15 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 d1ef5a755dbd5..9fc9bb66a8701 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-08-13 +date: 2024-08-15 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 978688e8b0ec3..6a600904e06d9 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-08-13 +date: 2024-08-15 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 df171eada6dc8..dcc9eb5703261 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-08-13 +date: 2024-08-15 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 c9e03ea3711bd..07108134ee885 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-08-13 +date: 2024-08-15 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 33a9b6cd92bba..8bdce97357077 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-08-13 +date: 2024-08-15 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 bb7668283a969..1fc1fb90d76ae 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -15,13 +15,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 830 | 706 | 45 | +| 833 | 709 | 45 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 52174 | 241 | 39111 | 1915 | +| 52284 | 241 | 39219 | 1920 | ## Plugin Directory @@ -62,7 +62,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Data view management app | 2 | 0 | 2 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Data services are useful for searching and querying data from Elasticsearch. Helpful utilities include: a re-usable react query bar, KQL autocomplete, async search, Data Views (Index Patterns) and field formatters. | 1224 | 0 | 443 | 3 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | The Data Visualizer tools help you understand your data, by analyzing the metrics and fields in a log file or an existing Elasticsearch index. | 31 | 3 | 25 | 4 | -| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin introduces the concept of data set quality, where users can easily get an overview on the data sets they have. | 10 | 0 | 10 | 5 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin introduces the concept of data set quality, where users can easily get an overview on the data sets they have. | 15 | 0 | 15 | 8 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 15 | 0 | 9 | 2 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the Discover application and the saved search embeddable. | 149 | 0 | 102 | 26 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 35 | 0 | 33 | 2 | @@ -102,7 +102,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 84 | 0 | 84 | 8 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 240 | 0 | 24 | 9 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Simple UI for managing files in Kibana | 3 | 0 | 3 | 0 | -| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1351 | 5 | 1229 | 74 | +| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1359 | 5 | 1236 | 74 | | ftrApis | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 72 | 0 | 14 | 5 | | globalSearchBar | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 0 | 0 | 0 | 0 | @@ -121,7 +121,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 127 | 2 | 100 | 4 | | | [@elastic/security-scalability](https://github.com/orgs/elastic/teams/security-scalability) | Plugin implementing the Integration Assistant API and UI | 47 | 0 | 40 | 3 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides UI and APIs for the interactive setup mode. | 28 | 0 | 18 | 0 | -| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 112 | 0 | 112 | 6 | +| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 111 | 0 | 111 | 5 | | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 5 | 0 | 5 | 2 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 6 | 0 | 6 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 153 | 0 | 121 | 3 | @@ -150,7 +150,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 3 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 1 | -| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 701 | 2 | 694 | 22 | +| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 702 | 2 | 695 | 22 | | | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 290 | 1 | 288 | 26 | | | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 4 | 0 | 4 | 0 | | | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 2 | 0 | 2 | 0 | @@ -166,7 +166,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 23 | 0 | 23 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Reporting Services enables applications to feature reports that the user can automate with Watcher and download later. | 9 | 0 | 2 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 21 | 0 | 21 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 287 | 0 | 250 | 11 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 285 | 0 | 248 | 11 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 24 | 0 | 19 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 132 | 2 | 121 | 5 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 25 | 0 | 25 | 0 | @@ -254,8 +254,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 1 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 18 | 0 | 18 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 4 | 0 | 4 | 0 | -| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 49 | 0 | 49 | 8 | -| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 200 | 0 | 200 | 31 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 51 | 0 | 51 | 9 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 201 | 0 | 201 | 31 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 316 | 0 | 315 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 11 | 0 | 11 | 0 | | | [@elastic/security-defend-workflows](https://github.com/orgs/elastic/teams/security-defend-workflows) | - | 3 | 0 | 3 | 0 | @@ -279,10 +279,12 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 24 | 0 | 24 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 149 | 2 | 143 | 20 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 10 | 0 | 8 | 4 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 39 | 0 | 38 | 0 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 6 | 0 | 6 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 8 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 3 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 10 | 0 | 10 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 49 | 0 | 33 | 3 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 50 | 0 | 33 | 3 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 30 | 0 | 30 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 195 | 1 | 128 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 100 | 0 | 0 | 0 | @@ -493,7 +495,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 35 | 0 | 34 | 0 | | | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 156 | 0 | 130 | 9 | | | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 354 | 0 | 328 | 0 | -| | [@elastic/obs-entities](https://github.com/orgs/elastic/teams/obs-entities) | - | 34 | 0 | 34 | 0 | +| | [@elastic/obs-entities](https://github.com/orgs/elastic/teams/obs-entities) | - | 41 | 0 | 41 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 55 | 0 | 40 | 7 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 32 | 0 | 19 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 11 | 0 | 6 | 0 | @@ -510,7 +512,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 49 | 0 | 40 | 2 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 0 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 3 | 0 | 3 | 0 | -| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 46 | 0 | 31 | 1 | +| | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 47 | 0 | 32 | 1 | | | [@elastic/appex-qa](https://github.com/orgs/elastic/teams/appex-qa) | - | 551 | 6 | 511 | 3 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 0 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 1 | 0 | 1 | 0 | @@ -529,6 +531,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 7 | 1 | 7 | 1 | | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 9 | 0 | 9 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 52 | 12 | 43 | 0 | +| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 25 | 0 | 25 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 60 | 0 | 60 | 4 | | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | - | 44 | 0 | 44 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 13 | 0 | 13 | 0 | @@ -582,7 +585,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 34 | 0 | 0 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 44 | 0 | 38 | 1 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 18 | 0 | 18 | 0 | -| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 31 | 1 | 24 | 1 | +| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 42 | 1 | 35 | 1 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 22 | 0 | 16 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 123 | 0 | 123 | 3 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 55 | 1 | 50 | 0 | @@ -601,7 +604,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 1 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 1 | 0 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 88 | 0 | 76 | 0 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 216 | 0 | 181 | 5 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 216 | 0 | 181 | 6 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 168 | 0 | 55 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 13 | 0 | 7 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 22 | 0 | 9 | 0 | @@ -650,7 +653,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 51 | 0 | 25 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 275 | 1 | 154 | 0 | | | [@elastic/kibana-cloud-security-posture](https://github.com/orgs/elastic/teams/kibana-cloud-security-posture) | - | 6 | 0 | 0 | 0 | -| | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 14 | 0 | 14 | 6 | +| | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 15 | 0 | 15 | 7 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 54 | 0 | 49 | 0 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 30 | 0 | 24 | 0 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 2 | 0 | 0 | 0 | @@ -672,9 +675,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 120 | 0 | 116 | 0 | | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 51 | 0 | 46 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 69 | 0 | 64 | 0 | -| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 35 | 0 | 34 | 0 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 38 | 0 | 38 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 3 | 0 | 3 | 0 | -| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 24 | 0 | 24 | 0 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 26 | 0 | 26 | 0 | | | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 1 | 0 | 1 | 0 | | | [@elastic/appex-sharedux @elastic/kibana-management @elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 1 | 0 | 1 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 10 | 0 | 7 | 1 | diff --git a/api_docs/presentation_panel.devdocs.json b/api_docs/presentation_panel.devdocs.json index 4b73956c37eea..15ffab0f06b91 100644 --- a/api_docs/presentation_panel.devdocs.json +++ b/api_docs/presentation_panel.devdocs.json @@ -45,7 +45,7 @@ }, "<", "PanelCompatibleComponent", - " | null>; } & { hidePanelChrome?: boolean | undefined; }) => JSX.Element" + " | null>; } & { hidePanelChrome?: boolean | undefined; }) => JSX.Element | null" ], "path": "src/plugins/presentation_panel/public/panel_component/presentation_panel.tsx", "deprecated": false, diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index a554fe61df7e7..d33becb5faa1d 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-08-13 +date: 2024-08-15 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 2875c6c2b9c0c..2c5baf88b086d 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-08-13 +date: 2024-08-15 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 269a448850401..942816ef6e36f 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-08-13 +date: 2024-08-15 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 ed0ae757281df..ad230daf2d269 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-08-13 +date: 2024-08-15 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 514993f0b9cfa..80b9ff24e51c9 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-08-13 +date: 2024-08-15 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 c6aab03f1f165..308b71a43949a 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-08-13 +date: 2024-08-15 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 f3ffced39c19f..4ef5f102c37a5 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json index d7cec6f063cb3..02bf20ed95090 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -3667,7 +3667,7 @@ "label": "alertWithPersistence", "description": [], "signature": [ - "(alerts: { _id: string; _source: T; }[], refresh: boolean | \"wait_for\", maxAlerts?: number | undefined, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined) => Promise<", + "(alerts: { _id: string; _source: T; }[], refresh: boolean | \"wait_for\", maxAlerts?: number | undefined, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined) => Promise<", { "pluginId": "ruleRegistry", "scope": "server", @@ -3737,20 +3737,6 @@ "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", "deprecated": false, "trackAdoption": false - }, - { - "parentPluginId": "ruleRegistry", - "id": "def-server.PersistenceServices.alertWithPersistence.$5", - "type": "Object", - "tags": [], - "label": "currentTimeOverride", - "description": [], - "signature": [ - "Date | undefined" - ], - "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", - "deprecated": false, - "trackAdoption": false } ] }, @@ -4431,7 +4417,7 @@ "label": "PersistenceAlertService", "description": [], "signature": [ - "(alerts: { _id: string; _source: T; }[], refresh: boolean | \"wait_for\", maxAlerts?: number | undefined, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined) => Promise<", + "(alerts: { _id: string; _source: T; }[], refresh: boolean | \"wait_for\", maxAlerts?: number | undefined, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined) => Promise<", { "pluginId": "ruleRegistry", "scope": "server", @@ -4501,20 +4487,6 @@ "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", "deprecated": false, "trackAdoption": false - }, - { - "parentPluginId": "ruleRegistry", - "id": "def-server.PersistenceAlertService.$5", - "type": "Object", - "tags": [], - "label": "currentTimeOverride", - "description": [], - "signature": [ - "Date | undefined" - ], - "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", - "deprecated": false, - "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 42c8d55fc6081..ed6db2aca7d4c 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.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 | |-------------------|-----------|------------------------|-----------------| -| 287 | 0 | 250 | 11 | +| 285 | 0 | 248 | 11 | ## Server diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index ae920bf0f15a2..aab34e8deab74 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-08-13 +date: 2024-08-15 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 9a794746eb83b..ae93c15cbf764 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-08-13 +date: 2024-08-15 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 715d30b0cbe24..e6bc1d8aa7217 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-08-13 +date: 2024-08-15 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 d26e1f0292ad2..c80f6596ee0a6 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-08-13 +date: 2024-08-15 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 5a1a6a64a24ea..93bc393e67f22 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-08-13 +date: 2024-08-15 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 0c07f3adfd0e2..f60d6c26b99a1 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-08-13 +date: 2024-08-15 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 2a9f3669955e1..a623d9a20485a 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-08-13 +date: 2024-08-15 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 a4121aefd3358..65283a47f4824 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-08-13 +date: 2024-08-15 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 9f8dc75f17aad..5544e9ba66c35 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-08-13 +date: 2024-08-15 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 bd19aa55abd6b..08b1ed1da6660 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-08-13 +date: 2024-08-15 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 80df0fedb5e2a..03f6292c37692 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-08-13 +date: 2024-08-15 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 2728c9196a81c..49f3bd89128e9 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-08-13 +date: 2024-08-15 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 3d3a32166ed77..dd023c6d772db 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-08-13 +date: 2024-08-15 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 fbaffaec14068..ed19ac288035f 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchPlayground'] --- import searchPlaygroundObj from './search_playground.devdocs.json'; diff --git a/api_docs/security.mdx b/api_docs/security.mdx index a6a217423e3fd..57c68acbcf56b 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-08-13 +date: 2024-08-15 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 5acac10822e12..a0d30670b23d8 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-08-13 +date: 2024-08-15 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 2bd5cb29cef93..604eed30ca4e2 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-08-13 +date: 2024-08-15 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 1961c8f5683d9..09af2ec1bf1ea 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-08-13 +date: 2024-08-15 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 83f2677ec7452..aa8b827c4da21 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-08-13 +date: 2024-08-15 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 ab70b1e451469..27063068a6b3b 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-08-13 +date: 2024-08-15 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 ab39c9fc109b4..77fb379147b42 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-08-13 +date: 2024-08-15 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 261d94a9df0ab..ae22a14d9ea93 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-08-13 +date: 2024-08-15 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 d7e8d6cafc929..de226cbc6fcc6 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-08-13 +date: 2024-08-15 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 091030d7d7a38..3a480019a43ae 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-08-13 +date: 2024-08-15 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 ce02f0d28a74e..c84df0d94665a 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-08-13 +date: 2024-08-15 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 0f54ee0036b1c..e6cae13a8f3b7 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-08-13 +date: 2024-08-15 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 d72d989b5fd44..8810cb8cd2564 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-08-13 +date: 2024-08-15 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 77cbb0a24c16a..669103d6b4b76 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 6a255ee59ffab..d3e2dd4565829 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 0cb8ceb47f544..d795e1a1ac7e7 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-08-13 +date: 2024-08-15 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 1741ba236a2dc..c5440e21e60dd 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-08-13 +date: 2024-08-15 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 aa14e75a6fd87..a6ccf82135690 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-08-13 +date: 2024-08-15 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 b0fb3e8ffa6ca..1ffebd9ed4eeb 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-08-13 +date: 2024-08-15 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 b011ba2c46daf..e335455007f04 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-08-13 +date: 2024-08-15 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 07b01c990d5de..0ccff7711d662 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-08-13 +date: 2024-08-15 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 8f00c131b0712..d187704de8599 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 3dcf15f8204cf..09f9932c8314b 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 29e13d21a8b7b..628770ff25367 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-08-13 +date: 2024-08-15 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 b067c8636e508..80b9fd5993c60 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-08-13 +date: 2024-08-15 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 88a653ec65d2a..60f1933b567ad 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-08-13 +date: 2024-08-15 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 1947de6ede30f..6ba027cfea9fd 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-08-13 +date: 2024-08-15 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 1a38c6b461d21..d83cf2819c20a 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-08-13 +date: 2024-08-15 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 8077b3465f7e2..1b46a6f0eacaa 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-08-13 +date: 2024-08-15 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 a075e1b08edee..4addb9dbe97d2 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-08-13 +date: 2024-08-15 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 f59a5d3f8b1c7..e2c194942a63e 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-08-13 +date: 2024-08-15 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 cb6a028e85c3d..ec587344c3b5e 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-08-13 +date: 2024-08-15 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 ab71d0badeb6c..580a70f94be9f 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-08-13 +date: 2024-08-15 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 e35b838324ef6..47634a7d24701 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-08-13 +date: 2024-08-15 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 8fa4e9c0420ea..aab82e2cad4e7 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-08-13 +date: 2024-08-15 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 d532c58ab10ec..7695e99ff5350 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-08-13 +date: 2024-08-15 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 381ef3bcc6925..b1e735f534b78 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-08-13 +date: 2024-08-15 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 a884fc7a1fd11..2e8b3a97ef4f6 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-08-13 +date: 2024-08-15 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 3315c425c2e9d..824b4a09f467d 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-08-13 +date: 2024-08-15 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 85ecf8f3a2577..7e5b59c16d4e4 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-08-13 +date: 2024-08-15 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 9c17b4e586d30..61f2b93bf3064 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-08-13 +date: 2024-08-15 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 cb7057ef1dd9f..b25edd0b6683f 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-08-13 +date: 2024-08-15 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 661e5c609541d..d6cff18d8b7e4 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-08-13 +date: 2024-08-15 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 2a68cc14ed713..94bdb3aeaf43f 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-08-13 +date: 2024-08-15 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/catalog-info.yaml b/catalog-info.yaml index 47fd1049e2fed..865723fbe0976 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -119,10 +119,6 @@ spec: repository: elastic/kibana provider_settings: trigger_mode: none - schedules: - daily: - branch: main - cronline: "@daily" pipeline_file: ".buildkite/pipelines/sonarqube.yml" teams: kibana-operations: diff --git a/examples/controls_example/public/app/react_control_example/react_control_example.tsx b/examples/controls_example/public/app/react_control_example/react_control_example.tsx index 9436adc208ebd..4ed6703c46c84 100644 --- a/examples/controls_example/public/app/react_control_example/react_control_example.tsx +++ b/examples/controls_example/public/app/react_control_example/react_control_example.tsx @@ -99,6 +99,9 @@ export const ReactControlExample = ({ const saveNotification$ = useMemo(() => { return new Subject(); }, []); + const reload$ = useMemo(() => { + return new Subject(); + }, []); const [dataLoading, timeRange, viewMode] = useBatchedPublishingSubjects( dataLoading$, timeRange$, @@ -136,8 +139,8 @@ export const ReactControlExample = ({ addNewPanel: () => { return Promise.resolve(undefined); }, - lastUsedDataViewId: new BehaviorSubject(WEB_LOGS_DATA_VIEW_ID), saveNotification$, + reload$, }; // eslint-disable-next-line react-hooks/exhaustive-deps }, []); @@ -215,6 +218,19 @@ export const ReactControlExample = ({ }; }, [controlGroupApi, timeslice$]); + const [hasControls, setHasControls] = useState(false); + useEffect(() => { + if (!controlGroupApi) { + return; + } + const subscription = controlGroupApi.children$.subscribe((children) => { + setHasControls(Object.keys(children).length > 0); + }); + return () => { + subscription.unsubscribe(); + }; + }, [controlGroupApi]); + useEffect(() => { const subscription = combineLatest([controlGroupFilters$, unifiedSearchFilters$]).subscribe( ([controlGroupFilters, unifiedSearchFilters]) => { @@ -381,8 +397,11 @@ export const ReactControlExample = ({ to: end, }); }} + onRefresh={() => { + reload$.next(); + }} /> - + {hasControls && } { dashboardApi?.setChild(api); @@ -395,6 +414,7 @@ export const ReactControlExample = ({ getSerializedStateForChild: getControlGroupSerializedState, getRuntimeStateForChild: getControlGroupRuntimeState, })} + panelProps={{ hideLoader: true }} key={`control_group`} /> diff --git a/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx b/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx index ef73c179b8f8e..eea33aff7bf5a 100644 --- a/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx +++ b/examples/embeddable_examples/public/react_embeddables/search/search_react_embeddable.tsx @@ -111,10 +111,10 @@ export const getSearchEmbeddableFactory = (services: Services) => { ) .subscribe((next) => { dataLoading$.next(false); - if (next && next.hasOwnProperty('count') && next.count !== undefined) { + if (next && Object.hasOwn(next, 'count') && next.count !== undefined) { count$.next(next.count); } - if (next && next.hasOwnProperty('error')) { + if (next && Object.hasOwn(next, 'error')) { blockingError$.next(next.error); } }); diff --git a/examples/ui_actions_explorer/public/trigger_context_example.tsx b/examples/ui_actions_explorer/public/trigger_context_example.tsx index 3e94cd253a215..5769c4c6c02b9 100644 --- a/examples/ui_actions_explorer/public/trigger_context_example.tsx +++ b/examples/ui_actions_explorer/public/trigger_context_example.tsx @@ -108,7 +108,7 @@ export function TriggerContextExample({ uiActionsApi }: Props) { const renderCellValue = useMemo(() => { return ({ rowIndex, columnId }: EuiDataGridCellValueElementProps) => { - return rows.hasOwnProperty(rowIndex) ? rows[rowIndex][columnId] : null; + return Object.hasOwn(rows, rowIndex) ? rows[rowIndex][columnId] : null; }; }, [rows]); diff --git a/oas_docs/.spectral.yaml b/oas_docs/.spectral.yaml index ec05decbc1fe4..2bea043e02446 100644 --- a/oas_docs/.spectral.yaml +++ b/oas_docs/.spectral.yaml @@ -16,9 +16,12 @@ rules: # Operations operation-operationId: error operation-operationId-unique: error - operation-operationId-valid-in-url: error + operation-operationId-valid-in-url: false operation-tag-defined: warn operation-tags: warn + # Parameters + # Lower severity to allow optional path parameters + path-params: warn # Responses operation-success-response: warn # Schema @@ -69,13 +72,13 @@ rules: message: 'Each operation should have a summary' severity: error recommended: true - given: $.paths[*][*] + given: $.paths[*][get,put,post,delete,options,head,patch,trace] then: field: summary function: defined operation-summary-length: description: Operation summary should be between 5 and 45 characters - given: '$.paths[*][*]' + given: '$.paths[*][get,put,post,delete,options,head,patch,trace]' then: field: summary function: length diff --git a/oas_docs/README.md b/oas_docs/README.md index 2e11c838241a9..f5317ed084893 100644 --- a/oas_docs/README.md +++ b/oas_docs/README.md @@ -1,8 +1,9 @@ The `bundle.json` and `bundle.serverless.json` files are generated automatically. See `node scripts/capture_oas_snapshot --help` for more info. -The `output/kibana.serverless.yaml` file is a temporary OpenAPI document created by joining some manually-maintained files. -To create it and lint it, run `make api-docs` or `make api-docs-serverless` and `make api-docs-lint` or `make api-docs-lint-serverless`. +The `output/kibana.serverless.yaml` and `output/kibana.yaml` files join some manually-maintained files with the automatically generated files. +To add integrate more files into this bundle, edit the appropriate `oas_docs/scripts/merge*.js` files. +To generate the bundled files, run `make api-docs` (or `make api-docs-serverless` and `make api-docs-stateful`). +To lint them, run `make api-docs-lint` (or `make api-docs-lint-serverless` and `make api-lint-stateful`). -The `output/kibana.yaml` file is a temporary OpenAPI document created by joining some manually-maintained files. -To create it and lint it, run `make api-docs` or `make api-docs-stateful` and `make api-docs-lint` or `make api-docs-lint-stateful`. \ No newline at end of file +To apply some overlays that perform some post-processing and append some content, run `make api-docs-overlay`. \ No newline at end of file diff --git a/oas_docs/makefile b/oas_docs/makefile index 6e300734cdd17..673e46c546a80 100644 --- a/oas_docs/makefile +++ b/oas_docs/makefile @@ -18,19 +18,18 @@ api-docs: ## Generate Serverless and ESS Kibana OpenAPI bundles with kbn-openapi @node scripts/merge_serverless_oas.js @node scripts/merge_ess_oas.js -.PHONY: api-docs-redocly -api-docs-redocly: ## Generate kibana.serverless.yaml and kibana.yaml with Redocly CLI - @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" "bundle.serverless.json" -o "output/kibana.serverless.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" "bundle.json" -o "output/kibana.yaml" --prefix-components-with-info-prop title +.PHONY: api-docs-staging +api-docs-staging: ## Generate Serverless and ESS Kibana OpenAPI bundles with kbn-openapi-bundler + @node scripts/merge_serverless_oas_staging.js + @node scripts/merge_ess_oas_staging.js .PHONY: api-docs-stateful api-docs-stateful: ## Generate only kibana.yaml - @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" "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 + @node scripts/merge_ess_oas.js .PHONY: api-docs-serverless api-docs-serverless: ## Generate only kibana.serverless.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" "bundle.serverless.json" -o "output/kibana.serverless.yaml" --prefix-components-with-info-prop title + @node scripts/merge_serverless_oas.js .PHONY: api-docs-lint api-docs-lint: ## Run spectral API docs linter diff --git a/oas_docs/output/kibana.serverless.yaml b/oas_docs/output/kibana.serverless.yaml index 0626823f8739a..371d1b25b4c40 100644 --- a/oas_docs/output/kibana.serverless.yaml +++ b/oas_docs/output/kibana.serverless.yaml @@ -3,18 +3,26 @@ info: contact: name: Kibana Team description: > - The Kibana REST APIs enable you to manage resources such as connectors, data - views, and saved objects. + **Technical preview** - The API calls are stateless. + This functionality is in technical preview and may be changed or removed in + a future release. - Each request that you make happens in isolation from other calls and must - include all of the necessary information for Kibana to fulfill the + Elastic will work to fix any issues, but features in technical preview are + not subject to the support SLA of official GA features. - request. - API requests return JSON output, which is a format that is machine-readable - and works well for automation. + The Kibana REST APIs for Elastic serverless enable you to manage resources + + such as connectors, data views, and saved objects. The API calls are + + stateless. Each request that you make happens in isolation from other calls + + and must include all of the necessary information for Kibana to fulfill the + + request. API requests return JSON output, which is a format that is + + machine-readable and works well for automation. To interact with Kibana APIs, use the following operations: @@ -22,8 +30,6 @@ info: - GET: Fetches the information. - - PATCH: Applies partial modifications to the existing information. - - POST: Adds new information. - PUT: Updates the existing information. @@ -32,9 +38,8 @@ info: You can prepend any Kibana API endpoint with `kbn:` and run the request in - **Dev Tools → Console**. - For example: + **Dev Tools → Console**. For example: ``` @@ -42,291 +47,239 @@ info: GET kbn:/api/data_views ``` - - - For more information about the console, refer to [Run API - requests](https://www.elastic.co/guide/en/kibana/current/console-kibana.html). license: name: Elastic License 2.0 url: 'https://www.elastic.co/licensing/elastic-license' - title: Kibana APIs + title: Kibana Serverless APIs version: 1.0.2 servers: + - url: 'http://{kibana_host}:{port}' + variables: + kibana_host: + default: localhost + port: + default: '5601' + - url: 'http://localhost:5622' + - url: 'https://{kibanaUrl}' + variables: + kibanaUrl: + default: 'localhost:5601' - url: 'https://{kibana_url}' variables: kibana_url: default: 'localhost:5601' + - url: / + - description: Public and supported Fleet API + url: 'http://KIBANA_HOST:5601/api/fleet' + - description: local + url: 'http://localhost:5601' paths: - /api/actions/connector: - post: - description: The connector identifier is randomly generated. - operationId: createConnector - parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - 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 - schema: - $ref: '#/components/schemas/Connectors_create_connector_request' - required: true + /agent_download_sources: + get: + operationId: get-download-sources responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - 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 schema: - $ref: '#/components/schemas/Connectors_connector_response_properties' - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - summary: Create a connector with a random ID + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_download_sources' + type: array + page: + type: integer + perPage: + type: integer + total: + type: integer + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List agent binary download sources tags: - - connectors - /api/actions/connector_types: - get: - operationId: getConnectorTypes - parameters: - - description: >- - A filter to limit the retrieved connector types to those that - support a specific feature (such as alerting or cases). - in: query - name: feature_id - schema: - $ref: '#/components/schemas/Connectors_features' + - Elastic Agent binary download sources + post: + operationId: post-download-sources + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + host: + type: string + id: + type: string + is_default: + type: boolean + name: + type: string + required: + - name + - host + - is_default responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - getConnectorTypesServerlessResponse: - $ref: >- - #/components/examples/Connectors_get_connector_types_generativeai_response schema: - description: The properties vary for each connector type. - items: - type: object - properties: - enabled: - description: >- - Indicates whether the connector type is enabled in - Kibana. - example: true - type: boolean - enabled_in_config: - description: >- - Indicates whether the connector type is enabled in the - Kibana configuration file. - example: true - type: boolean - enabled_in_license: - description: >- - Indicates whether the connector is enabled in the - license. - example: true - type: boolean - id: - $ref: '#/components/schemas/Connectors_connector_types' - is_system_action_type: - example: false - type: boolean - minimum_license_required: - description: The license that is required to use the connector type. - example: basic - type: string - name: - description: The name of the connector type. - example: Index - type: string - supported_feature_ids: - description: The features that are supported by the connector type. - example: - - alerting - - cases - - siem - items: - $ref: '#/components/schemas/Connectors_features' - type: array - title: Get connector types response body properties - type: array - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - summary: Get all connector types + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_download_sources' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Create agent binary download source tags: - - connectors - '/api/actions/connector/{connectorId}': + - Elastic Agent binary download sources + '/agent_download_sources/{sourceId}': delete: - operationId: deleteConnector - parameters: - - $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' - summary: Delete a connector - tags: - - connectors - get: - operationId: getConnector + operationId: delete-download-source parameters: - - $ref: '#/components/parameters/Connectors_connector_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - getConnectorResponse: - $ref: '#/components/examples/Connectors_get_connector_response' schema: - $ref: '#/components/schemas/Connectors_connector_response_properties' - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - '404': - $ref: '#/components/responses/Connectors_404' - summary: Get a connector information + type: object + properties: + id: + type: string + required: + - id + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete agent binary download source by ID tags: - - connectors - post: - operationId: createConnectorId - parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - description: > - A UUID v1 or v4 identifier for the connector. If you omit this - parameter, an identifier is randomly generated. - in: path - name: connectorId - required: true - schema: - example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - examples: - createIndexConnectorRequest: - $ref: >- - #/components/examples/Connectors_create_index_connector_request - schema: - $ref: '#/components/schemas/Connectors_create_connector_request' - required: true + - Elastic Agent binary download sources + get: + operationId: get-one-download-source responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - createIndexConnectorResponse: - $ref: >- - #/components/examples/Connectors_create_index_connector_response schema: - $ref: '#/components/schemas/Connectors_connector_response_properties' - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - summary: Create a connector + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_download_sources' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get agent binary download source by ID tags: - - connectors + - Elastic Agent binary download sources + parameters: + - in: path + name: sourceId + required: true + schema: + type: string put: - operationId: updateConnector + operationId: update-download-source parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - $ref: '#/components/parameters/Connectors_connector_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - updateIndexConnectorRequest: - $ref: >- - #/components/examples/Connectors_update_index_connector_request schema: - $ref: '#/components/schemas/Connectors_update_connector_request' - required: true + type: object + properties: + host: + type: string + is_default: + type: boolean + name: + type: string + required: + - name + - is_default + - host responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Connectors_connector_response_properties' - description: Indicates a successful call. + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_download_sources' + required: + - item + description: OK '400': - $ref: '#/components/responses/Connectors_401' - '401': - $ref: '#/components/responses/Connectors_401' - '404': - $ref: '#/components/responses/Connectors_404' - summary: Update a connector + $ref: '#/components/responses/Fleet_error' + summary: Update agent binary download source by ID tags: - - connectors - /api/actions/connectors: + - Elastic Agent binary download sources + /agent_policies: get: - operationId: getConnectors + description: '' + operationId: agent-policy-list + parameters: + - $ref: '#/components/parameters/Fleet_page_size' + - $ref: '#/components/parameters/Fleet_page_index' + - $ref: '#/components/parameters/Fleet_kuery' + - description: >- + When set to true, retrieve the related package policies for each + agent policy. + in: query + name: full + schema: + type: boolean + - description: >- + When set to true, do not count how many agents are in the agent + policy, this can improve performance if you are searching over a + large number of agent policies. The "agents" property will always be + 0 if set to true. + in: query + name: noAgentCount + schema: + type: boolean responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - getConnectorsResponse: - $ref: '#/components/examples/Connectors_get_connectors_response' schema: - items: - $ref: >- - #/components/schemas/Connectors_connector_response_properties - type: array - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - summary: Get all connectors + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_agent_policy' + type: array + page: + type: number + perPage: + type: number + total: + type: number + required: + - items + - total + - page + - perPage + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List agent policies tags: - - connectors - /api/apm/agent_keys: + - Elastic Agent policies post: - description: Create a new agent key for APM. - operationId: createAgentKey + operationId: create-agent-policy + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - type: object - properties: - name: - type: string - privileges: - items: - enum: - - 'event:write' - - 'config_agent:read' - type: string - type: array - required: true + $ref: '#/components/schemas/Fleet_agent_policy_create_request' responses: '200': content: @@ -334,125 +287,37 @@ paths: schema: type: object properties: - api_key: - type: string - encoded: - type: string - expiration: - format: int64 - type: integer - id: - type: string - name: - type: string - description: Agent key created successfully - summary: Create an APM agent key + item: + $ref: '#/components/schemas/Fleet_agent_policy' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + security: [] + summary: Create agent policy tags: - - APM agent keys - '/api/apm/services/{serviceName}/annotation': + - Elastic Agent policies + /agent_policies/_bulk_get: post: - description: Create a new annotation for a specific service. - operationId: createAnnotation - parameters: - - description: The name of the service - in: path - name: serviceName - required: true - schema: - type: string + operationId: bulk-get-agent-policies + parameters: [] requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - '@timestamp': - type: string - message: - type: string - service: - type: object - properties: - environment: - type: string - version: - type: string - tags: + full: + description: get full policies with package policies populated + type: boolean + ids: + description: list of agent policy ids items: type: string type: array - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - _id: - type: string - _index: - type: string - _source: - type: object - properties: - '@timestamp': - type: string - annotation: - type: string - event: - type: object - properties: - created: - type: string - message: - type: string - service: - type: object - properties: - environment: - type: string - name: - type: string - version: - type: string - tags: - items: - type: string - type: array - description: Annotation created successfully - summary: Create a service annotation - tags: - - APM annotations - '/api/apm/services/{serviceName}/annotation/search': - get: - description: Search for annotations related to a specific service. - operationId: getAnnotation - parameters: - - description: The name of the service - in: path - name: serviceName - required: true - schema: - type: string - - description: The environment to filter annotations by - in: query - name: environment - required: false - schema: - type: string - - description: The start date for the search - in: query - name: start - required: false - schema: - type: string - - description: The end date for the search - in: query - name: end - required: false - schema: - type: string + ignoreMissing: + type: boolean + required: + - ids responses: '200': content: @@ -460,51 +325,24 @@ paths: schema: type: object properties: - annotations: + items: items: - type: object - properties: - '@timestamp': - type: number - id: - type: string - text: - type: string - type: - enum: - - version - type: string + $ref: '#/components/schemas/Fleet_agent_policy' type: array - description: Successful response - summary: Search for annotations + required: + - items + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + security: [] + summary: Bulk get agent policies tags: - - APM annotations - /api/asset_criticality: - delete: - operationId: DeleteAssetCriticalityRecord - parameters: - - description: The ID value of the asset. - in: query - name: id_value - required: true - schema: - type: string - - description: The field representing the ID. - example: host.name - in: query - name: id_field - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_IdField - - description: If 'wait_for' the request will wait for the index refresh. - in: query - name: refresh - required: false - schema: - enum: - - wait_for - type: string + - Elastic Agent policies + '/agent_policies/{agentPolicyId}': + get: + description: Get one agent policy + operationId: agent-policy-info + parameters: [] responses: '200': content: @@ -512,186 +350,220 @@ paths: schema: type: object properties: - deleted: - description: >- - If the record was deleted. If false the record did not - exist. - type: boolean - record: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityRecord + item: + $ref: '#/components/schemas/Fleet_agent_policy' required: - - deleted - description: Successful response + - item + description: OK '400': - description: Invalid request - summary: Delete Criticality Record + $ref: '#/components/responses/Fleet_error' + summary: Get agent policy by ID tags: - - Security Solution Entity Analytics API - get: - operationId: GetAssetCriticalityRecord + - Elastic Agent policies + parameters: + - in: path + name: agentPolicyId + required: true + schema: + type: string + put: + operationId: update-agent-policy parameters: - - description: The ID value of the asset. - in: query - name: id_value - required: true - schema: - type: string - - description: The field representing the ID. - example: host.name - in: query - name: id_field - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_IdField - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityRecord - description: Successful response - '400': - description: Invalid request - '404': - description: Criticality record not found - summary: Get Criticality Record - tags: - - Security Solution Entity Analytics API - post: - operationId: CreateAssetCriticalityRecord + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_CreateAssetCriticalityRecord - - type: object - properties: - refresh: - description: >- - If 'wait_for' the request will wait for the index - refresh. - enum: - - wait_for - type: string - required: true + $ref: '#/components/schemas/Fleet_agent_policy_update_request' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityRecord - description: Successful response + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_agent_policy' + required: + - item + description: OK '400': - description: Invalid request - summary: Create Criticality Record - tags: - - Security Solution Entity Analytics API - /api/asset_criticality/bulk: + $ref: '#/components/responses/Fleet_error' + summary: Update agent policy by ID + tags: + - Elastic Agent policies + '/agent_policies/{agentPolicyId}/copy': + parameters: + - in: path + name: agentPolicyId + required: true + schema: + type: string post: - operationId: BulkUpsertAssetCriticalityRecords + operationId: agent-policy-copy + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - example: - records: - - criticality_level: low_impact - id_field: host.name - id_value: host-1 - - criticality_level: medium_impact - id_field: host.name - id_value: host-2 type: object properties: - records: - items: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_CreateAssetCriticalityRecord - maxItems: 1000 - minItems: 1 - type: array + description: + type: string + name: + type: string required: - - records + - name + description: '' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - example: - errors: - - index: 0 - message: Invalid ID field - stats: - failed: 1 - successful: 1 - total: 2 type: object properties: - errors: - items: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityBulkUploadErrorItem - type: array - stats: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityBulkUploadStats + item: + $ref: '#/components/schemas/Fleet_agent_policy' required: - - errors - - stats - description: Bulk upload successful - '413': - description: File too large - summary: >- - Bulk upsert asset criticality data, creating or updating records as - needed + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Copy agent policy by ID + tags: + - Elastic Agent policies + '/agent_policies/{agentPolicyId}/download': + get: + operationId: agent-policy-download + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + item: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Download agent policy by ID + tags: + - Elastic Agent policies + parameters: + - in: path + name: agentPolicyId + required: true + schema: + type: string + - in: query + name: download + required: false + schema: + type: string + - in: query + name: standalone + required: false + schema: + type: string + - in: query + name: kubernetes + required: false + schema: + type: string + '/agent_policies/{agentPolicyId}/full': + get: + operationId: agent-policy-full + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + item: + oneOf: + - type: string + - $ref: '#/components/schemas/Fleet_agent_policy_full' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get full agent policy by ID tags: - - Security Solution Entity Analytics API - /api/asset_criticality/list: + - Elastic Agent policies + parameters: + - in: path + name: agentPolicyId + required: true + schema: + type: string + - in: query + name: download + required: false + schema: + type: string + - in: query + name: standalone + required: false + schema: + type: string + - in: query + name: kubernetes + required: false + schema: + type: string + /agent_policies/delete: + parameters: [] post: - operationId: FindAssetCriticalityRecords + operationId: delete-agent-policy parameters: - - description: The field to sort by. - in: query - name: sort_field - required: false - schema: - enum: - - id_value - - id_field - - criticality_level - - \@timestamp - type: string - - description: The order to sort by. - in: query - name: sort_direction + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + agentPolicyId: + type: string + force: + description: >- + bypass validation checks that can prevent agent policy + deletion + type: boolean + required: + - agentPolicyId + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + id: + type: string + success: + type: boolean + required: + - id + - success + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete agent policy by ID + tags: + - Elastic Agent policies + /agent_status: + get: + operationId: get-agent-status + parameters: + - in: query + name: policyId required: false schema: - enum: - - asc - - desc type: string - - description: The page number to return. - in: query - name: page - required: false - schema: - minimum: 1 - type: integer - - description: The number of records to return per page. - in: query - name: per_page - required: false - schema: - maximum: 1000 - minimum: 1 - type: integer - - description: The kuery to filter by. + - deprecated: true in: query name: kuery required: false @@ -704,196 +576,291 @@ paths: schema: type: object properties: - page: - minimum: 1 + active: type: integer - per_page: - maximum: 1000 - minimum: 1 + all: + type: integer + error: + type: integer + events: + type: integer + inactive: + type: integer + offline: + type: integer + online: + type: integer + other: type: integer - records: - items: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityRecord - type: array total: - minimum: 0 + deprecated: true + type: integer + unenrolled: + type: integer + updating: type: integer required: - - records - - page - - per_page + - active + - all + - error + - events + - inactive + - offline + - online + - other - total - description: Bulk upload successful - summary: 'List asset criticality data, filtering and sorting as needed' + - updating + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get agent status summary tags: - - Security Solution Entity Analytics API - /api/data_views: + - Elastic Agent status + /agent_status/data: get: - operationId: getAllDataViewsDefault + operationId: get-agent-data + parameters: + - in: query + name: agentsIds + required: true + schema: + items: + type: string + type: array responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - getAllDataViewsResponse: - $ref: '#/components/examples/Data_views_get_data_views_response' schema: type: object properties: - data_view: + items: items: + additionalProperties: + type: object + properties: + data: + type: boolean type: object - properties: - id: - type: string - name: - type: string - namespaces: - items: - type: string - type: array - title: - type: string - typeMeta: - type: object type: array - description: Indicates a successful call. + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Get incoming agent data + tags: + - Elastic Agent status + /agent-status: + get: + deprecated: true + operationId: get-agent-status-deprecated + parameters: + - in: query + name: policyId + required: false + schema: + type: string + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Get all data views + type: object + properties: + error: + type: integer + events: + type: integer + inactive: + type: integer + offline: + type: integer + online: + type: integer + other: + type: integer + total: + type: integer + updating: + type: integer + required: + - error + - events + - inactive + - offline + - online + - other + - total + - updating + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get agent status summary tags: - - data views - /api/data_views/data_view: + - Elastic Agent status + /agents: + get: + operationId: get-agents + parameters: + - $ref: '#/components/parameters/Fleet_page_size' + - $ref: '#/components/parameters/Fleet_page_index' + - $ref: '#/components/parameters/Fleet_kuery' + - $ref: '#/components/parameters/Fleet_show_inactive' + - $ref: '#/components/parameters/Fleet_show_upgradeable' + - $ref: '#/components/parameters/Fleet_sort_field' + - $ref: '#/components/parameters/Fleet_sort_order' + - $ref: '#/components/parameters/Fleet_with_metrics' + - in: query + name: getStatusSummary + required: false + schema: + type: boolean + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Fleet_get_agents_response' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + security: + - Fleet_basicAuth: [] + summary: List agents + tags: + - Elastic Agents post: - operationId: createDataViewDefaultw + operationId: get-agents-by-actions parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - createDataViewRequest: - $ref: '#/components/examples/Data_views_create_data_view_request' schema: - $ref: '#/components/schemas/Data_views_create_data_view_request_object' + type: object + properties: + actionIds: + items: + type: string + type: array + required: + - policy_id required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_data_view_response_object' - description: Indicates a successful call. + $ref: '#/components/schemas/Fleet_agent_get_by_actions' + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Create a data view + $ref: '#/components/responses/Fleet_error' + summary: List agents by action ids tags: - - data views - '/api/data_views/data_view/{viewId}': + - Elastic Agents + '/agents/{agentId}': delete: - description: | - WARNING: When you delete a data view, it cannot be recovered. - operationId: deleteDataViewDefault + operationId: delete-agent parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: - '204': - description: Indicates a successful call. - '404': + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_404_response' - description: Object is not found. - summary: Delete a data view + type: object + properties: + action: + enum: + - deleted + type: string + required: + - action + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete agent by ID tags: - - data views + - Elastic Agents get: - operationId: getDataViewDefault + operationId: get-agent parameters: - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Fleet_with_metrics' responses: '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - examples: - getDataViewResponse: - $ref: '#/components/examples/Data_views_get_data_view_response' - schema: - $ref: '#/components/schemas/Data_views_data_view_response_object' - description: Indicates a successful call. - '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_404_response' - description: Object is not found. - summary: Get a data view + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_agent' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get agent by ID tags: - - data views - post: - operationId: updateDataViewDefault + - Elastic Agents + parameters: + - in: path + name: agentId + required: true + schema: + type: string + put: + operationId: update-agent parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - updateDataViewRequest: - $ref: '#/components/examples/Data_views_update_data_view_request' schema: - $ref: '#/components/schemas/Data_views_update_data_view_request_object' + type: object + properties: + tags: + items: + type: string + type: array + user_provided_metadata: + type: object required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_data_view_response_object' - description: Indicates a successful call. + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_agent' + required: + - item + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Update a data view - tags: - - data views - '/api/data_views/data_view/{viewId}/fields': + $ref: '#/components/responses/Fleet_error' + summary: Update agent by ID + tags: + - Elastic Agents + '/agents/{agentId}/actions': + parameters: + - in: path + name: agentId + required: true + schema: + type: string post: - description: > - Update fields presentation metadata such as count, customLabel, - customDescription, and format. - operationId: updateFieldsMetadataDefault + operationId: new-agent-action parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - updateFieldsMetadataRequest: - $ref: '#/components/examples/Data_views_update_field_metadata_request' schema: type: object properties: - fields: - description: The field object. - type: object - required: - - fields + action: + $ref: '#/components/schemas/Fleet_agent_action' required: true responses: '200': @@ -902,44 +869,72 @@ paths: schema: type: object properties: - acknowledged: - type: boolean - description: Indicates a successful call. + body: + items: + type: number + type: array + headers: + type: string + statusCode: + type: number + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Create agent action + tags: + - Elastic Agent actions + '/agents/{agentId}/actions/{actionId}/cancel': + parameters: + - in: path + name: agentId + required: true + schema: + type: string + - in: path + name: actionId + required: true + schema: + type: string + post: + operationId: agent-action-cancel + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Update data view fields metadata - tags: - - data views - '/api/data_views/data_view/{viewId}/runtime_field': + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_agent_action' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Cancel agent action + tags: + - Elastic Agent actions + '/agents/{agentId}/reassign': + parameters: + - in: path + name: agentId + required: true + schema: + type: string post: - operationId: createRuntimeFieldDefault + operationId: reassign-agent parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - createRuntimeFieldRequest: - $ref: '#/components/examples/Data_views_create_runtime_field_request' schema: type: object properties: - name: - description: | - The name for a runtime field. + policy_id: type: string - runtimeField: - description: | - The runtime field definition object. - type: object required: - - name - - runtimeField + - policy_id required: true responses: '200': @@ -947,41 +942,27 @@ paths: application/json; Elastic-Api-Version=2023-10-31: schema: type: object - description: Indicates a successful call. - summary: Create a runtime field + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Reassign agent tags: - - data views + - Elastic Agents put: - operationId: createUpdateRuntimeFieldDefault + deprecated: true + operationId: reassign-agent-deprecated parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - description: | - The ID of the data view fields you want to update. - in: path - name: viewId - required: true - schema: - type: string + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - updateRuntimeFieldRequest: - $ref: '#/components/examples/Data_views_create_runtime_field_request' schema: type: object properties: - name: - description: | - The name for a runtime field. + policy_id: type: string - runtimeField: - description: | - The runtime field definition object. - type: object required: - - name - - runtimeField + - policy_id required: true responses: '200': @@ -989,163 +970,298 @@ paths: application/json; Elastic-Api-Version=2023-10-31: schema: type: object - properties: - data_view: - type: object - fields: - items: - type: object - type: array - description: Indicates a successful call. + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Create or update a runtime field - tags: - - data views - '/api/data_views/data_view/{viewId}/runtime_field/{fieldName}': - delete: - operationId: deleteRuntimeFieldDefault + $ref: '#/components/responses/Fleet_error' + summary: Reassign agent + tags: + - Elastic Agents + '/agents/{agentId}/request_diagnostics': + parameters: + - in: path + name: agentId + required: true + schema: + type: string + post: + operationId: request-diagnostics-agent parameters: - - $ref: '#/components/parameters/Data_views_field_name' - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + additional_metrics: + items: + oneOf: + - enum: + - CPU + type: string + type: array responses: '200': - description: Indicates a successful call. - '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_404_response' - description: Object is not found. - summary: Delete a runtime field from a data view - tags: - - data views - get: - operationId: getRuntimeFieldDefault + type: object + properties: + actionId: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Request agent diagnostics + tags: + - Elastic Agents + '/agents/{agentId}/unenroll': + parameters: + - in: path + name: agentId + required: true + schema: + type: string + post: + operationId: unenroll-agent parameters: - - $ref: '#/components/parameters/Data_views_field_name' - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + force: + type: boolean + revoke: + type: boolean responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - getRuntimeFieldResponse: - $ref: '#/components/examples/Data_views_get_runtime_field_response' schema: type: object - properties: - data_view: - type: object - fields: - items: - type: object - type: array - description: Indicates a successful call. - '404': + description: OK + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_404_response' - description: Object is not found. - summary: Get a runtime field - tags: - - data views + type: object + properties: + error: + type: string + message: + type: string + statusCode: + enum: + - 400 + type: number + description: BAD REQUEST + summary: Unenroll agent + tags: + - Elastic Agents + '/agents/{agentId}/upgrade': + parameters: + - in: path + name: agentId + required: true + schema: + type: string post: - operationId: updateRuntimeFieldDefault + operationId: upgrade-agent parameters: - - $ref: '#/components/parameters/Data_views_field_name' - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - updateRuntimeFieldRequest: - $ref: '#/components/examples/Data_views_update_runtime_field_request' schema: - type: object - properties: - runtimeField: - description: | - The runtime field definition object. - - You can update following fields: - - - `type` - - `script` - type: object - required: - - runtimeField + $ref: '#/components/schemas/Fleet_upgrade_agent' required: true responses: '200': - description: Indicates a successful call. - '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Update a runtime field + $ref: '#/components/schemas/Fleet_upgrade_agent' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Upgrade agent tags: - - data views - /api/data_views/default: + - Elastic Agents + '/agents/{agentId}/uploads': get: - operationId: getDefaultDataViewDefault + operationId: list-agent-uploads responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - getDefaultDataViewResponse: - $ref: >- - #/components/examples/Data_views_get_default_data_view_response schema: type: object properties: - data_view_id: - type: string - description: Indicates a successful call. + body: + type: object + properties: + item: + items: + $ref: '#/components/schemas/Fleet_agent_diagnostics' + type: array + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Get the default data view + $ref: '#/components/responses/Fleet_error' + summary: List agent uploads tags: - - data views + - Elastic Agents + parameters: + - in: path + name: agentId + required: true + schema: + type: string + /agents/action_status: + get: + operationId: agents-action-status + parameters: + - $ref: '#/components/parameters/Fleet_page_size' + - $ref: '#/components/parameters/Fleet_page_index' + - in: query + name: errorSize + schema: + default: 5 + type: integer + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + items: + items: + type: object + properties: + actionId: + type: string + cancellationTime: + type: string + completionTime: + type: string + creationTime: + description: creation time of action + type: string + expiration: + type: string + latestErrors: + description: >- + latest errors that happened when the agents executed + the action + items: + type: object + properties: + agentId: + type: string + error: + type: string + timestamp: + type: string + type: array + nbAgentsAck: + description: number of agents that acknowledged the action + type: number + nbAgentsActionCreated: + description: number of agents included in action from kibana + type: number + nbAgentsActioned: + description: number of agents actioned + type: number + nbAgentsFailed: + description: number of agents that failed to execute the action + type: number + newPolicyId: + description: new policy id (POLICY_REASSIGN action) + type: string + policyId: + description: policy id (POLICY_CHANGE action) + type: string + revision: + description: new policy revision (POLICY_CHANGE action) + type: string + startTime: + description: start time of action (scheduled actions) + type: string + status: + enum: + - COMPLETE + - EXPIRED + - CANCELLED + - FAILED + - IN_PROGRESS + - ROLLOUT_PASSED + type: string + type: + enum: + - POLICY_REASSIGN + - UPGRADE + - UNENROLL + - FORCE_UNENROLL + - UPDATE_TAGS + - CANCEL + - REQUEST_DIAGNOSTICS + - SETTINGS + - POLICY_CHANGE + - INPUT_ACTION + type: string + version: + description: agent version number (UPGRADE action) + type: string + required: + - actionId + - complete + - nbAgentsActioned + - nbAgentsActionCreated + - nbAgentsAck + - nbAgentsFailed + - status + - creationTime + - type + type: array + required: + - items + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get agent action status + tags: + - Elastic Agent actions + /agents/bulk_reassign: post: - operationId: setDefaultDatailViewDefault + operationId: bulk-reassign-agents parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - setDefaultDataViewRequest: - $ref: '#/components/examples/Data_views_set_default_data_view_request' + example: + agents: 'fleet-agents.policy_id : ("policy1" or "policy2")' + policy_id: policy_id schema: type: object properties: - data_view_id: - 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. - nullable: true + agents: + oneOf: + - description: 'KQL query string, leave empty to action all agents' + type: string + - description: list of agent IDs + items: + type: string + type: array + policy_id: + description: new agent policy id type: string - force: - default: false - description: Update an existing default data view identifier. - type: boolean required: - - data_view_id - required: true + - policy_id + - agents responses: '200': content: @@ -1153,36 +1269,46 @@ paths: schema: type: object properties: - acknowledged: - type: boolean - description: Indicates a successful call. + actionId: + type: string + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Set the default data view + $ref: '#/components/responses/Fleet_error' + summary: Bulk reassign agents tags: - - data views - /api/data_views/swap_references: + - Elastic Agents + /agents/bulk_request_diagnostics: post: - 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. - operationId: swapDataViewsDefault + operationId: bulk-request-diagnostics parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - swapDataViewRequest: - $ref: '#/components/examples/Data_views_swap_data_view_request' + example: + agents: 'fleet-agents.policy_id : ("policy1" or "policy2")' schema: - $ref: '#/components/schemas/Data_views_swap_data_view_request_object' - required: true + type: object + properties: + additional_metrics: + items: + oneOf: + - enum: + - CPU + type: string + type: array + agents: + oneOf: + - description: 'KQL query string, leave empty to action all agents' + type: string + - description: list of agent IDs + items: + type: string + type: array + batchSize: + type: number + required: + - agents responses: '200': content: @@ -1190,46 +1316,52 @@ paths: schema: type: object properties: - deleteStatus: - type: object - properties: - deletePerformed: - type: boolean - remainingRefs: - type: integer - result: - items: - type: object - properties: - id: - description: A saved object identifier. - type: string - type: - description: The saved object type. - type: string - type: array - description: Indicates a successful call. - summary: Swap saved object references + actionId: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Bulk request diagnostics from agents tags: - - data views - /api/data_views/swap_references/_preview: + - Elastic Agents + /agents/bulk_unenroll: post: - description: > - Preview the impact of swapping saved object references from one data - view identifier to another. - operationId: previewSwapDataViewsDefault + operationId: bulk-unenroll-agents parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - previewSwapDataViewRequest: - $ref: >- - #/components/examples/Data_views_preview_swap_data_view_request + example: + agents: + - agent1 + - agent2 + force: false + revoke: true schema: - $ref: '#/components/schemas/Data_views_swap_data_view_request_object' - required: true + type: object + properties: + agents: + oneOf: + - description: 'KQL query string, leave empty to action all agents' + type: string + - description: list of agent IDs + items: + type: string + type: array + force: + description: Unenrolls hosted agents too + type: boolean + includeInactive: + description: >- + When passing agents by KQL query, unenrolls inactive agents + too + type: boolean + revoke: + description: Revokes API keys of agents + type: boolean + required: + - agents responses: '200': content: @@ -1237,33 +1369,53 @@ paths: schema: type: object properties: - result: - items: - type: object - properties: - id: - description: A saved object identifier. - type: string - type: - description: The saved object type. - type: string - type: array - description: Indicates a successful call. - summary: Preview a saved object reference swap + actionId: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Bulk unenroll agents tags: - - data views - /api/detection_engine/privileges: - get: - description: > - Retrieves whether or not the user is authenticated, and the user's - Kibana - - space and index privileges, which determine if the user can create an - - index for the Elastic Security alerts generated by - - detection engine rules. - operationId: ReadPrivileges + - Elastic Agents + /agents/bulk_update_agent_tags: + post: + operationId: bulk-update-agent-tags + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + example: + agents: + - agent1 + - agent2 + tagsToAdd: + - newTag + tagsToRemove: + - existingTag + schema: + type: object + properties: + agents: + oneOf: + - description: 'KQL query string, leave empty to action all agents' + type: string + - description: list of agent IDs + items: + type: string + type: array + batchSize: + type: number + tagsToAdd: + items: + type: string + type: array + tagsToRemove: + items: + type: string + type: array + required: + - agents responses: '200': content: @@ -1271,2490 +1423,2063 @@ paths: schema: type: object properties: - has_encryption_key: - type: boolean - is_authenticated: - type: boolean - required: - - is_authenticated - - has_encryption_key - description: Successful response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Returns user privileges for the Kibana space + actionId: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Bulk update agent tags tags: - - Security Solution Detections API - - Privileges API - /api/detection_engine/rules: - delete: - description: Delete a detection rule using the `rule_id` or `id` field. - operationId: DeleteRule + - Elastic Agents + /agents/bulk_upgrade: + post: + operationId: bulk-upgrade-agents parameters: - - description: The rule's `id` value. - in: query - name: id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleObjectId' - - description: The rule's `rule_id` value. - in: query - name: rule_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + example: + agents: + - agent1 + - agent2 + rollout_duration_seconds: 3600 + source_uri: 'https://artifacts.elastic.co/downloads/beats/elastic-agent' + start_time: '2022-08-03T14:00:00.000Z' + version: 8.4.0 + schema: + $ref: '#/components/schemas/Fleet_bulk_upgrade_agents' + required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleResponse - description: Indicates a successful call. - summary: Delete a detection rule + type: object + properties: + actionId: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Bulk upgrade agents tags: - - Security Solution Detections API - - Rules API - get: - description: Retrieve a detection rule using the `rule_id` or `id` field. - operationId: ReadRule - parameters: - - description: The rule's `id` value. - in: query - name: id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleObjectId' - - description: The rule's `rule_id` value. - in: query - name: rule_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId + - Elastic Agents + '/agents/files/{fileId}': + delete: + operationId: delete-agent-upload-file responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleResponse - description: Indicates a successful call. - summary: Retrieve a detection rule - tags: - - Security Solution Detections API - - Rules API - patch: - description: >- - Update specific fields of an existing detection rule using the `rule_id` - or `id` field. - operationId: PatchRule - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePatchProps + type: object + properties: + body: + type: object + properties: + deleted: + type: boolean + id: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete file uploaded by agent + tags: + - Elastic Agents + parameters: + - in: path + name: fileId required: true + schema: + type: string + '/agents/files/{fileId}/{fileName}': + get: + operationId: get-agent-upload-file responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleResponse - description: Indicates a successful call. - summary: Patch a detection rule + type: object + properties: + body: + type: object + properties: + items: + type: object + properties: + body: {} + headers: {} + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get file uploaded by agent tags: - - Security Solution Detections API - - Rules API - post: - description: Create a new detection rule. - operationId: CreateRule - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleCreateProps + - Elastic Agents + parameters: + - in: path + name: fileId required: true + schema: + type: string + - in: path + name: fileName + required: true + schema: + type: string + /agents/setup: + get: + operationId: get-agents-setup-status responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleResponse - description: Indicates a successful call. - summary: Create a detection rule + $ref: '#/components/schemas/Fleet_fleet_status_response' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + security: + - Fleet_basicAuth: [] + summary: Get agent setup info tags: - - Security Solution Detections API - - Rules API - put: - description: > - Update a detection rule using the `rule_id` or `id` field. The original - rule is replaced, and all unspecified fields are deleted. - - > info - - > You cannot modify the `id` or `rule_id` values. - operationId: UpdateRule + - Elastic Agents + post: + operationId: setup-agents + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleUpdateProps - required: true + type: object + properties: + admin_password: + type: string + admin_username: + type: string + required: + - admin_username + - admin_password responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleResponse - description: Indicates a successful call. - summary: Update a detection rule + $ref: '#/components/schemas/Fleet_fleet_setup_response' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Initiate agent setup tags: - - Security Solution Detections API - - Rules API - /api/detection_engine/rules/_bulk_action: - post: - description: >- - Apply a bulk action, such as bulk edit, duplicate, or delete, to - multiple detection rules. The bulk action is applied to all rules that - match the query or to the rules listed by their IDs. - operationId: PerformRulesBulkAction - parameters: - - description: Enables dry run mode for the request call. - in: query - name: dry_run - required: false - schema: - type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkDeleteRules - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkDisableRules - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkEnableRules - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkExportRules - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkDuplicateRules - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkManualRuleRun - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkEditRules + - Elastic Agents + /agents/tags: + get: + operationId: get-agent-tags responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkEditActionResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkExportActionResponse + $ref: '#/components/schemas/Fleet_get_agent_tags_response' description: OK - summary: Apply a bulk action to detection rules + '400': + $ref: '#/components/responses/Fleet_error' + summary: List agent tags tags: - - Security Solution Detections API - - Bulk API - /api/detection_engine/rules/_export: + - Elastic Agents + /api/actions/connector: post: - description: > - Export detection rules to an `.ndjson` file. The following configuration - items are also included in the `.ndjson` file: - - - Actions - - - Exception lists - - > info - - > You cannot export prebuilt rules. - operationId: ExportRules + description: The connector identifier is randomly generated. + operationId: createConnector parameters: - - description: Determines whether a summary of the exported rules is returned. - in: query - name: exclude_export_details - required: false - schema: - default: false - type: boolean - - description: File name for saving the exported rules. - in: query - name: file_name - required: false - schema: - default: export.ndjson - type: string + - $ref: '#/components/parameters/Connectors_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + 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 schema: - nullable: true - type: object - properties: - objects: - description: >- - Array of `rule_id` fields. Exports all rules when - unspecified. - items: - type: object - properties: - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - required: - - rule_id - type: array - required: - - objects - required: false + $ref: '#/components/schemas/Connectors_create_connector_request' + required: true responses: '200': content: - application/ndjson; Elastic-Api-Version=2023-10-31: + application/json; Elastic-Api-Version=2023-10-31: + 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 schema: - description: An `.ndjson` file containing the returned rules. - format: binary - type: string + $ref: '#/components/schemas/Connectors_connector_response_properties' description: Indicates a successful call. - summary: Export detection rules + '401': + $ref: '#/components/responses/Connectors_401' + summary: Create a connector with a random ID tags: - - Security Solution Detections API - - Import/Export API - /api/detection_engine/rules/_find: + - connectors + /api/actions/connector_types: get: - description: >- - Retrieve a paginated list of detection rules. By default, the first page - is returned, with 20 results per page. - operationId: FindRules + operationId: getConnectorTypes parameters: - - in: query - name: fields - required: false - schema: - items: - type: string - type: array - - description: Search query - in: query - name: filter - required: false - schema: - type: string - - description: Field to sort by - in: query - name: sort_field - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_FindRulesSortField - - description: Sort order - in: query - name: sort_order - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Detections_API_SortOrder' - - description: Page number - in: query - name: page - required: false - schema: - default: 1 - minimum: 1 - type: integer - - description: Rules per page + - description: >- + A filter to limit the retrieved connector types to those that + support a specific feature (such as alerting or cases). in: query - name: per_page - required: false + name: feature_id schema: - default: 20 - minimum: 0 - type: integer + $ref: '#/components/schemas/Connectors_features' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getConnectorTypesServerlessResponse: + $ref: >- + #/components/examples/Connectors_get_connector_types_generativeai_response schema: - type: object - properties: - data: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleResponse - type: array - page: - type: integer - perPage: - type: integer - total: - type: integer - required: - - page - - perPage - - total - - data - description: Successful response - summary: List all detection rules + description: The properties vary for each connector type. + items: + type: object + properties: + enabled: + description: >- + Indicates whether the connector type is enabled in + Kibana. + example: true + type: boolean + enabled_in_config: + description: >- + Indicates whether the connector type is enabled in the + Kibana configuration file. + example: true + type: boolean + enabled_in_license: + description: >- + Indicates whether the connector is enabled in the + license. + example: true + type: boolean + id: + $ref: '#/components/schemas/Connectors_connector_types' + is_system_action_type: + example: false + type: boolean + minimum_license_required: + description: The license that is required to use the connector type. + example: basic + type: string + name: + description: The name of the connector type. + example: Index + type: string + supported_feature_ids: + description: The features that are supported by the connector type. + example: + - alerting + - cases + - siem + items: + $ref: '#/components/schemas/Connectors_features' + type: array + title: Get connector types response body properties + type: array + description: Indicates a successful call. + '401': + $ref: '#/components/responses/Connectors_401' + summary: Get all connector types tags: - - Security Solution Detections API - - Rules API - /api/detection_engine/rules/_import: - post: - description: > - Import detection rules from an `.ndjson` file, including actions and - exception lists. The request must include: - - - The `Content-Type: multipart/form-data` HTTP header. - - - A link to the `.ndjson` file containing the rules. - operationId: ImportRules + - connectors + '/api/actions/connector/{connectorId}': + delete: + operationId: deleteConnector parameters: - - description: >- - Determines whether existing rules with the same `rule_id` are - overwritten. - in: query - name: overwrite - required: false - schema: - default: false - type: boolean - - description: >- - Determines whether existing exception lists with the same `list_id` - are overwritten. - in: query - name: overwrite_exceptions - required: false - schema: - default: false - type: boolean - - description: >- - Determines whether existing actions with the same - `kibana.alert.rule.actions.id` are overwritten. - in: query - name: overwrite_action_connectors - required: false - schema: - default: false - type: boolean - - description: Generates a new list ID for each imported exception list. - in: query - name: as_new_list - required: false - schema: - default: false - type: boolean - requestBody: - content: - multipart/form-data; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - file: - description: The `.ndjson` file containing the rules. - format: binary - type: string - required: true + - $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' + summary: Delete a connector + tags: + - connectors + get: + operationId: getConnector + parameters: + - $ref: '#/components/parameters/Connectors_connector_id' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getConnectorResponse: + $ref: '#/components/examples/Connectors_get_connector_response' schema: - additionalProperties: false - type: object - properties: - action_connectors_errors: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ErrorSchema - type: array - action_connectors_success: - type: boolean - action_connectors_success_count: - minimum: 0 - type: integer - action_connectors_warnings: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_WarningSchema - type: array - errors: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ErrorSchema - type: array - exceptions_errors: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ErrorSchema - type: array - exceptions_success: - type: boolean - exceptions_success_count: - minimum: 0 - type: integer - rules_count: - minimum: 0 - type: integer - success: - type: boolean - success_count: - minimum: 0 - type: integer - required: - - exceptions_success - - exceptions_success_count - - exceptions_errors - - rules_count - - success - - success_count - - errors - - action_connectors_errors - - action_connectors_warnings - - action_connectors_success - - action_connectors_success_count + $ref: '#/components/schemas/Connectors_connector_response_properties' description: Indicates a successful call. - summary: Import detection rules + '401': + $ref: '#/components/responses/Connectors_401' + '404': + $ref: '#/components/responses/Connectors_404' + summary: Get a connector information tags: - - Security Solution Detections API - - Import/Export API - '/api/detection_engine/rules/{id}/exceptions': + - connectors post: - operationId: CreateRuleExceptionListItems + operationId: createConnectorId parameters: - - description: Detection rule's identifier + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - description: > + A UUID v1 or v4 identifier for the connector. If you omit this + parameter, an identifier is randomly generated. in: path - name: id + name: connectorId required: true schema: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_RuleId' + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + type: string requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + createIndexConnectorRequest: + $ref: >- + #/components/examples/Connectors_create_index_connector_request schema: - type: object - properties: - items: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_CreateRuleExceptionListItemProps - type: array - required: - - items - description: Rule exception list items + $ref: '#/components/schemas/Connectors_create_connector_request' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - schema: - items: + examples: + createIndexConnectorResponse: $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItem - type: array - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: + #/components/examples/Connectors_create_index_connector_response schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/Connectors_connector_response_properties' + description: Indicates a successful call. '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Creates rule exception list items + $ref: '#/components/responses/Connectors_401' + summary: Create a connector tags: - - Security Solution Exceptions API - /api/detection_engine/rules/preview: - post: - operationId: RulePreview + - connectors + put: + operationId: updateConnector + parameters: + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_connector_id' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + updateIndexConnectorRequest: + $ref: >- + #/components/examples/Connectors_update_index_connector_request schema: - anyOf: - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - discriminator: - propertyName: type - description: >- - An object containing tags to add or remove and alert ids the changes - will be applied + $ref: '#/components/schemas/Connectors_update_connector_request' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - type: object - properties: - isAborted: - type: boolean - logs: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewLogs - type: array - previewId: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - required: - - logs - description: Successful response + $ref: '#/components/schemas/Connectors_connector_response_properties' + description: Indicates a successful call. '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/responses/Connectors_401' '401': + $ref: '#/components/responses/Connectors_401' + '404': + $ref: '#/components/responses/Connectors_404' + summary: Update a connector + tags: + - connectors + /api/actions/connectors: + get: + operationId: getConnectors + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getConnectorsResponse: + $ref: '#/components/examples/Connectors_get_connectors_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Preview rule alerts generated on specified time range + items: + $ref: >- + #/components/schemas/Connectors_connector_response_properties + type: array + description: Indicates a successful call. + '401': + $ref: '#/components/responses/Connectors_401' + summary: Get all connectors tags: - - Security Solution Detections API - - Rule preview API - /api/detection_engine/signals/assignees: + - connectors + /api/apm/agent_keys: post: - description: | - Assign users to detection alerts, and unassign them from alerts. - > info - > You cannot add and remove the same assignee in the same request. - operationId: SetAlertAssignees + description: Create a new agent key for APM. + operationId: createAgentKey requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - assignees: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertAssignees - description: Details about the assignees to assign and unassign. - ids: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertIds - description: List of alerts ids to assign and unassign passed assignees. - required: - - assignees - - ids + name: + type: string + privileges: + items: + enum: + - 'event:write' + - 'config_agent:read' + type: string + type: array required: true responses: '200': - description: Indicates a successful call. - '400': - description: Invalid request. - summary: Assign and unassign users from detection alerts + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + api_key: + type: string + encoded: + type: string + expiration: + format: int64 + type: integer + id: + type: string + name: + type: string + description: Agent key created successfully + summary: Create an APM agent key tags: - - Security Solution Detections API - /api/detection_engine/signals/search: + - APM agent keys + '/api/apm/services/{serviceName}/annotation': post: - description: Find and/or aggregate detection alerts that match the given query. - operationId: SearchAlerts + description: Create a new annotation for a specific service. + operationId: createAnnotation + parameters: + - description: The name of the service + in: path + name: serviceName + required: true + schema: + type: string requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - description: Elasticsearch query and aggregation request type: object properties: - _source: - oneOf: - - type: boolean - - type: string - - items: - type: string - type: array - aggs: - additionalProperties: true + '@timestamp': + type: string + message: + type: string + service: type: object - fields: + properties: + environment: + type: string + version: + type: string + tags: items: type: string type: array - query: - additionalProperties: true - type: object - runtime_mappings: - additionalProperties: true - type: object - size: - minimum: 0 - type: integer - sort: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsSort - track_total_hits: - type: boolean - description: Search and/or aggregation query required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - additionalProperties: true - description: Elasticsearch search response type: object - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Find and/or aggregate detection alerts + properties: + _id: + type: string + _index: + type: string + _source: + type: object + properties: + '@timestamp': + type: string + annotation: + type: string + event: + type: object + properties: + created: + type: string + message: + type: string + service: + type: object + properties: + environment: + type: string + name: + type: string + version: + type: string + tags: + items: + type: string + type: array + description: Annotation created successfully + summary: Create a service annotation tags: - - Security Solution Detections API - - Alerts API - /api/detection_engine/signals/status: - post: - description: Set the status of one or more detection alerts. - operationId: SetAlertsStatus - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SetAlertsStatusByIds - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SetAlertsStatusByQuery - description: >- - An object containing desired status and explicit alert ids or a query - to select alerts - required: true + - APM annotations + '/api/apm/services/{serviceName}/annotation/search': + get: + description: Search for annotations related to a specific service. + operationId: getAnnotation + parameters: + - description: The name of the service + in: path + name: serviceName + required: true + schema: + type: string + - description: The environment to filter annotations by + in: query + name: environment + required: false + schema: + type: string + - description: The start date for the search + in: query + name: start + required: false + schema: + type: string + - description: The end date for the search + in: query + name: end + required: false + schema: + type: string responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - additionalProperties: true - description: Elasticsearch update by query response type: object + properties: + annotations: + items: + type: object + properties: + '@timestamp': + type: number + id: + type: string + text: + type: string + type: + enum: + - version + type: string + type: array description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response - '401': + summary: Search for annotations + tags: + - APM annotations + /api/data_views: + get: + operationId: getAllDataViewsDefault + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getAllDataViewsResponse: + $ref: '#/components/examples/Data_views_get_data_views_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': + type: object + properties: + data_view: + items: + type: object + properties: + id: + type: string + name: + type: string + namespaces: + items: + type: string + type: array + title: + type: string + typeMeta: + type: object + type: array + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Set a detection alert status + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Get all data views tags: - - Security Solution Detections API - - Alerts API - /api/detection_engine/signals/tags: + - data views + /api/data_views/data_view: post: - description: | - And tags to detection alerts, and remove them from alerts. - > info - > You cannot add and remove the same alert tag in the same request. - operationId: SetAlertTags + operationId: createDataViewDefaultw + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + createDataViewRequest: + $ref: '#/components/examples/Data_views_create_data_view_request' schema: - type: object - properties: - ids: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertIds - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SetAlertTags - required: - - ids - - tags - description: >- - An object containing tags to add or remove and alert ids the changes - will be applied + $ref: '#/components/schemas/Data_views_create_data_view_request_object' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - additionalProperties: true - description: Elasticsearch update by query response - type: object - description: Successful response + $ref: '#/components/schemas/Data_views_data_view_response_object' + description: Indicates a successful call. '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Create a data view + tags: + - data views + '/api/data_views/data_view/{viewId}': + delete: + description: | + WARNING: When you delete a data view, it cannot be recovered. + operationId: deleteDataViewDefault + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Data_views_view_id' + responses: + '204': + description: Indicates a successful call. + '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Add and remove detection alert tags + $ref: '#/components/schemas/Data_views_404_response' + description: Object is not found. + summary: Delete a data view tags: - - Security Solution Detections API - - Alerts API - /api/detection_engine/tags: + - data views get: - description: List all unique tags from all detection rules. - operationId: ReadTags + operationId: getDataViewDefault + parameters: + - $ref: '#/components/parameters/Data_views_view_id' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getDataViewResponse: + $ref: '#/components/examples/Data_views_get_data_view_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - description: Indicates a successful call - summary: List all detection rule tags + $ref: '#/components/schemas/Data_views_data_view_response_object' + description: Indicates a successful call. + '404': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Data_views_404_response' + description: Object is not found. + summary: Get a data view tags: - - Security Solution Detections API - - Tags API - /api/endpoint_list: + - data views post: - description: Creates an endpoint list or does nothing if the list already exists - operationId: CreateEndpointList + operationId: updateDataViewDefault + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Data_views_view_id' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + examples: + updateDataViewRequest: + $ref: '#/components/examples/Data_views_update_data_view_request' + schema: + $ref: '#/components/schemas/Data_views_update_data_view_request_object' + required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_EndpointList - description: Successful response + $ref: '#/components/schemas/Data_views_data_view_response_object' + description: Indicates a successful call. '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Invalid input data - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Insufficient privileges - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Internal server error - summary: Creates an endpoint list - /api/endpoint_list/items: - delete: - operationId: DeleteEndpointListItem - parameters: - - description: Either `id` or `item_id` must be specified - in: query - name: id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemId - - description: Either `id` or `item_id` must be specified - in: query - name: item_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemHumanId - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_EndpointListItem - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Invalid input data - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Insufficient privileges - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Endpoint list item not found - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Internal server error - summary: Deletes an endpoint list item - get: - operationId: ReadEndpointListItem + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Update a data view + tags: + - data views + '/api/data_views/data_view/{viewId}/fields': + post: + description: > + Update fields presentation metadata such as count, customLabel, + customDescription, and format. + operationId: updateFieldsMetadataDefault parameters: - - description: Either `id` or `item_id` must be specified - in: query - name: id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemId - - description: Either `id` or `item_id` must be specified - in: query - name: item_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemHumanId + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Data_views_view_id' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + examples: + updateFieldsMetadataRequest: + $ref: '#/components/examples/Data_views_update_field_metadata_request' + schema: + type: object + properties: + fields: + description: The field object. + type: object + required: + - fields + required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_EndpointListItem - type: array - description: Successful response + type: object + properties: + acknowledged: + type: boolean + description: Indicates a successful call. '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Invalid input data - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Insufficient privileges - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Endpoint list item not found - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Internal server error - summary: Reads an endpoint list item + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Update data view fields metadata + tags: + - data views + '/api/data_views/data_view/{viewId}/runtime_field': post: - operationId: CreateEndpointListItem + operationId: createRuntimeFieldDefault + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Data_views_view_id' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + createRuntimeFieldRequest: + $ref: '#/components/examples/Data_views_create_runtime_field_request' schema: type: object properties: - comments: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemCommentArray - default: [] - description: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryArray - item_id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemMeta name: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemName - os_types: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray - default: [] - tags: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemTags - default: [] - type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemType + description: | + The name for a runtime field. + type: string + runtimeField: + description: | + The runtime field definition object. + type: object required: - - type - name - - description - - entries - description: Exception list item's properties + - runtimeField required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_EndpointListItem - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Invalid input data - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Insufficient privileges - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Endpoint list item already exists - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Internal server error - summary: Creates an endpoint list item + type: object + description: Indicates a successful call. + summary: Create a runtime field + tags: + - data views put: - operationId: UpdateEndpointListItem + operationId: createUpdateRuntimeFieldDefault + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - description: | + The ID of the data view fields you want to update. + in: path + name: viewId + required: true + schema: + type: string requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + updateRuntimeFieldRequest: + $ref: '#/components/examples/Data_views_create_runtime_field_request' schema: type: object properties: - _version: - type: string - comments: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemCommentArray - default: [] - description: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryArray - id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemId - description: Either `id` or `item_id` must be specified - item_id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemHumanId - description: Either `id` or `item_id` must be specified - meta: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemMeta name: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemName - os_types: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray - default: [] - tags: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemTags - type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemType + description: | + The name for a runtime field. + type: string + runtimeField: + description: | + The runtime field definition object. + type: object required: - - type - name - - description - - entries - description: Exception list item's properties + - runtimeField required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_EndpointListItem - description: Successful response + type: object + properties: + data_view: + type: object + fields: + items: + type: object + type: array + description: Indicates a successful call. '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Invalid input data - '401': + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Create or update a runtime field + tags: + - data views + '/api/data_views/data_view/{viewId}/runtime_field/{fieldName}': + delete: + operationId: deleteRuntimeFieldDefault + parameters: + - $ref: '#/components/parameters/Data_views_field_name' + - $ref: '#/components/parameters/Data_views_view_id' + responses: + '200': + description: Indicates a successful call. + '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Insufficient privileges - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Endpoint list item not found - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Internal server error - summary: Updates an endpoint list item - /api/endpoint_list/items/_find: - get: - operationId: FindEndpointListItems - parameters: - - description: > - Filters the returned results according to the value of the specified - field, - - using the `:` syntax. - in: query - name: filter - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_FindEndpointListItemsFilter - - description: The page number to return - in: query - name: page - required: false - schema: - minimum: 0 - type: integer - - description: The number of exception list items to return per page - in: query - name: per_page - required: false - schema: - minimum: 0 - type: integer - - description: Determines which field is used to sort the results - in: query - name: sort_field - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - - description: 'Determines the sort order, which can be `desc` or `asc`' - in: query - name: sort_order - required: false - schema: - enum: - - desc - - asc - type: string - responses: - '200': + $ref: '#/components/schemas/Data_views_404_response' + description: Object is not found. + summary: Delete a runtime field from a data view + tags: + - data views + get: + operationId: getRuntimeFieldDefault + parameters: + - $ref: '#/components/parameters/Data_views_field_name' + - $ref: '#/components/parameters/Data_views_view_id' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getRuntimeFieldResponse: + $ref: '#/components/examples/Data_views_get_runtime_field_response' schema: type: object properties: - data: + data_view: + type: object + fields: items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_EndpointListItem + type: object type: array - page: - minimum: 0 - type: integer - per_page: - minimum: 0 - type: integer - pit: - type: string - total: - minimum: 0 - type: integer - required: - - data - - page - - per_page - - total - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Invalid input data - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Insufficient privileges + description: Indicates a successful call. '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Endpoint list not found - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Internal server error - summary: Finds endpoint list items - /api/endpoint/action: - get: - description: Get a list of action requests and their responses - operationId: EndpointGetActionsList - parameters: - - in: query - name: query - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_GetEndpointActionListRouteQuery - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get Actions List schema + $ref: '#/components/schemas/Data_views_404_response' + description: Object is not found. + summary: Get a runtime field tags: - - Security Solution Endpoint Management API - '/api/endpoint/action_log/{agent_id}': - get: - deprecated: true - description: Get action requests log - operationId: EndpointGetActionLog + - data views + post: + operationId: updateRuntimeFieldDefault parameters: - - in: path - name: agent_id - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentId - - in: query - name: query - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ActionLogRequestQuery + - $ref: '#/components/parameters/Data_views_field_name' + - $ref: '#/components/parameters/Data_views_view_id' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + examples: + updateRuntimeFieldRequest: + $ref: '#/components/examples/Data_views_update_runtime_field_request' + schema: + type: object + properties: + runtimeField: + description: | + The runtime field definition object. + + You can update following fields: + + - `type` + - `script` + type: object + required: + - runtimeField + required: true responses: '200': + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get action requests log schema + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Update a runtime field tags: - - Security Solution Endpoint Management API - /api/endpoint/action_status: + - data views + /api/data_views/default: get: - description: Get action status - operationId: EndpointGetActionsStatus - parameters: - - in: query - name: query - required: true - schema: - type: object - properties: - agent_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentIds + operationId: getDefaultDataViewDefault responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getDefaultDataViewResponse: + $ref: >- + #/components/examples/Data_views_get_default_data_view_response schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ActionStatusSuccessResponse - description: OK - summary: Get Actions status schema - tags: - - Security Solution Endpoint Management API - '/api/endpoint/action/{action_id}': - get: - description: Get action details - operationId: EndpointGetActionsDetails - parameters: - - in: path - name: action_id - required: true - schema: - type: string - responses: - '200': + type: object + properties: + data_view_id: + type: string + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get Action details schema + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Get the default data view tags: - - Security Solution Endpoint Management API - '/api/endpoint/action/{action_id}/file/{file_id}/download`': - get: - description: Download a file from an endpoint - operationId: EndpointFileDownload + - data views + post: + operationId: setDefaultDatailViewDefault parameters: - - in: path - name: action_id - required: true - schema: - type: string - - in: path - name: file_id - required: true - schema: - type: string + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + examples: + setDefaultDataViewRequest: + $ref: '#/components/examples/Data_views_set_default_data_view_request' + schema: + type: object + properties: + data_view_id: + 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. + nullable: true + type: string + force: + default: false + description: Update an existing default data view identifier. + type: boolean + required: + - data_view_id + required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: File Download schema - tags: - - Security Solution Endpoint Management API - '/api/endpoint/action/{action_id}/file/{file_id}`': - get: - description: Get file info - operationId: EndpointFileInfo - parameters: - - in: path - name: action_id - required: true - schema: - type: string - - in: path - name: file_id - required: true - schema: - type: string - responses: - '200': + type: object + properties: + acknowledged: + type: boolean + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: File Info schema + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Set the default data view tags: - - Security Solution Endpoint Management API - /api/endpoint/action/execute: + - data views + /api/data_views/swap_references: post: - description: Execute a given command on an endpoint - operationId: EndpointExecuteAction + 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. + operationId: swapDataViewsDefault + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + swapDataViewRequest: + $ref: '#/components/examples/Data_views_swap_data_view_request' schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ExecuteRouteRequestBody + $ref: '#/components/schemas/Data_views_swap_data_view_request_object' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Execute Action - tags: - - Security Solution Endpoint Management API - /api/endpoint/action/get_file: - post: - description: Get a file from an endpoint - operationId: EndpointGetFileAction - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_GetFileRouteRequestBody - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get File Action + type: object + properties: + deleteStatus: + type: object + properties: + deletePerformed: + type: boolean + remainingRefs: + type: integer + result: + items: + type: object + properties: + id: + description: A saved object identifier. + type: string + type: + description: The saved object type. + type: string + type: array + description: Indicates a successful call. + summary: Swap saved object references tags: - - Security Solution Endpoint Management API - /api/endpoint/action/isolate: + - data views + /api/data_views/swap_references/_preview: post: - description: Isolate an endpoint - operationId: EndpointIsolateAction + description: > + Preview the impact of swapping saved object references from one data + view identifier to another. + operationId: previewSwapDataViewsDefault + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + previewSwapDataViewRequest: + $ref: >- + #/components/examples/Data_views_preview_swap_data_view_request schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_IsolateRouteRequestBody + $ref: '#/components/schemas/Data_views_swap_data_view_request_object' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Isolate Action + type: object + properties: + result: + items: + type: object + properties: + id: + description: A saved object identifier. + type: string + type: + description: The saved object type. + type: string + type: array + description: Indicates a successful call. + summary: Preview a saved object reference swap tags: - - Security Solution Endpoint Management API - /api/endpoint/action/kill_process: - post: - description: Kill a running process on an endpoint - operationId: EndpointKillProcessAction - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_KillOrSuspendActionSchema - required: true + - data views + /api/ml/saved_objects/sync: + get: + description: > + Synchronizes Kibana saved objects for machine learning jobs and trained + models. This API runs automatically when you start Kibana and + periodically thereafter. + operationId: mlSync + parameters: + - $ref: '#/components/parameters/Machine_learning_APIs_simulateParam' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + syncExample: + $ref: '#/components/examples/Machine_learning_APIs_mlSyncExample' schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Kill process Action - tags: - - Security Solution Endpoint Management API - /api/endpoint/action/running_procs: - post: - description: Get list of running processes on an endpoint - operationId: EndpointGetProcessesAction - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_GetProcessesRouteRequestBody - required: true - responses: - '200': + $ref: '#/components/schemas/Machine_learning_APIs_mlSync200Response' + description: Indicates a successful call + '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get Running Processes Action + $ref: '#/components/schemas/Machine_learning_APIs_mlSync4xxResponse' + description: Authorization information is missing or invalid. + summary: Sync machine learning saved objects tags: - - Security Solution Endpoint Management API - /api/endpoint/action/scan: + - ml + /api/saved_objects/_export: post: - description: Scan a file or directory - operationId: EndpointScanAction + 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. + operationId: exportSavedObjectsDefault + parameters: + - $ref: '#/components/parameters/Serverless_saved_objects_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + exportSavedObjectsRequest: + $ref: >- + #/components/examples/Serverless_saved_objects_export_objects_request schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ScanRouteRequestBody + type: object + properties: + excludeExportDetails: + default: false + description: Do not add export details entry at the end of the stream. + type: boolean + includeReferencesDeep: + description: >- + Includes all of the referenced objects in the exported + objects. + type: boolean + objects: + description: A list of objects to export. + items: + type: object + type: array + type: + description: >- + The saved object types to include in the export. Use `*` to + export all the types. + oneOf: + - type: string + - items: + type: string + type: array required: true responses: '200': content: - application/json; Elastic-Api-Version=2023-10-31: + application/x-ndjson; Elastic-Api-Version=2023-10-31: + examples: + exportSavedObjectsResponse: + $ref: >- + #/components/examples/Serverless_saved_objects_export_objects_response schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Scan Action - tags: - - Security Solution Endpoint Management API - /api/endpoint/action/state: - get: - operationId: EndpointGetActionsState - responses: - '200': + additionalProperties: true + type: object + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ActionStateSuccessResponse - description: OK - summary: Get Action State schema + $ref: '#/components/schemas/Serverless_saved_objects_400_response' + description: Bad request. + summary: Export saved objects tags: - - Security Solution Endpoint Management API - /api/endpoint/action/suspend_process: + - saved objects + /api/saved_objects/_import: post: - description: Suspend a running process on an endpoint - operationId: EndpointSuspendProcessAction + 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. + operationId: importSavedObjectsDefault + parameters: + - $ref: '#/components/parameters/Serverless_saved_objects_kbn_xsrf' + - 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: createNewCopies + required: false + schema: + type: boolean + - 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: overwrite + required: false + schema: + type: boolean + - 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. + in: query + name: compatibilityMode + required: false + schema: + type: boolean requestBody: content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_KillOrSuspendActionSchema - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: + multipart/form-data; Elastic-Api-Version=2023-10-31: + examples: + importObjectsRequest: $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Suspend process Action - tags: - - Security Solution Endpoint Management API - /api/endpoint/action/unisolate: - post: - description: Release an endpoint - operationId: EndpointUnisolateAction - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: + #/components/examples/Serverless_saved_objects_import_objects_request schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_UnisolateRouteRequestBody + 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. required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Unisolate Action - tags: - - Security Solution Endpoint Management API - /api/endpoint/action/upload: - post: - description: Upload a file to an endpoint - operationId: EndpointUploadAction - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_UploadRouteRequestBody - required: true - responses: - '200': + examples: + importObjectsResponse: + $ref: >- + #/components/examples/Serverless_saved_objects_import_objects_response + schema: + type: object + properties: + errors: + 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. + items: + type: object + type: array + success: + 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. + type: boolean + successCount: + description: Indicates the number of successfully imported records. + type: integer + successResults: + 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. + items: + type: object + type: array + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Upload Action + $ref: '#/components/schemas/Serverless_saved_objects_400_response' + description: Bad request. + summary: Import saved objects tags: - - Security Solution Endpoint Management API - /api/endpoint/metadata: + - saved objects + /api/status: get: - operationId: GetEndpointMetadataList + operationId: /api/status#0 parameters: - - in: query - name: query - required: true + - description: The version of the API to use + in: header + name: elastic-api-version schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ListRequestQuery + 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: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get Metadata List 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: - - Security Solution Endpoint Management API - '/api/endpoint/metadata/{id}': + - system + /data_streams: get: - operationId: GetEndpointMetadata - parameters: - - in: path - name: id - required: true - schema: - type: string + operationId: data-streams-list responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse + type: object + properties: + data_streams: + items: + $ref: '#/components/schemas/Fleet_data_stream' + type: array description: OK - summary: Get Metadata schema + '400': + $ref: '#/components/responses/Fleet_error' + summary: List data streams tags: - - Security Solution Endpoint Management API - /api/endpoint/metadata/transforms: + - Data streams + parameters: [] + /enrollment_api_keys: get: - operationId: GetEndpointMetadataTransform + operationId: get-enrollment-api-keys + parameters: [] responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + type: array + list: + deprecated: true + items: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + type: array + page: + type: number + perPage: + type: number + total: + type: number + required: + - items + - page + - perPage + - total description: OK - summary: Get Metadata Transform schema + '400': + $ref: '#/components/responses/Fleet_error' + summary: List enrollment API keys tags: - - Security Solution Endpoint Management API - /api/endpoint/policy_response: - get: - operationId: GetPolicyResponse + - Fleet enrollment API keys + post: + operationId: create-enrollment-api-keys parameters: - - in: query - name: query - required: true - schema: - type: object - properties: - agentId: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentId + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse + type: object + properties: + action: + enum: + - created + type: string + item: + $ref: '#/components/schemas/Fleet_enrollment_api_key' description: OK - summary: Get Policy Response schema + '400': + $ref: '#/components/responses/Fleet_error' + summary: Create enrollment API key tags: - - Security Solution Endpoint Management API - /api/endpoint/policy/summaries: - get: - deprecated: true - operationId: GetAgentPolicySummary + - Fleet enrollment API keys + '/enrollment_api_keys/{keyId}': + delete: + operationId: delete-enrollment-api-key parameters: - - in: query - name: query - required: true - schema: - type: object - properties: - package_name: - type: string - policy_id: - nullable: true - type: string + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse + type: object + properties: + action: + enum: + - deleted + type: string + required: + - action description: OK - summary: Get Agent Policy Summary schema + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete enrollment API key by ID tags: - - Security Solution Endpoint Management API - '/api/endpoint/protection_updates_note/{package_policy_id}': + - Fleet enrollment API keys get: - operationId: GetProtectionUpdatesNote - parameters: - - in: path - name: package_policy_id - required: true - schema: - type: string + operationId: get-enrollment-api-key responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ProtectionUpdatesNoteResponse + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + required: + - item description: OK - summary: Get Protection Updates Note schema + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get enrollment API key by ID tags: - - Security Solution Endpoint Management API - post: - operationId: CreateUpdateProtectionUpdatesNote - parameters: - - in: path - name: package_policy_id - required: true - schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - note: - type: string + - Fleet enrollment API keys + parameters: + - in: path + name: keyId required: true + schema: + type: string + /enrollment-api-keys: + get: + deprecated: true + operationId: get-enrollment-api-keys-deprecated + parameters: [] responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ProtectionUpdatesNoteResponse + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + type: array + list: + deprecated: true + items: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + type: array + page: + type: number + perPage: + type: number + total: + type: number + required: + - items + - page + - perPage + - total description: OK - summary: Create Update Protection Updates Note schema + '400': + $ref: '#/components/responses/Fleet_error' + summary: List enrollment API keys tags: - - Security Solution Endpoint Management API - '/api/endpoint/suggestions/{suggestion_type}': + - Fleet enrollment API keys post: - operationId: GetEndpointSuggestions + deprecated: true + operationId: create-enrollment-api-keys-deprecated parameters: - - in: path - name: suggestion_type - required: true - schema: - enum: - - eventFilters - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - field: - type: string - fieldMeta: {} - filters: {} - query: - type: string - required: - - parameters - required: true + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse + type: object + properties: + action: + enum: + - created + type: string + item: + $ref: '#/components/schemas/Fleet_enrollment_api_key' description: OK - summary: Get suggestions + '400': + $ref: '#/components/responses/Fleet_error' + summary: Create enrollment API key tags: - - Security Solution Endpoint Management API - /api/exception_lists: + - Fleet enrollment API keys + '/enrollment-api-keys/{keyId}': delete: - operationId: DeleteExceptionList + deprecated: true + operationId: delete-enrollment-api-key-deprecated parameters: - - description: Either `id` or `list_id` must be specified - in: query - name: id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - - description: Either `id` or `list_id` must be specified - in: query - name: list_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - - in: query - name: namespace_type - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': + type: object + properties: + action: + enum: + - deleted + type: string + required: + - action + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete enrollment API key by ID + tags: + - Fleet enrollment API keys + get: + deprecated: true + operationId: get-enrollment-api-key-deprecated + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get enrollment API key by ID + tags: + - Fleet enrollment API keys + parameters: + - in: path + name: keyId + required: true + schema: + type: string + /epm/bulk_assets: + post: + operationId: bulk-get-assets + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + assetIds: + description: list of items necessary to fetch assets + items: + type: object + properties: + id: + type: string + type: + type: string + type: array + required: + - assetIds + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list not found response - '500': + $ref: '#/components/schemas/Fleet_get_bulk_assets_response' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Bulk get assets + tags: + - Elastic Package Manager (EPM) + /epm/categories: + get: + operationId: get-package-categories + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Deletes an exception list - tags: - - Security Solution Exceptions API + $ref: '#/components/schemas/Fleet_get_categories_response' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List package categories + tags: + - Elastic Package Manager (EPM) + parameters: + - description: >- + Whether to include prerelease packages in categories count (e.g. beta, + rc, preview) + in: query + name: prerelease + schema: + default: false + type: boolean + - deprecated: true + in: query + name: experimental + schema: + default: false + type: boolean + - in: query + name: include_policy_templates + schema: + default: false + type: boolean + /epm/packages: get: - operationId: ReadExceptionList + operationId: list-all-packages parameters: - - description: Either `id` or `list_id` must be specified + - description: >- + Whether to exclude the install status of each package. Enabling this + option will opt in to caching for the response via `cache-control` + headers. If you don't need up-to-date installation info for a + package, and are querying for a list of available packages, + providing this flag can improve performance substantially. in: query - name: id - required: false + name: excludeInstallStatus schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - - description: Either `id` or `list_id` must be specified + default: false + type: boolean + - description: >- + Whether to return prerelease versions of packages (e.g. beta, rc, + preview) in: query - name: list_id - required: false + name: prerelease schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId + default: false + type: boolean + - deprecated: true + in: query + name: experimental + schema: + default: false + type: boolean - in: query - name: namespace_type - required: false + name: category schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single + type: string responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList - description: Successful response + $ref: '#/components/schemas/Fleet_get_packages_response' + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: List packages + tags: + - Elastic Package Manager (EPM) + post: + description: '' + operationId: install-package-by-upload + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - description: avoid erroring out on unexpected mapping update errors + in: query + name: ignoreMappingUpdateErrors + schema: + default: false + type: boolean + - description: >- + Skip data stream rollover during index template mapping or settings + update + in: query + name: skipDataStreamRollover + schema: + default: false + type: boolean + requestBody: + content: + application/gzip; Elastic-Api-Version=2023-10-31: + schema: + format: binary + type: string + application/zip; Elastic-Api-Version=2023-10-31: + schema: + format: binary + type: string + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list item not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Retrieves an exception list using its `id` or `list_id` field + type: object + properties: + _meta: + type: object + properties: + install_source: + enum: + - upload + - registry + - bundled + type: string + items: + items: + type: object + properties: + id: + type: string + type: + oneOf: + - $ref: >- + #/components/schemas/Fleet_kibana_saved_object_type + - $ref: >- + #/components/schemas/Fleet_elasticsearch_asset_type + required: + - id + - type + type: array + required: + - items + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + '429': + $ref: '#/components/responses/Fleet_error' + summary: Install by package by direct upload tags: - - Security Solution Exceptions API + - Elastic Package Manager (EPM) + /epm/packages/_bulk: post: - operationId: CreateExceptionList + operationId: bulk-install-packages + parameters: + - description: >- + Whether to return prerelease versions of packages (e.g. beta, rc, + preview) + in: query + name: prerelease + schema: + default: false + type: boolean requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListDescription - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListMeta - name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListOsTypeArray - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListTags - default: [] - type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListType - version: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListVersion - default: 1 + force: + description: force install to ignore package verification errors + type: boolean + packages: + description: list of packages to install + items: + oneOf: + - description: package name + type: string + - type: object + properties: + name: + description: package name + type: string + version: + description: package version + type: string + type: array required: - - name - - description - - type - description: Exception list's properties - required: true + - packages responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList - description: Successful response + $ref: '#/components/schemas/Fleet_bulk_install_packages_response' + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list already exists response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Creates an exception list + $ref: '#/components/responses/Fleet_error' + summary: Bulk install packages tags: - - Security Solution Exceptions API - put: - operationId: UpdateExceptionList + - Elastic Package Manager (EPM) + '/epm/packages/{pkgkey}': + delete: + deprecated: true + operationId: delete-package-deprecated + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - in: path + name: pkgkey + required: true + schema: + type: string requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - _version: - type: string - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListDescription - id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListMeta - name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListOsTypeArray - default: [] - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListTags - type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListType - version: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListVersion - required: - - name - - description - - type - description: Exception list's properties - required: true + force: + type: boolean responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList - description: Successful response + type: object + properties: + response: + items: + type: object + properties: + id: + type: string + type: + oneOf: + - $ref: >- + #/components/schemas/Fleet_kibana_saved_object_type + - $ref: >- + #/components/schemas/Fleet_elasticsearch_asset_type + required: + - id + - type + type: array + required: + - response + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Updates an exception list + $ref: '#/components/responses/Fleet_error' + summary: Delete ackage tags: - - Security Solution Exceptions API - /api/exception_lists/_duplicate: - post: - operationId: DuplicateExceptionList + - Elastic Package Manager (EPM) + get: + deprecated: true + operationId: get-package-deprecated parameters: - - description: Exception list's human identifier - in: query - name: list_id - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - - in: query - name: namespace_type + - in: path + name: pkgkey required: true schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType + type: string - description: >- - Determines whether to include expired exceptions in the exported - list + Whether to return prerelease versions of packages (e.g. beta, rc, + preview) in: query - name: include_expired_exceptions - required: true + name: prerelease schema: - default: 'true' - enum: - - 'true' - - 'false' - type: string + default: false + type: boolean responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList - description: Successful response + allOf: + - properties: + response: + $ref: '#/components/schemas/Fleet_package_info' + - properties: + savedObject: + type: string + status: + enum: + - installed + - installing + - install_failed + - not_installed + type: string + required: + - status + - savedObject + type: object + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '405': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list to duplicate not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Duplicates an exception list + $ref: '#/components/responses/Fleet_error' + security: + - Fleet_basicAuth: [] + summary: Get package tags: - - Security Solution Exceptions API - /api/exception_lists/_export: + - Elastic Package Manager (EPM) post: - description: Exports an exception list and its associated items to an .ndjson file - operationId: ExportExceptionList + deprecated: true + description: '' + operationId: install-package-deprecated parameters: - - description: Exception list's identifier - in: query - name: id + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - in: path + name: pkgkey required: true schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - - description: Exception list's human identifier + type: string + - description: avoid erroring out on unexpected mapping update errors in: query - name: list_id - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - - in: query - name: namespace_type - required: true + name: ignoreMappingUpdateErrors schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType + default: false + type: boolean - description: >- - Determines whether to include expired exceptions in the exported - list + Skip data stream rollover during index template mapping or settings + update in: query - name: include_expired_exceptions - required: true + name: skipDataStreamRollover schema: - default: 'true' - enum: - - 'true' - - 'false' - type: string + default: false + type: boolean + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + force: + type: boolean responses: '200': - content: - application/ndjson; Elastic-Api-Version=2023-10-31: - schema: - description: >- - A `.ndjson` file containing specified exception list and its - items - format: binary - type: string - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Exports an exception list + type: object + properties: + response: + items: + type: object + properties: + id: + type: string + type: + oneOf: + - $ref: >- + #/components/schemas/Fleet_kibana_saved_object_type + - $ref: >- + #/components/schemas/Fleet_elasticsearch_asset_type + required: + - id + - type + type: array + required: + - response + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Install package tags: - - Security Solution Exceptions API - /api/exception_lists/_find: - get: - operationId: FindExceptionLists + - Elastic Package Manager (EPM) + '/epm/packages/{pkgName}/{pkgVersion}': + delete: + operationId: delete-package parameters: - - description: > - Filters the returned results according to the value of the specified - field. - - - Uses the `so type.field name:field` value syntax, where `so type` - can be: - - - - `exception-list`: Specify a space-aware exception list. - - - `exception-list-agnostic`: Specify an exception list that is - shared across spaces. - in: query - name: filter - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_FindExceptionListsFilter - - description: > - Determines whether the returned containers are Kibana associated - with a Kibana space - - or available in all spaces (`agnostic` or `single`) - in: query - name: namespace_type - required: false - schema: - default: - - single - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - type: array - - description: The page number to return - in: query - name: page - required: false - schema: - minimum: 1 - type: integer - - description: The number of exception lists to return per page - in: query - name: per_page - required: false - schema: - minimum: 1 - type: integer - - description: Determines which field is used to sort the results - in: query - name: sort_field - required: false - schema: - type: string - - description: 'Determines the sort order, which can be `desc` or `asc`' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - description: delete package even if policies used by agents in: query - name: sort_order - required: false + name: force schema: - enum: - - desc - - asc - type: string + type: boolean + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + deprecated: true + type: object + properties: + force: + type: boolean responses: '200': content: @@ -3762,114 +3487,132 @@ paths: schema: type: object properties: - data: + items: items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList + type: object + properties: + id: + type: string + type: + oneOf: + - $ref: >- + #/components/schemas/Fleet_kibana_saved_object_type + - $ref: >- + #/components/schemas/Fleet_elasticsearch_asset_type + required: + - id + - type type: array - page: - minimum: 1 - type: integer - per_page: - minimum: 1 - type: integer - total: - minimum: 0 - type: integer required: - - data - - page - - per_page - - total - description: Successful response + - items + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete package + tags: + - Elastic Package Manager (EPM) + get: + operationId: get-package + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Finds exception lists - tags: - - Security Solution Exceptions API - /api/exception_lists/_import: + allOf: + - properties: + item: + $ref: '#/components/schemas/Fleet_package_info' + - properties: + keepPoliciesUpToDate: + type: boolean + latestVersion: + type: string + licensePath: + type: string + notice: + type: string + savedObject: + deprecated: true + type: object + status: + enum: + - installed + - installing + - install_failed + - not_installed + type: string + required: + - status + - savedObject + type: object + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + security: + - Fleet_basicAuth: [] + summary: Get package + tags: + - Elastic Package Manager (EPM) + parameters: + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: true + schema: + type: string + - description: Ignore if the package is fails signature verification + in: query + name: ignoreUnverified + schema: + type: boolean + - description: >- + Return all fields from the package manifest, not just those supported + by the Elastic Package Registry + in: query + name: full + schema: + type: boolean + - description: >- + Whether to return prerelease versions of packages (e.g. beta, rc, + preview) + in: query + name: prerelease + schema: + default: false + type: boolean post: - description: Imports an exception list and associated items - operationId: ImportExceptionList + description: '' + operationId: install-package parameters: - - description: > - Determines whether existing exception lists with the same `list_id` - are overwritten. - - If any exception items have the same `item_id`, those are also - overwritten. + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - description: avoid erroring out on unexpected mapping update errors in: query - name: overwrite - required: false - schema: - default: false - type: boolean - - in: query - name: overwrite_exceptions - required: false + name: ignoreMappingUpdateErrors schema: default: false type: boolean - - in: query - name: overwrite_action_connectors - required: false - schema: - default: false - type: boolean - - description: > - Determines whether the list being imported will have a new `list_id` - generated. - - Additional `item_id`'s are generated for each exception item. Both - the exception - - list and its items are overwritten. - in: query - name: as_new_list - required: false + - description: >- + Skip data stream rollover during index template mapping or settings + update + in: query + name: skipDataStreamRollover schema: default: false type: boolean requestBody: content: - multipart/form-data; Elastic-Api-Version=2023-10-31: + application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - file: - description: A `.ndjson` file containing the exception list - format: binary - type: string - required: true + force: + type: boolean + ignore_constraints: + type: boolean responses: '200': content: @@ -3877,505 +3620,524 @@ paths: schema: type: object properties: - errors: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListsImportBulkErrorArray - success: - type: boolean - success_count: - minimum: 0 - type: integer - success_count_exception_list_items: - minimum: 0 - type: integer - success_count_exception_lists: - minimum: 0 - type: integer - success_exception_list_items: - type: boolean - success_exception_lists: - type: boolean + _meta: + type: object + properties: + install_source: + enum: + - registry + - upload + - bundled + type: string + items: + items: + type: object + properties: + id: + type: string + type: + oneOf: + - $ref: >- + #/components/schemas/Fleet_kibana_saved_object_type + - $ref: >- + #/components/schemas/Fleet_elasticsearch_asset_type + required: + - id + - type + type: array required: - - errors - - success - - success_count - - success_exception_lists - - success_count_exception_lists - - success_exception_list_items - - success_count_exception_list_items - description: Successful response + - items + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Imports an exception list + $ref: '#/components/responses/Fleet_error' + summary: Install package tags: - - Security Solution Exceptions API - /api/exception_lists/items: - delete: - operationId: DeleteExceptionListItem - parameters: - - description: Either `id` or `item_id` must be specified - in: query - name: id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemId - - description: Either `id` or `item_id` must be specified - in: query - name: item_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - - in: query - name: namespace_type - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single + - Elastic Package Manager (EPM) + put: + description: '' + operationId: update-package + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + keepPoliciesUpToDate: + type: boolean responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItem - description: Successful response + type: object + properties: + items: + items: + type: object + properties: + id: + type: string + type: + oneOf: + - $ref: >- + #/components/schemas/Fleet_kibana_saved_object_type + - $ref: >- + #/components/schemas/Fleet_elasticsearch_asset_type + required: + - id + - type + type: array + required: + - items + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list item not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Deletes an exception list item + $ref: '#/components/responses/Fleet_error' + summary: Update package settings tags: - - Security Solution Exceptions API + - Elastic Package Manager (EPM) + '/epm/packages/{pkgName}/{pkgVersion}/{filePath}': get: - operationId: ReadExceptionListItem - parameters: - - description: Either `id` or `item_id` must be specified - in: query - name: id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemId - - description: Either `id` or `item_id` must be specified - in: query - name: item_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - - in: query - name: namespace_type - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single + operationId: packages-get-file responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItem - description: Successful response + type: object + properties: + body: + type: object + headers: + type: object + statusCode: + type: number + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list item not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Gets an exception list item + $ref: '#/components/responses/Fleet_error' + summary: Get package file tags: - - Security Solution Exceptions API + - Elastic Package Manager (EPM) + parameters: + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: true + schema: + type: string + - in: path + name: filePath + required: true + schema: + type: string + '/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize': post: - operationId: CreateExceptionListItem + description: '' + operationId: reauthorize-transforms + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: true + schema: + type: string + - description: >- + Whether to include prerelease packages in categories count (e.g. + beta, rc, preview) + in: query + name: prerelease + schema: + default: false + type: boolean requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - comments: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_CreateExceptionListItemCommentArray - default: [] - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryArray - expire_time: - format: date-time - type: string - item_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemMeta - name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemOsTypeArray - default: [] - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemTags - default: [] - type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemType - required: - - list_id - - type - - name - - description - - entries - description: Exception list item's properties - required: true + transforms: + items: + type: object + properties: + transformId: + type: string + type: array responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItem - description: Successful response + type: object + properties: + items: + items: + type: object + properties: + error: + type: string + success: + type: boolean + transformId: + type: string + required: + - transformId + - error + type: array + required: + - items + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Authorize transforms + tags: + - Elastic Package Manager (EPM) + '/epm/packages/{pkgName}/stats': + get: + operationId: get-package-stats + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '409': + type: object + properties: + response: + $ref: '#/components/schemas/Fleet_package_usage_stats' + required: + - response + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + security: + - Fleet_basicAuth: [] + summary: Get package stats + tags: + - Elastic Package Manager (EPM) + parameters: + - in: path + name: pkgName + required: true + schema: + type: string + /epm/packages/limited: + get: + operationId: list-limited-packages + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list item already exists response - '500': + type: object + properties: + items: + items: + type: string + type: array + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get limited package list + tags: + - Elastic Package Manager (EPM) + parameters: [] + '/epm/templates/{pkgName}/{pkgVersion}/inputs': + get: + operationId: get-inputs-template + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + security: + - Fleet_basicAuth: [] + summary: Get inputs template + tags: + - Elastic Package Manager (EPM) + parameters: + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: true + schema: + type: string + - description: Format of response - json or yaml + in: query + name: format + schema: + enum: + - json + - yaml + - yml + type: string + - description: Specify if version is prerelease + in: query + name: prerelease + schema: + type: boolean + - description: Ignore if the package is fails signature verification + in: query + name: ignoreUnverified + schema: + type: boolean + /epm/verification_key_id: + get: + operationId: packages-get-verification-key-id + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Creates an exception list item + type: object + properties: + body: + type: object + properties: + id: + description: >- + the key ID of the GPG key used to verify package + signatures + nullable: true + type: string + headers: + type: object + statusCode: + type: number + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get package signature verification key ID tags: - - Security Solution Exceptions API - put: - operationId: UpdateExceptionListItem + - Elastic Package Manager (EPM) + parameters: [] + /fleet_server_hosts: + get: + operationId: get-fleet-server-hosts + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_fleet_server_host' + type: array + page: + type: integer + perPage: + type: integer + total: + type: integer + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List Fleet Server hosts + tags: + - Fleet Server hosts + post: + operationId: post-fleet-server-hosts requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - _version: - type: string - comments: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_UpdateExceptionListItemCommentArray - default: [] - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryArray - expire_time: - format: date-time - type: string + host_urls: + items: + type: string + type: array id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemId - description: Either `id` or `item_id` must be specified - item_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - description: Either `id` or `item_id` must be specified - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemMeta + type: string + is_default: + type: boolean + is_internal: + type: boolean name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemOsTypeArray - default: [] - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemTags - type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemType + type: string + proxy_id: + description: >- + The ID of the proxy to use for this fleet server host. See + the proxies API for more information. + type: string required: - - type - name - - description - - entries - description: Exception list item's properties - required: true + - host_urls responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItem - description: Successful response + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_fleet_server_host' + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Create Fleet Server host + tags: + - Fleet Server hosts + '/fleet_server_hosts/{itemId}': + delete: + operationId: delete-fleet-server-hosts + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': + type: object + properties: + id: + type: string + required: + - id + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete Fleet Server host by ID + tags: + - Fleet Server hosts + get: + operationId: get-one-fleet-server-hosts + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_fleet_server_host' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get Fleet Server host by ID + tags: + - Fleet Server hosts + parameters: + - in: path + name: itemId + required: true + schema: + type: string + put: + operationId: update-fleet-server-hosts + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + host_urls: + items: + type: string + type: array + is_default: + type: boolean + is_internal: + type: boolean + name: + type: string + proxy_id: + description: >- + The ID of the proxy to use for this fleet server host. See + the proxies API for more information. + nullable: true + type: string + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list item not found response - '500': + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_fleet_server_host' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Update Fleet Server host by ID + tags: + - Fleet Server hosts + /health_check: + post: + operationId: fleet-server-health-check + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + host: + deprecated: true + type: string + id: + type: string + required: + - id + required: true + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Updates an exception list item + type: object + properties: + host: + deprecated: true + type: string + id: + description: Fleet Server host id + type: string + status: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Fleet Server health check tags: - - Security Solution Exceptions API - /api/exception_lists/items/_find: + - Fleet internals + /kubernetes: get: - operationId: FindExceptionListItems + operationId: get-full-k8s-manifest parameters: - - description: List's id - in: query - name: list_id - required: true - schema: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - type: array - - description: > - Filters the returned results according to the value of the specified - field, - - using the `:` syntax. - in: query - name: filter - required: false - schema: - default: [] - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_FindExceptionListItemsFilter - type: array - - description: > - Determines whether the returned containers are Kibana associated - with a Kibana space - - or available in all spaces (`agnostic` or `single`) - in: query - name: namespace_type + - in: query + name: download required: false schema: - default: - - single - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - type: array + type: boolean - in: query - name: search + name: fleetServer required: false schema: type: string - - description: The page number to return - in: query - name: page - required: false - schema: - minimum: 0 - type: integer - - description: The number of exception list items to return per page - in: query - name: per_page - required: false - schema: - minimum: 0 - type: integer - - description: Determines which field is used to sort the results - in: query - name: sort_field - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_NonEmptyString - - description: 'Determines the sort order, which can be `desc` or `asc`' - in: query - name: sort_order + - in: query + name: enrolToken required: false schema: - enum: - - desc - - asc type: string responses: '200': @@ -4384,100 +4146,88 @@ paths: schema: type: object properties: - data: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItem - type: array - page: - minimum: 1 - type: integer - per_page: - minimum: 1 - type: integer - pit: + item: type: string - total: - minimum: 0 - type: integer - required: - - data - - page - - per_page - - total - description: Successful response + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Get full K8s agent manifest + tags: + - Fleet Kubernetes + /logstash_api_keys: + post: + operationId: generate-logstash-api-key + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': + type: object + properties: + api_key: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Generate Logstash API key + tags: + - Fleet outputs + /outputs: + get: + operationId: get-outputs + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list not found response - '500': + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_output_create_request' + type: array + page: + type: integer + perPage: + type: integer + total: + type: integer + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List outputs + tags: + - Fleet outputs + post: + operationId: post-outputs + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Fleet_output_create_request' + required: true + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Finds exception list items + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_output_create_request' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Create output tags: - - Security Solution Exceptions API - /api/exception_lists/summary: - get: - operationId: ReadExceptionListSummary + - Fleet outputs + '/outputs/{outputId}': + delete: + operationId: delete-output parameters: - - description: Exception list's identifier generated upon creation - in: query - name: id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - - description: Exception list's human readable identifier - in: query - name: list_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - - in: query - name: namespace_type - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - - description: Search filter clause - in: query - name: filter - required: false - schema: - type: string + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: @@ -4485,1474 +4235,1168 @@ paths: schema: type: object properties: - linux: - minimum: 0 - type: integer - macos: - minimum: 0 - type: integer - total: - minimum: 0 - type: integer - windows: - minimum: 0 - type: integer - description: Successful response + id: + type: string + required: + - id + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete output by ID + tags: + - Fleet outputs + get: + operationId: get-output + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_output_create_request' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get output by ID + tags: + - Fleet outputs + parameters: + - in: path + name: outputId + required: true + schema: + type: string + put: + operationId: update-output + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Fleet_output_update_request' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_output_update_request' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Update output by ID + tags: + - Fleet outputs + '/outputs/{outputId}/health': + get: + operationId: get-output-health + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': + type: object + properties: + message: + description: long message if unhealthy + type: string + state: + description: 'state of output, HEALTHY or DEGRADED' + type: string + timestamp: + description: timestamp of reported state + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get latest output health + tags: + - Fleet outputs + parameters: + - in: path + name: outputId + required: true + schema: + type: string + /package_policies: + get: + operationId: get-package-policies + parameters: + - $ref: '#/components/parameters/Fleet_page_size' + - $ref: '#/components/parameters/Fleet_page_index' + - $ref: '#/components/parameters/Fleet_kuery' + - $ref: '#/components/parameters/Fleet_format' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list not found response - '500': + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_package_policy' + type: array + page: + type: number + perPage: + type: number + total: + type: number + required: + - items + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + security: [] + summary: List package policies + tags: + - Fleet package policies + parameters: [] + post: + operationId: create-package-policy + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - $ref: '#/components/parameters/Fleet_format' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Fleet_package_policy_request' + description: >- + You should use inputs as an object and not use the deprecated inputs + array. + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Retrieves an exception list summary + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_package_policy' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + '409': + $ref: '#/components/responses/Fleet_error' + summary: Create package policy tags: - - Security Solution Exceptions API - /api/exceptions/shared: + - Fleet package policies + /package_policies/_bulk_get: post: - operationId: CreateSharedExceptionList + operationId: bulk-get-package-policies + parameters: + - $ref: '#/components/parameters/Fleet_format' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListDescription - name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListName + ids: + description: list of package policy ids + items: + type: string + type: array + ignoreMissing: + type: boolean required: - - name - - description - required: true + - ids responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList - description: Successful response + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_package_policy' + type: array + required: + - items + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list already exists response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Creates a shared exception list + $ref: '#/components/responses/Fleet_error' + security: [] + summary: Bulk get package policies tags: - - Security Solution Exceptions API - /api/lists: + - Fleet package policies + '/package_policies/{packagePolicyId}': delete: - operationId: DeleteList + operationId: delete-package-policy parameters: - - description: List's `id` value - in: query - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - in: query - name: deleteReferences - required: false - schema: - default: false - type: boolean - in: query - name: ignoreReferences - required: false + name: force schema: - default: false type: boolean responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' - description: Successful response + type: object + properties: + id: + type: string + required: + - id + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Deletes a list + $ref: '#/components/responses/Fleet_error' + summary: Delete package policy by ID tags: - - Security Solution Lists API + - Fleet package policies get: - operationId: ReadList + operationId: get-package-policy parameters: - - description: List's `id` value - in: query - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' + - $ref: '#/components/parameters/Fleet_format' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' - description: Successful response + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_package_policy' + required: + - item + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Get package policy by ID + tags: + - Fleet package policies + parameters: + - in: path + name: packagePolicyId + required: true + schema: + type: string + put: + operationId: update-package-policy + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - $ref: '#/components/parameters/Fleet_format' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Fleet_package_policy_request' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_package_policy' + sucess: + type: boolean + required: + - item + - sucess + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Update package policy by ID + tags: + - Fleet package policies + /package_policies/delete: + post: + operationId: post-delete-package-policy + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + force: + type: boolean + packagePolicyIds: + items: + type: string + type: array + required: + - packagePolicyIds + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List not found response - '500': + items: + type: object + properties: + id: + type: string + name: + type: string + success: + type: boolean + required: + - id + - success + type: array + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete package policy + tags: + - Fleet package policies + /package_policies/upgrade: + post: + operationId: upgrade-package-policy + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + packagePolicyIds: + items: + type: string + type: array + required: + - packagePolicyIds + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Retrieves a list using its id field + items: + type: object + properties: + id: + type: string + name: + type: string + success: + type: boolean + required: + - id + - success + type: array + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + '409': + $ref: '#/components/responses/Fleet_error' + summary: Upgrade package policy to a newer package version tags: - - Security Solution Lists API - patch: - operationId: PatchList + - Fleet package policies + /package_policies/upgrade/dryrun: + post: + operationId: upgrade-package-policy-dry-run requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - _version: + packagePolicyIds: + items: + type: string + type: array + packageVersion: type: string - description: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListDescription - id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - meta: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListMetadata - name: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListName' - version: - minimum: 1 - type: integer required: - - id - description: List's properties - required: true + - packagePolicyIds responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' - description: Successful response + items: + type: object + properties: + agent_diff: + $ref: '#/components/schemas/Fleet_upgrade_agent_diff' + diff: + $ref: '#/components/schemas/Fleet_upgrade_diff' + hasErrors: + type: boolean + required: + - hasErrors + type: array + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Dry run package policy upgrade + tags: + - Fleet package policies + /proxies: + get: + operationId: get-fleet-proxies + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Patches a list + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_proxies' + type: array + page: + type: integer + perPage: + type: integer + total: + type: integer + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List proxies tags: - - Security Solution Lists API + - Fleet proxies post: - operationId: CreateList + operationId: post-fleet-proxies requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - description: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListDescription - deserializer: + certificate: + type: string + certificate_authorities: + type: string + certificate_key: type: string id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - meta: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListMetadata + type: string name: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListName' - serializer: type: string - type: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListType' - version: - default: 1 - minimum: 1 - type: integer + proxy_headers: + type: object + url: + type: string required: - name - - description - - type - description: List's properties - required: true + - url responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' - description: Successful response + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_proxies' + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Create proxy + tags: + - Fleet proxies + '/proxies/{itemId}': + delete: + operationId: delete-fleet-proxies + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List already exists response - '500': + type: object + properties: + id: + type: string + required: + - id + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete proxy by ID + tags: + - Fleet proxies + get: + operationId: get-one-fleet-proxies + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Creates a list + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_proxies' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get proxy by ID tags: - - Security Solution Lists API + - Fleet proxies + parameters: + - in: path + name: itemId + required: true + schema: + type: string put: - operationId: UpdateList + operationId: update-fleet-proxies + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - _version: + certificate: + type: string + certificate_authorities: + type: string + certificate_key: type: string - description: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListDescription - id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - meta: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListMetadata name: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListName' - version: - minimum: 1 - type: integer - required: - - id - - name - - description - description: List's properties - required: true + type: string + proxy_headers: + type: object + url: + type: string responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' - description: Successful response + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_proxies' + required: + - item + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Updates a list + $ref: '#/components/responses/Fleet_error' + summary: Update proxy by ID tags: - - Security Solution Lists API - /api/lists/_find: + - Fleet proxies + '/s/{spaceId}/api/observability/slos': get: - operationId: FindLists + description: > + You must have the `read` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: findSlosOp parameters: - - description: The page number to return + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - description: A valid kql query to filter the SLO with + example: 'slo.name:latency* and slo.tags : "prod"' in: query - name: page - required: false + name: kqlQuery schema: - type: integer - - description: The number of lists to return per page + type: string + - description: 'The page to use for pagination, must be greater or equal than 1' + example: 1 in: query - name: per_page - required: false + name: page schema: + default: 1 type: integer - - description: Determines which field is used to sort the results + - description: Number of SLOs returned by page + example: 25 in: query - name: sort_field - required: false + name: perPage schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - - description: 'Determines the sort order, which can be `desc` or `asc`' + default: 25 + maximum: 5000 + type: integer + - description: Sort by field + example: status in: query - name: sort_order - required: false + name: sortBy schema: + default: status enum: - - desc - - asc + - sli_value + - status + - error_budget_consumed + - error_budget_remaining type: string - - description: > - Returns the list that come after the last list returned in the - previous call - - (use the cursor value returned in the previous call). This parameter - uses - - the `tie_breaker_id` field to ensure all lists are sorted and - returned correctly. + - description: Sort order + example: asc in: query - name: cursor - required: false + name: sortDirection schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_FindListsCursor' - - description: > - Filters the returned results according to the value of the specified - field, - - using the : syntax. + default: asc + enum: + - asc + - desc + type: string + - description: >- + Hide stale SLOs from the list as defined by stale SLO threshold in + SLO settings in: query - name: filter - required: false + name: hideStale schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_FindListsFilter' + type: boolean responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - type: object - properties: - cursor: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_FindListsCursor - data: - items: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' - type: array - page: - minimum: 0 - type: integer - per_page: - minimum: 0 - type: integer - total: - minimum: 0 - type: integer - required: - - data - - page - - per_page - - total - - cursor - description: Successful response + $ref: '#/components/schemas/SLOs_find_slo_response' + description: Successful request '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '500': + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response + '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Finds lists + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Get a paginated list of SLOs tags: - - Security Solution Lists API - /api/lists/index: - delete: - operationId: DeleteListIndex + - slo + post: + description: > + You must have `all` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: createSloOp + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_create_slo_request' + required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - type: object - properties: - acknowledged: - type: boolean - required: - - acknowledged - description: Successful response + $ref: '#/components/schemas/SLOs_create_slo_response' + description: Successful request '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List data stream not found response - '500': + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response + '409': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Deletes list data streams + $ref: '#/components/schemas/SLOs_409_response' + description: Conflict - The SLO id already exists + servers: + - url: 'https://localhost:5601' + summary: Create an SLO tags: - - Security Solution Lists API - get: - operationId: ReadListIndex + - slo + '/s/{spaceId}/api/observability/slos/_delete_instances': + post: + 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. + operationId: deleteSloInstancesOp + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_delete_slo_instances_request' + required: true responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - list_index: - type: boolean - list_item_index: - type: boolean - required: - - list_index - - list_item_index - description: Successful response + '204': + description: Successful request '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List data stream(s) not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Get list data stream existence status + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response + servers: + - url: 'https://localhost:5601' + summary: Batch delete rollup and summary data tags: - - Security Solution Lists API - post: - operationId: CreateListIndex + - slo + '/s/{spaceId}/api/observability/slos/{sloId}': + delete: + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: deleteSloOp + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - acknowledged: - type: boolean - required: - - acknowledged - description: Successful response + '204': + description: Successful request '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List data stream exists response - '500': + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response + '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Creates necessary list data streams + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Delete an SLO tags: - - Security Solution Lists API - /api/lists/items: - delete: - operationId: DeleteListItem + - slo + get: + description: > + You must have the `read` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: getSloOp parameters: - - description: Required if `list_id` and `value` are not specified - in: query - name: id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - description: Required if `id` is not specified - in: query - name: list_id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - description: Required if `id` is not specified - in: query - name: value - required: false - schema: - type: string - - description: >- - Determines when changes made by the request are made visible to - search + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' + - description: the specific instanceId used by the summary calculation + example: host-abcde in: query - name: refresh - required: false + name: instanceId schema: - default: 'false' - enum: - - 'true' - - 'false' - - wait_for type: string responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItem' - - items: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItem - type: array - description: Successful response + $ref: '#/components/schemas/SLOs_slo_with_summary_response' + description: Successful request '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List item not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Deletes a list item - tags: - - Security Solution Lists API - get: - operationId: ReadListItem + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Get an SLO + tags: + - slo + put: + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: updateSloOp parameters: - - description: Required if `list_id` and `value` are not specified - in: query - name: id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - description: Required if `id` is not specified - in: query - name: list_id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - description: Required if `id` is not specified - in: query - name: value - required: false - schema: - type: string + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_update_slo_request' + required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItem' - - items: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItem - type: array - description: Successful response + $ref: '#/components/schemas/SLOs_slo_definition_response' + description: Successful request '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List item not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Gets a list item + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Update an SLO tags: - - Security Solution Lists API - patch: - operationId: PatchListItem - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - _version: - type: string - id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItemId' - meta: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemMetadata - refresh: - description: >- - Determines when changes made by the request are made visible - to search - enum: - - 'true' - - 'false' - - wait_for - type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemValue - required: - - id - description: List item's properties - required: true + - slo + '/s/{spaceId}/api/observability/slos/{sloId}/_reset': + post: + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: resetSloOp + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' responses: - '200': + '204': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItem' - description: Successful response + $ref: '#/components/schemas/SLOs_slo_definition_response' + description: Successful request '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List item not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Patches a list item + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Reset an SLO tags: - - Security Solution Lists API + - slo + '/s/{spaceId}/api/observability/slos/{sloId}/disable': post: - operationId: CreateListItem - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItemId' - list_id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - meta: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemMetadata - refresh: - description: >- - Determines when changes made by the request are made visible - to search - enum: - - 'true' - - 'false' - - wait_for - type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemValue - required: - - list_id - - value - description: List item's properties - required: true + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: disableSloOp + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' responses: '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItem' - description: Successful response + description: Successful request '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List item already exists response - '500': + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response + '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Creates a list item + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Disable an SLO tags: - - Security Solution Lists API - put: - operationId: UpdateListItem - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - _version: - type: string - id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItemId' - meta: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemMetadata - value: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemValue - required: - - id - - value - description: List item's properties - required: true + - slo + '/s/{spaceId}/api/observability/slos/{sloId}/enable': + post: + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: enableSloOp + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItem' - description: Successful response + '204': + description: Successful request '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List item not found response - '500': + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Enable an SLO + tags: + - slo + /service_tokens: + post: + operationId: generate-service-token + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Updates a list item + type: object + properties: + name: + type: string + value: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Create service token tags: - - Security Solution Lists API - /api/lists/items/_export: + - Fleet service tokens + /service-tokens: post: - description: Exports list item values from the specified list - operationId: ExportListItems + deprecated: true + operationId: generate-service-token-deprecated parameters: - - description: List's id to export - in: query - name: list_id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: - application/ndjson; Elastic-Api-Version=2023-10-31: + application/json; Elastic-Api-Version=2023-10-31: schema: - description: A `.txt` file containing list items from the specified list - format: binary - type: string - description: Successful response + type: object + properties: + name: + type: string + value: + type: string + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Create service token + tags: + - Fleet service tokens + /settings: + get: + operationId: get-settings + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': + $ref: '#/components/schemas/Fleet_fleet_settings_response' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get settings + tags: + - Fleet internals + put: + operationId: update-settings + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + additional_yaml_config: + type: string + fleet_server_hosts: + description: Protocol and path must be the same for each URL + items: + type: string + type: array + has_seen_add_data_notice: + type: boolean + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Exports list items + $ref: '#/components/schemas/Fleet_fleet_settings_response' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Update settings tags: - - Security Solution Lists API - /api/lists/items/_find: + - Fleet internals + /settings/enrollment: get: - operationId: FindListItems + operationId: get-enrollment-settings parameters: - - description: List's id - in: query - name: list_id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - description: The page number to return - in: query - name: page - required: false - schema: - type: integer - - description: The number of list items to return per page - in: query - name: per_page - required: false - schema: - type: integer - - description: Determines which field is used to sort the results - in: query - name: sort_field - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - - description: 'Determines the sort order, which can be `desc` or `asc`' + - description: >- + An agent policy ID to scope the enrollment settings to. For example, + that policy's Fleet Server host, its proxy, download location, etc. + If not provided, the default Fleet Server policy is used (if any). in: query - name: sort_order + name: agentPolicyId required: false schema: - enum: - - desc - - asc type: string - - description: > - Returns the list that come after the last list returned in the - previous call - - (use the cursor value returned in the previous call). This parameter - uses - - the `tie_breaker_id` field to ensure all lists are sorted and - returned correctly. - in: query - name: cursor - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_FindListItemsCursor - - description: > - Filters the returned results according to the value of the specified - field, - - using the : syntax. - in: query - name: filter - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_FindListItemsFilter responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - type: object - properties: - cursor: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_FindListItemsCursor - data: - items: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItem - type: array - page: - minimum: 0 - type: integer - per_page: - minimum: 0 - type: integer - total: - minimum: 0 - type: integer - required: - - data - - page - - per_page - - total - - cursor - description: Successful response + $ref: '#/components/schemas/Fleet_fleet_settings_enrollment_response' + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Get enrollment settings + tags: + - Fleet internals + servers: + - description: Used for Fleet internals and not supported + url: 'http://KIBANA_HOST:5601/internal/fleet' + /setup: + post: + operationId: setup + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response + $ref: '#/components/schemas/Fleet_fleet_setup_response' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' '500': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Finds list items + type: object + properties: + message: + type: string + description: Internal Server Error + summary: Initiate Fleet setup tags: - - Security Solution Lists API - /api/lists/items/_import: - post: - description: > - Imports a list of items from a `.txt` or `.csv` file. The maximum file - size is 9 million bytes. - - - You can import items to a new or existing list. - operationId: ImportListItems + - Fleet internals + /uninstall_tokens: + get: + operationId: get-uninstall-tokens parameters: - - description: | - List's id. - - Required when importing to an existing list. - in: query - name: list_id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - description: > - Type of the importing list. - - - Required when importing a new list that is `list_id` is not - specified. + - description: The number of items to return in: query - name: type - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListType' - - in: query - name: serializer - required: false - schema: - type: string - - in: query - name: deserializer + name: perPage required: false schema: - type: string - - description: >- - Determines when changes made by the request are made visible to - search + default: 20 + minimum: 5 + type: integer + - $ref: '#/components/parameters/Fleet_page_index' + - description: Partial match filtering for policy IDs in: query - name: refresh + name: policyId required: false schema: - enum: - - 'true' - - 'false' - - wait_for type: string - requestBody: - content: - multipart/form-data; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - file: - description: >- - A `.txt` or `.csv` file containing newline separated list - items - format: binary - type: string - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List with specified list_id does not exist response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Imports list items - tags: - - Security Solution Lists API - /api/lists/privileges: - get: - operationId: ReadListPrivileges responses: '200': content: @@ -5960,107 +5404,47 @@ paths: schema: type: object properties: - is_authenticated: - type: boolean - listItems: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemPrivileges - lists: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListPrivileges + items: + items: + type: object + properties: + created_at: + type: string + id: + type: string + policy_id: + type: string + required: + - id + - policy_id + - created_at + type: array + page: + type: number + perPage: + type: number + total: + type: number required: - - lists - - listItems - - is_authenticated - description: Successful response + - items + - total + - page + - perPage + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Gets list privileges + $ref: '#/components/responses/Fleet_error' + summary: List metadata for latest uninstall tokens per agent policy tags: - - Security Solution Lists API - /api/ml/saved_objects/sync: + - Fleet uninstall tokens + '/uninstall_tokens/{uninstallTokenId}': get: - description: > - Synchronizes Kibana saved objects for machine learning jobs and trained - models. This API runs automatically when you start Kibana and - periodically thereafter. - operationId: mlSync + operationId: get-uninstall-token parameters: - - $ref: '#/components/parameters/Machine_learning_APIs_simulateParam' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - examples: - syncExample: - $ref: '#/components/examples/Machine_learning_APIs_mlSyncExample' - schema: - $ref: '#/components/schemas/Machine_learning_APIs_mlSync200Response' - description: Indicates a successful call - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Machine_learning_APIs_mlSync4xxResponse' - description: Authorization information is missing or invalid. - summary: Sync machine learning saved objects - tags: - - ml - /api/note: - delete: - operationId: DeleteNote - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - nullable: true - type: object - properties: - noteId: - type: string - required: - - noteId - - type: object - properties: - noteIds: - items: - type: string - nullable: true - type: array - required: - - noteIds - description: The id of the note to delete. - required: true + - in: path + name: uninstallTokenId + required: true + schema: + type: string responses: '200': content: @@ -6068,18318 +5452,8082 @@ paths: schema: type: object properties: - data: + item: type: object - description: Indicates the note was successfully deleted. - summary: Deletes a note from a timeline. + properties: + created_at: + type: string + id: + type: string + policy_id: + type: string + token: + type: string + required: + - id + - token + - policy_id + - created_at + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get one decrypted uninstall token by its ID tags: - - Security Solution Timeline API - - 'access:securitySolution' - get: - description: Gets notes - operationId: GetNotes - parameters: - - in: query - name: documentIds - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Timeline_API_DocumentIds' - - in: query - name: page - schema: - nullable: true - type: number - - in: query - name: perPage - schema: - nullable: true - type: number - - in: query - name: search - schema: - nullable: true - type: string - - in: query - name: sortField - schema: - nullable: true - type: string - - in: query - name: sortOrder - schema: - nullable: true - type: string - - in: query - name: filter - schema: - nullable: true - type: string - responses: - '200': - description: Indicates the requested notes were returned. - summary: Get all notes for a given document. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - patch: - operationId: PersistNoteRoute - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - eventDataView: - nullable: true - type: string - eventIngested: - nullable: true - type: string - eventTimestamp: - nullable: true - type: string - note: - $ref: '#/components/schemas/Security_Solution_Timeline_API_BareNote' - noteId: - nullable: true - type: string - overrideOwner: - nullable: true - type: boolean - version: - nullable: true - type: string - required: - - note - description: The note to persist or update along with additional metadata. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - persistNote: - type: object - properties: - code: - type: number - message: - type: string - note: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_Note - required: - - code - - message - - note - required: - - persistNote - required: - - data - description: Indicates the note was successfully created. - summary: Persists a note to a timeline. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/osquery/live_queries: - get: - operationId: OsqueryFindLiveQueries - parameters: - - in: query - name: query - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_FindLiveQueryRequestQuery - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Find live queries - tags: - - Security Solution Osquery API - post: - operationId: OsqueryCreateLiveQuery - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_CreateLiveQueryRequestBody - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Create a live query - tags: - - Security Solution Osquery API - '/api/osquery/live_queries/{id}': - get: - operationId: OsqueryGetLiveQueryDetails - parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Id' - - in: query - name: query - schema: - additionalProperties: true - type: object - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Get live query details - tags: - - Security Solution Osquery API - '/api/osquery/live_queries/{id}/results/{actionId}': - get: - operationId: OsqueryGetLiveQueryResults - parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Id' - - in: path - name: actionId - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Id' - - in: query - name: query - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_GetLiveQueryResultsRequestQuery - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Get live query results - tags: - - Security Solution Osquery API - /api/osquery/packs: - get: - operationId: OsqueryFindPacks - parameters: - - in: query - name: query - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_FindPacksRequestQuery - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Find packs - tags: - - Security Solution Osquery API - post: - operationId: OsqueryCreatePacks - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_CreatePacksRequestBody - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Create a packs - tags: - - Security Solution Osquery API - '/api/osquery/packs/{id}': - delete: - operationId: OsqueryDeletePacks - parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackId' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Delete packs - tags: - - Security Solution Osquery API - get: - operationId: OsqueryGetPacksDetails - parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackId' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Get packs details - tags: - - Security Solution Osquery API - put: - operationId: OsqueryUpdatePacks - parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackId' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_UpdatePacksRequestBody - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Update packs - tags: - - Security Solution Osquery API - /api/osquery/saved_queries: - get: - operationId: OsqueryFindSavedQueries - parameters: - - in: query - name: query - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_FindSavedQueryRequestQuery - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Find saved queries - tags: - - Security Solution Osquery API - post: - operationId: OsqueryCreateSavedQuery - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_CreateSavedQueryRequestBody - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Create a saved query - tags: - - Security Solution Osquery API - '/api/osquery/saved_queries/{id}': - delete: - operationId: OsqueryDeleteSavedQuery - parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SavedQueryId' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Delete saved query - tags: - - Security Solution Osquery API - get: - operationId: OsqueryGetSavedQueryDetails - parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SavedQueryId' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Get saved query details - tags: - - Security Solution Osquery API - put: - operationId: OsqueryUpdateSavedQuery - parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SavedQueryId' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_UpdateSavedQueryRequestBody - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Update saved query - tags: - - Security Solution Osquery API - /api/pinned_event: - patch: - operationId: PersistPinnedEventRoute - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - eventId: - type: string - pinnedEventId: - nullable: true - type: string - timelineId: - type: string - required: - - eventId - - timelineId - description: The pinned event to persist or update along with additional metadata. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - persistPinnedEventOnTimeline: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_PinnedEvent - - type: object - properties: - code: - type: number - message: - type: string - required: - - persistPinnedEventOnTimeline - required: - - data - description: Indicate the event was successfully pinned in the timeline. - summary: Persists a pinned event to a timeline. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/saved_objects/_export: - post: - 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. - operationId: exportSavedObjectsDefault - parameters: - - $ref: '#/components/parameters/Serverless_saved_objects_kbn_xsrf' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - examples: - exportSavedObjectsRequest: - $ref: >- - #/components/examples/Serverless_saved_objects_export_objects_request - schema: - type: object - properties: - excludeExportDetails: - default: false - description: Do not add export details entry at the end of the stream. - type: boolean - includeReferencesDeep: - description: >- - Includes all of the referenced objects in the exported - objects. - type: boolean - objects: - description: A list of objects to export. - items: - type: object - type: array - type: - description: >- - The saved object types to include in the export. Use `*` to - export all the types. - oneOf: - - type: string - - items: - type: string - type: array - required: true - responses: - '200': - content: - application/x-ndjson; Elastic-Api-Version=2023-10-31: - examples: - exportSavedObjectsResponse: - $ref: >- - #/components/examples/Serverless_saved_objects_export_objects_response - schema: - additionalProperties: true - type: object - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Serverless_saved_objects_400_response' - description: Bad request. - summary: Export saved objects - tags: - - saved objects - /api/saved_objects/_import: - post: - 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. - operationId: importSavedObjectsDefault - parameters: - - $ref: '#/components/parameters/Serverless_saved_objects_kbn_xsrf' - - 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: createNewCopies - required: false - schema: - type: boolean - - 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: overwrite - required: false - schema: - type: boolean - - 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. - in: query - name: compatibilityMode - required: false - schema: - type: boolean - requestBody: - content: - multipart/form-data; Elastic-Api-Version=2023-10-31: - examples: - importObjectsRequest: - $ref: >- - #/components/examples/Serverless_saved_objects_import_objects_request - 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. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - examples: - importObjectsResponse: - $ref: >- - #/components/examples/Serverless_saved_objects_import_objects_response - schema: - type: object - properties: - errors: - 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. - items: - type: object - type: array - success: - 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. - type: boolean - successCount: - description: Indicates the number of successfully imported records. - type: integer - successResults: - 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. - items: - type: object - type: array - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Serverless_saved_objects_400_response' - description: Bad request. - summary: Import saved objects - tags: - - saved objects - /api/security_ai_assistant/anonymization_fields/_bulk_action: - post: - description: >- - The bulk action is applied to all anonymization fields that match the - filter or to the list of anonymization fields by their IDs. - operationId: PerformAnonymizationFieldsBulkAction - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - create: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldCreateProps - type: array - delete: - type: object - properties: - ids: - description: Array of anonymization fields IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter anonymization fields - type: string - update: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldUpdateProps - type: array - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResponse - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Applies a bulk action to multiple anonymization fields - tags: - - Security AI Assistant API - - Bulk API - /api/security_ai_assistant/anonymization_fields/_find: - get: - description: Finds anonymization fields that match the given query. - operationId: FindAnonymizationFields - parameters: - - in: query - name: fields - required: false - schema: - items: - type: string - type: array - - description: Search query - in: query - name: filter - required: false - schema: - type: string - - description: Field to sort by - in: query - name: sort_field - required: false - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_FindAnonymizationFieldsSortField - - description: Sort order - in: query - name: sort_order - required: false - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_SortOrder' - - description: Page number - in: query - name: page - required: false - schema: - default: 1 - minimum: 1 - type: integer - - description: AnonymizationFields per page - in: query - name: per_page - required: false - schema: - default: 20 - minimum: 0 - type: integer - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldResponse - type: array - page: - type: integer - perPage: - type: integer - total: - type: integer - required: - - page - - perPage - - total - - data - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Finds anonymization fields that match the given query. - tags: - - Security AI Assistant API - - AnonymizationFields API - /api/security_ai_assistant/chat/complete: - post: - description: Creates a model response for the given chat conversation. - operationId: ChatComplete - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_ChatCompleteProps' - required: true - responses: - '200': - content: - application/octet-stream; Elastic-Api-Version=2023-10-31: - schema: - format: binary - type: string - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Creates a model response for the given chat conversation. - tags: - - Security AI Assistant API - - Chat Complete API - /api/security_ai_assistant/current_user/conversations: - post: - description: Create a conversation - operationId: CreateConversation - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationCreateProps - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationResponse - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Create a conversation - tags: - - Security AI Assistant API - - Conversation API - /api/security_ai_assistant/current_user/conversations/_find: - get: - description: Finds conversations that match the given query. - operationId: FindConversations - parameters: - - in: query - name: fields - required: false - schema: - items: - type: string - type: array - - description: Search query - in: query - name: filter - required: false - schema: - type: string - - description: Field to sort by - in: query - name: sort_field - required: false - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_FindConversationsSortField - - description: Sort order - in: query - name: sort_order - required: false - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_SortOrder' - - description: Page number - in: query - name: page - required: false - schema: - default: 1 - minimum: 1 - type: integer - - description: Conversations per page - in: query - name: per_page - required: false - schema: - default: 20 - minimum: 0 - type: integer - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationResponse - type: array - page: - type: integer - perPage: - type: integer - total: - type: integer - required: - - page - - perPage - - total - - data - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Finds conversations that match the given query. - tags: - - Security AI Assistant API - - Conversations API - '/api/security_ai_assistant/current_user/conversations/{id}': - delete: - description: Deletes a single conversation using the `id` field. - operationId: DeleteConversation - parameters: - - description: The conversation's `id` value. - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationResponse - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Deletes a single conversation using the `id` field. - tags: - - Security AI Assistant API - - Conversation API - get: - description: Read a single conversation - operationId: ReadConversation - parameters: - - description: The conversation's `id` value. - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationResponse - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Read a single conversation - tags: - - Security AI Assistant API - - Conversations API - put: - description: Update a single conversation - operationId: UpdateConversation - parameters: - - description: The conversation's `id` value. - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationUpdateProps - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationResponse - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Update a conversation - tags: - - Security AI Assistant API - - Conversation API - /api/security_ai_assistant/prompts/_bulk_action: - post: - description: >- - The bulk action is applied to all prompts that match the filter or to - the list of prompts by their IDs. - operationId: PerformPromptsBulkAction - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - create: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptCreateProps - type: array - delete: - type: object - properties: - ids: - description: Array of prompts IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter promps - type: string - update: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptUpdateProps - type: array - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptsBulkCrudActionResponse - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Applies a bulk action to multiple prompts - tags: - - Security AI Assistant API - - Bulk API - /api/security_ai_assistant/prompts/_find: - get: - description: Finds prompts that match the given query. - operationId: FindPrompts - parameters: - - in: query - name: fields - required: false - schema: - items: - type: string - type: array - - description: Search query - in: query - name: filter - required: false - schema: - type: string - - description: Field to sort by - in: query - name: sort_field - required: false - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_FindPromptsSortField - - description: Sort order - in: query - name: sort_order - required: false - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_SortOrder' - - description: Page number - in: query - name: page - required: false - schema: - default: 1 - minimum: 1 - type: integer - - description: Prompts per page - in: query - name: per_page - required: false - schema: - default: 20 - minimum: 0 - type: integer - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptResponse - type: array - page: - type: integer - perPage: - type: integer - total: - type: integer - required: - - page - - perPage - - total - - data - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Finds prompts that match the given query. - tags: - - Security AI Assistant API - - Prompts API - /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 - /api/timeline: - delete: - operationId: DeleteTimelines - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - savedObjectIds: - items: - type: string - type: array - searchIds: - description: >- - Saved search ids that should be deleted alongside the - timelines - items: - type: string - type: array - required: - - savedObjectIds - description: The ids of the timelines or timeline templates to delete. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - deleteTimeline: - type: boolean - required: - - deleteTimeline - required: - - data - description: Indicates the timeline was successfully deleted. - summary: Deletes one or more timelines or timeline templates. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - get: - operationId: GetTimeline - parameters: - - description: The ID of the template timeline to retrieve - in: query - name: template_timeline_id - schema: - type: string - - description: The ID of the timeline to retrieve - in: query - name: id - schema: - type: string - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - getOneTimeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - nullable: true - required: - - getOneTimeline - required: - - data - description: Indicates that the (template) timeline was found and returned. - summary: >- - Get an existing saved timeline or timeline template. This API is used to - retrieve an existing saved timeline or timeline template. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - patch: - description: >- - Updates an existing timeline. This API is used to update the title, - description, date range, pinned events, pinned queries, and/or pinned - saved queries of an existing timeline. - operationId: PatchTimeline - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - timeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_SavedTimeline - timelineId: - nullable: true - type: string - version: - nullable: true - type: string - required: - - timelineId - - version - - timeline - description: The timeline updates along with the timeline ID and version. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - persistTimeline: - type: object - properties: - timeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - required: - - timeline - required: - - persistTimeline - required: - - data - description: >- - Indicates that the draft timeline was successfully created. In the - event the user already has a draft timeline, the existing draft - timeline is cleared and returned. - '405': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - body: - type: string - statusCode: - type: number - description: >- - Indicates that the user does not have the required access to create - a draft timeline. - summary: Updates an existing timeline. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - post: - operationId: CreateTimelines - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - status: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineStatus - nullable: true - templateTimelineId: - nullable: true - type: string - templateTimelineVersion: - nullable: true - type: number - timeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_SavedTimeline - timelineId: - nullable: true - type: string - timelineType: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineType - nullable: true - version: - nullable: true - type: string - required: - - timeline - description: >- - The required timeline fields used to create a new timeline along with - optional fields that will be created if not provided. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - persistTimeline: - type: object - properties: - timeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - required: - - persistTimeline - required: - - data - description: Indicates the timeline was successfully created. - '405': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - body: - type: string - statusCode: - type: number - description: Indicates that there was an error in the timeline creation. - summary: Creates a new timeline. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timeline/_draft: - get: - operationId: GetDraftTimelines - parameters: - - in: query - name: timelineType - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Timeline_API_TimelineType' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - persistTimeline: - type: object - properties: - timeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - required: - - timeline - required: - - persistTimeline - required: - - data - description: Indicates that the draft timeline was successfully retrieved. - '403': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - message: - type: string - status_code: - type: number - description: >- - If a draft timeline was not found and we attempted to create one, it - indicates that the user does not have the required permissions to - create a draft timeline. - '409': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - message: - type: string - status_code: - type: number - description: >- - This should never happen, but if a draft timeline was not found and - we attempted to create one, it indicates that there is already a - draft timeline with the given timelineId. - summary: >- - Retrieves the draft timeline for the current user. If the user does not - have a draft timeline, an empty timeline is returned. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - post: - description: > - Retrieves a clean draft timeline. If a draft timeline does not exist, it - is created and returned. - operationId: CleanDraftTimelines - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - timelineType: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineType - required: - - timelineType - description: >- - The type of timeline to create. Valid values are `default` and - `template`. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - persistTimeline: - type: object - properties: - timeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - required: - - timeline - required: - - persistTimeline - required: - - data - description: >- - Indicates that the draft timeline was successfully created. In the - event the user already has a draft timeline, the existing draft - timeline is cleared and returned. - '403': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - message: - type: string - status_code: - type: number - description: >- - Indicates that the user does not have the required permissions to - create a draft timeline. - '409': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - message: - type: string - status_code: - type: number - description: >- - Indicates that there is already a draft timeline with the given - timelineId. - summary: Retrieves a draft timeline or timeline template. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timeline/_export: - post: - operationId: ExportTimelines - parameters: - - description: The name of the file to export - in: query - name: file_name - required: true - schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - ids: - items: - type: string - nullable: true - type: array - description: The ids of the timelines to export - required: true - responses: - '200': - content: - application/ndjson; Elastic-Api-Version=2023-10-31: - schema: - description: NDJSON of the exported timelines - type: string - description: Indicates the timelines were successfully exported - '400': - content: - application/ndjson; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - body: - type: string - statusCode: - type: number - description: Indicates that the export size limit was exceeded - summary: Exports timelines as an NDJSON file - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timeline/_favorite: - patch: - operationId: PersistFavoriteRoute - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - templateTimelineId: - nullable: true - type: string - templateTimelineVersion: - nullable: true - type: number - timelineId: - nullable: true - type: string - timelineType: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineType - nullable: true - required: - - timelineId - - templateTimelineId - - templateTimelineVersion - - timelineType - description: The required fields used to favorite a (template) timeline. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - persistFavorite: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_FavoriteTimelineResponse - required: - - persistFavorite - required: - - data - description: Indicates the favorite status was successfully updated. - '403': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - body: - type: string - statusCode: - type: number - description: >- - Indicates the user does not have the required permissions to persist - the favorite status. - summary: Persists a given users favorite status of a timeline. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timeline/_import: - post: - operationId: ImportTimelines - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - file: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_Readable - - type: object - properties: - hapi: - type: object - properties: - filename: - type: string - headers: - type: object - isImmutable: - enum: - - 'true' - - 'false' - type: string - required: - - filename - - headers - required: - - hapi - description: The timelines to import as a readable stream. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_ImportTimelineResult - required: - - data - description: Indicates the import of timelines was successful. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - body: - type: string - id: - type: string - statusCode: - type: number - description: >- - Indicates the import of timelines was unsuccessful because of an - invalid file extension. - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - id: - type: string - statusCode: - type: number - description: >- - Indicates that we were unable to locate the saved object client - necessary to handle the import. - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - body: - type: string - id: - type: string - statusCode: - type: number - description: Indicates the import of timelines was unsuccessful. - summary: Imports timelines. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timeline/_prepackaged: - post: - operationId: InstallPrepackedTimelines - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - prepackagedTimelines: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_SavedTimeline - type: array - timelinesToInstall: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_ImportTimelines - nullable: true - type: array - timelinesToUpdate: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_ImportTimelines - nullable: true - type: array - required: - - timelinesToInstall - - timelinesToUpdate - - prepackagedTimelines - description: The timelines to install or update. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_ImportTimelineResult - required: - - data - description: Indicates the installation of prepackaged timelines was successful. - '500': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - body: - type: string - statusCode: - type: number - description: >- - Indicates the installation of prepackaged timelines was - unsuccessful. - summary: Installs prepackaged timelines. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timeline/resolve: - get: - operationId: ResolveTimeline - parameters: - - description: The ID of the template timeline to resolve - in: query - name: template_timeline_id - schema: - type: string - - description: The ID of the timeline to resolve - in: query - name: id - schema: - type: string - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - getOneTimeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - nullable: true - required: - - getOneTimeline - required: - - data - description: The (template) timeline has been found - '400': - description: The request is missing parameters - '404': - description: The (template) timeline was not found - summary: Get an existing saved timeline or timeline template. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timelines: - get: - operationId: GetTimelines - parameters: - - description: >- - If true, only timelines that are marked as favorites by the user are - returned. - in: query - name: only_user_favorite - schema: - enum: - - 'true' - - 'false' - nullable: true - type: string - - in: query - name: timeline_type - schema: - $ref: '#/components/schemas/Security_Solution_Timeline_API_TimelineType' - nullable: true - - in: query - name: sort_field - schema: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_SortFieldTimeline - - in: query - name: sort_order - schema: - enum: - - asc - - desc - type: string - - in: query - name: page_size - schema: - nullable: true - type: string - - in: query - name: page_index - schema: - nullable: true - type: string - - in: query - name: search - schema: - nullable: true - type: string - - in: query - name: status - schema: - $ref: '#/components/schemas/Security_Solution_Timeline_API_TimelineStatus' - nullable: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - customTemplateTimelineCount: - type: number - defaultTimelineCount: - type: number - elasticTemplateTimelineCount: - type: number - favoriteCount: - type: number - templateTimelineCount: - type: number - timelines: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - type: array - totalCount: - type: number - required: - - timelines - - totalCount - - defaultTimelineCount - - templateTimelineCount - - favoriteCount - - elasticTemplateTimelineCount - - customTemplateTimelineCount - required: - - data - description: Indicates that the (template) timelines were found and returned. - '400': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - body: - type: string - statusCode: - type: number - description: Bad request. The user supplied invalid data. - summary: >- - This API is used to retrieve a list of existing saved timelines or - timeline templates. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - '/s/{spaceId}/api/observability/slos': - get: - description: > - You must have the `read` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: findSlosOp - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - description: A valid kql query to filter the SLO with - example: 'slo.name:latency* and slo.tags : "prod"' - in: query - name: kqlQuery - schema: - type: string - - description: 'The page to use for pagination, must be greater or equal than 1' - example: 1 - in: query - name: page - schema: - default: 1 - type: integer - - description: Number of SLOs returned by page - example: 25 - in: query - name: perPage - schema: - default: 25 - maximum: 5000 - type: integer - - description: Sort by field - example: status - in: query - name: sortBy - schema: - default: status - enum: - - sli_value - - status - - error_budget_consumed - - error_budget_remaining - type: string - - description: Sort order - example: asc - in: query - name: sortDirection - schema: - default: asc - enum: - - asc - - desc - type: string - - description: >- - Hide stale SLOs from the list as defined by stale SLO threshold in - SLO settings - in: query - name: hideStale - schema: - type: boolean - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_find_slo_response' - description: Successful request - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Get a paginated list of SLOs - tags: - - slo - post: - description: > - You must have `all` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: createSloOp - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_create_slo_request' - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_create_slo_response' - description: Successful request - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_409_response' - description: Conflict - The SLO id already exists - summary: Create an SLO - tags: - - slo - '/s/{spaceId}/api/observability/slos/_delete_instances': - post: - 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. - operationId: deleteSloInstancesOp - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_delete_slo_instances_request' - required: true - responses: - '204': - description: Successful request - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - summary: Batch delete rollup and summary data - tags: - - slo - '/s/{spaceId}/api/observability/slos/{sloId}': - delete: - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: deleteSloOp - 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': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Delete an SLO - tags: - - slo - get: - description: > - You must have the `read` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: getSloOp - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - $ref: '#/components/parameters/SLOs_slo_id' - - description: the specific instanceId used by the summary calculation - example: host-abcde - in: query - name: instanceId - schema: - type: string - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_slo_with_summary_response' - description: Successful request - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Get an SLO - tags: - - slo - put: - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: updateSloOp - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - $ref: '#/components/parameters/SLOs_slo_id' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_update_slo_request' - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_slo_definition_response' - description: Successful request - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Update an SLO - tags: - - slo - '/s/{spaceId}/api/observability/slos/{sloId}/_reset': - post: - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: resetSloOp - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - $ref: '#/components/parameters/SLOs_slo_id' - responses: - '204': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_slo_definition_response' - description: Successful request - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Reset an SLO - tags: - - slo - '/s/{spaceId}/api/observability/slos/{sloId}/disable': - post: - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: disableSloOp - 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': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Disable an SLO - tags: - - slo - '/s/{spaceId}/api/observability/slos/{sloId}/enable': - post: - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: enableSloOp - 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': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Enable an SLO - tags: - - slo -components: - examples: - Connectors_create_email_connector_request: - summary: Create an email connector. - value: - config: - from: tester@example.com - hasAuth: true - host: 'https://example.com' - port: 1025 - secure: false - service: other - connector_type_id: .email - name: email-connector-1 - secrets: - password: password - user: username - Connectors_create_email_connector_response: - summary: A new email connector. - value: - config: - clientId: null - from: tester@example.com - hasAuth: true - host: 'https://example.com' - oauthTokenUrl: null - port: 1025 - secure: false - service: other - tenantId: null - connector_type_id: .email - id: 90a82c60-478f-11ee-a343-f98a117c727f - is_deprecated: false - is_missing_secrets: false - is_preconfigured: false - is_system_action: false - name: email-connector-1 - Connectors_create_index_connector_request: - summary: Create an index connector. - value: - config: - index: test-index - connector_type_id: .index - name: my-connector - Connectors_create_index_connector_response: - summary: A new index connector. - value: - config: - executionTimeField: null - index: test-index - refresh: false - connector_type_id: .index - id: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad - is_deprecated: false - is_missing_secrets: false - is_preconfigured: false - is_system_action: false - name: my-connector - Connectors_create_webhook_connector_request: - summary: Create a webhook connector with SSL authentication. - value: - config: - authType: webhook-authentication-ssl - certType: ssl-crt-key - method: post - url: 'https://example.com' - connector_type_id: .webhook - name: my-webhook-connector - secrets: - crt: QmFnIEF0dH... - key: LS0tLS1CRUdJ... - password: my-passphrase - Connectors_create_webhook_connector_response: - summary: A new webhook connector. - value: - config: - authType: webhook-authentication-ssl - certType: ssl-crt-key - hasAuth: true - headers: null - method: post - url: 'https://example.com' - verificationMode: full - connector_type_id: .webhook - id: 900eb010-3b9d-11ee-a642-8ffbb94e38bd - is_deprecated: false - is_missing_secrets: false - is_preconfigured: false - is_system_action: false - name: my-webhook-connector - Connectors_create_xmatters_connector_request: - summary: Create an xMatters connector with URL authentication. - value: - config: - usesBasic: false - connector_type_id: .xmatters - name: my-xmatters-connector - secrets: - secretsUrl: 'https://example.com?apiKey=xxxxx' - Connectors_create_xmatters_connector_response: - summary: A new xMatters connector. - value: - config: - configUrl: null - usesBasic: false - connector_type_id: .xmatters - id: 4d2d8da0-4d1f-11ee-9367-577408be4681 - is_deprecated: false - is_missing_secrets: false - is_preconfigured: false - is_system_action: false - name: my-xmatters-connector - Connectors_get_connector_response: - summary: Get connector details. - value: - config: {} - connector_type_id: .server-log - id: df770e30-8b8b-11ed-a780-3b746c987a81 - is_deprecated: false - is_missing_secrets: false - is_preconfigured: false - is_system_action: false - name: my_server_log_connector - Connectors_get_connector_types_generativeai_response: - summary: A list of connector types for the `generativeAI` feature. - value: - - enabled: true - enabled_in_config: true - enabled_in_license: true - id: .gen-ai - is_system_action_type: false - minimum_license_required: enterprise - name: OpenAI - supported_feature_ids: - - generativeAIForSecurity - - generativeAIForObservability - - generativeAIForSearchPlayground - - enabled: true - enabled_in_config: true - enabled_in_license: true - id: .bedrock - is_system_action_type: false - minimum_license_required: enterprise - name: AWS Bedrock - supported_feature_ids: - - generativeAIForSecurity - - generativeAIForObservability - - generativeAIForSearchPlayground - - enabled: true - enabled_in_config: true - enabled_in_license: true - id: .gemini - is_system_action_type: false - minimum_license_required: enterprise - name: Google Gemini - supported_feature_ids: - - generativeAIForSecurity - Connectors_get_connectors_response: - summary: A list of connectors - value: - - connector_type_id: .email - id: preconfigured-email-connector - is_deprecated: false - is_preconfigured: true - is_system_action: false - name: my-preconfigured-email-notification - referenced_by_count: 0 - - config: - executionTimeField: null - index: test-index - refresh: false - connector_type_id: .index - id: e07d0c80-8b8b-11ed-a780-3b746c987a81 - is_deprecated: false - is_missing_secrets: false - is_preconfigured: false - is_system_action: false - name: my-index-connector - referenced_by_count: 2 - Connectors_update_index_connector_request: - summary: Update an index connector. - value: - config: - index: updated-index - name: updated-connector - Data_views_create_data_view_request: - summary: Create a data view with runtime fields. - value: - data_view: - name: My Logstash data view - runtimeFieldMap: - runtime_shape_name: - script: - source: 'emit(doc[''shape_name''].value)' - type: keyword - title: logstash-* - Data_views_create_runtime_field_request: - summary: Create a runtime field. - value: - name: runtimeFoo - runtimeField: - script: - source: 'emit(doc["foo"].value)' - type: long - Data_views_get_data_view_response: - summary: >- - The get data view API returns a JSON object that contains information - about the data view. - value: - data_view: - allowNoIndex: false - fieldAttrs: - products.manufacturer: - count: 1 - products.price: - count: 1 - products.product_name: - count: 1 - total_quantity: - count: 1 - fieldFormats: - products.base_price: - id: number - params: - pattern: '$0,0.00' - products.base_unit_price: - id: number - params: - pattern: '$0,0.00' - products.min_price: - id: number - params: - pattern: '$0,0.00' - products.price: - id: number - params: - pattern: '$0,0.00' - products.taxful_price: - id: number - params: - pattern: '$0,0.00' - products.taxless_price: - id: number - params: - pattern: '$0,0.00' - taxful_total_price: - id: number - params: - pattern: '$0,0.[00]' - taxless_total_price: - id: number - params: - pattern: '$0,0.00' - fields: - _id: - aggregatable: false - count: 0 - esTypes: - - _id - format: - id: string - isMapped: true - name: _id - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - _index: - aggregatable: true - count: 0 - esTypes: - - _index - format: - id: string - isMapped: true - name: _index - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - _score: - aggregatable: false - count: 0 - format: - id: number - isMapped: true - name: _score - readFromDocValues: false - scripted: false - searchable: false - shortDotsEnable: false - type: number - _source: - aggregatable: false - count: 0 - esTypes: - - _source - format: - id: _source - isMapped: true - name: _source - readFromDocValues: false - scripted: false - searchable: false - shortDotsEnable: false - type: _source - category: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: category - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - category.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: category.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: category - type: string - currency: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: currency - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - customer_birth_date: - aggregatable: true - count: 0 - esTypes: - - date - format: - id: date - isMapped: true - name: customer_birth_date - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: date - customer_first_name: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: customer_first_name - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - customer_first_name.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: customer_first_name.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: customer_first_name - type: string - customer_full_name: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: customer_full_name - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - customer_full_name.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: customer_full_name.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: customer_full_name - type: string - customer_gender: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: customer_gender - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - customer_id: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: customer_id - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - customer_last_name: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: customer_last_name - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - customer_last_name.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: customer_last_name.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: customer_last_name - type: string - customer_phone: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: customer_phone - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - day_of_week: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: day_of_week - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - day_of_week_i: - aggregatable: true - count: 0 - esTypes: - - integer - format: - id: number - isMapped: true - name: day_of_week_i - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - email: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: email - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - event.dataset: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: event.dataset - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - geoip.city_name: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: geoip.city_name - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - geoip.continent_name: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: geoip.continent_name - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - geoip.country_iso_code: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: geoip.country_iso_code - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - geoip.location: - aggregatable: true - count: 0 - esTypes: - - geo_point - format: - id: geo_point - params: - transform: wkt - isMapped: true - name: geoip.location - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: geo_point - geoip.region_name: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: geoip.region_name - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - manufacturer: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: manufacturer - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - manufacturer.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: manufacturer.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: manufacturer - type: string - order_date: - aggregatable: true - count: 0 - esTypes: - - date - format: - id: date - isMapped: true - name: order_date - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: date - order_id: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: order_id - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - products._id: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: products._id - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - products._id.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: products._id.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: products._id - type: string - products.base_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: products.base_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.base_unit_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: products.base_unit_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.category: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: products.category - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - products.category.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: products.category.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: products.category - type: string - products.created_on: - aggregatable: true - count: 0 - esTypes: - - date - format: - id: date - isMapped: true - name: products.created_on - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: date - products.discount_amount: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - isMapped: true - name: products.discount_amount - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.discount_percentage: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - isMapped: true - name: products.discount_percentage - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.manufacturer: - aggregatable: false - count: 1 - esTypes: - - text - format: - id: string - isMapped: true - name: products.manufacturer - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - products.manufacturer.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: products.manufacturer.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: products.manufacturer - type: string - products.min_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: products.min_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.price: - aggregatable: true - count: 1 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: products.price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.product_id: - aggregatable: true - count: 0 - esTypes: - - long - format: - id: number - isMapped: true - name: products.product_id - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.product_name: - aggregatable: false - count: 1 - esTypes: - - text - format: - id: string - isMapped: true - name: products.product_name - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - products.product_name.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: products.product_name.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: products.product_name - type: string - products.quantity: - aggregatable: true - count: 0 - esTypes: - - integer - format: - id: number - isMapped: true - name: products.quantity - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.sku: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: products.sku - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - products.tax_amount: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - isMapped: true - name: products.tax_amount - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.taxful_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: products.taxful_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.taxless_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: products.taxless_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.unit_discount_amount: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - isMapped: true - name: products.unit_discount_amount - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - sku: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: sku - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - taxful_total_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.[00]' - isMapped: true - name: taxful_total_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - taxless_total_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: taxless_total_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - total_quantity: - aggregatable: true - count: 1 - esTypes: - - integer - format: - id: number - isMapped: true - name: total_quantity - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - total_unique_products: - aggregatable: true - count: 0 - esTypes: - - integer - format: - id: number - isMapped: true - name: total_unique_products - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - type: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: type - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - user: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: user - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - id: ff959d40-b880-11e8-a6d9-e546fe2bba5f - name: Kibana Sample Data eCommerce - namespaces: - - default - runtimeFieldMap: {} - sourceFilters: [] - timeFieldName: order_date - title: kibana_sample_data_ecommerce - typeMeta: {} - version: WzUsMV0= - Data_views_get_data_views_response: - summary: The get all data views API returns a list of data views. - value: - data_view: - - id: ff959d40-b880-11e8-a6d9-e546fe2bba5f - name: Kibana Sample Data eCommerce - namespaces: - - default - title: kibana_sample_data_ecommerce - typeMeta: {} - - id: d3d7af60-4c81-11e8-b3d7-01146121b73d - name: Kibana Sample Data Flights - namespaces: - - default - title: kibana_sample_data_flights - - id: 90943e30-9a47-11e8-b64d-95841ca0b247 - name: Kibana Sample Data Logs - namespaces: - - default - title: kibana_sample_data_logs - Data_views_get_default_data_view_response: - summary: The get default data view API returns the default data view identifier. - value: - data_view_id: ff959d40-b880-11e8-a6d9-e546fe2bba5f - Data_views_get_runtime_field_response: - summary: >- - The get runtime field API returns a JSON object that contains - information about the runtime field (`hour_of_day`) and the data view - (`d3d7af60-4c81-11e8-b3d7-01146121b73d`). - value: - data_view: - allowNoIndex: false - fieldAttrs: {} - fieldFormats: - AvgTicketPrice: - id: number - params: - pattern: '$0,0.[00]' - hour_of_day: - id: number - params: - pattern: '00' - fields: - _id: - aggregatable: false - count: 0 - esTypes: - - _id - format: - id: string - isMapped: true - name: _id - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - _index: - aggregatable: true - count: 0 - esTypes: - - _index - format: - id: string - isMapped: true - name: _index - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - _score: - aggregatable: false - count: 0 - format: - id: number - isMapped: true - name: _score - readFromDocValues: false - scripted: false - searchable: false - shortDotsEnable: false - type: number - _source: - aggregatable: false - count: 0 - esTypes: - - _source - format: - id: _source - isMapped: true - name: _source - readFromDocValues: false - scripted: false - searchable: false - shortDotsEnable: false - type: _source - AvgTicketPrice: - aggregatable: true - count: 0 - esTypes: - - float - format: - id: number - params: - pattern: '$0,0.[00]' - isMapped: true - name: AvgTicketPrice - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - Cancelled: - aggregatable: true - count: 0 - esTypes: - - boolean - format: - id: boolean - isMapped: true - name: Cancelled - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: boolean - Carrier: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: Carrier - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - dayOfWeek: - aggregatable: true - count: 0 - esTypes: - - integer - format: - id: number - isMapped: true - name: dayOfWeek - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - Dest: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: Dest - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - DestAirportID: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: DestAirportID - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - DestCityName: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: DestCityName - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - DestCountry: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: DestCountry - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - DestLocation: - aggregatable: true - count: 0 - esTypes: - - geo_point - format: - id: geo_point - params: - transform: wkt - isMapped: true - name: DestLocation - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: geo_point - DestRegion: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: DestRegion - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - DestWeather: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: DestWeather - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - DistanceKilometers: - aggregatable: true - count: 0 - esTypes: - - float - format: - id: number - isMapped: true - name: DistanceKilometers - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - DistanceMiles: - aggregatable: true - count: 0 - esTypes: - - float - format: - id: number - isMapped: true - name: DistanceMiles - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - FlightDelay: - aggregatable: true - count: 0 - esTypes: - - boolean - format: - id: boolean - isMapped: true - name: FlightDelay - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: boolean - FlightDelayMin: - aggregatable: true - count: 0 - esTypes: - - integer - format: - id: number - isMapped: true - name: FlightDelayMin - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - FlightDelayType: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: FlightDelayType - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - FlightNum: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: FlightNum - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - FlightTimeHour: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: FlightTimeHour - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - FlightTimeMin: - aggregatable: true - count: 0 - esTypes: - - float - format: - id: number - isMapped: true - name: FlightTimeMin - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - hour_of_day: - aggregatable: true - count: 0 - esTypes: - - long - format: - id: number - params: - pattern: '00' - name: hour_of_day - readFromDocValues: false - runtimeField: - script: - source: 'emit(doc[''timestamp''].value.getHour());' - type: long - scripted: false - searchable: true - shortDotsEnable: false - type: number - Origin: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: Origin - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - OriginAirportID: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: OriginAirportID - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - OriginCityName: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: OriginCityName - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - OriginCountry: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: OriginCountry - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - OriginLocation: - aggregatable: true - count: 0 - esTypes: - - geo_point - format: - id: geo_point - params: - transform: wkt - isMapped: true - name: OriginLocation - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: geo_point - OriginRegion: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: OriginRegion - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - OriginWeather: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: OriginWeather - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - timestamp: - aggregatable: true - count: 0 - esTypes: - - date - format: - id: date - isMapped: true - name: timestamp - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: date - id: d3d7af60-4c81-11e8-b3d7-01146121b73d - name: Kibana Sample Data Flights - runtimeFieldMap: - hour_of_day: - script: - source: 'emit(doc[''timestamp''].value.getHour());' - type: long - sourceFilters: [] - timeFieldName: timestamp - title: kibana_sample_data_flights - version: WzM2LDJd - fields: - - aggregatable: true - count: 0 - esTypes: - - long - name: hour_of_day - readFromDocValues: false - runtimeField: - script: - source: 'emit(doc[''timestamp''].value.getHour());' - type: long - scripted: false - searchable: true - shortDotsEnable: false - type: number - Data_views_preview_swap_data_view_request: - summary: Preview swapping references from data view ID "abcd-efg" to "xyz-123". - value: - fromId: abcd-efg - toId: xyz-123 - Data_views_set_default_data_view_request: - summary: Set the default data view identifier. - value: - data_view_id: ff959d40-b880-11e8-a6d9-e546fe2bba5f - force: true - Data_views_swap_data_view_request: - summary: >- - Swap references from data view ID "abcd-efg" to "xyz-123" and remove the - data view that is no longer referenced. - value: - delete: true - fromId: abcd-efg - toId: xyz-123 - Data_views_update_data_view_request: - summary: Update some properties for a data view. - value: - data_view: - allowNoIndex: false - name: Kibana Sample Data eCommerce - timeFieldName: order_date - title: kibana_sample_data_ecommerce - refresh_fields: true - Data_views_update_field_metadata_request: - summary: Update metadata for multiple fields. - value: - fields: - field1: - count: 123 - customLabel: Field 1 label - field2: - customDescription: Field 2 description - customLabel: Field 2 label - Data_views_update_runtime_field_request: - summary: Update an existing runtime field on a data view. - value: - runtimeField: - script: - source: 'emit(doc["bar"].value)' - Machine_learning_APIs_mlSyncExample: - summary: Two anomaly detection jobs required synchronization in this example. - value: - datafeedsAdded: {} - datafeedsRemoved: {} - savedObjectsCreated: - anomaly-detector: - myjob1: - success: true - myjob2: - success: true - savedObjectsDeleted: {} - Serverless_saved_objects_export_objects_request: - summary: Export a specific saved object. - value: - excludeExportDetails: true - includeReferencesDeep: false - objects: - - id: de71f4f0-1902-11e9-919b-ffe5949a18d2 - type: map - Serverless_saved_objects_export_objects_response: - summary: >- - The export objects API response contains a JSON record for each exported - object. - value: - attributes: - description: '' - layerListJSON: >- - [{"id":"0hmz5","alpha":1,"sourceDescriptor":{"type":"EMS_TMS","isAutoSelect":true,"lightModeDefault":"road_map_desaturated"},"visible":true,"style":{},"type":"EMS_VECTOR_TILE","minZoom":0,"maxZoom":24},{"id":"edh66","label":"Total - Requests by - Destination","minZoom":0,"maxZoom":24,"alpha":0.5,"sourceDescriptor":{"type":"EMS_FILE","id":"world_countries","tooltipProperties":["name","iso2"]},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"DYNAMIC","options":{"field":{"name":"__kbnjoin__count__673ff994-fc75-4c67-909b-69fcb0e1060e","origin":"join"},"color":"Greys","fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"lineColor":{"type":"STATIC","options":{"color":"#FFFFFF"}},"lineWidth":{"type":"STATIC","options":{"size":1}},"iconSize":{"type":"STATIC","options":{"size":10}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR","joins":[{"leftField":"iso2","right":{"type":"ES_TERM_SOURCE","id":"673ff994-fc75-4c67-909b-69fcb0e1060e","indexPatternTitle":"kibana_sample_data_logs","term":"geo.dest","indexPatternRefName":"layer_1_join_0_index_pattern","metrics":[{"type":"count","label":"web - logs - count"}],"applyGlobalQuery":true}}]},{"id":"gaxya","label":"Actual - Requests","minZoom":9,"maxZoom":24,"alpha":1,"sourceDescriptor":{"id":"b7486535-171b-4d3b-bb2e-33c1a0a2854c","type":"ES_SEARCH","geoField":"geo.coordinates","limit":2048,"filterByMapBounds":true,"tooltipProperties":["clientip","timestamp","host","request","response","machine.os","agent","bytes"],"indexPatternRefName":"layer_2_source_index_pattern","applyGlobalQuery":true,"scalingType":"LIMIT"},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"STATIC","options":{"color":"#2200ff"}},"lineColor":{"type":"STATIC","options":{"color":"#FFFFFF"}},"lineWidth":{"type":"STATIC","options":{"size":2}},"iconSize":{"type":"DYNAMIC","options":{"field":{"name":"bytes","origin":"source"},"minSize":1,"maxSize":23,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR"},{"id":"tfi3f","label":"Total - Requests and - Bytes","minZoom":0,"maxZoom":9,"alpha":1,"sourceDescriptor":{"type":"ES_GEO_GRID","resolution":"COARSE","id":"8aaa65b5-a4e9-448b-9560-c98cb1c5ac5b","geoField":"geo.coordinates","requestType":"point","metrics":[{"type":"count","label":"web - logs - count"},{"type":"sum","field":"bytes"}],"indexPatternRefName":"layer_3_source_index_pattern","applyGlobalQuery":true},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"color":"Blues","fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"lineColor":{"type":"STATIC","options":{"color":"#cccccc"}},"lineWidth":{"type":"STATIC","options":{"size":1}},"iconSize":{"type":"DYNAMIC","options":{"field":{"name":"sum_of_bytes","origin":"source"},"minSize":7,"maxSize":25,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"labelText":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"labelSize":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"minSize":12,"maxSize":24,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR"}] - mapStateJSON: >- - {"zoom":3.64,"center":{"lon":-88.92107,"lat":42.16337},"timeFilters":{"from":"now-7d","to":"now"},"refreshConfig":{"isPaused":true,"interval":0},"query":{"language":"kuery","query":""},"settings":{"autoFitToDataBounds":false}} - title: '[Logs] Total Requests and Bytes' - uiStateJSON: '{"isDarkMode":false}' - coreMigrationVersion: 8.8.0 - created_at: '2023-08-23T20:03:32.204Z' - id: de71f4f0-1902-11e9-919b-ffe5949a18d2 - managed: false - references: - - id: 90943e30-9a47-11e8-b64d-95841ca0b247 - name: layer_1_join_0_index_pattern - type: index-pattern - - id: 90943e30-9a47-11e8-b64d-95841ca0b247 - name: layer_2_source_index_pattern - type: index-pattern - - id: 90943e30-9a47-11e8-b64d-95841ca0b247 - name: layer_3_source_index_pattern - type: index-pattern - type: map - typeMigrationVersion: 8.4.0 - updated_at: '2023-08-23T20:03:32.204Z' - version: WzEzLDFd - Serverless_saved_objects_import_objects_request: - value: - file: file.ndjson - Serverless_saved_objects_import_objects_response: - summary: >- - The import objects API response indicates a successful import and the - objects are created. Since these objects are created as new copies, each - entry in the successResults array includes a destinationId attribute. - value: - success: true - successCount: 1 - successResults: - - destinationId: 82d2760c-468f-49cf-83aa-b9a35b6a8943 - id: 90943e30-9a47-11e8-b64d-95841ca0b247 - managed: false - meta: - icon: indexPatternApp - title: Kibana Sample Data Logs - type: index-pattern - parameters: - Connectors_connector_id: - description: An identifier for the connector. - in: path - name: connectorId - required: true - schema: - example: df770e30-8b8b-11ed-a780-3b746c987a81 - type: string - Connectors_kbn_xsrf: - description: Cross-site request forgery protection - in: header - name: kbn-xsrf - required: true - schema: - type: string - Data_views_field_name: - description: The name of the runtime field. - in: path - name: fieldName - required: true - schema: - example: hour_of_day - type: string - Data_views_kbn_xsrf: - description: Cross-site request forgery protection - in: header - name: kbn-xsrf - required: true - schema: - type: string - Data_views_view_id: - description: An identifier for the data view. - in: path - name: viewId - required: true - schema: - example: ff959d40-b880-11e8-a6d9-e546fe2bba5f - type: string - Machine_learning_APIs_simulateParam: - description: >- - When true, simulates the synchronization by returning only the list of - actions that would be performed. - example: 'true' - in: query - name: simulate - required: false - schema: - type: boolean - Serverless_saved_objects_kbn_xsrf: - description: Cross-site request forgery protection - in: header - name: kbn-xsrf - required: true - schema: - type: string - SLOs_kbn_xsrf: - description: Cross-site request forgery protection - in: header - name: kbn-xsrf - required: true - schema: - type: string - SLOs_slo_id: - description: An identifier for the slo. - in: path - name: sloId - required: true - schema: - example: 9c235211-6834-11ea-a78c-6feb38a34414 - type: string - SLOs_space_id: - description: >- - An identifier for the space. If `/s/` and the identifier are omitted - from the path, the default space is used. - in: path - name: spaceId - required: true - schema: - example: default - type: string - responses: - Connectors_401: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - properties: - error: - enum: - - Unauthorized - example: Unauthorized - type: string - message: - type: string - statusCode: - enum: - - 401 - example: 401 - type: integer - title: Unauthorized response - type: object - description: Authorization information is missing or invalid. - Connectors_404: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - properties: - error: - enum: - - Not Found - example: Not Found - type: string - message: - example: >- - Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not - found - type: string - statusCode: - enum: - - 404 - example: 404 - type: integer - title: Not found response - type: object - description: Object is not found. - schemas: - Connectors_config_properties_bedrock: - description: Defines properties for connectors when type is `.bedrock`. - properties: - apiUrl: - description: The Amazon Bedrock request URL. - type: string - defaultModel: - default: 'anthropic.claude-3-5-sonnet-20240620-v1:0' - description: > - The generative artificial intelligence model for Amazon Bedrock to - use. Current support is for the Anthropic Claude models. - type: string - required: - - apiUrl - title: Connector request properties for an Amazon Bedrock connector - type: object - Connectors_config_properties_cases_webhook: - description: Defines properties for connectors when type is `.cases-webhook`. - type: object - properties: - createCommentJson: - description: > - A JSON payload sent to the create comment URL to create a case - comment. You can use variables to add Kibana Cases data to the - payload. The required variable is `case.comment`. Due to Mustache - template variables (the text enclosed in triple braces, for example, - `{{{case.title}}}`), the JSON is not validated when you create the - connector. The JSON is validated once the Mustache variables have - been placed when the REST method runs. Manually ensure that the JSON - is valid, disregarding the Mustache variables, so the later - validation will pass. - example: '{"body": {{{case.comment}}}}' - type: string - createCommentMethod: - default: put - description: > - The REST API HTTP request method to create a case comment in the - third-party system. Valid values are `patch`, `post`, and `put`. - enum: - - patch - - post - - put - type: string - createCommentUrl: - description: > - The REST API URL to create a case comment by ID in the third-party - system. You can use a variable to add the external system ID to the - URL. If you are using the `xpack.actions.allowedHosts setting`, add - the hostname to the allowed hosts. - example: 'https://example.com/issue/{{{external.system.id}}}/comment' - type: string - createIncidentJson: - description: > - A JSON payload sent to the create case URL to create a case. You can - use variables to add case data to the payload. Required variables - are `case.title` and `case.description`. Due to Mustache template - variables (which is the text enclosed in triple braces, for example, - `{{{case.title}}}`), the JSON is not validated when you create the - connector. The JSON is validated after the Mustache variables have - been placed when REST method runs. Manually ensure that the JSON is - valid to avoid future validation errors; disregard Mustache - variables during your review. - example: >- - {"fields": {"summary": {{{case.title}}},"description": - {{{case.description}}},"labels": {{{case.tags}}}}} - type: string - createIncidentMethod: - default: post - description: > - The REST API HTTP request method to create a case in the third-party - system. Valid values are `patch`, `post`, and `put`. - enum: - - patch - - post - - put - type: string - createIncidentResponseKey: - description: >- - The JSON key in the create external case response that contains the - case ID. - type: string - createIncidentUrl: - description: > - The REST API URL to create a case in the third-party system. If you - are using the `xpack.actions.allowedHosts` setting, add the hostname - to the allowed hosts. - type: string - getIncidentResponseExternalTitleKey: - description: >- - The JSON key in get external case response that contains the case - title. - type: string - getIncidentUrl: - description: > - The REST API URL to get the case by ID from the third-party system. - If you are using the `xpack.actions.allowedHosts` setting, add the - hostname to the allowed hosts. You can use a variable to add the - external system ID to the URL. Due to Mustache template variables - (the text enclosed in triple braces, for example, - `{{{case.title}}}`), the JSON is not validated when you create the - connector. The JSON is validated after the Mustache variables have - been placed when REST method runs. Manually ensure that the JSON is - valid, disregarding the Mustache variables, so the later validation - will pass. - example: 'https://example.com/issue/{{{external.system.id}}}' - type: string - hasAuth: - default: true - description: >- - If true, a username and password for login type authentication must - be provided. - type: boolean - headers: - description: > - A set of key-value pairs sent as headers with the request URLs for - the create case, update case, get case, and create comment methods. - type: string - updateIncidentJson: - description: > - The JSON payload sent to the update case URL to update the case. You - can use variables to add Kibana Cases data to the payload. Required - variables are `case.title` and `case.description`. Due to Mustache - template variables (which is the text enclosed in triple braces, for - example, `{{{case.title}}}`), the JSON is not validated when you - create the connector. The JSON is validated after the Mustache - variables have been placed when REST method runs. Manually ensure - that the JSON is valid to avoid future validation errors; disregard - Mustache variables during your review. - example: >- - {"fields": {"summary": {{{case.title}}},"description": - {{{case.description}}},"labels": {{{case.tags}}}}} - type: string - updateIncidentMethod: - default: put - description: > - The REST API HTTP request method to update the case in the - third-party system. Valid values are `patch`, `post`, and `put`. - enum: - - patch - - post - - put - type: string - updateIncidentUrl: - description: > - The REST API URL to update the case by ID in the third-party system. - You can use a variable to add the external system ID to the URL. If - you are using the `xpack.actions.allowedHosts` setting, add the - hostname to the allowed hosts. - example: 'https://example.com/issue/{{{external.system.ID}}}' - type: string - viewIncidentUrl: - description: > - The URL to view the case in the external system. You can use - variables to add the external system ID or external system title to - the URL. - example: >- - https://testing-jira.atlassian.net/browse/{{{external.system.title}}} - type: string - required: - - createIncidentJson - - createIncidentResponseKey - - createIncidentUrl - - getIncidentResponseExternalTitleKey - - getIncidentUrl - - updateIncidentJson - - updateIncidentUrl - - viewIncidentUrl - title: Connector request properties for Webhook - Case Management connector - Connectors_config_properties_d3security: - description: Defines properties for connectors when type is `.d3security`. - properties: - url: - description: > - The D3 Security API request URL. If you are using the - `xpack.actions.allowedHosts` setting, add the hostname to the - allowed hosts. - type: string - required: - - url - title: Connector request properties for a D3 Security connector - type: object - Connectors_config_properties_email: - description: Defines properties for connectors when type is `.email`. - type: object - properties: - clientId: - description: > - The client identifier, which is a part of OAuth 2.0 client - credentials authentication, in GUID format. If `service` is - `exchange_server`, this property is required. - nullable: true - type: string - from: - description: > - The from address for all emails sent by the connector. It must be - specified in `user@host-name` format. - type: string - hasAuth: - default: true - description: > - Specifies whether a user and password are required inside the - secrets configuration. - type: boolean - host: - description: > - The host name of the service provider. If the `service` is - `elastic_cloud` (for Elastic Cloud notifications) or one of - Nodemailer's well-known email service providers, this property is - ignored. If `service` is `other`, this property must be defined. - type: string - oauthTokenUrl: - nullable: true - type: string - port: - description: > - The port to connect to on the service provider. If the `service` is - `elastic_cloud` (for Elastic Cloud notifications) or one of - Nodemailer's well-known email service providers, this property is - ignored. If `service` is `other`, this property must be defined. - type: integer - secure: - description: > - Specifies whether the connection to the service provider will use - TLS. If the `service` is `elastic_cloud` (for Elastic Cloud - notifications) or one of Nodemailer's well-known email service - providers, this property is ignored. - type: boolean - service: - description: | - The name of the email service. - enum: - - elastic_cloud - - exchange_server - - gmail - - other - - outlook365 - - ses - type: string - tenantId: - description: > - The tenant identifier, which is part of OAuth 2.0 client credentials - authentication, in GUID format. If `service` is `exchange_server`, - this property is required. - nullable: true - type: string - required: - - from - title: Connector request properties for an email connector - Connectors_config_properties_gemini: - description: Defines properties for connectors when type is `.gemini`. - properties: - apiUrl: - description: The Google Gemini request URL. - type: string - defaultModel: - default: gemini-1.5-pro-001 - description: >- - The generative artificial intelligence model for Google Gemini to - use. - type: string - gcpProjectID: - description: The Google ProjectID that has Vertex AI endpoint enabled. - type: string - gcpRegion: - description: The GCP region where the Vertex AI endpoint enabled. - type: string - required: - - apiUrl - - gcpRegion - - gcpProjectID - title: Connector request properties for an Google Gemini connector - type: object - Connectors_config_properties_genai: - description: Defines properties for connectors when type is `.gen-ai`. - discriminator: - mapping: - Azure OpenAI: '#/components/schemas/Connectors_config_properties_genai_azure' - OpenAI: '#/components/schemas/Connectors_config_properties_genai_openai' - propertyName: apiProvider - oneOf: - - $ref: '#/components/schemas/Connectors_config_properties_genai_azure' - - $ref: '#/components/schemas/Connectors_config_properties_genai_openai' - title: Connector request properties for an OpenAI connector - Connectors_config_properties_genai_azure: - description: > - Defines properties for connectors when type is `.gen-ai` and the API - provider is `Azure OpenAI'. - properties: - apiProvider: - description: The OpenAI API provider. - enum: - - Azure OpenAI - type: string - apiUrl: - description: The OpenAI API endpoint. - type: string - required: - - apiProvider - - apiUrl - title: >- - Connector request properties for an OpenAI connector that uses Azure - OpenAI - type: object - Connectors_config_properties_genai_openai: - description: > - Defines properties for connectors when type is `.gen-ai` and the API - provider is `OpenAI'. - properties: - apiProvider: - description: The OpenAI API provider. - enum: - - OpenAI - type: string - apiUrl: - description: The OpenAI API endpoint. - type: string - defaultModel: - description: The default model to use for requests. - type: string - required: - - apiProvider - - apiUrl - title: Connector request properties for an OpenAI connector - type: object - Connectors_config_properties_index: - description: Defines properties for connectors when type is `.index`. - type: object - properties: - executionTimeField: - default: null - description: A field that indicates when the document was indexed. - nullable: true - type: string - index: - description: The Elasticsearch index to be written to. - type: string - refresh: - default: false - description: > - The refresh policy for the write request, which affects when changes - are made visible to search. Refer to the refresh setting for - Elasticsearch document APIs. - type: boolean - required: - - index - title: Connector request properties for an index connector - Connectors_config_properties_jira: - description: Defines properties for connectors when type is `.jira`. - type: object - properties: - apiUrl: - description: The Jira instance URL. - type: string - projectKey: - description: The Jira project key. - type: string - required: - - apiUrl - - projectKey - title: Connector request properties for a Jira connector - Connectors_config_properties_opsgenie: - description: Defines properties for connectors when type is `.opsgenie`. - type: object - properties: - apiUrl: - description: > - The Opsgenie URL. For example, `https://api.opsgenie.com` or - `https://api.eu.opsgenie.com`. If you are using the - `xpack.actions.allowedHosts` setting, add the hostname to the - allowed hosts. - type: string - required: - - apiUrl - title: Connector request properties for an Opsgenie connector - Connectors_config_properties_pagerduty: - description: Defines properties for connectors when type is `.pagerduty`. - properties: - apiUrl: - description: The PagerDuty event URL. - example: 'https://events.pagerduty.com/v2/enqueue' - nullable: true - type: string - title: Connector request properties for a PagerDuty connector - type: object - Connectors_config_properties_resilient: - description: Defines properties for connectors when type is `.resilient`. - type: object - properties: - apiUrl: - description: The IBM Resilient instance URL. - type: string - orgId: - description: The IBM Resilient organization ID. - type: string - required: - - apiUrl - - orgId - title: Connector request properties for a IBM Resilient connector - Connectors_config_properties_sentinelone: - description: Defines properties for connectors when type is `.sentinelone`. - type: object - properties: - url: - description: > - The SentinelOne tenant URL. If you are using the - `xpack.actions.allowedHosts` setting, add the hostname to the - allowed hosts. - type: string - required: - - url - title: Connector request properties for a SentinelOne connector - Connectors_config_properties_servicenow: - description: Defines properties for connectors when type is `.servicenow`. - type: object - properties: - apiUrl: - description: The ServiceNow instance URL. - type: string - clientId: - description: > - The client ID assigned to your OAuth application. This property is - required when `isOAuth` is `true`. - type: string - isOAuth: - default: false - description: > - The type of authentication to use. The default value is false, which - means basic authentication is used instead of open authorization - (OAuth). - type: boolean - jwtKeyId: - description: > - The key identifier assigned to the JWT verifier map of your OAuth - application. This property is required when `isOAuth` is `true`. - type: string - userIdentifierValue: - description: > - The identifier to use for OAuth authentication. This identifier - should be the user field you selected when you created an OAuth JWT - API endpoint for external clients in your ServiceNow instance. For - example, if the selected user field is `Email`, the user identifier - should be the user's email address. This property is required when - `isOAuth` is `true`. - type: string - usesTableApi: - default: true - description: > - Determines whether the connector uses the Table API or the Import - Set API. This property is supported only for ServiceNow ITSM and - ServiceNow SecOps connectors. NOTE: If this property is set to - `false`, the Elastic application should be installed in ServiceNow. - type: boolean - required: - - apiUrl - title: Connector request properties for a ServiceNow ITSM connector - Connectors_config_properties_servicenow_itom: - description: Defines properties for connectors when type is `.servicenow`. - type: object - properties: - apiUrl: - description: The ServiceNow instance URL. - type: string - clientId: - description: > - The client ID assigned to your OAuth application. This property is - required when `isOAuth` is `true`. - type: string - isOAuth: - default: false - description: > - The type of authentication to use. The default value is false, which - means basic authentication is used instead of open authorization - (OAuth). - type: boolean - jwtKeyId: - description: > - The key identifier assigned to the JWT verifier map of your OAuth - application. This property is required when `isOAuth` is `true`. - type: string - userIdentifierValue: - description: > - The identifier to use for OAuth authentication. This identifier - should be the user field you selected when you created an OAuth JWT - API endpoint for external clients in your ServiceNow instance. For - example, if the selected user field is `Email`, the user identifier - should be the user's email address. This property is required when - `isOAuth` is `true`. - type: string - required: - - apiUrl - title: Connector request properties for a ServiceNow ITSM connector - Connectors_config_properties_slack_api: - description: Defines properties for connectors when type is `.slack_api`. - properties: - allowedChannels: - description: A list of valid Slack channels. - items: - maxItems: 25 - type: object - properties: - id: - description: The Slack channel ID. - example: C123ABC456 - minLength: 1 - type: string - name: - description: The Slack channel name. - minLength: 1 - type: string - required: - - id - - name - type: array - title: Connector request properties for a Slack connector - type: object - Connectors_config_properties_swimlane: - description: Defines properties for connectors when type is `.swimlane`. - type: object - properties: - apiUrl: - description: The Swimlane instance URL. - type: string - appId: - description: The Swimlane application ID. - type: string - connectorType: - description: >- - The type of connector. Valid values are `all`, `alerts`, and - `cases`. - enum: - - all - - alerts - - cases - type: string - mappings: - description: The field mapping. - properties: - alertIdConfig: - description: Mapping for the alert ID. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Alert identifier mapping - type: object - caseIdConfig: - description: Mapping for the case ID. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Case identifier mapping - type: object - caseNameConfig: - description: Mapping for the case name. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Case name mapping - type: object - commentsConfig: - description: Mapping for the case comments. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Case comment mapping - type: object - descriptionConfig: - description: Mapping for the case description. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Case description mapping - type: object - ruleNameConfig: - description: Mapping for the name of the alert's rule. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Rule name mapping - type: object - severityConfig: - description: Mapping for the severity. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Severity mapping - type: object - title: Connector mappings properties for a Swimlane connector - type: object - required: - - apiUrl - - appId - - connectorType - title: Connector request properties for a Swimlane connector - Connectors_config_properties_tines: - description: Defines properties for connectors when type is `.tines`. - properties: - url: - description: > - The Tines tenant URL. If you are using the - `xpack.actions.allowedHosts` setting, make sure this hostname is - added to the allowed hosts. - type: string - required: - - url - title: Connector request properties for a Tines connector - type: object - Connectors_config_properties_torq: - description: Defines properties for connectors when type is `.torq`. - properties: - webhookIntegrationUrl: - description: The endpoint URL of the Elastic Security integration in Torq. - type: string - required: - - webhookIntegrationUrl - title: Connector request properties for a Torq connector - type: object - Connectors_config_properties_webhook: - description: Defines properties for connectors when type is `.webhook`. - properties: - authType: - description: | - The type of authentication to use: basic, SSL, or none. - enum: - - webhook-authentication-basic - - webhook-authentication-ssl - nullable: true - type: string - ca: - description: > - A base64 encoded version of the certificate authority file that the - connector can trust to sign and validate certificates. This option - is available for all authentication types. - type: string - certType: - description: > - If the `authType` is `webhook-authentication-ssl`, specifies whether - the certificate authentication data is in a CRT and key file format - or a PFX file format. - enum: - - ssl-crt-key - - ssl-pfx - type: string - hasAuth: - description: > - If `true`, a user name and password must be provided for login type - authentication. - type: boolean - headers: - description: A set of key-value pairs sent as headers with the request. - nullable: true - type: object - method: - default: post - description: | - The HTTP request method, either `post` or `put`. - enum: - - post - - put - type: string - url: - description: > - The request URL. If you are using the `xpack.actions.allowedHosts` - setting, add the hostname to the allowed hosts. - type: string - verificationMode: - default: full - description: > - Controls the verification of certificates. Use `full` to validate - that the certificate has an issue date within the `not_before` and - `not_after` dates, chains to a trusted certificate authority (CA), - and has a hostname or IP address that matches the names within the - certificate. Use `certificate` to validate the certificate and - verify that it is signed by a trusted authority; this option does - not check the certificate hostname. Use `none` to skip certificate - validation. - enum: - - certificate - - full - - none - type: string - title: Connector request properties for a Webhook connector - type: object - Connectors_config_properties_xmatters: - description: Defines properties for connectors when type is `.xmatters`. - properties: - configUrl: - description: > - The request URL for the Elastic Alerts trigger in xMatters. It is - applicable only when `usesBasic` is `true`. - nullable: true - type: string - usesBasic: - default: true - description: >- - Specifies whether the connector uses HTTP basic authentication - (`true`) or URL authentication (`false`). - type: boolean - title: Connector request properties for an xMatters connector - type: object - Connectors_connector_response_properties: - description: The properties vary depending on the connector type. - discriminator: - mapping: - .bedrock: >- - #/components/schemas/Connectors_connector_response_properties_bedrock - .cases-webhook: >- - #/components/schemas/Connectors_connector_response_properties_cases_webhook - .d3security: >- - #/components/schemas/Connectors_connector_response_properties_d3security - .email: '#/components/schemas/Connectors_connector_response_properties_email' - .gemini: '#/components/schemas/Connectors_connector_response_properties_gemini' - .gen-ai: '#/components/schemas/Connectors_connector_response_properties_genai' - .index: '#/components/schemas/Connectors_connector_response_properties_index' - .jira: '#/components/schemas/Connectors_connector_response_properties_jira' - .opsgenie: >- - #/components/schemas/Connectors_connector_response_properties_opsgenie - .pagerduty: >- - #/components/schemas/Connectors_connector_response_properties_pagerduty - .resilient: >- - #/components/schemas/Connectors_connector_response_properties_resilient - .sentinelone: >- - #/components/schemas/Connectors_connector_response_properties_sentinelone - .server-log: >- - #/components/schemas/Connectors_connector_response_properties_serverlog - .servicenow: >- - #/components/schemas/Connectors_connector_response_properties_servicenow - .servicenow-itom: >- - #/components/schemas/Connectors_connector_response_properties_servicenow_itom - .servicenow-sir: >- - #/components/schemas/Connectors_connector_response_properties_servicenow_sir - .slack: >- - #/components/schemas/Connectors_connector_response_properties_slack_webhook - .slack_api: >- - #/components/schemas/Connectors_connector_response_properties_slack_api - .swimlane: >- - #/components/schemas/Connectors_connector_response_properties_swimlane - .teams: '#/components/schemas/Connectors_connector_response_properties_teams' - .tines: '#/components/schemas/Connectors_connector_response_properties_tines' - .torq: '#/components/schemas/Connectors_connector_response_properties_torq' - .webhook: >- - #/components/schemas/Connectors_connector_response_properties_webhook - .xmatters: >- - #/components/schemas/Connectors_connector_response_properties_xmatters - propertyName: connector_type_id - oneOf: - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_bedrock - - $ref: '#/components/schemas/Connectors_connector_response_properties_gemini' - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_cases_webhook - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_d3security - - $ref: '#/components/schemas/Connectors_connector_response_properties_email' - - $ref: '#/components/schemas/Connectors_connector_response_properties_genai' - - $ref: '#/components/schemas/Connectors_connector_response_properties_index' - - $ref: '#/components/schemas/Connectors_connector_response_properties_jira' - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_opsgenie - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_pagerduty - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_resilient - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_sentinelone - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_serverlog - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_servicenow - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_servicenow_itom - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_servicenow_sir - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_slack_api - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_slack_webhook - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_swimlane - - $ref: '#/components/schemas/Connectors_connector_response_properties_teams' - - $ref: '#/components/schemas/Connectors_connector_response_properties_tines' - - $ref: '#/components/schemas/Connectors_connector_response_properties_torq' - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_webhook - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_xmatters - title: Connector response properties - Connectors_connector_response_properties_bedrock: - title: Connector response properties for an Amazon Bedrock connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_bedrock' - connector_type_id: - description: The type of connector. - enum: - - .bedrock - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_cases_webhook: - title: Connector request properties for a Webhook - Case Management connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_cases_webhook' - connector_type_id: - description: The type of connector. - enum: - - .cases-webhook - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_d3security: - title: Connector response properties for a D3 Security connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_d3security' - connector_type_id: - description: The type of connector. - enum: - - .d3security - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_email: - title: Connector response properties for an email connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_email' - connector_type_id: - description: The type of connector. - enum: - - .email - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_gemini: - title: Connector response properties for a Google Gemini connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_gemini' - connector_type_id: - description: The type of connector. - enum: - - .gemini - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_genai: - title: Connector response properties for an OpenAI connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_genai' - connector_type_id: - description: The type of connector. - enum: - - .gen-ai - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_index: - title: Connector response properties for an index connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_index' - connector_type_id: - description: The type of connector. - enum: - - .index - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_jira: - title: Connector response properties for a Jira connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_jira' - connector_type_id: - description: The type of connector. - enum: - - .jira - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_opsgenie: - title: Connector response properties for an Opsgenie connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_opsgenie' - connector_type_id: - description: The type of connector. - enum: - - .opsgenie - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_pagerduty: - title: Connector response properties for a PagerDuty connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_pagerduty' - connector_type_id: - description: The type of connector. - enum: - - .pagerduty - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_resilient: - title: Connector response properties for a IBM Resilient connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_resilient' - connector_type_id: - description: The type of connector. - enum: - - .resilient - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_sentinelone: - title: Connector response properties for a SentinelOne connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_sentinelone' - connector_type_id: - description: The type of connector. - enum: - - .sentinelone - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_serverlog: - title: Connector response properties for a server log connector - type: object - properties: - config: - nullable: true - type: object - connector_type_id: - description: The type of connector. - enum: - - .server-log - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_servicenow: - title: Connector response properties for a ServiceNow ITSM connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow' - connector_type_id: - description: The type of connector. - enum: - - .servicenow - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_servicenow_itom: - title: Connector response properties for a ServiceNow ITOM connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow_itom' - connector_type_id: - description: The type of connector. - enum: - - .servicenow-itom - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_servicenow_sir: - title: Connector response properties for a ServiceNow SecOps connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow' - connector_type_id: - description: The type of connector. - enum: - - .servicenow-sir - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_slack_api: - title: Connector response properties for a Slack connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_slack_api' - connector_type_id: - description: The type of connector. - enum: - - .slack_api - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_slack_webhook: - title: Connector response properties for a Slack connector - type: object - properties: - connector_type_id: - description: The type of connector. - enum: - - .slack - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_swimlane: - title: Connector response properties for a Swimlane connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_swimlane' - connector_type_id: - description: The type of connector. - enum: - - .swimlane - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_teams: - title: Connector response properties for a Microsoft Teams connector - type: object - properties: - config: - type: object - connector_type_id: - description: The type of connector. - enum: - - .teams - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_tines: - title: Connector response properties for a Tines connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_tines' - connector_type_id: - description: The type of connector. - enum: - - .tines - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_torq: - title: Connector response properties for a Torq connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_torq' - connector_type_id: - description: The type of connector. - enum: - - .torq - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_webhook: - title: Connector response properties for a Webhook connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_webhook' - connector_type_id: - description: The type of connector. - enum: - - .webhook - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_xmatters: - title: Connector response properties for an xMatters connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_xmatters' - connector_type_id: - description: The type of connector. - enum: - - .xmatters - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_types: - description: >- - The type of connector. For example, `.email`, `.index`, `.jira`, - `.opsgenie`, or `.server-log`. - enum: - - .bedrock - - .gemini - - .cases-webhook - - .d3security - - .email - - .gen-ai - - .index - - .jira - - .opsgenie - - .pagerduty - - .resilient - - .sentinelone - - .servicenow - - .servicenow-itom - - .servicenow-sir - - .server-log - - .slack - - .slack_api - - .swimlane - - .teams - - .tines - - .torq - - .webhook - - .xmatters - example: .server-log - title: Connector types - type: string - Connectors_create_connector_request: - description: The properties vary depending on the connector type. - discriminator: - mapping: - .bedrock: '#/components/schemas/Connectors_create_connector_request_bedrock' - .cases-webhook: >- - #/components/schemas/Connectors_create_connector_request_cases_webhook - .d3security: '#/components/schemas/Connectors_create_connector_request_d3security' - .email: '#/components/schemas/Connectors_create_connector_request_email' - .gemini: '#/components/schemas/Connectors_create_connector_request_gemini' - .gen-ai: '#/components/schemas/Connectors_create_connector_request_genai' - .index: '#/components/schemas/Connectors_create_connector_request_index' - .jira: '#/components/schemas/Connectors_create_connector_request_jira' - .opsgenie: '#/components/schemas/Connectors_create_connector_request_opsgenie' - .pagerduty: '#/components/schemas/Connectors_create_connector_request_pagerduty' - .resilient: '#/components/schemas/Connectors_create_connector_request_resilient' - .sentinelone: '#/components/schemas/Connectors_create_connector_request_sentinelone' - .server-log: '#/components/schemas/Connectors_create_connector_request_serverlog' - .servicenow: '#/components/schemas/Connectors_create_connector_request_servicenow' - .servicenow-itom: >- - #/components/schemas/Connectors_create_connector_request_servicenow_itom - .servicenow-sir: >- - #/components/schemas/Connectors_create_connector_request_servicenow_sir - .slack: >- - #/components/schemas/Connectors_create_connector_request_slack_webhook - .slack_api: '#/components/schemas/Connectors_create_connector_request_slack_api' - .swimlane: '#/components/schemas/Connectors_create_connector_request_swimlane' - .teams: '#/components/schemas/Connectors_create_connector_request_teams' - .tines: '#/components/schemas/Connectors_create_connector_request_tines' - .torq: '#/components/schemas/Connectors_create_connector_request_torq' - .webhook: '#/components/schemas/Connectors_create_connector_request_webhook' - .xmatters: '#/components/schemas/Connectors_create_connector_request_xmatters' - propertyName: connector_type_id - oneOf: - - $ref: '#/components/schemas/Connectors_create_connector_request_bedrock' - - $ref: '#/components/schemas/Connectors_create_connector_request_gemini' - - $ref: >- - #/components/schemas/Connectors_create_connector_request_cases_webhook - - $ref: '#/components/schemas/Connectors_create_connector_request_d3security' - - $ref: '#/components/schemas/Connectors_create_connector_request_email' - - $ref: '#/components/schemas/Connectors_create_connector_request_genai' - - $ref: '#/components/schemas/Connectors_create_connector_request_index' - - $ref: '#/components/schemas/Connectors_create_connector_request_jira' - - $ref: '#/components/schemas/Connectors_create_connector_request_opsgenie' - - $ref: '#/components/schemas/Connectors_create_connector_request_pagerduty' - - $ref: '#/components/schemas/Connectors_create_connector_request_resilient' - - $ref: '#/components/schemas/Connectors_create_connector_request_sentinelone' - - $ref: '#/components/schemas/Connectors_create_connector_request_serverlog' - - $ref: '#/components/schemas/Connectors_create_connector_request_servicenow' - - $ref: >- - #/components/schemas/Connectors_create_connector_request_servicenow_itom - - $ref: >- - #/components/schemas/Connectors_create_connector_request_servicenow_sir - - $ref: '#/components/schemas/Connectors_create_connector_request_slack_api' - - $ref: >- - #/components/schemas/Connectors_create_connector_request_slack_webhook - - $ref: '#/components/schemas/Connectors_create_connector_request_swimlane' - - $ref: '#/components/schemas/Connectors_create_connector_request_teams' - - $ref: '#/components/schemas/Connectors_create_connector_request_tines' - - $ref: '#/components/schemas/Connectors_create_connector_request_torq' - - $ref: '#/components/schemas/Connectors_create_connector_request_webhook' - - $ref: '#/components/schemas/Connectors_create_connector_request_xmatters' - title: Create connector request body properties - Connectors_create_connector_request_bedrock: - description: >- - The Amazon Bedrock connector uses axios to send a POST request to Amazon - Bedrock. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_bedrock' - connector_type_id: - description: The type of connector. - enum: - - .bedrock - example: .bedrock - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_bedrock' - required: - - config - - connector_type_id - - name - - secrets - title: Create Amazon Bedrock connector request - type: object - Connectors_create_connector_request_cases_webhook: - description: > - The Webhook - Case Management connector uses axios to send POST, PUT, - and GET requests to a case management RESTful API web service. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_cases_webhook' - connector_type_id: - description: The type of connector. - enum: - - .cases-webhook - example: .cases-webhook - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_cases_webhook' - required: - - config - - connector_type_id - - name - title: Create Webhook - Case Managment connector request - type: object - Connectors_create_connector_request_d3security: - description: > - The connector uses axios to send a POST request to a D3 Security - endpoint. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_d3security' - connector_type_id: - description: The type of connector. - enum: - - .d3security - example: .d3security - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_d3security' - required: - - config - - connector_type_id - - name - - secrets - title: Create D3 Security connector request - type: object - Connectors_create_connector_request_email: - description: > - The email connector uses the SMTP protocol to send mail messages, using - an integration of Nodemailer. An exception is Microsoft Exchange, which - uses HTTP protocol for sending emails, Send mail. Email message text is - sent as both plain text and html text. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_email' - connector_type_id: - description: The type of connector. - enum: - - .email - example: .email - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_email' - required: - - config - - connector_type_id - - name - - secrets - title: Create email connector request - type: object - Connectors_create_connector_request_gemini: - description: >- - The Google Gemini connector uses axios to send a POST request to Google - Gemini. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_gemini' - connector_type_id: - description: The type of connector. - enum: - - .gemini - example: .gemini - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_gemini' - required: - - config - - connector_type_id - - name - - secrets - title: Create Google Gemini connector request - type: object - Connectors_create_connector_request_genai: - description: > - The OpenAI connector uses axios to send a POST request to either OpenAI - or Azure OpenAPI. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_genai' - connector_type_id: - description: The type of connector. - enum: - - .gen-ai - example: .gen-ai - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_genai' - required: - - config - - connector_type_id - - name - - secrets - title: Create OpenAI connector request - type: object - Connectors_create_connector_request_index: - description: The index connector indexes a document into Elasticsearch. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_index' - connector_type_id: - description: The type of connector. - enum: - - .index - example: .index - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - required: - - config - - connector_type_id - - name - title: Create index connector request - type: object - Connectors_create_connector_request_jira: - description: The Jira connector uses the REST API v2 to create Jira issues. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_jira' - connector_type_id: - description: The type of connector. - enum: - - .jira - example: .jira - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_jira' - required: - - config - - connector_type_id - - name - - secrets - title: Create Jira connector request - type: object - Connectors_create_connector_request_opsgenie: - description: The Opsgenie connector uses the Opsgenie alert API. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_opsgenie' - connector_type_id: - description: The type of connector. - enum: - - .opsgenie - example: .opsgenie - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_opsgenie' - required: - - config - - connector_type_id - - name - - secrets - title: Create Opsgenie connector request - type: object - Connectors_create_connector_request_pagerduty: - description: > - The PagerDuty connector uses the v2 Events API to trigger, acknowledge, - and resolve PagerDuty alerts. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_pagerduty' - connector_type_id: - description: The type of connector. - enum: - - .pagerduty - example: .pagerduty - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_pagerduty' - required: - - config - - connector_type_id - - name - - secrets - title: Create PagerDuty connector request - type: object - Connectors_create_connector_request_resilient: - description: >- - The IBM Resilient connector uses the RESILIENT REST v2 to create IBM - Resilient incidents. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_resilient' - connector_type_id: - description: The type of connector. - enum: - - .resilient - example: .resilient - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_resilient' - required: - - config - - connector_type_id - - name - - secrets - title: Create IBM Resilient connector request - type: object - Connectors_create_connector_request_sentinelone: - description: > - The SentinelOne connector communicates with SentinelOne Management - Console via REST API. 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. - title: Create SentinelOne connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_sentinelone' - connector_type_id: - description: The type of connector. - enum: - - .sentinelone - example: .sentinelone - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_sentinelone' - required: - - config - - connector_type_id - - name - - secrets - x-technical-preview: true - Connectors_create_connector_request_serverlog: - description: This connector writes an entry to the Kibana server log. - properties: - connector_type_id: - description: The type of connector. - enum: - - .server-log - example: .server-log - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - required: - - connector_type_id - - name - title: Create server log connector request - type: object - Connectors_create_connector_request_servicenow: - description: > - The ServiceNow ITSM connector uses the import set API to create - ServiceNow incidents. You can use the connector for rule actions and - cases. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow' - connector_type_id: - description: The type of connector. - enum: - - .servicenow - example: .servicenow - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' - required: - - config - - connector_type_id - - name - - secrets - title: Create ServiceNow ITSM connector request - type: object - Connectors_create_connector_request_servicenow_itom: - description: > - The ServiceNow ITOM connector uses the event API to create ServiceNow - events. You can use the connector for rule actions. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow_itom' - connector_type_id: - description: The type of connector. - enum: - - .servicenow-itom - example: .servicenow-itom - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' - required: - - config - - connector_type_id - - name - - secrets - title: Create ServiceNow ITOM connector request - type: object - Connectors_create_connector_request_servicenow_sir: - description: > - The ServiceNow SecOps connector uses the import set API to create - ServiceNow security incidents. You can use the connector for rule - actions and cases. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow' - connector_type_id: - description: The type of connector. - enum: - - .servicenow-sir - example: .servicenow-sir - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' - required: - - config - - connector_type_id - - name - - secrets - title: Create ServiceNow SecOps connector request - type: object - Connectors_create_connector_request_slack_api: - description: The Slack connector uses an API method to send Slack messages. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_slack_api' - connector_type_id: - description: The type of connector. - enum: - - .slack_api - example: .slack_api - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_slack_api' - required: - - connector_type_id - - name - - secrets - title: Create Slack connector request - type: object - Connectors_create_connector_request_slack_webhook: - description: The Slack connector uses Slack Incoming Webhooks. - properties: - connector_type_id: - description: The type of connector. - enum: - - .slack - example: .slack - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_slack_webhook' - required: - - connector_type_id - - name - - secrets - title: Create Slack connector request - type: object - Connectors_create_connector_request_swimlane: - description: >- - The Swimlane connector uses the Swimlane REST API to create Swimlane - records. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_swimlane' - connector_type_id: - description: The type of connector. - enum: - - .swimlane - example: .swimlane - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_swimlane' - required: - - config - - connector_type_id - - name - - secrets - title: Create Swimlane connector request - type: object - Connectors_create_connector_request_teams: - description: The Microsoft Teams connector uses Incoming Webhooks. - properties: - connector_type_id: - description: The type of connector. - enum: - - .teams - example: .teams - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_teams' - required: - - connector_type_id - - name - - secrets - title: Create Microsoft Teams connector request - type: object - Connectors_create_connector_request_tines: - description: > - The Tines connector uses Tines Webhook actions to send events via POST - request. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_tines' - connector_type_id: - description: The type of connector. - enum: - - .tines - example: .tines - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_tines' - required: - - config - - connector_type_id - - name - - secrets - title: Create Tines connector request - type: object - Connectors_create_connector_request_torq: - description: > - The Torq connector uses a Torq webhook to trigger workflows with Kibana - actions. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_torq' - connector_type_id: - description: The type of connector. - enum: - - .torq - example: .torq - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_torq' - required: - - config - - connector_type_id - - name - - secrets - title: Create Torq connector request - type: object - Connectors_create_connector_request_webhook: - description: > - The Webhook connector uses axios to send a POST or PUT request to a web - service. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_webhook' - connector_type_id: - description: The type of connector. - enum: - - .webhook - example: .webhook - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_webhook' - required: - - config - - connector_type_id - - name - - secrets - title: Create Webhook connector request - type: object - Connectors_create_connector_request_xmatters: - description: > - The xMatters connector uses the xMatters Workflow for Elastic to send - actionable alerts to on-call xMatters resources. - properties: + - Fleet uninstall tokens +components: + examples: + Connectors_create_email_connector_request: + summary: Create an email connector. + value: config: - $ref: '#/components/schemas/Connectors_config_properties_xmatters' - connector_type_id: - description: The type of connector. - enum: - - .xmatters - example: .xmatters - type: string - name: - description: The display name for the connector. - example: my-connector - type: string + from: tester@example.com + hasAuth: true + host: 'https://example.com' + port: 1025 + secure: false + service: other + connector_type_id: .email + name: email-connector-1 secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_xmatters' - required: - - config - - connector_type_id - - name - - secrets - title: Create xMatters connector request - type: object - Connectors_features: - description: | - The feature that uses the connector. - enum: - - alerting - - cases - - generativeAIForSecurity - - generativeAIForObservability - - generativeAIForSearchPlayground - - siem - - uptime - type: string - Connectors_is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean - Connectors_is_missing_secrets: - description: >- - Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean - Connectors_is_preconfigured: - description: > - Indicates whether it is a preconfigured connector. If true, the `config` - and `is_missing_secrets` properties are omitted from the response. - example: false - type: boolean - Connectors_is_system_action: - description: Indicates whether the connector is used for system actions. - example: false - type: boolean - Connectors_referenced_by_count: - description: > - Indicates the number of saved objects that reference the connector. If - `is_preconfigured` is true, this value is not calculated. This property - is returned only by the get all connectors API. - example: 2 - type: integer - Connectors_secrets_properties_bedrock: - description: Defines secrets for connectors when type is `.bedrock`. - properties: - accessKey: - description: The AWS access key for authentication. - type: string - secret: - description: The AWS secret for authentication. - type: string - required: - - accessKey - - secret - title: Connector secrets properties for an Amazon Bedrock connector - type: object - Connectors_secrets_properties_cases_webhook: - title: Connector secrets properties for Webhook - Case Management connector - type: object - properties: - password: - description: >- - The password for HTTP basic authentication. If `hasAuth` is set to - `true`, this property is required. - type: string - user: - description: >- - The username for HTTP basic authentication. If `hasAuth` is set to - `true`, this property is required. - type: string - Connectors_secrets_properties_d3security: - description: Defines secrets for connectors when type is `.d3security`. - type: object - properties: - token: - description: The D3 Security token. - type: string - required: - - token - title: Connector secrets properties for a D3 Security connector - Connectors_secrets_properties_email: - description: Defines secrets for connectors when type is `.email`. - properties: - clientSecret: - description: > - The Microsoft Exchange Client secret for OAuth 2.0 client - credentials authentication. It must be URL-encoded. If `service` is - `exchange_server`, this property is required. - type: string - password: - description: > - The password for HTTP basic authentication. If `hasAuth` is set to - `true`, this property is required. - type: string - user: - description: > - The username for HTTP basic authentication. If `hasAuth` is set to - `true`, this property is required. - type: string - title: Connector secrets properties for an email connector - type: object - Connectors_secrets_properties_gemini: - description: Defines secrets for connectors when type is `.gemini`. - properties: - credentialsJSON: - description: >- - The service account credentials JSON file. The service account - should have Vertex AI user IAM role assigned to it. - type: string - required: - - credentialsJSON - title: Connector secrets properties for a Google Gemini connector - type: object - Connectors_secrets_properties_genai: - description: Defines secrets for connectors when type is `.gen-ai`. - properties: - apiKey: - description: The OpenAI API key. - type: string - title: Connector secrets properties for an OpenAI connector - type: object - Connectors_secrets_properties_jira: - description: Defines secrets for connectors when type is `.jira`. - type: object - properties: - apiToken: - description: The Jira API authentication token for HTTP basic authentication. - type: string - email: - description: The account email for HTTP Basic authentication. - type: string - required: - - apiToken - - email - title: Connector secrets properties for a Jira connector - Connectors_secrets_properties_opsgenie: - description: Defines secrets for connectors when type is `.opsgenie`. - type: object - properties: - apiKey: - description: The Opsgenie API authentication key for HTTP Basic authentication. - type: string - required: - - apiKey - title: Connector secrets properties for an Opsgenie connector - Connectors_secrets_properties_pagerduty: - description: Defines secrets for connectors when type is `.pagerduty`. - properties: - routingKey: - description: > - A 32 character PagerDuty Integration Key for an integration on a - service. - type: string - required: - - routingKey - title: Connector secrets properties for a PagerDuty connector - type: object - Connectors_secrets_properties_resilient: - description: Defines secrets for connectors when type is `.resilient`. - type: object - properties: - apiKeyId: - description: The authentication key ID for HTTP Basic authentication. - type: string - apiKeySecret: - description: The authentication key secret for HTTP Basic authentication. - type: string - required: - - apiKeyId - - apiKeySecret - title: Connector secrets properties for IBM Resilient connector - Connectors_secrets_properties_sentinelone: - description: Defines secrets for connectors when type is `.sentinelone`. - properties: - token: - description: The A SentinelOne API token. - type: string - required: - - token - title: Connector secrets properties for a SentinelOne connector - type: object - Connectors_secrets_properties_servicenow: + password: password + user: username + Connectors_create_email_connector_response: + summary: A new email connector. + value: + config: + clientId: null + from: tester@example.com + hasAuth: true + host: 'https://example.com' + oauthTokenUrl: null + port: 1025 + secure: false + service: other + tenantId: null + connector_type_id: .email + id: 90a82c60-478f-11ee-a343-f98a117c727f + is_deprecated: false + is_missing_secrets: false + is_preconfigured: false + is_system_action: false + name: email-connector-1 + Connectors_create_index_connector_request: + summary: Create an index connector. + value: + config: + index: test-index + connector_type_id: .index + name: my-connector + Connectors_create_index_connector_response: + summary: A new index connector. + value: + config: + executionTimeField: null + index: test-index + refresh: false + connector_type_id: .index + id: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + is_deprecated: false + is_missing_secrets: false + is_preconfigured: false + is_system_action: false + name: my-connector + Connectors_create_webhook_connector_request: + summary: Create a webhook connector with SSL authentication. + value: + config: + authType: webhook-authentication-ssl + certType: ssl-crt-key + method: post + url: 'https://example.com' + connector_type_id: .webhook + name: my-webhook-connector + secrets: + crt: QmFnIEF0dH... + key: LS0tLS1CRUdJ... + password: my-passphrase + Connectors_create_webhook_connector_response: + summary: A new webhook connector. + value: + config: + authType: webhook-authentication-ssl + certType: ssl-crt-key + hasAuth: true + headers: null + method: post + url: 'https://example.com' + verificationMode: full + connector_type_id: .webhook + id: 900eb010-3b9d-11ee-a642-8ffbb94e38bd + is_deprecated: false + is_missing_secrets: false + is_preconfigured: false + is_system_action: false + name: my-webhook-connector + Connectors_create_xmatters_connector_request: + summary: Create an xMatters connector with URL authentication. + value: + config: + usesBasic: false + connector_type_id: .xmatters + name: my-xmatters-connector + secrets: + secretsUrl: 'https://example.com?apiKey=xxxxx' + Connectors_create_xmatters_connector_response: + summary: A new xMatters connector. + value: + config: + configUrl: null + usesBasic: false + connector_type_id: .xmatters + id: 4d2d8da0-4d1f-11ee-9367-577408be4681 + is_deprecated: false + is_missing_secrets: false + is_preconfigured: false + is_system_action: false + name: my-xmatters-connector + Connectors_get_connector_response: + summary: Get connector details. + value: + config: {} + connector_type_id: .server-log + id: df770e30-8b8b-11ed-a780-3b746c987a81 + is_deprecated: false + is_missing_secrets: false + is_preconfigured: false + is_system_action: false + name: my_server_log_connector + Connectors_get_connector_types_generativeai_response: + summary: A list of connector types for the `generativeAI` feature. + value: + - enabled: true + enabled_in_config: true + enabled_in_license: true + id: .gen-ai + is_system_action_type: false + minimum_license_required: enterprise + name: OpenAI + supported_feature_ids: + - generativeAIForSecurity + - generativeAIForObservability + - generativeAIForSearchPlayground + - enabled: true + enabled_in_config: true + enabled_in_license: true + id: .bedrock + is_system_action_type: false + minimum_license_required: enterprise + name: AWS Bedrock + supported_feature_ids: + - generativeAIForSecurity + - generativeAIForObservability + - generativeAIForSearchPlayground + - enabled: true + enabled_in_config: true + enabled_in_license: true + id: .gemini + is_system_action_type: false + minimum_license_required: enterprise + name: Google Gemini + supported_feature_ids: + - generativeAIForSecurity + Connectors_get_connectors_response: + summary: A list of connectors + value: + - connector_type_id: .email + id: preconfigured-email-connector + is_deprecated: false + is_preconfigured: true + is_system_action: false + name: my-preconfigured-email-notification + referenced_by_count: 0 + - config: + executionTimeField: null + index: test-index + refresh: false + connector_type_id: .index + id: e07d0c80-8b8b-11ed-a780-3b746c987a81 + is_deprecated: false + is_missing_secrets: false + is_preconfigured: false + is_system_action: false + name: my-index-connector + referenced_by_count: 2 + Connectors_update_index_connector_request: + summary: Update an index connector. + value: + config: + index: updated-index + name: updated-connector + Data_views_create_data_view_request: + summary: Create a data view with runtime fields. + value: + data_view: + name: My Logstash data view + runtimeFieldMap: + runtime_shape_name: + script: + source: 'emit(doc[''shape_name''].value)' + type: keyword + title: logstash-* + Data_views_create_runtime_field_request: + summary: Create a runtime field. + value: + name: runtimeFoo + runtimeField: + script: + source: 'emit(doc["foo"].value)' + type: long + Data_views_get_data_view_response: + summary: >- + The get data view API returns a JSON object that contains information + about the data view. + value: + data_view: + allowNoIndex: false + fieldAttrs: + products.manufacturer: + count: 1 + products.price: + count: 1 + products.product_name: + count: 1 + total_quantity: + count: 1 + fieldFormats: + products.base_price: + id: number + params: + pattern: '$0,0.00' + products.base_unit_price: + id: number + params: + pattern: '$0,0.00' + products.min_price: + id: number + params: + pattern: '$0,0.00' + products.price: + id: number + params: + pattern: '$0,0.00' + products.taxful_price: + id: number + params: + pattern: '$0,0.00' + products.taxless_price: + id: number + params: + pattern: '$0,0.00' + taxful_total_price: + id: number + params: + pattern: '$0,0.[00]' + taxless_total_price: + id: number + params: + pattern: '$0,0.00' + fields: + _id: + aggregatable: false + count: 0 + esTypes: + - _id + format: + id: string + isMapped: true + name: _id + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + _index: + aggregatable: true + count: 0 + esTypes: + - _index + format: + id: string + isMapped: true + name: _index + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + _score: + aggregatable: false + count: 0 + format: + id: number + isMapped: true + name: _score + readFromDocValues: false + scripted: false + searchable: false + shortDotsEnable: false + type: number + _source: + aggregatable: false + count: 0 + esTypes: + - _source + format: + id: _source + isMapped: true + name: _source + readFromDocValues: false + scripted: false + searchable: false + shortDotsEnable: false + type: _source + category: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: category + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + category.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: category.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: category + type: string + currency: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: currency + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + customer_birth_date: + aggregatable: true + count: 0 + esTypes: + - date + format: + id: date + isMapped: true + name: customer_birth_date + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: date + customer_first_name: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: customer_first_name + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + customer_first_name.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: customer_first_name.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: customer_first_name + type: string + customer_full_name: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: customer_full_name + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + customer_full_name.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: customer_full_name.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: customer_full_name + type: string + customer_gender: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: customer_gender + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + customer_id: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: customer_id + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + customer_last_name: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: customer_last_name + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + customer_last_name.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: customer_last_name.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: customer_last_name + type: string + customer_phone: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: customer_phone + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + day_of_week: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: day_of_week + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + day_of_week_i: + aggregatable: true + count: 0 + esTypes: + - integer + format: + id: number + isMapped: true + name: day_of_week_i + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + email: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: email + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + event.dataset: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: event.dataset + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + geoip.city_name: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: geoip.city_name + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + geoip.continent_name: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: geoip.continent_name + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + geoip.country_iso_code: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: geoip.country_iso_code + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + geoip.location: + aggregatable: true + count: 0 + esTypes: + - geo_point + format: + id: geo_point + params: + transform: wkt + isMapped: true + name: geoip.location + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: geo_point + geoip.region_name: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: geoip.region_name + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + manufacturer: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: manufacturer + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + manufacturer.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: manufacturer.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: manufacturer + type: string + order_date: + aggregatable: true + count: 0 + esTypes: + - date + format: + id: date + isMapped: true + name: order_date + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: date + order_id: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: order_id + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + products._id: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: products._id + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + products._id.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: products._id.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: products._id + type: string + products.base_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: products.base_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.base_unit_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: products.base_unit_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.category: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: products.category + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + products.category.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: products.category.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: products.category + type: string + products.created_on: + aggregatable: true + count: 0 + esTypes: + - date + format: + id: date + isMapped: true + name: products.created_on + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: date + products.discount_amount: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + isMapped: true + name: products.discount_amount + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.discount_percentage: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + isMapped: true + name: products.discount_percentage + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.manufacturer: + aggregatable: false + count: 1 + esTypes: + - text + format: + id: string + isMapped: true + name: products.manufacturer + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + products.manufacturer.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: products.manufacturer.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: products.manufacturer + type: string + products.min_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: products.min_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.price: + aggregatable: true + count: 1 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: products.price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.product_id: + aggregatable: true + count: 0 + esTypes: + - long + format: + id: number + isMapped: true + name: products.product_id + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.product_name: + aggregatable: false + count: 1 + esTypes: + - text + format: + id: string + isMapped: true + name: products.product_name + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + products.product_name.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: products.product_name.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: products.product_name + type: string + products.quantity: + aggregatable: true + count: 0 + esTypes: + - integer + format: + id: number + isMapped: true + name: products.quantity + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.sku: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: products.sku + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + products.tax_amount: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + isMapped: true + name: products.tax_amount + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.taxful_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: products.taxful_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.taxless_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: products.taxless_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.unit_discount_amount: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + isMapped: true + name: products.unit_discount_amount + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + sku: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: sku + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + taxful_total_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.[00]' + isMapped: true + name: taxful_total_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + taxless_total_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: taxless_total_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + total_quantity: + aggregatable: true + count: 1 + esTypes: + - integer + format: + id: number + isMapped: true + name: total_quantity + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + total_unique_products: + aggregatable: true + count: 0 + esTypes: + - integer + format: + id: number + isMapped: true + name: total_unique_products + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + type: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: type + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + user: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: user + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + id: ff959d40-b880-11e8-a6d9-e546fe2bba5f + name: Kibana Sample Data eCommerce + namespaces: + - default + runtimeFieldMap: {} + sourceFilters: [] + timeFieldName: order_date + title: kibana_sample_data_ecommerce + typeMeta: {} + version: WzUsMV0= + Data_views_get_data_views_response: + summary: The get all data views API returns a list of data views. + value: + data_view: + - id: ff959d40-b880-11e8-a6d9-e546fe2bba5f + name: Kibana Sample Data eCommerce + namespaces: + - default + title: kibana_sample_data_ecommerce + typeMeta: {} + - id: d3d7af60-4c81-11e8-b3d7-01146121b73d + name: Kibana Sample Data Flights + namespaces: + - default + title: kibana_sample_data_flights + - id: 90943e30-9a47-11e8-b64d-95841ca0b247 + name: Kibana Sample Data Logs + namespaces: + - default + title: kibana_sample_data_logs + Data_views_get_default_data_view_response: + summary: The get default data view API returns the default data view identifier. + value: + data_view_id: ff959d40-b880-11e8-a6d9-e546fe2bba5f + Data_views_get_runtime_field_response: + summary: >- + The get runtime field API returns a JSON object that contains + information about the runtime field (`hour_of_day`) and the data view + (`d3d7af60-4c81-11e8-b3d7-01146121b73d`). + value: + data_view: + allowNoIndex: false + fieldAttrs: {} + fieldFormats: + AvgTicketPrice: + id: number + params: + pattern: '$0,0.[00]' + hour_of_day: + id: number + params: + pattern: '00' + fields: + _id: + aggregatable: false + count: 0 + esTypes: + - _id + format: + id: string + isMapped: true + name: _id + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + _index: + aggregatable: true + count: 0 + esTypes: + - _index + format: + id: string + isMapped: true + name: _index + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + _score: + aggregatable: false + count: 0 + format: + id: number + isMapped: true + name: _score + readFromDocValues: false + scripted: false + searchable: false + shortDotsEnable: false + type: number + _source: + aggregatable: false + count: 0 + esTypes: + - _source + format: + id: _source + isMapped: true + name: _source + readFromDocValues: false + scripted: false + searchable: false + shortDotsEnable: false + type: _source + AvgTicketPrice: + aggregatable: true + count: 0 + esTypes: + - float + format: + id: number + params: + pattern: '$0,0.[00]' + isMapped: true + name: AvgTicketPrice + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + Cancelled: + aggregatable: true + count: 0 + esTypes: + - boolean + format: + id: boolean + isMapped: true + name: Cancelled + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: boolean + Carrier: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: Carrier + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + dayOfWeek: + aggregatable: true + count: 0 + esTypes: + - integer + format: + id: number + isMapped: true + name: dayOfWeek + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + Dest: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: Dest + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + DestAirportID: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: DestAirportID + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + DestCityName: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: DestCityName + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + DestCountry: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: DestCountry + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + DestLocation: + aggregatable: true + count: 0 + esTypes: + - geo_point + format: + id: geo_point + params: + transform: wkt + isMapped: true + name: DestLocation + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: geo_point + DestRegion: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: DestRegion + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + DestWeather: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: DestWeather + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + DistanceKilometers: + aggregatable: true + count: 0 + esTypes: + - float + format: + id: number + isMapped: true + name: DistanceKilometers + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + DistanceMiles: + aggregatable: true + count: 0 + esTypes: + - float + format: + id: number + isMapped: true + name: DistanceMiles + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + FlightDelay: + aggregatable: true + count: 0 + esTypes: + - boolean + format: + id: boolean + isMapped: true + name: FlightDelay + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: boolean + FlightDelayMin: + aggregatable: true + count: 0 + esTypes: + - integer + format: + id: number + isMapped: true + name: FlightDelayMin + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + FlightDelayType: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: FlightDelayType + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + FlightNum: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: FlightNum + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + FlightTimeHour: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: FlightTimeHour + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + FlightTimeMin: + aggregatable: true + count: 0 + esTypes: + - float + format: + id: number + isMapped: true + name: FlightTimeMin + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + hour_of_day: + aggregatable: true + count: 0 + esTypes: + - long + format: + id: number + params: + pattern: '00' + name: hour_of_day + readFromDocValues: false + runtimeField: + script: + source: 'emit(doc[''timestamp''].value.getHour());' + type: long + scripted: false + searchable: true + shortDotsEnable: false + type: number + Origin: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: Origin + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + OriginAirportID: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: OriginAirportID + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + OriginCityName: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: OriginCityName + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + OriginCountry: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: OriginCountry + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + OriginLocation: + aggregatable: true + count: 0 + esTypes: + - geo_point + format: + id: geo_point + params: + transform: wkt + isMapped: true + name: OriginLocation + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: geo_point + OriginRegion: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: OriginRegion + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + OriginWeather: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: OriginWeather + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + timestamp: + aggregatable: true + count: 0 + esTypes: + - date + format: + id: date + isMapped: true + name: timestamp + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: date + id: d3d7af60-4c81-11e8-b3d7-01146121b73d + name: Kibana Sample Data Flights + runtimeFieldMap: + hour_of_day: + script: + source: 'emit(doc[''timestamp''].value.getHour());' + type: long + sourceFilters: [] + timeFieldName: timestamp + title: kibana_sample_data_flights + version: WzM2LDJd + fields: + - aggregatable: true + count: 0 + esTypes: + - long + name: hour_of_day + readFromDocValues: false + runtimeField: + script: + source: 'emit(doc[''timestamp''].value.getHour());' + type: long + scripted: false + searchable: true + shortDotsEnable: false + type: number + Data_views_preview_swap_data_view_request: + summary: Preview swapping references from data view ID "abcd-efg" to "xyz-123". + value: + fromId: abcd-efg + toId: xyz-123 + Data_views_set_default_data_view_request: + summary: Set the default data view identifier. + value: + data_view_id: ff959d40-b880-11e8-a6d9-e546fe2bba5f + force: true + Data_views_swap_data_view_request: + summary: >- + Swap references from data view ID "abcd-efg" to "xyz-123" and remove the + data view that is no longer referenced. + value: + delete: true + fromId: abcd-efg + toId: xyz-123 + Data_views_update_data_view_request: + summary: Update some properties for a data view. + value: + data_view: + allowNoIndex: false + name: Kibana Sample Data eCommerce + timeFieldName: order_date + title: kibana_sample_data_ecommerce + refresh_fields: true + Data_views_update_field_metadata_request: + summary: Update metadata for multiple fields. + value: + fields: + field1: + count: 123 + customLabel: Field 1 label + field2: + customDescription: Field 2 description + customLabel: Field 2 label + Data_views_update_runtime_field_request: + summary: Update an existing runtime field on a data view. + value: + runtimeField: + script: + source: 'emit(doc["bar"].value)' + Machine_learning_APIs_mlSyncExample: + summary: Two anomaly detection jobs required synchronization in this example. + value: + datafeedsAdded: {} + datafeedsRemoved: {} + savedObjectsCreated: + anomaly-detector: + myjob1: + success: true + myjob2: + success: true + savedObjectsDeleted: {} + Serverless_saved_objects_export_objects_request: + summary: Export a specific saved object. + value: + excludeExportDetails: true + includeReferencesDeep: false + objects: + - id: de71f4f0-1902-11e9-919b-ffe5949a18d2 + type: map + Serverless_saved_objects_export_objects_response: + summary: >- + The export objects API response contains a JSON record for each exported + object. + value: + attributes: + description: '' + layerListJSON: >- + [{"id":"0hmz5","alpha":1,"sourceDescriptor":{"type":"EMS_TMS","isAutoSelect":true,"lightModeDefault":"road_map_desaturated"},"visible":true,"style":{},"type":"EMS_VECTOR_TILE","minZoom":0,"maxZoom":24},{"id":"edh66","label":"Total + Requests by + Destination","minZoom":0,"maxZoom":24,"alpha":0.5,"sourceDescriptor":{"type":"EMS_FILE","id":"world_countries","tooltipProperties":["name","iso2"]},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"DYNAMIC","options":{"field":{"name":"__kbnjoin__count__673ff994-fc75-4c67-909b-69fcb0e1060e","origin":"join"},"color":"Greys","fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"lineColor":{"type":"STATIC","options":{"color":"#FFFFFF"}},"lineWidth":{"type":"STATIC","options":{"size":1}},"iconSize":{"type":"STATIC","options":{"size":10}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR","joins":[{"leftField":"iso2","right":{"type":"ES_TERM_SOURCE","id":"673ff994-fc75-4c67-909b-69fcb0e1060e","indexPatternTitle":"kibana_sample_data_logs","term":"geo.dest","indexPatternRefName":"layer_1_join_0_index_pattern","metrics":[{"type":"count","label":"web + logs + count"}],"applyGlobalQuery":true}}]},{"id":"gaxya","label":"Actual + Requests","minZoom":9,"maxZoom":24,"alpha":1,"sourceDescriptor":{"id":"b7486535-171b-4d3b-bb2e-33c1a0a2854c","type":"ES_SEARCH","geoField":"geo.coordinates","limit":2048,"filterByMapBounds":true,"tooltipProperties":["clientip","timestamp","host","request","response","machine.os","agent","bytes"],"indexPatternRefName":"layer_2_source_index_pattern","applyGlobalQuery":true,"scalingType":"LIMIT"},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"STATIC","options":{"color":"#2200ff"}},"lineColor":{"type":"STATIC","options":{"color":"#FFFFFF"}},"lineWidth":{"type":"STATIC","options":{"size":2}},"iconSize":{"type":"DYNAMIC","options":{"field":{"name":"bytes","origin":"source"},"minSize":1,"maxSize":23,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR"},{"id":"tfi3f","label":"Total + Requests and + Bytes","minZoom":0,"maxZoom":9,"alpha":1,"sourceDescriptor":{"type":"ES_GEO_GRID","resolution":"COARSE","id":"8aaa65b5-a4e9-448b-9560-c98cb1c5ac5b","geoField":"geo.coordinates","requestType":"point","metrics":[{"type":"count","label":"web + logs + count"},{"type":"sum","field":"bytes"}],"indexPatternRefName":"layer_3_source_index_pattern","applyGlobalQuery":true},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"color":"Blues","fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"lineColor":{"type":"STATIC","options":{"color":"#cccccc"}},"lineWidth":{"type":"STATIC","options":{"size":1}},"iconSize":{"type":"DYNAMIC","options":{"field":{"name":"sum_of_bytes","origin":"source"},"minSize":7,"maxSize":25,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"labelText":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"labelSize":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"minSize":12,"maxSize":24,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR"}] + mapStateJSON: >- + {"zoom":3.64,"center":{"lon":-88.92107,"lat":42.16337},"timeFilters":{"from":"now-7d","to":"now"},"refreshConfig":{"isPaused":true,"interval":0},"query":{"language":"kuery","query":""},"settings":{"autoFitToDataBounds":false}} + title: '[Logs] Total Requests and Bytes' + uiStateJSON: '{"isDarkMode":false}' + coreMigrationVersion: 8.8.0 + created_at: '2023-08-23T20:03:32.204Z' + id: de71f4f0-1902-11e9-919b-ffe5949a18d2 + managed: false + references: + - id: 90943e30-9a47-11e8-b64d-95841ca0b247 + name: layer_1_join_0_index_pattern + type: index-pattern + - id: 90943e30-9a47-11e8-b64d-95841ca0b247 + name: layer_2_source_index_pattern + type: index-pattern + - id: 90943e30-9a47-11e8-b64d-95841ca0b247 + name: layer_3_source_index_pattern + type: index-pattern + type: map + typeMigrationVersion: 8.4.0 + updated_at: '2023-08-23T20:03:32.204Z' + version: WzEzLDFd + Serverless_saved_objects_import_objects_request: + value: + file: file.ndjson + Serverless_saved_objects_import_objects_response: + summary: >- + The import objects API response indicates a successful import and the + objects are created. Since these objects are created as new copies, each + entry in the successResults array includes a destinationId attribute. + value: + success: true + successCount: 1 + successResults: + - destinationId: 82d2760c-468f-49cf-83aa-b9a35b6a8943 + id: 90943e30-9a47-11e8-b64d-95841ca0b247 + managed: false + meta: + icon: indexPatternApp + title: Kibana Sample Data Logs + type: index-pattern + parameters: + Connectors_connector_id: + description: An identifier for the connector. + in: path + name: connectorId + required: true + schema: + example: df770e30-8b8b-11ed-a780-3b746c987a81 + type: string + Connectors_kbn_xsrf: + description: Cross-site request forgery protection + in: header + name: kbn-xsrf + required: true + schema: + type: string + Data_views_field_name: + description: The name of the runtime field. + in: path + name: fieldName + required: true + schema: + example: hour_of_day + type: string + Data_views_kbn_xsrf: + description: Cross-site request forgery protection + in: header + name: kbn-xsrf + required: true + schema: + type: string + Data_views_view_id: + description: An identifier for the data view. + in: path + name: viewId + required: true + schema: + example: ff959d40-b880-11e8-a6d9-e546fe2bba5f + type: string + Fleet_format: + description: Simplified or legacy format for package inputs + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + Fleet_kbn_xsrf: + description: Kibana's anti Cross-Site Request Forgery token. Can be any string value. + in: header + name: kbn-xsrf + required: true + schema: + type: string + Fleet_kuery: + in: query + name: kuery + required: false + schema: + type: string + Fleet_page_index: + in: query + name: page + required: false + schema: + default: 1 + type: integer + Fleet_page_size: + description: The number of items to return + in: query + name: perPage + required: false + schema: + default: 20 + type: integer + Fleet_show_inactive: + in: query + name: showInactive + required: false + schema: + type: boolean + Fleet_show_upgradeable: + in: query + name: showUpgradeable + required: false + schema: + type: boolean + Fleet_sort_field: + in: query + name: sortField + required: false + schema: + deprecated: true + type: string + Fleet_sort_order: + in: query + name: sortOrder + required: false + schema: + enum: + - asc + - desc + type: string + Fleet_with_metrics: + description: 'Return agent metrics, false by default' + in: query + name: withMetrics + required: false + schema: + type: boolean + Machine_learning_APIs_simulateParam: description: >- - Defines secrets for connectors when type is `.servicenow`, - `.servicenow-sir`, or `.servicenow-itom`. - properties: - clientSecret: - description: >- - The client secret assigned to your OAuth application. This property - is required when `isOAuth` is `true`. - type: string - password: - description: >- - The password for HTTP basic authentication. This property is - required when `isOAuth` is `false`. - type: string - privateKey: - description: >- - The RSA private key that you created for use in ServiceNow. This - property is required when `isOAuth` is `true`. - type: string - privateKeyPassword: - description: >- - The password for the RSA private key. This property is required when - `isOAuth` is `true` and you set a password on your private key. - type: string - username: - description: >- - The username for HTTP basic authentication. This property is - required when `isOAuth` is `false`. - type: string - title: >- - Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and - ServiceNow SecOps connectors - type: object - Connectors_secrets_properties_slack_api: - description: Defines secrets for connectors when type is `.slack`. - type: object - properties: - token: - description: Slack bot user OAuth token. - type: string - required: - - token - title: Connector secrets properties for a Web API Slack connector - Connectors_secrets_properties_slack_webhook: - description: Defines secrets for connectors when type is `.slack`. - type: object - properties: - webhookUrl: - description: Slack webhook url. - type: string - required: - - webhookUrl - title: Connector secrets properties for a Webhook Slack connector - Connectors_secrets_properties_swimlane: - description: Defines secrets for connectors when type is `.swimlane`. - properties: - apiToken: - description: Swimlane API authentication token. - type: string - title: Connector secrets properties for a Swimlane connector - type: object - Connectors_secrets_properties_teams: - description: Defines secrets for connectors when type is `.teams`. - properties: - webhookUrl: - description: > - The URL of the incoming webhook. If you are using the - `xpack.actions.allowedHosts` setting, add the hostname to the - allowed hosts. - type: string - required: - - webhookUrl - title: Connector secrets properties for a Microsoft Teams connector - type: object - Connectors_secrets_properties_tines: - description: Defines secrets for connectors when type is `.tines`. - properties: - email: - description: The email used to sign in to Tines. - type: string - token: - description: The Tines API token. - type: string - required: - - email - - token - title: Connector secrets properties for a Tines connector - type: object - Connectors_secrets_properties_torq: - description: Defines secrets for connectors when type is `.torq`. - properties: - token: - description: The secret of the webhook authentication header. - type: string - required: - - token - title: Connector secrets properties for a Torq connector - type: object - Connectors_secrets_properties_webhook: - description: Defines secrets for connectors when type is `.webhook`. - properties: - crt: - description: >- - If `authType` is `webhook-authentication-ssl` and `certType` is - `ssl-crt-key`, it is a base64 encoded version of the CRT or CERT - file. - type: string - key: - description: >- - If `authType` is `webhook-authentication-ssl` and `certType` is - `ssl-crt-key`, it is a base64 encoded version of the KEY file. - type: string - password: - description: > - The password for HTTP basic authentication or the passphrase for the - SSL certificate files. If `hasAuth` is set to `true` and `authType` - is `webhook-authentication-basic`, this property is required. - type: string - pfx: - description: >- - If `authType` is `webhook-authentication-ssl` and `certType` is - `ssl-pfx`, it is a base64 encoded version of the PFX or P12 file. + When true, simulates the synchronization by returning only the list of + actions that would be performed. + example: 'true' + in: query + name: simulate + required: false + schema: + type: boolean + Serverless_saved_objects_kbn_xsrf: + description: Cross-site request forgery protection + in: header + name: kbn-xsrf + required: true + schema: + type: string + SLOs_kbn_xsrf: + description: Cross-site request forgery protection + in: header + name: kbn-xsrf + required: true + schema: + type: string + SLOs_slo_id: + description: An identifier for the slo. + in: path + name: sloId + required: true + schema: + example: 9c235211-6834-11ea-a78c-6feb38a34414 + type: string + SLOs_space_id: + description: >- + An identifier for the space. If `/s/` and the identifier are omitted + from the path, the default space is used. + in: path + name: spaceId + required: true + schema: + example: default + type: string + responses: + Connectors_401: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + properties: + error: + enum: + - Unauthorized + example: Unauthorized + type: string + message: + type: string + statusCode: + enum: + - 401 + example: 401 + type: integer + title: Unauthorized response + type: object + description: Authorization information is missing or invalid. + Connectors_404: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + properties: + error: + enum: + - Not Found + example: Not Found + type: string + message: + example: >- + Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not + found + type: string + statusCode: + enum: + - 404 + example: 404 + type: integer + title: Not found response + type: object + description: Object is not found. + Fleet_error: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + description: Generic Error + schemas: + Connectors_config_properties_bedrock: + description: Defines properties for connectors when type is `.bedrock`. + properties: + apiUrl: + description: The Amazon Bedrock request URL. type: string - user: + defaultModel: + default: 'anthropic.claude-3-5-sonnet-20240620-v1:0' description: > - The username for HTTP basic authentication. If `hasAuth` is set to - `true` and `authType` is `webhook-authentication-basic`, this - property is required. + The generative artificial intelligence model for Amazon Bedrock to + use. Current support is for the Anthropic Claude models. type: string - title: Connector secrets properties for a Webhook connector + required: + - apiUrl + title: Connector request properties for an Amazon Bedrock connector + type: object + Connectors_config_properties_cases_webhook: + description: Defines properties for connectors when type is `.cases-webhook`. type: object - Connectors_secrets_properties_xmatters: - description: Defines secrets for connectors when type is `.xmatters`. properties: - password: + createCommentJson: description: > - A user name for HTTP basic authentication. It is applicable only - when `usesBasic` is `true`. + A JSON payload sent to the create comment URL to create a case + comment. You can use variables to add Kibana Cases data to the + payload. The required variable is `case.comment`. Due to Mustache + template variables (the text enclosed in triple braces, for example, + `{{{case.title}}}`), the JSON is not validated when you create the + connector. The JSON is validated once the Mustache variables have + been placed when the REST method runs. Manually ensure that the JSON + is valid, disregarding the Mustache variables, so the later + validation will pass. + example: '{"body": {{{case.comment}}}}' type: string - secretsUrl: + createCommentMethod: + default: put description: > - The request URL for the Elastic Alerts trigger in xMatters with the - API key included in the URL. It is applicable only when `usesBasic` - is `false`. + The REST API HTTP request method to create a case comment in the + third-party system. Valid values are `patch`, `post`, and `put`. + enum: + - patch + - post + - put type: string - user: + createCommentUrl: description: > - A password for HTTP basic authentication. It is applicable only when - `usesBasic` is `true`. - type: string - title: Connector secrets properties for an xMatters connector - type: object - Connectors_update_connector_request: - description: The properties vary depending on the connector type. - oneOf: - - $ref: '#/components/schemas/Connectors_update_connector_request_bedrock' - - $ref: '#/components/schemas/Connectors_update_connector_request_gemini' - - $ref: >- - #/components/schemas/Connectors_update_connector_request_cases_webhook - - $ref: '#/components/schemas/Connectors_update_connector_request_d3security' - - $ref: '#/components/schemas/Connectors_update_connector_request_email' - - $ref: '#/components/schemas/Connectors_create_connector_request_genai' - - $ref: '#/components/schemas/Connectors_update_connector_request_index' - - $ref: '#/components/schemas/Connectors_update_connector_request_jira' - - $ref: '#/components/schemas/Connectors_update_connector_request_opsgenie' - - $ref: '#/components/schemas/Connectors_update_connector_request_pagerduty' - - $ref: '#/components/schemas/Connectors_update_connector_request_resilient' - - $ref: '#/components/schemas/Connectors_update_connector_request_sentinelone' - - $ref: '#/components/schemas/Connectors_update_connector_request_serverlog' - - $ref: '#/components/schemas/Connectors_update_connector_request_servicenow' - - $ref: >- - #/components/schemas/Connectors_update_connector_request_servicenow_itom - - $ref: '#/components/schemas/Connectors_update_connector_request_slack_api' - - $ref: >- - #/components/schemas/Connectors_update_connector_request_slack_webhook - - $ref: '#/components/schemas/Connectors_update_connector_request_swimlane' - - $ref: '#/components/schemas/Connectors_update_connector_request_teams' - - $ref: '#/components/schemas/Connectors_update_connector_request_tines' - - $ref: '#/components/schemas/Connectors_update_connector_request_torq' - - $ref: '#/components/schemas/Connectors_update_connector_request_webhook' - - $ref: '#/components/schemas/Connectors_update_connector_request_xmatters' - title: Update connector request body properties - Connectors_update_connector_request_bedrock: - title: Update Amazon Bedrock connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_bedrock' - name: - description: The display name for the connector. - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_bedrock' - required: - - config - - name - Connectors_update_connector_request_cases_webhook: - title: Update Webhook - Case Managment connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_cases_webhook' - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_cases_webhook' - required: - - config - - name - Connectors_update_connector_request_d3security: - title: Update D3 Security connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_d3security' - name: - description: The display name for the connector. + The REST API URL to create a case comment by ID in the third-party + system. You can use a variable to add the external system ID to the + URL. If you are using the `xpack.actions.allowedHosts setting`, add + the hostname to the allowed hosts. + example: 'https://example.com/issue/{{{external.system.id}}}/comment' type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_d3security' - required: - - config - - name - - secrets - Connectors_update_connector_request_email: - title: Update email connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_email' - name: - description: The display name for the connector. + createIncidentJson: + description: > + A JSON payload sent to the create case URL to create a case. You can + use variables to add case data to the payload. Required variables + are `case.title` and `case.description`. Due to Mustache template + variables (which is the text enclosed in triple braces, for example, + `{{{case.title}}}`), the JSON is not validated when you create the + connector. The JSON is validated after the Mustache variables have + been placed when REST method runs. Manually ensure that the JSON is + valid to avoid future validation errors; disregard Mustache + variables during your review. + example: >- + {"fields": {"summary": {{{case.title}}},"description": + {{{case.description}}},"labels": {{{case.tags}}}}} type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_email' - required: - - config - - name - Connectors_update_connector_request_gemini: - title: Update Google Gemini connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_gemini' - name: - description: The display name for the connector. + createIncidentMethod: + default: post + description: > + The REST API HTTP request method to create a case in the third-party + system. Valid values are `patch`, `post`, and `put`. + enum: + - patch + - post + - put type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_gemini' - required: - - config - - name - Connectors_update_connector_request_index: - title: Update index connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_index' - name: - description: The display name for the connector. + createIncidentResponseKey: + description: >- + The JSON key in the create external case response that contains the + case ID. type: string - required: - - config - - name - Connectors_update_connector_request_jira: - title: Update Jira connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_jira' - name: - description: The display name for the connector. + createIncidentUrl: + description: > + The REST API URL to create a case in the third-party system. If you + are using the `xpack.actions.allowedHosts` setting, add the hostname + to the allowed hosts. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_jira' - required: - - config - - name - - secrets - Connectors_update_connector_request_opsgenie: - title: Update Opsgenie connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_opsgenie' - name: - description: The display name for the connector. + getIncidentResponseExternalTitleKey: + description: >- + The JSON key in get external case response that contains the case + title. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_opsgenie' - required: - - config - - name - - secrets - Connectors_update_connector_request_pagerduty: - title: Update PagerDuty connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_pagerduty' - name: - description: The display name for the connector. + getIncidentUrl: + description: > + The REST API URL to get the case by ID from the third-party system. + If you are using the `xpack.actions.allowedHosts` setting, add the + hostname to the allowed hosts. You can use a variable to add the + external system ID to the URL. Due to Mustache template variables + (the text enclosed in triple braces, for example, + `{{{case.title}}}`), the JSON is not validated when you create the + connector. The JSON is validated after the Mustache variables have + been placed when REST method runs. Manually ensure that the JSON is + valid, disregarding the Mustache variables, so the later validation + will pass. + example: 'https://example.com/issue/{{{external.system.id}}}' type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_pagerduty' - required: - - config - - name - - secrets - Connectors_update_connector_request_resilient: - title: Update IBM Resilient connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_resilient' - name: - description: The display name for the connector. + hasAuth: + default: true + description: >- + If true, a username and password for login type authentication must + be provided. + type: boolean + headers: + description: > + A set of key-value pairs sent as headers with the request URLs for + the create case, update case, get case, and create comment methods. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_resilient' - required: - - config - - name - - secrets - Connectors_update_connector_request_sentinelone: - title: Update SentinelOne connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_sentinelone' - name: - description: The display name for the connector. + updateIncidentJson: + description: > + The JSON payload sent to the update case URL to update the case. You + can use variables to add Kibana Cases data to the payload. Required + variables are `case.title` and `case.description`. Due to Mustache + template variables (which is the text enclosed in triple braces, for + example, `{{{case.title}}}`), the JSON is not validated when you + create the connector. The JSON is validated after the Mustache + variables have been placed when REST method runs. Manually ensure + that the JSON is valid to avoid future validation errors; disregard + Mustache variables during your review. + example: >- + {"fields": {"summary": {{{case.title}}},"description": + {{{case.description}}},"labels": {{{case.tags}}}}} type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_sentinelone' - required: - - config - - name - - secrets - Connectors_update_connector_request_serverlog: - title: Update server log connector request - type: object - properties: - name: - description: The display name for the connector. + updateIncidentMethod: + default: put + description: > + The REST API HTTP request method to update the case in the + third-party system. Valid values are `patch`, `post`, and `put`. + enum: + - patch + - post + - put type: string - required: - - name - Connectors_update_connector_request_servicenow: - title: Update ServiceNow ITSM connector or ServiceNow SecOps request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow' - name: - description: The display name for the connector. + updateIncidentUrl: + description: > + The REST API URL to update the case by ID in the third-party system. + You can use a variable to add the external system ID to the URL. If + you are using the `xpack.actions.allowedHosts` setting, add the + hostname to the allowed hosts. + example: 'https://example.com/issue/{{{external.system.ID}}}' type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' - required: - - config - - name - - secrets - Connectors_update_connector_request_servicenow_itom: - title: Create ServiceNow ITOM connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow_itom' - name: - description: The display name for the connector. + viewIncidentUrl: + description: > + The URL to view the case in the external system. You can use + variables to add the external system ID or external system title to + the URL. + example: >- + https://testing-jira.atlassian.net/browse/{{{external.system.title}}} type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' required: - - config - - name - - secrets - Connectors_update_connector_request_slack_api: - title: Update Slack connector request - type: object + - createIncidentJson + - createIncidentResponseKey + - createIncidentUrl + - getIncidentResponseExternalTitleKey + - getIncidentUrl + - updateIncidentJson + - updateIncidentUrl + - viewIncidentUrl + title: Connector request properties for Webhook - Case Management connector + Connectors_config_properties_d3security: + description: Defines properties for connectors when type is `.d3security`. properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_slack_api' - name: - description: The display name for the connector. + url: + description: > + The D3 Security API request URL. If you are using the + `xpack.actions.allowedHosts` setting, add the hostname to the + allowed hosts. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_slack_api' required: - - name - - secrets - Connectors_update_connector_request_slack_webhook: - title: Update Slack connector request + - url + title: Connector request properties for a D3 Security connector type: object - properties: - name: - description: The display name for the connector. - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_slack_webhook' - required: - - name - - secrets - Connectors_update_connector_request_swimlane: - title: Update Swimlane connector request + Connectors_config_properties_email: + description: Defines properties for connectors when type is `.email`. type: object properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_swimlane' - name: - description: The display name for the connector. - example: my-connector + clientId: + description: > + The client identifier, which is a part of OAuth 2.0 client + credentials authentication, in GUID format. If `service` is + `exchange_server`, this property is required. + nullable: true type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_swimlane' - required: - - config - - name - - secrets - Connectors_update_connector_request_teams: - title: Update Microsoft Teams connector request - type: object - properties: - name: - description: The display name for the connector. + from: + description: > + The from address for all emails sent by the connector. It must be + specified in `user@host-name` format. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_teams' - required: - - name - - secrets - Connectors_update_connector_request_tines: - title: Update Tines connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_tines' - name: - description: The display name for the connector. + hasAuth: + default: true + description: > + Specifies whether a user and password are required inside the + secrets configuration. + type: boolean + host: + description: > + The host name of the service provider. If the `service` is + `elastic_cloud` (for Elastic Cloud notifications) or one of + Nodemailer's well-known email service providers, this property is + ignored. If `service` is `other`, this property must be defined. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_tines' - required: - - config - - name - - secrets - Connectors_update_connector_request_torq: - title: Update Torq connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_torq' - name: - description: The display name for the connector. + oauthTokenUrl: + nullable: true + type: string + port: + description: > + The port to connect to on the service provider. If the `service` is + `elastic_cloud` (for Elastic Cloud notifications) or one of + Nodemailer's well-known email service providers, this property is + ignored. If `service` is `other`, this property must be defined. + type: integer + secure: + description: > + Specifies whether the connection to the service provider will use + TLS. If the `service` is `elastic_cloud` (for Elastic Cloud + notifications) or one of Nodemailer's well-known email service + providers, this property is ignored. + type: boolean + service: + description: | + The name of the email service. + enum: + - elastic_cloud + - exchange_server + - gmail + - other + - outlook365 + - ses type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_torq' - required: - - config - - name - - secrets - Connectors_update_connector_request_webhook: - title: Update Webhook connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_webhook' - name: - description: The display name for the connector. + tenantId: + description: > + The tenant identifier, which is part of OAuth 2.0 client credentials + authentication, in GUID format. If `service` is `exchange_server`, + this property is required. + nullable: true type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_webhook' required: - - config - - name - - secrets - Connectors_update_connector_request_xmatters: - title: Update xMatters connector request - type: object + - from + title: Connector request properties for an email connector + Connectors_config_properties_gemini: + description: Defines properties for connectors when type is `.gemini`. properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_xmatters' - name: - description: The display name for the connector. + apiUrl: + description: The Google Gemini request URL. + type: string + defaultModel: + default: gemini-1.5-pro-001 + description: >- + The generative artificial intelligence model for Google Gemini to + use. + type: string + gcpProjectID: + description: The Google ProjectID that has Vertex AI endpoint enabled. + type: string + gcpRegion: + description: The GCP region where the Vertex AI endpoint enabled. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_xmatters' required: - - config - - name - - secrets - Data_views_400_response: - title: Bad request + - apiUrl + - gcpRegion + - gcpProjectID + title: Connector request properties for an Google Gemini connector type: object + Connectors_config_properties_genai: + description: Defines properties for connectors when type is `.gen-ai`. + discriminator: + mapping: + Azure OpenAI: '#/components/schemas/Connectors_config_properties_genai_azure' + OpenAI: '#/components/schemas/Connectors_config_properties_genai_openai' + propertyName: apiProvider + oneOf: + - $ref: '#/components/schemas/Connectors_config_properties_genai_azure' + - $ref: '#/components/schemas/Connectors_config_properties_genai_openai' + title: Connector request properties for an OpenAI connector + Connectors_config_properties_genai_azure: + description: > + Defines properties for connectors when type is `.gen-ai` and the API + provider is `Azure OpenAI'. properties: - error: - example: Bad Request + apiProvider: + description: The OpenAI API provider. + enum: + - Azure OpenAI type: string - message: + apiUrl: + description: The OpenAI API endpoint. type: string - statusCode: - example: 400 - type: number required: - - statusCode - - error - - message - Data_views_404_response: + - apiProvider + - apiUrl + title: >- + Connector request properties for an OpenAI connector that uses Azure + OpenAI type: object + Connectors_config_properties_genai_openai: + description: > + Defines properties for connectors when type is `.gen-ai` and the API + provider is `OpenAI'. properties: - error: + apiProvider: + description: The OpenAI API provider. enum: - - Not Found - example: Not Found + - OpenAI type: string - message: - example: >- - Saved object [index-pattern/caaad6d0-920c-11ed-b36a-874bd1548a00] - not found + apiUrl: + description: The OpenAI API endpoint. + type: string + defaultModel: + description: The default model to use for requests. type: string - statusCode: - enum: - - 404 - example: 404 - type: integer - Data_views_allownoindex: - description: Allows the data view saved object to exist before the data is available. - type: boolean - Data_views_create_data_view_request_object: - title: Create data view request - type: object - properties: - data_view: - description: The data view object. - type: object - properties: - allowNoIndex: - $ref: '#/components/schemas/Data_views_allownoindex' - fieldAttrs: - additionalProperties: - $ref: '#/components/schemas/Data_views_fieldattrs' - type: object - fieldFormats: - $ref: '#/components/schemas/Data_views_fieldformats' - fields: - type: object - id: - type: string - name: - description: The data view name. - type: string - namespaces: - $ref: '#/components/schemas/Data_views_namespaces' - runtimeFieldMap: - additionalProperties: - $ref: '#/components/schemas/Data_views_runtimefieldmap' - type: object - sourceFilters: - $ref: '#/components/schemas/Data_views_sourcefilters' - timeFieldName: - $ref: '#/components/schemas/Data_views_timefieldname' - title: - $ref: '#/components/schemas/Data_views_title' - type: - $ref: '#/components/schemas/Data_views_type' - typeMeta: - $ref: '#/components/schemas/Data_views_typemeta' - version: - type: string - required: - - title - override: - default: false - description: >- - Override an existing data view if a data view with the provided - title already exists. - type: boolean required: - - data_view - Data_views_data_view_response_object: - title: Data view response properties + - apiProvider + - apiUrl + title: Connector request properties for an OpenAI connector type: object - properties: - data_view: - type: object - properties: - allowNoIndex: - $ref: '#/components/schemas/Data_views_allownoindex' - fieldAttrs: - additionalProperties: - $ref: '#/components/schemas/Data_views_fieldattrs' - type: object - fieldFormats: - $ref: '#/components/schemas/Data_views_fieldformats' - fields: - type: object - id: - example: ff959d40-b880-11e8-a6d9-e546fe2bba5f - type: string - name: - description: The data view name. - type: string - namespaces: - $ref: '#/components/schemas/Data_views_namespaces' - runtimeFieldMap: - additionalProperties: - $ref: '#/components/schemas/Data_views_runtimefieldmap' - type: object - sourceFilters: - $ref: '#/components/schemas/Data_views_sourcefilters' - timeFieldName: - $ref: '#/components/schemas/Data_views_timefieldname' - title: - $ref: '#/components/schemas/Data_views_title' - typeMeta: - $ref: '#/components/schemas/Data_views_typemeta_response' - version: - example: WzQ2LDJd - type: string - Data_views_fieldattrs: - description: A map of field attributes by field name. + Connectors_config_properties_index: + description: Defines properties for connectors when type is `.index`. type: object properties: - count: - description: Popularity count for the field. - type: integer - customDescription: - description: Custom description for the field. - maxLength: 300 + executionTimeField: + default: null + description: A field that indicates when the document was indexed. + nullable: true type: string - customLabel: - description: Custom label for the field. + index: + description: The Elasticsearch index to be written to. type: string - Data_views_fieldformats: - description: A map of field formats by field name. - type: object - Data_views_namespaces: - description: >- - An array of space identifiers for sharing the data view between multiple - spaces. - items: - default: default - type: string - type: array - Data_views_runtimefieldmap: - description: A map of runtime field definitions by field name. + refresh: + default: false + description: > + The refresh policy for the write request, which affects when changes + are made visible to search. Refer to the refresh setting for + Elasticsearch document APIs. + type: boolean + required: + - index + title: Connector request properties for an index connector + Connectors_config_properties_jira: + description: Defines properties for connectors when type is `.jira`. type: object properties: - script: - type: object - properties: - source: - description: Script for the runtime field. - type: string - type: - description: Mapping type of the runtime field. + apiUrl: + description: The Jira instance URL. + type: string + projectKey: + description: The Jira project key. type: string required: - - script - - type - Data_views_sourcefilters: - description: The array of field names you want to filter out in Discover. - items: - type: object - properties: - value: - type: string - required: - - value - type: array - Data_views_swap_data_view_request_object: - title: Data view reference swap request + - apiUrl + - projectKey + title: Connector request properties for a Jira connector + Connectors_config_properties_opsgenie: + description: Defines properties for connectors when type is `.opsgenie`. type: object properties: - delete: - description: Deletes referenced saved object if all references are removed. - type: boolean - forId: - description: Limit the affected saved objects to one or more by identifier. - oneOf: - - type: string - - items: - type: string - type: array - forType: - description: Limit the affected saved objects by type. + apiUrl: + description: > + The Opsgenie URL. For example, `https://api.opsgenie.com` or + `https://api.eu.opsgenie.com`. If you are using the + `xpack.actions.allowedHosts` setting, add the hostname to the + allowed hosts. type: string - fromId: - description: The saved object reference to change. + required: + - apiUrl + title: Connector request properties for an Opsgenie connector + Connectors_config_properties_pagerduty: + description: Defines properties for connectors when type is `.pagerduty`. + properties: + apiUrl: + description: The PagerDuty event URL. + example: 'https://events.pagerduty.com/v2/enqueue' + nullable: true type: string - fromType: - description: > - Specify the type of the saved object reference to alter. The default - value is `index-pattern` for data views. + title: Connector request properties for a PagerDuty connector + type: object + Connectors_config_properties_resilient: + description: Defines properties for connectors when type is `.resilient`. + type: object + properties: + apiUrl: + description: The IBM Resilient instance URL. type: string - toId: - description: New saved object reference value to replace the old value. + orgId: + description: The IBM Resilient organization ID. type: string required: - - fromId - - toId - Data_views_timefieldname: - description: 'The timestamp field name, which you use for time-based data views.' - type: string - Data_views_title: - description: >- - Comma-separated list of data streams, indices, and aliases that you want - to search. Supports wildcards (`*`). - type: string - Data_views_type: - description: 'When set to `rollup`, identifies the rollup data views.' - type: string - Data_views_typemeta: - description: >- - When you use rollup indices, contains the field list for the rollup data - view API endpoints. + - apiUrl + - orgId + title: Connector request properties for a IBM Resilient connector + Connectors_config_properties_sentinelone: + description: Defines properties for connectors when type is `.sentinelone`. type: object properties: - aggs: - description: A map of rollup restrictions by aggregation type and field name. - type: object - params: - description: Properties for retrieving rollup fields. - type: object + url: + description: > + The SentinelOne tenant URL. If you are using the + `xpack.actions.allowedHosts` setting, add the hostname to the + allowed hosts. + type: string required: - - aggs - - params - Data_views_typemeta_response: - description: >- - When you use rollup indices, contains the field list for the rollup data - view API endpoints. - nullable: true + - url + title: Connector request properties for a SentinelOne connector + Connectors_config_properties_servicenow: + description: Defines properties for connectors when type is `.servicenow`. type: object properties: - aggs: - description: A map of rollup restrictions by aggregation type and field name. - type: object - params: - description: Properties for retrieving rollup fields. - type: object - Data_views_update_data_view_request_object: - title: Update data view request + apiUrl: + description: The ServiceNow instance URL. + type: string + clientId: + description: > + The client ID assigned to your OAuth application. This property is + required when `isOAuth` is `true`. + type: string + isOAuth: + default: false + description: > + The type of authentication to use. The default value is false, which + means basic authentication is used instead of open authorization + (OAuth). + type: boolean + jwtKeyId: + description: > + The key identifier assigned to the JWT verifier map of your OAuth + application. This property is required when `isOAuth` is `true`. + type: string + userIdentifierValue: + description: > + The identifier to use for OAuth authentication. This identifier + should be the user field you selected when you created an OAuth JWT + API endpoint for external clients in your ServiceNow instance. For + example, if the selected user field is `Email`, the user identifier + should be the user's email address. This property is required when + `isOAuth` is `true`. + type: string + usesTableApi: + default: true + description: > + Determines whether the connector uses the Table API or the Import + Set API. This property is supported only for ServiceNow ITSM and + ServiceNow SecOps connectors. NOTE: If this property is set to + `false`, the Elastic application should be installed in ServiceNow. + type: boolean + required: + - apiUrl + title: Connector request properties for a ServiceNow ITSM connector + Connectors_config_properties_servicenow_itom: + description: Defines properties for connectors when type is `.servicenow`. type: object properties: - data_view: + apiUrl: + description: The ServiceNow instance URL. + type: string + clientId: description: > - The data view properties you want to update. Only the specified - properties are updated in the data view. Unspecified fields stay as - they are persisted. - type: object - properties: - allowNoIndex: - $ref: '#/components/schemas/Data_views_allownoindex' - fieldFormats: - $ref: '#/components/schemas/Data_views_fieldformats' - fields: - type: object - name: - type: string - runtimeFieldMap: - additionalProperties: - $ref: '#/components/schemas/Data_views_runtimefieldmap' - type: object - sourceFilters: - $ref: '#/components/schemas/Data_views_sourcefilters' - timeFieldName: - $ref: '#/components/schemas/Data_views_timefieldname' - title: - $ref: '#/components/schemas/Data_views_title' - type: - $ref: '#/components/schemas/Data_views_type' - typeMeta: - $ref: '#/components/schemas/Data_views_typemeta' - refresh_fields: + The client ID assigned to your OAuth application. This property is + required when `isOAuth` is `true`. + type: string + isOAuth: default: false - description: Reloads the data view fields after the data view is updated. + description: > + The type of authentication to use. The default value is false, which + means basic authentication is used instead of open authorization + (OAuth). type: boolean + jwtKeyId: + description: > + The key identifier assigned to the JWT verifier map of your OAuth + application. This property is required when `isOAuth` is `true`. + type: string + userIdentifierValue: + description: > + The identifier to use for OAuth authentication. This identifier + should be the user field you selected when you created an OAuth JWT + API endpoint for external clients in your ServiceNow instance. For + example, if the selected user field is `Email`, the user identifier + should be the user's email address. This property is required when + `isOAuth` is `true`. + type: string required: - - data_view - Kibana_HTTP_APIs_core_status_redactedResponse: - additionalProperties: false - description: A minimal representation of Kibana's operational status. + - apiUrl + title: Connector request properties for a ServiceNow ITSM connector + Connectors_config_properties_slack_api: + description: Defines properties for connectors when type is `.slack_api`. + properties: + allowedChannels: + description: A list of valid Slack channels. + items: + maxItems: 25 + type: object + properties: + id: + description: The Slack channel ID. + example: C123ABC456 + minLength: 1 + type: string + name: + description: The Slack channel name. + minLength: 1 + type: string + required: + - id + - name + type: array + title: Connector request properties for a Slack connector + type: object + Connectors_config_properties_swimlane: + description: Defines properties for connectors when type is `.swimlane`. type: object properties: - status: - additionalProperties: false - type: object + apiUrl: + description: The Swimlane instance URL. + type: string + appId: + description: The Swimlane application ID. + type: string + connectorType: + description: >- + The type of connector. Valid values are `all`, `alerts`, and + `cases`. + enum: + - all + - alerts + - cases + type: string + mappings: + description: The field mapping. properties: - overall: - additionalProperties: false + alertIdConfig: + description: Mapping for the alert ID. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Alert identifier mapping type: object + caseIdConfig: + description: Mapping for the case ID. properties: - level: - description: Service status levels as human and machine readable values. - enum: - - available - - degraded - - unavailable - - critical + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. type: string required: - - level - required: - - overall - required: - - status - Kibana_HTTP_APIs_core_status_response: - additionalProperties: false - description: >- - Kibana's operational status as well as a detailed breakdown of plugin - statuses indication of various loads (like event loop utilization and - network traffic) at time of request. - type: object - properties: - metrics: - additionalProperties: false - description: Metric groups collected by Kibana. - type: object - properties: - collection_interval_in_millis: - description: The interval at which metrics should be collected. - type: number - elasticsearch_client: - additionalProperties: false - description: Current network metrics of Kibana's Elasticsearch client. + - fieldType + - id + - key + - name + title: Case identifier mapping type: object + caseNameConfig: + description: Mapping for the case name. properties: - totalActiveSockets: - description: Count of network sockets currently in use. - type: number - totalIdleSockets: - description: Count of network sockets currently idle. - type: number - totalQueuedRequests: - description: Count of requests not yet assigned to sockets. - type: number + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string required: - - totalActiveSockets - - totalIdleSockets - - totalQueuedRequests - last_updated: - description: The time metrics were collected. - type: string - required: - - elasticsearch_client - - last_updated - - collection_interval_in_millis - name: - description: Kibana instance name. - type: string - status: - additionalProperties: false - type: object - properties: - core: - additionalProperties: false - description: Statuses of core Kibana services. + - fieldType + - id + - key + - name + title: Case name mapping type: object + commentsConfig: + description: Mapping for the case comments. properties: - elasticsearch: - additionalProperties: false - type: object - properties: - detail: - description: Human readable detail of the service status. - type: string - documentationUrl: - description: A URL to further documentation regarding this service. - type: string - level: - description: >- - Service status levels as human and machine readable - values. - enum: - - available - - degraded - - unavailable - - critical - type: string - meta: - additionalProperties: {} - description: >- - An unstructured set of extra metadata about this - service. - type: object - summary: - description: A human readable summary of the service status. - type: string - required: - - level - - summary - - meta - savedObjects: - additionalProperties: false - type: object - properties: - detail: - description: Human readable detail of the service status. - type: string - documentationUrl: - description: A URL to further documentation regarding this service. - type: string - level: - description: >- - Service status levels as human and machine readable - values. - enum: - - available - - degraded - - unavailable - - critical - type: string - meta: - additionalProperties: {} - description: >- - An unstructured set of extra metadata about this - service. - type: object - summary: - description: A human readable summary of the service status. - type: string - required: - - level - - summary - - meta + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Case comment mapping + type: object + descriptionConfig: + description: Mapping for the case description. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Case description mapping + type: object + ruleNameConfig: + description: Mapping for the name of the alert's rule. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string required: - - elasticsearch - - savedObjects - overall: - additionalProperties: false + - fieldType + - id + - key + - name + title: Rule name mapping type: object + severityConfig: + description: Mapping for the severity. properties: - detail: - description: Human readable detail of the service status. + fieldType: + description: The type of field in Swimlane. type: string - documentationUrl: - description: A URL to further documentation regarding this service. + id: + description: The identifier for the field in Swimlane. type: string - level: - description: Service status levels as human and machine readable values. - enum: - - available - - degraded - - unavailable - - critical + key: + description: The key for the field in Swimlane. type: string - meta: - additionalProperties: {} - description: An unstructured set of extra metadata about this service. - type: object - summary: - description: A human readable summary of the service status. + name: + description: The name of the field in Swimlane. type: string required: - - level - - summary - - meta - plugins: - additionalProperties: - additionalProperties: false - type: object - properties: - detail: - description: Human readable detail of the service status. - type: string - documentationUrl: - description: A URL to further documentation regarding this service. - type: string - level: - description: >- - Service status levels as human and machine readable - values. - enum: - - available - - degraded - - unavailable - - critical - type: string - meta: - additionalProperties: {} - description: An unstructured set of extra metadata about this service. - type: object - summary: - description: A human readable summary of the service status. - type: string - required: - - level - - summary - - meta - description: A dynamic mapping of plugin ID to plugin status. + - fieldType + - id + - key + - name + title: Severity mapping type: object - required: - - overall - - core - - plugins - uuid: - description: >- - Unique, generated Kibana instance UUID. This UUID should persist - even if the Kibana process restarts. - type: string - version: - additionalProperties: false + title: Connector mappings properties for a Swimlane connector type: object - properties: - build_date: - description: The date and time of this build. - type: string - build_flavor: - description: >- - The build flavour determines configuration and behavior of - Kibana. On premise users will almost always run the - "traditional" flavour, while other flavours are reserved for - Elastic-specific use cases. - enum: - - serverless - - traditional - type: string - build_hash: - description: >- - A unique hash value representing the git commit of this Kibana - build. - type: string - build_number: - description: >- - A monotonically increasing number, each subsequent build will - have a higher number. - type: number - build_snapshot: - description: Whether this build is a snapshot build. - type: boolean - number: - description: A semantic version number. - type: string - required: - - number - - build_hash - - build_number - - build_snapshot - - build_flavor - - build_date required: - - name - - uuid - - version - - status - - metrics - Machine_learning_APIs_mlSync200Response: - properties: - datafeedsAdded: - additionalProperties: - $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseDatafeeds' - description: >- - If a saved object for an anomaly detection job is missing a datafeed - identifier, it is added when you run the sync machine learning saved - objects API. - type: object - datafeedsRemoved: - additionalProperties: - $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseDatafeeds' - description: >- - If a saved object for an anomaly detection job references a datafeed - that no longer exists, it is deleted when you run the sync machine - learning saved objects API. - type: object - savedObjectsCreated: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseSavedObjectsCreated - savedObjectsDeleted: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseSavedObjectsDeleted - title: Successful sync API response - type: object - Machine_learning_APIs_mlSync4xxResponse: - properties: - error: - example: Unauthorized - type: string - message: - type: string - statusCode: - example: 401 - type: integer - title: Unsuccessful sync API response - type: object - Machine_learning_APIs_mlSyncResponseAnomalyDetectors: - description: >- - The sync machine learning saved objects API response contains this - object when there are anomaly detection jobs affected by the - synchronization. There is an object for each relevant job, which - contains the synchronization status. - properties: - success: - $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' - title: Sync API response for anomaly detection jobs - type: object - Machine_learning_APIs_mlSyncResponseDatafeeds: - description: >- - The sync machine learning saved objects API response contains this - object when there are datafeeds affected by the synchronization. There - is an object for each relevant datafeed, which contains the - synchronization status. - properties: - success: - $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' - title: Sync API response for datafeeds - type: object - Machine_learning_APIs_mlSyncResponseDataFrameAnalytics: - description: >- - The sync machine learning saved objects API response contains this - object when there are data frame analytics jobs affected by the - synchronization. There is an object for each relevant job, which - contains the synchronization status. - properties: - success: - $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' - title: Sync API response for data frame analytics jobs - type: object - Machine_learning_APIs_mlSyncResponseSavedObjectsCreated: - description: >- - If saved objects are missing for machine learning jobs or trained - models, they are created when you run the sync machine learning saved - objects API. + - apiUrl + - appId + - connectorType + title: Connector request properties for a Swimlane connector + Connectors_config_properties_tines: + description: Defines properties for connectors when type is `.tines`. properties: - anomaly-detector: - additionalProperties: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseAnomalyDetectors - description: >- - If saved objects are missing for anomaly detection jobs, they are - created. - type: object - data-frame-analytics: - additionalProperties: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseDataFrameAnalytics - description: >- - If saved objects are missing for data frame analytics jobs, they are - created. - type: object - trained-model: - additionalProperties: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseTrainedModels - description: 'If saved objects are missing for trained models, they are created.' - type: object - title: Sync API response for created saved objects + url: + description: > + The Tines tenant URL. If you are using the + `xpack.actions.allowedHosts` setting, make sure this hostname is + added to the allowed hosts. + type: string + required: + - url + title: Connector request properties for a Tines connector type: object - Machine_learning_APIs_mlSyncResponseSavedObjectsDeleted: - description: >- - If saved objects exist for machine learning jobs or trained models that - no longer exist, they are deleted when you run the sync machine learning - saved objects API. + Connectors_config_properties_torq: + description: Defines properties for connectors when type is `.torq`. properties: - anomaly-detector: - additionalProperties: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseAnomalyDetectors - description: >- - If there are saved objects exist for nonexistent anomaly detection - jobs, they are deleted. - type: object - data-frame-analytics: - additionalProperties: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseDataFrameAnalytics - description: >- - If there are saved objects exist for nonexistent data frame - analytics jobs, they are deleted. - type: object - trained-model: - additionalProperties: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseTrainedModels - description: >- - If there are saved objects exist for nonexistent trained models, - they are deleted. + webhookIntegrationUrl: + description: The endpoint URL of the Elastic Security integration in Torq. + type: string + required: + - webhookIntegrationUrl + title: Connector request properties for a Torq connector + type: object + Connectors_config_properties_webhook: + description: Defines properties for connectors when type is `.webhook`. + properties: + authType: + description: | + The type of authentication to use: basic, SSL, or none. + enum: + - webhook-authentication-basic + - webhook-authentication-ssl + nullable: true + type: string + ca: + description: > + A base64 encoded version of the certificate authority file that the + connector can trust to sign and validate certificates. This option + is available for all authentication types. + type: string + certType: + description: > + If the `authType` is `webhook-authentication-ssl`, specifies whether + the certificate authentication data is in a CRT and key file format + or a PFX file format. + enum: + - ssl-crt-key + - ssl-pfx + type: string + hasAuth: + description: > + If `true`, a user name and password must be provided for login type + authentication. + type: boolean + headers: + description: A set of key-value pairs sent as headers with the request. + nullable: true type: object - title: Sync API response for deleted saved objects + method: + default: post + description: | + The HTTP request method, either `post` or `put`. + enum: + - post + - put + type: string + url: + description: > + The request URL. If you are using the `xpack.actions.allowedHosts` + setting, add the hostname to the allowed hosts. + type: string + verificationMode: + default: full + description: > + Controls the verification of certificates. Use `full` to validate + that the certificate has an issue date within the `not_before` and + `not_after` dates, chains to a trusted certificate authority (CA), + and has a hostname or IP address that matches the names within the + certificate. Use `certificate` to validate the certificate and + verify that it is signed by a trusted authority; this option does + not check the certificate hostname. Use `none` to skip certificate + validation. + enum: + - certificate + - full + - none + type: string + title: Connector request properties for a Webhook connector type: object - Machine_learning_APIs_mlSyncResponseSuccess: - description: The success or failure of the synchronization. - type: boolean - Machine_learning_APIs_mlSyncResponseTrainedModels: - description: >- - The sync machine learning saved objects API response contains this - object when there are trained models affected by the synchronization. - There is an object for each relevant trained model, which contains the - synchronization status. + Connectors_config_properties_xmatters: + description: Defines properties for connectors when type is `.xmatters`. properties: - success: - $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' - title: Sync API response for trained models + configUrl: + description: > + The request URL for the Elastic Alerts trigger in xMatters. It is + applicable only when `usesBasic` is `true`. + nullable: true + type: string + usesBasic: + default: true + description: >- + Specifies whether the connector uses HTTP basic authentication + (`true`) or URL authentication (`false`). + type: boolean + title: Connector request properties for an xMatters connector type: object - Security_AI_Assistant_API_AnonymizationFieldCreateProps: + Connectors_connector_response_properties: + description: The properties vary depending on the connector type. + discriminator: + mapping: + .bedrock: >- + #/components/schemas/Connectors_connector_response_properties_bedrock + .cases-webhook: >- + #/components/schemas/Connectors_connector_response_properties_cases_webhook + .d3security: >- + #/components/schemas/Connectors_connector_response_properties_d3security + .email: '#/components/schemas/Connectors_connector_response_properties_email' + .gemini: '#/components/schemas/Connectors_connector_response_properties_gemini' + .gen-ai: '#/components/schemas/Connectors_connector_response_properties_genai' + .index: '#/components/schemas/Connectors_connector_response_properties_index' + .jira: '#/components/schemas/Connectors_connector_response_properties_jira' + .opsgenie: >- + #/components/schemas/Connectors_connector_response_properties_opsgenie + .pagerduty: >- + #/components/schemas/Connectors_connector_response_properties_pagerduty + .resilient: >- + #/components/schemas/Connectors_connector_response_properties_resilient + .sentinelone: >- + #/components/schemas/Connectors_connector_response_properties_sentinelone + .server-log: >- + #/components/schemas/Connectors_connector_response_properties_serverlog + .servicenow: >- + #/components/schemas/Connectors_connector_response_properties_servicenow + .servicenow-itom: >- + #/components/schemas/Connectors_connector_response_properties_servicenow_itom + .servicenow-sir: >- + #/components/schemas/Connectors_connector_response_properties_servicenow_sir + .slack: >- + #/components/schemas/Connectors_connector_response_properties_slack_webhook + .slack_api: >- + #/components/schemas/Connectors_connector_response_properties_slack_api + .swimlane: >- + #/components/schemas/Connectors_connector_response_properties_swimlane + .teams: '#/components/schemas/Connectors_connector_response_properties_teams' + .tines: '#/components/schemas/Connectors_connector_response_properties_tines' + .torq: '#/components/schemas/Connectors_connector_response_properties_torq' + .webhook: >- + #/components/schemas/Connectors_connector_response_properties_webhook + .xmatters: >- + #/components/schemas/Connectors_connector_response_properties_xmatters + propertyName: connector_type_id + oneOf: + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_bedrock + - $ref: '#/components/schemas/Connectors_connector_response_properties_gemini' + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_cases_webhook + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_d3security + - $ref: '#/components/schemas/Connectors_connector_response_properties_email' + - $ref: '#/components/schemas/Connectors_connector_response_properties_genai' + - $ref: '#/components/schemas/Connectors_connector_response_properties_index' + - $ref: '#/components/schemas/Connectors_connector_response_properties_jira' + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_opsgenie + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_pagerduty + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_resilient + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_sentinelone + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_serverlog + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_servicenow + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_servicenow_itom + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_servicenow_sir + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_slack_api + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_slack_webhook + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_swimlane + - $ref: '#/components/schemas/Connectors_connector_response_properties_teams' + - $ref: '#/components/schemas/Connectors_connector_response_properties_tines' + - $ref: '#/components/schemas/Connectors_connector_response_properties_torq' + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_webhook + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_xmatters + title: Connector response properties + Connectors_connector_response_properties_bedrock: + title: Connector response properties for an Amazon Bedrock connector type: object properties: - allowed: - type: boolean - anonymized: - type: boolean - field: + config: + $ref: '#/components/schemas/Connectors_config_properties_bedrock' + connector_type_id: + description: The type of connector. + enum: + - .bedrock + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string required: - - field - Security_AI_Assistant_API_AnonymizationFieldDetailsInError: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_cases_webhook: + title: Connector request properties for a Webhook - Case Management connector type: object properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_cases_webhook' + connector_type_id: + description: The type of connector. + enum: + - .cases-webhook + type: string id: + description: The identifier for the connector. type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - Security_AI_Assistant_API_AnonymizationFieldResponse: + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_d3security: + title: Connector response properties for a D3 Security connector type: object properties: - allowed: - type: boolean - anonymized: - type: boolean - createdAt: - type: string - createdBy: - type: string - field: + config: + $ref: '#/components/schemas/Connectors_config_properties_d3security' + connector_type_id: + description: The type of connector. + enum: + - .d3security type: string id: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - namespace: - description: Kibana space - type: string - timestamp: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - updatedAt: + description: The identifier for the connector. type: string - updatedBy: + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - - field - Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipReason: - enum: - - ANONYMIZATION_FIELD_NOT_MODIFIED - type: string - Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipResult: + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_email: + title: Connector response properties for an email connector type: object properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_email' + connector_type_id: + description: The type of connector. + enum: + - .email + type: string id: + description: The identifier for the connector. type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' name: + description: The display name for the connector. type: string - skip_reason: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipReason + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - - skip_reason - Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResponse: + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_gemini: + title: Connector response properties for a Google Gemini connector type: object properties: - anonymization_fields_count: - type: integer - attributes: - type: object - properties: - errors: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_NormalizedAnonymizationFieldError - type: array - results: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResults - summary: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_BulkCrudActionSummary - required: - - results - - summary - message: + config: + $ref: '#/components/schemas/Connectors_config_properties_gemini' + connector_type_id: + description: The type of connector. + enum: + - .gemini type: string - status_code: - type: integer - success: - type: boolean + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - attributes - Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResults: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_genai: + title: Connector response properties for an OpenAI connector type: object properties: - created: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldResponse - type: array - deleted: - items: - type: string - type: array - skipped: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipResult - type: array - updated: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldResponse - type: array + config: + $ref: '#/components/schemas/Connectors_config_properties_genai' + connector_type_id: + description: The type of connector. + enum: + - .gen-ai + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - updated - - created - - deleted - - skipped - Security_AI_Assistant_API_AnonymizationFieldUpdateProps: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_index: + title: Connector response properties for an index connector type: object properties: - allowed: - type: boolean - anonymized: - type: boolean + config: + $ref: '#/components/schemas/Connectors_config_properties_index' + connector_type_id: + description: The type of connector. + enum: + - .index + type: string id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - Security_AI_Assistant_API_ApiConfig: + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_jira: + title: Connector response properties for a Jira connector type: object properties: - actionTypeId: - description: action type id - type: string - connectorId: - description: connector id + config: + $ref: '#/components/schemas/Connectors_config_properties_jira' + connector_type_id: + description: The type of connector. + enum: + - .jira type: string - defaultSystemPromptId: - description: defaultSystemPromptId + id: + description: The identifier for the connector. type: string - model: - description: model + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string - provider: - $ref: '#/components/schemas/Security_AI_Assistant_API_Provider' - description: Provider + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - connectorId - - actionTypeId - Security_AI_Assistant_API_BulkCrudActionSummary: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_opsgenie: + title: Connector response properties for an Opsgenie connector type: object properties: - failed: - type: integer - skipped: - type: integer - succeeded: - type: integer - total: - type: integer + config: + $ref: '#/components/schemas/Connectors_config_properties_opsgenie' + connector_type_id: + description: The type of connector. + enum: + - .opsgenie + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - failed - - skipped - - succeeded - - total - Security_AI_Assistant_API_ChatCompleteProps: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_pagerduty: + title: Connector response properties for a PagerDuty connector type: object properties: - connectorId: - type: string - conversationId: - type: string - isStream: - type: boolean - langSmithApiKey: - type: string - langSmithProject: - type: string - messages: - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_ChatMessage' - type: array - model: + config: + $ref: '#/components/schemas/Connectors_config_properties_pagerduty' + connector_type_id: + description: The type of connector. + enum: + - .pagerduty type: string - persist: - type: boolean - promptId: + id: + description: The identifier for the connector. type: string - responseLanguage: + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - messages - - persist - - connectorId - Security_AI_Assistant_API_ChatMessage: - description: AI assistant message. + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_resilient: + title: Connector response properties for a IBM Resilient connector type: object properties: - content: - description: Message content. + config: + $ref: '#/components/schemas/Connectors_config_properties_resilient' + connector_type_id: + description: The type of connector. + enum: + - .resilient type: string - data: - $ref: '#/components/schemas/Security_AI_Assistant_API_MessageData' - description: ECS object to attach to the context of the message. - fields_to_anonymize: - items: - type: string - type: array - role: - $ref: '#/components/schemas/Security_AI_Assistant_API_ChatMessageRole' - description: Message role. - required: - - role - Security_AI_Assistant_API_ChatMessageRole: - description: Message role. - enum: - - system - - user - - assistant - type: string - Security_AI_Assistant_API_ConversationCategory: - description: The conversation category. - enum: - - assistant - - insights - type: string - Security_AI_Assistant_API_ConversationConfidence: - description: The conversation confidence. - enum: - - low - - medium - - high - type: string - Security_AI_Assistant_API_ConversationCreateProps: - type: object - properties: - apiConfig: - $ref: '#/components/schemas/Security_AI_Assistant_API_ApiConfig' - description: LLM API configuration. - category: - $ref: '#/components/schemas/Security_AI_Assistant_API_ConversationCategory' - description: The conversation category. - excludeFromLastConversationStorage: - description: excludeFromLastConversationStorage. - type: boolean id: - description: The conversation id. + description: The identifier for the connector. type: string - isDefault: - description: Is default conversation. - type: boolean - messages: - description: The conversation messages. - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_Message' - type: array - replacements: - $ref: '#/components/schemas/Security_AI_Assistant_API_Replacements' - title: - description: The conversation title. + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - title - Security_AI_Assistant_API_ConversationResponse: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_sentinelone: + title: Connector response properties for a SentinelOne connector type: object properties: - apiConfig: - $ref: '#/components/schemas/Security_AI_Assistant_API_ApiConfig' - description: LLM API configuration. - category: - $ref: '#/components/schemas/Security_AI_Assistant_API_ConversationCategory' - description: The conversation category. - createdAt: - description: The last time conversation was updated. + config: + $ref: '#/components/schemas/Connectors_config_properties_sentinelone' + connector_type_id: + description: The type of connector. + enum: + - .sentinelone type: string - excludeFromLastConversationStorage: - description: excludeFromLastConversationStorage. - type: boolean id: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - isDefault: - description: Is default conversation. - type: boolean - messages: - description: The conversation messages. - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_Message' - type: array - namespace: - description: Kibana space - type: string - replacements: - $ref: '#/components/schemas/Security_AI_Assistant_API_Replacements' - summary: - $ref: '#/components/schemas/Security_AI_Assistant_API_ConversationSummary' - timestamp: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - title: - description: The conversation title. + description: The identifier for the connector. type: string - updatedAt: - description: The last time conversation was updated. + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string - users: - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_User' - type: array + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - - title - - createdAt - - users - - namespace - - category - Security_AI_Assistant_API_ConversationSummary: + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_serverlog: + title: Connector response properties for a server log connector type: object properties: - confidence: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationConfidence - description: >- - How confident you are about this being a correct and useful - learning. - content: - description: Summary text of the conversation over time. + config: + nullable: true + type: object + connector_type_id: + description: The type of connector. + enum: + - .server-log type: string - public: - description: Define if summary is marked as publicly available. - type: boolean - timestamp: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - description: The timestamp summary was updated. - Security_AI_Assistant_API_ConversationUpdateProps: - type: object - properties: - apiConfig: - $ref: '#/components/schemas/Security_AI_Assistant_API_ApiConfig' - description: LLM API configuration. - category: - $ref: '#/components/schemas/Security_AI_Assistant_API_ConversationCategory' - description: The conversation category. - excludeFromLastConversationStorage: - description: excludeFromLastConversationStorage. - type: boolean id: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - messages: - description: The conversation messages. - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_Message' - type: array - replacements: - $ref: '#/components/schemas/Security_AI_Assistant_API_Replacements' - summary: - $ref: '#/components/schemas/Security_AI_Assistant_API_ConversationSummary' - title: - description: The conversation title. + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - Security_AI_Assistant_API_FindAnonymizationFieldsSortField: - enum: - - created_at - - anonymized - - allowed - - field - - updated_at - type: string - Security_AI_Assistant_API_FindConversationsSortField: - enum: - - created_at - - is_default - - title - - updated_at - type: string - Security_AI_Assistant_API_FindPromptsSortField: - enum: - - created_at - - is_default + - is_deprecated + - is_preconfigured - name - - updated_at - type: string - Security_AI_Assistant_API_Message: - description: AI assistant conversation message. + Connectors_connector_response_properties_servicenow: + title: Connector response properties for a ServiceNow ITSM connector type: object properties: - content: - description: Message content. + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow' + connector_type_id: + description: The type of connector. + enum: + - .servicenow type: string - isError: - description: Is error message. - type: boolean - reader: - $ref: '#/components/schemas/Security_AI_Assistant_API_Reader' - description: Message content. - role: - $ref: '#/components/schemas/Security_AI_Assistant_API_MessageRole' - description: Message role. - timestamp: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - description: The timestamp message was sent or received. - traceData: - $ref: '#/components/schemas/Security_AI_Assistant_API_TraceData' - description: trace Data - required: - - timestamp - - content - - role - Security_AI_Assistant_API_MessageData: - additionalProperties: true - type: object - Security_AI_Assistant_API_MessageRole: - description: Message role. - enum: - - system - - user - - assistant - type: string - Security_AI_Assistant_API_NonEmptyString: - description: A string that is not empty and does not contain only whitespace - minLength: 1 - pattern: ^(?! *$).+$ - type: string - Security_AI_Assistant_API_NormalizedAnonymizationFieldError: - type: object - properties: - anonymization_fields: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldDetailsInError - type: array - err_code: + id: + description: The identifier for the connector. type: string - message: + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string - status_code: - type: integer + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - message - - status_code - - anonymization_fields - Security_AI_Assistant_API_NormalizedPromptError: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_servicenow_itom: + title: Connector response properties for a ServiceNow ITOM connector type: object properties: - err_code: + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow_itom' + connector_type_id: + description: The type of connector. + enum: + - .servicenow-itom type: string - message: + id: + description: The identifier for the connector. type: string - prompts: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptDetailsInError - type: array - status_code: - type: integer + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - message - - status_code - - prompts - Security_AI_Assistant_API_PromptCreateProps: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_servicenow_sir: + title: Connector response properties for a ServiceNow SecOps connector type: object properties: - categories: - items: - type: string - type: array - color: - type: string - consumer: + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow' + connector_type_id: + description: The type of connector. + enum: + - .servicenow-sir type: string - content: + id: + description: The identifier for the connector. type: string - isDefault: - type: boolean - isNewConversationDefault: - type: boolean + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' name: + description: The display name for the connector. type: string - promptType: - $ref: '#/components/schemas/Security_AI_Assistant_API_PromptType' + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured - name - - content - - promptType - Security_AI_Assistant_API_PromptDetailsInError: + Connectors_connector_response_properties_slack_api: + title: Connector response properties for a Slack connector type: object properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_slack_api' + connector_type_id: + description: The type of connector. + enum: + - .slack_api + type: string id: + description: The identifier for the connector. type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - Security_AI_Assistant_API_PromptResponse: + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_slack_webhook: + title: Connector response properties for a Slack connector type: object properties: - categories: - items: - type: string - type: array - color: - type: string - consumer: - type: string - content: - type: string - createdAt: - type: string - createdBy: + connector_type_id: + description: The type of connector. + enum: + - .slack type: string id: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - isDefault: - type: boolean - isNewConversationDefault: - type: boolean - name: - type: string - namespace: - description: Kibana space - type: string - promptType: - $ref: '#/components/schemas/Security_AI_Assistant_API_PromptType' - timestamp: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - updatedAt: + description: The identifier for the connector. type: string - updatedBy: + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string - users: - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_User' - type: array + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id + - is_deprecated + - is_preconfigured - name - - promptType - - content - Security_AI_Assistant_API_PromptsBulkActionSkipReason: - enum: - - PROMPT_FIELD_NOT_MODIFIED - type: string - Security_AI_Assistant_API_PromptsBulkActionSkipResult: + Connectors_connector_response_properties_swimlane: + title: Connector response properties for a Swimlane connector type: object properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_swimlane' + connector_type_id: + description: The type of connector. + enum: + - .swimlane + type: string id: + description: The identifier for the connector. type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' name: + description: The display name for the connector. type: string - skip_reason: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptsBulkActionSkipReason + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - - skip_reason - Security_AI_Assistant_API_PromptsBulkCrudActionResponse: + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_teams: + title: Connector response properties for a Microsoft Teams connector type: object properties: - attributes: + config: type: object - properties: - errors: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_NormalizedPromptError - type: array - results: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptsBulkCrudActionResults - summary: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_BulkCrudActionSummary - required: - - results - - summary - message: + connector_type_id: + description: The type of connector. + enum: + - .teams type: string - prompts_count: - type: integer - status_code: - type: integer - success: - type: boolean + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - attributes - Security_AI_Assistant_API_PromptsBulkCrudActionResults: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_tines: + title: Connector response properties for a Tines connector type: object properties: - created: - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_PromptResponse' - type: array - deleted: - items: - type: string - type: array - skipped: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptsBulkActionSkipResult - type: array - updated: - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_PromptResponse' - type: array + config: + $ref: '#/components/schemas/Connectors_config_properties_tines' + connector_type_id: + description: The type of connector. + enum: + - .tines + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - updated - - created - - deleted - - skipped - Security_AI_Assistant_API_PromptType: - description: Prompt type - enum: - - system - - quick - type: string - Security_AI_Assistant_API_PromptUpdateProps: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_torq: + title: Connector response properties for a Torq connector type: object properties: - categories: - items: - type: string - type: array - color: - type: string - consumer: - type: string - content: + config: + $ref: '#/components/schemas/Connectors_config_properties_torq' + connector_type_id: + description: The type of connector. + enum: + - .torq type: string id: + description: The identifier for the connector. type: string - isDefault: - type: boolean - isNewConversationDefault: - type: boolean + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - Security_AI_Assistant_API_Provider: - description: Provider - enum: - - OpenAI - - Azure OpenAI - type: string - Security_AI_Assistant_API_Reader: - additionalProperties: true - type: object - Security_AI_Assistant_API_Replacements: - additionalProperties: - type: string - description: Replacements object used to anonymize/deanomymize messsages - type: object - Security_AI_Assistant_API_SortOrder: - enum: - - asc - - desc - type: string - Security_AI_Assistant_API_TraceData: - description: trace Data + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_webhook: + title: Connector response properties for a Webhook connector type: object properties: - traceId: - description: 'Could be any string, not necessarily a UUID' - type: string - transactionId: - description: 'Could be any string, not necessarily a UUID' + config: + $ref: '#/components/schemas/Connectors_config_properties_webhook' + connector_type_id: + description: The type of connector. + enum: + - .webhook type: string - Security_AI_Assistant_API_User: - description: 'Could be any string, not necessarily a UUID' - type: object - properties: id: - description: User id + description: The identifier for the connector. type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' name: - description: User name + description: The display name for the connector. type: string - Security_Solution_Detections_API_AlertAssignees: - type: object - properties: - add: - description: A list of users ids to assign. - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - type: array - remove: - description: A list of users ids to unassign. - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - type: array - required: - - add - - remove - Security_Solution_Detections_API_AlertIds: - description: A list of alerts ids. - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - minItems: 1 - type: array - Security_Solution_Detections_API_AlertsIndex: - deprecated: true - description: (deprecated) Has no effect. - type: string - Security_Solution_Detections_API_AlertsIndexNamespace: - description: Has no effect. - type: string - Security_Solution_Detections_API_AlertsSort: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsSortCombinations - - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsSortCombinations - type: array - Security_Solution_Detections_API_AlertsSortCombinations: - anyOf: - - type: string - - additionalProperties: true - type: object - Security_Solution_Detections_API_AlertStatus: - enum: - - open - - closed - - acknowledged - - in-progress - type: string - Security_Solution_Detections_API_AlertSuppression: - type: object - properties: - duration: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppressionDuration - group_by: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppressionGroupBy - missing_fields_strategy: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppressionMissingFieldsStrategy + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - group_by - Security_Solution_Detections_API_AlertSuppressionDuration: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_xmatters: + title: Connector response properties for an xMatters connector type: object properties: - unit: + config: + $ref: '#/components/schemas/Connectors_config_properties_xmatters' + connector_type_id: + description: The type of connector. enum: - - s - - m - - h + - .xmatters type: string - value: - minimum: 1 - type: integer + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - value - - unit - Security_Solution_Detections_API_AlertSuppressionGroupBy: - items: - type: string - maxItems: 3 - minItems: 1 - type: array - Security_Solution_Detections_API_AlertSuppressionMissingFieldsStrategy: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_types: description: >- - Describes how alerts will be generated for documents with missing - suppress by fields: - - doNotSuppress - per each document a separate alert will be created - - suppress - only alert will be created per suppress by bucket + The type of connector. For example, `.email`, `.index`, `.jira`, + `.opsgenie`, or `.server-log`. enum: - - doNotSuppress - - suppress - type: string - Security_Solution_Detections_API_AlertTag: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - Security_Solution_Detections_API_AlertTags: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_AlertTag' - type: array - Security_Solution_Detections_API_AnomalyThreshold: - description: Anomaly threshold - minimum: 0 - type: integer - Security_Solution_Detections_API_BuildingBlockType: - description: >- - Determines if the rule acts as a building block. By default, - building-block alerts are not displayed in the UI. These rules are used - as a foundation for other rules that do generate alerts. Its value must - be default. + - .bedrock + - .gemini + - .cases-webhook + - .d3security + - .email + - .gen-ai + - .index + - .jira + - .opsgenie + - .pagerduty + - .resilient + - .sentinelone + - .servicenow + - .servicenow-itom + - .servicenow-sir + - .server-log + - .slack + - .slack_api + - .swimlane + - .teams + - .tines + - .torq + - .webhook + - .xmatters + example: .server-log + title: Connector types type: string - Security_Solution_Detections_API_BulkActionEditPayload: - anyOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayloadTags - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayloadIndexPatterns + Connectors_create_connector_request: + description: The properties vary depending on the connector type. + discriminator: + mapping: + .bedrock: '#/components/schemas/Connectors_create_connector_request_bedrock' + .cases-webhook: >- + #/components/schemas/Connectors_create_connector_request_cases_webhook + .d3security: '#/components/schemas/Connectors_create_connector_request_d3security' + .email: '#/components/schemas/Connectors_create_connector_request_email' + .gemini: '#/components/schemas/Connectors_create_connector_request_gemini' + .gen-ai: '#/components/schemas/Connectors_create_connector_request_genai' + .index: '#/components/schemas/Connectors_create_connector_request_index' + .jira: '#/components/schemas/Connectors_create_connector_request_jira' + .opsgenie: '#/components/schemas/Connectors_create_connector_request_opsgenie' + .pagerduty: '#/components/schemas/Connectors_create_connector_request_pagerduty' + .resilient: '#/components/schemas/Connectors_create_connector_request_resilient' + .sentinelone: '#/components/schemas/Connectors_create_connector_request_sentinelone' + .server-log: '#/components/schemas/Connectors_create_connector_request_serverlog' + .servicenow: '#/components/schemas/Connectors_create_connector_request_servicenow' + .servicenow-itom: >- + #/components/schemas/Connectors_create_connector_request_servicenow_itom + .servicenow-sir: >- + #/components/schemas/Connectors_create_connector_request_servicenow_sir + .slack: >- + #/components/schemas/Connectors_create_connector_request_slack_webhook + .slack_api: '#/components/schemas/Connectors_create_connector_request_slack_api' + .swimlane: '#/components/schemas/Connectors_create_connector_request_swimlane' + .teams: '#/components/schemas/Connectors_create_connector_request_teams' + .tines: '#/components/schemas/Connectors_create_connector_request_tines' + .torq: '#/components/schemas/Connectors_create_connector_request_torq' + .webhook: '#/components/schemas/Connectors_create_connector_request_webhook' + .xmatters: '#/components/schemas/Connectors_create_connector_request_xmatters' + propertyName: connector_type_id + oneOf: + - $ref: '#/components/schemas/Connectors_create_connector_request_bedrock' + - $ref: '#/components/schemas/Connectors_create_connector_request_gemini' - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayloadInvestigationFields + #/components/schemas/Connectors_create_connector_request_cases_webhook + - $ref: '#/components/schemas/Connectors_create_connector_request_d3security' + - $ref: '#/components/schemas/Connectors_create_connector_request_email' + - $ref: '#/components/schemas/Connectors_create_connector_request_genai' + - $ref: '#/components/schemas/Connectors_create_connector_request_index' + - $ref: '#/components/schemas/Connectors_create_connector_request_jira' + - $ref: '#/components/schemas/Connectors_create_connector_request_opsgenie' + - $ref: '#/components/schemas/Connectors_create_connector_request_pagerduty' + - $ref: '#/components/schemas/Connectors_create_connector_request_resilient' + - $ref: '#/components/schemas/Connectors_create_connector_request_sentinelone' + - $ref: '#/components/schemas/Connectors_create_connector_request_serverlog' + - $ref: '#/components/schemas/Connectors_create_connector_request_servicenow' - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayloadTimeline + #/components/schemas/Connectors_create_connector_request_servicenow_itom - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayloadRuleActions + #/components/schemas/Connectors_create_connector_request_servicenow_sir + - $ref: '#/components/schemas/Connectors_create_connector_request_slack_api' - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayloadSchedule - Security_Solution_Detections_API_BulkActionEditPayloadIndexPatterns: - type: object + #/components/schemas/Connectors_create_connector_request_slack_webhook + - $ref: '#/components/schemas/Connectors_create_connector_request_swimlane' + - $ref: '#/components/schemas/Connectors_create_connector_request_teams' + - $ref: '#/components/schemas/Connectors_create_connector_request_tines' + - $ref: '#/components/schemas/Connectors_create_connector_request_torq' + - $ref: '#/components/schemas/Connectors_create_connector_request_webhook' + - $ref: '#/components/schemas/Connectors_create_connector_request_xmatters' + title: Create connector request body properties + Connectors_create_connector_request_bedrock: + description: >- + The Amazon Bedrock connector uses axios to send a POST request to Amazon + Bedrock. properties: - overwrite_data_views: - type: boolean - type: + config: + $ref: '#/components/schemas/Connectors_config_properties_bedrock' + connector_type_id: + description: The type of connector. enum: - - add_index_patterns - - delete_index_patterns - - set_index_patterns + - .bedrock + example: .bedrock type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray - required: - - type - - value - Security_Solution_Detections_API_BulkActionEditPayloadInvestigationFields: - type: object - properties: - type: - enum: - - add_investigation_fields - - delete_investigation_fields - - set_investigation_fields + name: + description: The display name for the connector. + example: my-connector type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_bedrock' required: - - type - - value - Security_Solution_Detections_API_BulkActionEditPayloadRuleActions: + - config + - connector_type_id + - name + - secrets + title: Create Amazon Bedrock connector request type: object + Connectors_create_connector_request_cases_webhook: + description: > + The Webhook - Case Management connector uses axios to send POST, PUT, + and GET requests to a case management RESTful API web service. properties: - type: + config: + $ref: '#/components/schemas/Connectors_config_properties_cases_webhook' + connector_type_id: + description: The type of connector. enum: - - add_rule_actions - - set_rule_actions + - .cases-webhook + example: .cases-webhook type: string - value: - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NormalizedRuleAction - type: array - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThrottleForBulkActions - required: - - actions + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_cases_webhook' required: - - type - - value - Security_Solution_Detections_API_BulkActionEditPayloadSchedule: + - config + - connector_type_id + - name + title: Create Webhook - Case Managment connector request type: object + Connectors_create_connector_request_d3security: + description: > + The connector uses axios to send a POST request to a D3 Security + endpoint. properties: - type: + config: + $ref: '#/components/schemas/Connectors_config_properties_d3security' + connector_type_id: + description: The type of connector. enum: - - set_schedule + - .d3security + example: .d3security type: string - value: - type: object - properties: - interval: - description: >- - Interval in which the rule runs. For example, `"1h"` means the - rule runs every hour. - example: 1h - pattern: '^[1-9]\d*[smh]$' - type: string - lookback: - description: Lookback time for the rule - example: 1h - pattern: '^[1-9]\d*[smh]$' - type: string - required: - - interval - - lookback + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_d3security' required: - - type - - value - Security_Solution_Detections_API_BulkActionEditPayloadTags: + - config + - connector_type_id + - name + - secrets + title: Create D3 Security connector request type: object + Connectors_create_connector_request_email: + description: > + The email connector uses the SMTP protocol to send mail messages, using + an integration of Nodemailer. An exception is Microsoft Exchange, which + uses HTTP protocol for sending emails, Send mail. Email message text is + sent as both plain text and html text. properties: - type: + config: + $ref: '#/components/schemas/Connectors_config_properties_email' + connector_type_id: + description: The type of connector. enum: - - add_tags - - delete_tags - - set_tags + - .email + example: .email type: string - value: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleTagArray' + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_email' required: - - type - - value - Security_Solution_Detections_API_BulkActionEditPayloadTimeline: + - config + - connector_type_id + - name + - secrets + title: Create email connector request type: object + Connectors_create_connector_request_gemini: + description: >- + The Google Gemini connector uses axios to send a POST request to Google + Gemini. properties: - type: + config: + $ref: '#/components/schemas/Connectors_config_properties_gemini' + connector_type_id: + description: The type of connector. enum: - - set_timeline + - .gemini + example: .gemini type: string - value: - type: object - properties: - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - required: - - timeline_id - - timeline_title + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_gemini' required: - - type - - value - Security_Solution_Detections_API_BulkActionsDryRunErrCode: - enum: - - IMMUTABLE - - MACHINE_LEARNING_AUTH - - MACHINE_LEARNING_INDEX_PATTERN - - ESQL_INDEX_PATTERN - - MANUAL_RULE_RUN_FEATURE - - MANUAL_RULE_RUN_DISABLED_RULE - type: string - Security_Solution_Detections_API_BulkActionSkipResult: + - config + - connector_type_id + - name + - secrets + title: Create Google Gemini connector request type: object + Connectors_create_connector_request_genai: + description: > + The OpenAI connector uses axios to send a POST request to either OpenAI + or Azure OpenAPI. properties: - id: + config: + $ref: '#/components/schemas/Connectors_config_properties_genai' + connector_type_id: + description: The type of connector. + enum: + - .gen-ai + example: .gen-ai type: string name: + description: The display name for the connector. + example: my-connector type: string - skip_reason: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkEditSkipReason + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_genai' required: - - id - - skip_reason - Security_Solution_Detections_API_BulkDeleteRules: + - config + - connector_type_id + - name + - secrets + title: Create OpenAI connector request type: object + Connectors_create_connector_request_index: + description: The index connector indexes a document into Elasticsearch. properties: - action: + config: + $ref: '#/components/schemas/Connectors_config_properties_index' + connector_type_id: + description: The type of connector. enum: - - delete + - .index + example: .index type: string - ids: - description: Array of rule IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter rules + name: + description: The display name for the connector. + example: my-connector type: string required: - - action - Security_Solution_Detections_API_BulkDisableRules: + - config + - connector_type_id + - name + title: Create index connector request type: object + Connectors_create_connector_request_jira: + description: The Jira connector uses the REST API v2 to create Jira issues. properties: - action: + config: + $ref: '#/components/schemas/Connectors_config_properties_jira' + connector_type_id: + description: The type of connector. enum: - - disable + - .jira + example: .jira type: string - ids: - description: Array of rule IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter rules + name: + description: The display name for the connector. + example: my-connector type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_jira' required: - - action - Security_Solution_Detections_API_BulkDuplicateRules: + - config + - connector_type_id + - name + - secrets + title: Create Jira connector request type: object + Connectors_create_connector_request_opsgenie: + description: The Opsgenie connector uses the Opsgenie alert API. properties: - action: + config: + $ref: '#/components/schemas/Connectors_config_properties_opsgenie' + connector_type_id: + description: The type of connector. enum: - - duplicate + - .opsgenie + example: .opsgenie type: string - duplicate: - type: object - properties: - include_exceptions: - description: Whether to copy exceptions from the original rule - type: boolean - include_expired_exceptions: - description: Whether to copy expired exceptions from the original rule - type: boolean - required: - - include_exceptions - - include_expired_exceptions - ids: - description: Array of rule IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter rules + name: + description: The display name for the connector. + example: my-connector type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_opsgenie' required: - - action - Security_Solution_Detections_API_BulkEditActionResponse: + - config + - connector_type_id + - name + - secrets + title: Create Opsgenie connector request type: object + Connectors_create_connector_request_pagerduty: + description: > + The PagerDuty connector uses the v2 Events API to trigger, acknowledge, + and resolve PagerDuty alerts. properties: - attributes: - type: object - properties: - errors: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NormalizedRuleError - type: array - results: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkEditActionResults - summary: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkEditActionSummary - required: - - results - - summary - message: + config: + $ref: '#/components/schemas/Connectors_config_properties_pagerduty' + connector_type_id: + description: The type of connector. + enum: + - .pagerduty + example: .pagerduty type: string - rules_count: - type: integer - status_code: - type: integer - success: - type: boolean + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_pagerduty' required: - - attributes - Security_Solution_Detections_API_BulkEditActionResults: + - config + - connector_type_id + - name + - secrets + title: Create PagerDuty connector request type: object + Connectors_create_connector_request_resilient: + description: >- + The IBM Resilient connector uses the RESILIENT REST v2 to create IBM + Resilient incidents. properties: - created: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleResponse' - type: array - deleted: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleResponse' - type: array - skipped: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionSkipResult - type: array - updated: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleResponse' - type: array + config: + $ref: '#/components/schemas/Connectors_config_properties_resilient' + connector_type_id: + description: The type of connector. + enum: + - .resilient + example: .resilient + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_resilient' required: - - updated - - created - - deleted - - skipped - Security_Solution_Detections_API_BulkEditActionSummary: + - config + - connector_type_id + - name + - secrets + title: Create IBM Resilient connector request type: object - properties: - failed: - type: integer - skipped: - type: integer - succeeded: - type: integer - total: - type: integer - required: - - failed - - skipped - - succeeded - - total - Security_Solution_Detections_API_BulkEditRules: + Connectors_create_connector_request_sentinelone: + description: > + The SentinelOne connector communicates with SentinelOne Management + Console via REST API. 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. + title: Create SentinelOne connector request type: object properties: - action: + config: + $ref: '#/components/schemas/Connectors_config_properties_sentinelone' + connector_type_id: + description: The type of connector. enum: - - edit + - .sentinelone + example: .sentinelone type: string - edit: - description: Array of objects containing the edit operations - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayload - minItems: 1 - type: array - ids: - description: Array of rule IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter rules + name: + description: The display name for the connector. + example: my-connector type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_sentinelone' required: - - action - - edit - Security_Solution_Detections_API_BulkEditSkipReason: - enum: - - RULE_NOT_MODIFIED - type: string - Security_Solution_Detections_API_BulkEnableRules: - type: object + - config + - connector_type_id + - name + - secrets + x-technical-preview: true + Connectors_create_connector_request_serverlog: + description: This connector writes an entry to the Kibana server log. properties: - action: + connector_type_id: + description: The type of connector. enum: - - enable + - .server-log + example: .server-log type: string - ids: - description: Array of rule IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter rules + name: + description: The display name for the connector. + example: my-connector type: string required: - - action - Security_Solution_Detections_API_BulkExportActionResponse: - type: string - Security_Solution_Detections_API_BulkExportRules: + - connector_type_id + - name + title: Create server log connector request type: object + Connectors_create_connector_request_servicenow: + description: > + The ServiceNow ITSM connector uses the import set API to create + ServiceNow incidents. You can use the connector for rule actions and + cases. properties: - action: + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow' + connector_type_id: + description: The type of connector. enum: - - export + - .servicenow + example: .servicenow type: string - ids: - description: Array of rule IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter rules + name: + description: The display name for the connector. + example: my-connector type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' required: - - action - Security_Solution_Detections_API_BulkManualRuleRun: + - config + - connector_type_id + - name + - secrets + title: Create ServiceNow ITSM connector request type: object + Connectors_create_connector_request_servicenow_itom: + description: > + The ServiceNow ITOM connector uses the event API to create ServiceNow + events. You can use the connector for rule actions. properties: - action: + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow_itom' + connector_type_id: + description: The type of connector. enum: - - run + - .servicenow-itom + example: .servicenow-itom type: string - ids: - description: Array of rule IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter rules + name: + description: The display name for the connector. + example: my-connector type: string - run: - type: object - properties: - end_date: - description: End date of the manual rule run - type: string - start_date: - description: Start date of the manual rule run - type: string - required: - - start_date + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' required: - - action - - run - Security_Solution_Detections_API_ConcurrentSearches: - minimum: 1 - type: integer - Security_Solution_Detections_API_DataViewId: - type: string - Security_Solution_Detections_API_DefaultParams: + - config + - connector_type_id + - name + - secrets + title: Create ServiceNow ITOM connector request type: object + Connectors_create_connector_request_servicenow_sir: + description: > + The ServiceNow SecOps connector uses the import set API to create + ServiceNow security incidents. You can use the connector for rule + actions and cases. properties: - command: + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow' + connector_type_id: + description: The type of connector. enum: - - isolate + - .servicenow-sir + example: .servicenow-sir type: string - comment: + name: + description: The display name for the connector. + example: my-connector type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' required: - - command - Security_Solution_Detections_API_EcsMapping: - additionalProperties: - type: object - properties: - field: - type: string - value: - oneOf: - - type: string - - items: - type: string - type: array - type: object - Security_Solution_Detections_API_EndpointResponseAction: + - config + - connector_type_id + - name + - secrets + title: Create ServiceNow SecOps connector request type: object + Connectors_create_connector_request_slack_api: + description: The Slack connector uses an API method to send Slack messages. properties: - action_type_id: + config: + $ref: '#/components/schemas/Connectors_config_properties_slack_api' + connector_type_id: + description: The type of connector. enum: - - .endpoint + - .slack_api + example: .slack_api type: string - params: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_DefaultParams - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ProcessesParams + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_slack_api' required: - - action_type_id - - params - Security_Solution_Detections_API_EqlOptionalFields: - type: object - properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - data_view_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_DataViewId' - event_category_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EventCategoryOverride - filters: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFilterArray - index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray - tiebreaker_field: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TiebreakerField - timestamp_field: - $ref: '#/components/schemas/Security_Solution_Detections_API_TimestampField' - Security_Solution_Detections_API_EqlQueryLanguage: - enum: - - eql - type: string - Security_Solution_Detections_API_EqlRequiredFields: + - connector_type_id + - name + - secrets + title: Create Slack connector request type: object + Connectors_create_connector_request_slack_webhook: + description: The Slack connector uses Slack Incoming Webhooks. properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlQueryLanguage - description: Query language to use - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - description: EQL query to execute - type: - description: Rule type + connector_type_id: + description: The type of connector. enum: - - eql - type: string - required: - - type - - query - - language - Security_Solution_Detections_API_EqlRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRuleResponseFields - Security_Solution_Detections_API_EqlRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlOptionalFields - Security_Solution_Detections_API_EqlRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRuleCreateFields - Security_Solution_Detections_API_EqlRulePatchFields: - allOf: - - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlQueryLanguage - description: Query language to use - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - description: EQL query to execute - type: - description: Rule type - enum: - - eql - type: string - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlOptionalFields - Security_Solution_Detections_API_EqlRulePatchProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRulePatchFields - Security_Solution_Detections_API_EqlRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlOptionalFields - Security_Solution_Detections_API_EqlRuleUpdateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRuleCreateFields - Security_Solution_Detections_API_ErrorSchema: - additionalProperties: false + - .slack + example: .slack + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_slack_webhook' + required: + - connector_type_id + - name + - secrets + title: Create Slack connector request type: object + Connectors_create_connector_request_swimlane: + description: >- + The Swimlane connector uses the Swimlane REST API to create Swimlane + records. properties: - error: - type: object - properties: - message: - type: string - status_code: - minimum: 400 - type: integer - required: - - status_code - - message - id: - type: string - item_id: - minLength: 1 + config: + $ref: '#/components/schemas/Connectors_config_properties_swimlane' + connector_type_id: + description: The type of connector. + enum: + - .swimlane + example: .swimlane type: string - list_id: - minLength: 1 + name: + description: The display name for the connector. + example: my-connector type: string - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_swimlane' required: - - error - Security_Solution_Detections_API_EsqlQueryLanguage: - enum: - - esql - type: string - Security_Solution_Detections_API_EsqlRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleResponseFields - Security_Solution_Detections_API_EsqlRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleRequiredFields - Security_Solution_Detections_API_EsqlRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleCreateFields - Security_Solution_Detections_API_EsqlRuleOptionalFields: + - config + - connector_type_id + - name + - secrets + title: Create Swimlane connector request type: object + Connectors_create_connector_request_teams: + description: The Microsoft Teams connector uses Incoming Webhooks. properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - Security_Solution_Detections_API_EsqlRulePatchProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlQueryLanguage - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - description: ESQL query to execute - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - type: - description: Rule type - enum: - - esql - type: string - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleOptionalFields - Security_Solution_Detections_API_EsqlRuleRequiredFields: + connector_type_id: + description: The type of connector. + enum: + - .teams + example: .teams + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_teams' + required: + - connector_type_id + - name + - secrets + title: Create Microsoft Teams connector request type: object + Connectors_create_connector_request_tines: + description: > + The Tines connector uses Tines Webhook actions to send events via POST + request. properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlQueryLanguage - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - description: ESQL query to execute - type: - description: Rule type + config: + $ref: '#/components/schemas/Connectors_config_properties_tines' + connector_type_id: + description: The type of connector. enum: - - esql + - .tines + example: .tines + type: string + name: + description: The display name for the connector. + example: my-connector type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_tines' required: - - type - - language - - query - Security_Solution_Detections_API_EsqlRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleRequiredFields - Security_Solution_Detections_API_EsqlRuleUpdateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleCreateFields - Security_Solution_Detections_API_EventCategoryOverride: - type: string - Security_Solution_Detections_API_ExceptionListType: - description: The exception type - enum: - - detection - - rule_default - - endpoint - - endpoint_trusted_apps - - endpoint_events - - endpoint_host_isolation_exceptions - - endpoint_blocklists - type: string - Security_Solution_Detections_API_ExternalRuleSource: - description: >- - Type of rule source for externally sourced rules, i.e. rules that have - an external source, such as the Elastic Prebuilt rules repo. + - config + - connector_type_id + - name + - secrets + title: Create Tines connector request type: object + Connectors_create_connector_request_torq: + description: > + The Torq connector uses a Torq webhook to trigger workflows with Kibana + actions. properties: - is_customized: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsExternalRuleCustomized - type: + config: + $ref: '#/components/schemas/Connectors_config_properties_torq' + connector_type_id: + description: The type of connector. enum: - - external + - .torq + example: .torq + type: string + name: + description: The display name for the connector. + example: my-connector type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_torq' required: - - type - - is_customized - Security_Solution_Detections_API_FindRulesSortField: - enum: - - created_at - - createdAt - - enabled - - execution_summary.last_execution.date - - execution_summary.last_execution.metrics.execution_gap_duration_s - - execution_summary.last_execution.metrics.total_indexing_duration_ms - - execution_summary.last_execution.metrics.total_search_duration_ms - - execution_summary.last_execution.status + - config + - connector_type_id - name - - risk_score - - riskScore - - severity - - updated_at - - updatedAt - type: string - Security_Solution_Detections_API_HistoryWindowStart: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - Security_Solution_Detections_API_IndexPatternArray: - items: - type: string - type: array - Security_Solution_Detections_API_InternalRuleSource: - description: >- - Type of rule source for internally sourced rules, i.e. created within - the Kibana apps. + - secrets + title: Create Torq connector request type: object + Connectors_create_connector_request_webhook: + description: > + The Webhook connector uses axios to send a POST or PUT request to a web + service. properties: - type: + config: + $ref: '#/components/schemas/Connectors_config_properties_webhook' + connector_type_id: + description: The type of connector. enum: - - internal + - .webhook + example: .webhook + type: string + name: + description: The display name for the connector. + example: my-connector type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_webhook' required: - - type - Security_Solution_Detections_API_InvestigationFields: - description: > - Schema for fields relating to investigation fields. These are user - defined fields we use to highlight - - in various features in the UI such as alert details flyout and - exceptions auto-population from alert. - - Added in PR #163235 - - Right now we only have a single field but anticipate adding more related - fields to store various - - configuration states such as `override` - where a user might say if they - want only these fields to - - display, or if they want these fields + the fields we select. When - expanding this field, it may look - - something like: - - ```typescript - - const investigationFields = z.object({ - field_names: NonEmptyArray(NonEmptyString), - override: z.boolean().optional(), - }); - - ``` + - config + - connector_type_id + - name + - secrets + title: Create Webhook connector request type: object + Connectors_create_connector_request_xmatters: + description: > + The xMatters connector uses the xMatters Workflow for Elastic to send + actionable alerts to on-call xMatters resources. properties: - field_names: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - minItems: 1 - type: array + config: + $ref: '#/components/schemas/Connectors_config_properties_xmatters' + connector_type_id: + description: The type of connector. + enum: + - .xmatters + example: .xmatters + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_xmatters' required: - - field_names - Security_Solution_Detections_API_InvestigationGuide: - description: Notes to help investigate alerts produced by the rule. + - config + - connector_type_id + - name + - secrets + title: Create xMatters connector request + type: object + Connectors_features: + description: | + The feature that uses the connector. + enum: + - alerting + - cases + - generativeAIForSecurity + - generativeAIForObservability + - generativeAIForSearchPlayground + - siem + - uptime type: string - Security_Solution_Detections_API_IsExternalRuleCustomized: + Connectors_is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + Connectors_is_missing_secrets: description: >- - Determines whether an external/prebuilt rule has been customized by the - user (i.e. any of its fields have been modified and diverged from the - base value). + Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false type: boolean - Security_Solution_Detections_API_IsRuleEnabled: - description: Determines whether the rule is enabled. + Connectors_is_preconfigured: + description: > + Indicates whether it is a preconfigured connector. If true, the `config` + and `is_missing_secrets` properties are omitted from the response. + example: false type: boolean - Security_Solution_Detections_API_IsRuleImmutable: - deprecated: true - description: >- - This field determines whether the rule is a prebuilt Elastic rule. It - will be replaced with the `rule_source` field. + Connectors_is_system_action: + description: Indicates whether the connector is used for system actions. + example: false type: boolean - Security_Solution_Detections_API_ItemsPerSearch: - minimum: 1 + Connectors_referenced_by_count: + description: > + Indicates the number of saved objects that reference the connector. If + `is_preconfigured` is true, this value is not calculated. This property + is returned only by the get all connectors API. + example: 2 type: integer - Security_Solution_Detections_API_KqlQueryLanguage: - enum: - - kuery - - lucene - type: string - Security_Solution_Detections_API_MachineLearningJobId: - description: Machine learning job ID - oneOf: - - type: string - - items: - type: string - minItems: 1 - type: array - Security_Solution_Detections_API_MachineLearningRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleResponseFields - Security_Solution_Detections_API_MachineLearningRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleOptionalFields - Security_Solution_Detections_API_MachineLearningRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleCreateFields - Security_Solution_Detections_API_MachineLearningRuleOptionalFields: + Connectors_secrets_properties_bedrock: + description: Defines secrets for connectors when type is `.bedrock`. + properties: + accessKey: + description: The AWS access key for authentication. + type: string + secret: + description: The AWS secret for authentication. + type: string + required: + - accessKey + - secret + title: Connector secrets properties for an Amazon Bedrock connector + type: object + Connectors_secrets_properties_cases_webhook: + title: Connector secrets properties for Webhook - Case Management connector type: object properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - Security_Solution_Detections_API_MachineLearningRulePatchFields: - allOf: - - type: object - properties: - anomaly_threshold: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AnomalyThreshold - machine_learning_job_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningJobId - type: - description: Rule type - enum: - - machine_learning - type: string - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleOptionalFields - Security_Solution_Detections_API_MachineLearningRulePatchProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRulePatchFields - Security_Solution_Detections_API_MachineLearningRuleRequiredFields: + password: + description: >- + The password for HTTP basic authentication. If `hasAuth` is set to + `true`, this property is required. + type: string + user: + description: >- + The username for HTTP basic authentication. If `hasAuth` is set to + `true`, this property is required. + type: string + Connectors_secrets_properties_d3security: + description: Defines secrets for connectors when type is `.d3security`. type: object properties: - anomaly_threshold: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AnomalyThreshold - machine_learning_job_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningJobId - type: - description: Rule type - enum: - - machine_learning + token: + description: The D3 Security token. type: string required: - - type - - machine_learning_job_id - - anomaly_threshold - Security_Solution_Detections_API_MachineLearningRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleOptionalFields - Security_Solution_Detections_API_MachineLearningRuleUpdateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleCreateFields - Security_Solution_Detections_API_MaxSignals: - minimum: 1 - type: integer - Security_Solution_Detections_API_NewTermsFields: - items: - type: string - maxItems: 3 - minItems: 1 - type: array - Security_Solution_Detections_API_NewTermsRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleResponseFields - Security_Solution_Detections_API_NewTermsRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleDefaultableFields - Security_Solution_Detections_API_NewTermsRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleCreateFields - Security_Solution_Detections_API_NewTermsRuleDefaultableFields: + - token + title: Connector secrets properties for a D3 Security connector + Connectors_secrets_properties_email: + description: Defines secrets for connectors when type is `.email`. + properties: + clientSecret: + description: > + The Microsoft Exchange Client secret for OAuth 2.0 client + credentials authentication. It must be URL-encoded. If `service` is + `exchange_server`, this property is required. + type: string + password: + description: > + The password for HTTP basic authentication. If `hasAuth` is set to + `true`, this property is required. + type: string + user: + description: > + The username for HTTP basic authentication. If `hasAuth` is set to + `true`, this property is required. + type: string + title: Connector secrets properties for an email connector + type: object + Connectors_secrets_properties_gemini: + description: Defines secrets for connectors when type is `.gemini`. + properties: + credentialsJSON: + description: >- + The service account credentials JSON file. The service account + should have Vertex AI user IAM role assigned to it. + type: string + required: + - credentialsJSON + title: Connector secrets properties for a Google Gemini connector type: object + Connectors_secrets_properties_genai: + description: Defines secrets for connectors when type is `.gen-ai`. properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - Security_Solution_Detections_API_NewTermsRuleOptionalFields: + apiKey: + description: The OpenAI API key. + type: string + title: Connector secrets properties for an OpenAI connector type: object - properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - data_view_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_DataViewId' - filters: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFilterArray - index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray - Security_Solution_Detections_API_NewTermsRulePatchFields: - allOf: - - type: object - properties: - history_window_start: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_HistoryWindowStart - new_terms_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsFields - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - type: - description: Rule type - enum: - - new_terms - type: string - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleDefaultableFields - Security_Solution_Detections_API_NewTermsRulePatchProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRulePatchFields - Security_Solution_Detections_API_NewTermsRuleRequiredFields: + Connectors_secrets_properties_jira: + description: Defines secrets for connectors when type is `.jira`. type: object properties: - history_window_start: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_HistoryWindowStart - new_terms_fields: - $ref: '#/components/schemas/Security_Solution_Detections_API_NewTermsFields' - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - type: - description: Rule type - enum: - - new_terms + apiToken: + description: The Jira API authentication token for HTTP basic authentication. + type: string + email: + description: The account email for HTTP Basic authentication. type: string required: - - type - - query - - new_terms_fields - - history_window_start - Security_Solution_Detections_API_NewTermsRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleOptionalFields - - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - required: - - language - Security_Solution_Detections_API_NewTermsRuleUpdateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleCreateFields - Security_Solution_Detections_API_NonEmptyString: - description: A string that is not empty and does not contain only whitespace - minLength: 1 - pattern: ^(?! *$).+$ - type: string - Security_Solution_Detections_API_NormalizedRuleAction: - additionalProperties: false + - apiToken + - email + title: Connector secrets properties for a Jira connector + Connectors_secrets_properties_opsgenie: + description: Defines secrets for connectors when type is `.opsgenie`. type: object properties: - alerts_filter: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionAlertsFilter - frequency: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionFrequency - group: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionGroup - id: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleActionId' - params: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionParams + apiKey: + description: The Opsgenie API authentication key for HTTP Basic authentication. + type: string required: - - id - - params - Security_Solution_Detections_API_NormalizedRuleError: + - apiKey + title: Connector secrets properties for an Opsgenie connector + Connectors_secrets_properties_pagerduty: + description: Defines secrets for connectors when type is `.pagerduty`. + properties: + routingKey: + description: > + A 32 character PagerDuty Integration Key for an integration on a + service. + type: string + required: + - routingKey + title: Connector secrets properties for a PagerDuty connector + type: object + Connectors_secrets_properties_resilient: + description: Defines secrets for connectors when type is `.resilient`. type: object properties: - err_code: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionsDryRunErrCode - message: + apiKeyId: + description: The authentication key ID for HTTP Basic authentication. + type: string + apiKeySecret: + description: The authentication key secret for HTTP Basic authentication. type: string - rules: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDetailsInError - type: array - status_code: - type: integer required: - - message - - status_code - - rules - Security_Solution_Detections_API_OsqueryParams: + - apiKeyId + - apiKeySecret + title: Connector secrets properties for IBM Resilient connector + Connectors_secrets_properties_sentinelone: + description: Defines secrets for connectors when type is `.sentinelone`. + properties: + token: + description: The A SentinelOne API token. + type: string + required: + - token + title: Connector secrets properties for a SentinelOne connector type: object + Connectors_secrets_properties_servicenow: + description: >- + Defines secrets for connectors when type is `.servicenow`, + `.servicenow-sir`, or `.servicenow-itom`. properties: - ecs_mapping: - $ref: '#/components/schemas/Security_Solution_Detections_API_EcsMapping' - pack_id: + clientSecret: + description: >- + The client secret assigned to your OAuth application. This property + is required when `isOAuth` is `true`. type: string - queries: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_OsqueryQuery' - type: array - query: + password: + description: >- + The password for HTTP basic authentication. This property is + required when `isOAuth` is `false`. + type: string + privateKey: + description: >- + The RSA private key that you created for use in ServiceNow. This + property is required when `isOAuth` is `true`. type: string - saved_query_id: + privateKeyPassword: + description: >- + The password for the RSA private key. This property is required when + `isOAuth` is `true` and you set a password on your private key. type: string - timeout: - type: number - Security_Solution_Detections_API_OsqueryQuery: + username: + description: >- + The username for HTTP basic authentication. This property is + required when `isOAuth` is `false`. + type: string + title: >- + Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and + ServiceNow SecOps connectors + type: object + Connectors_secrets_properties_slack_api: + description: Defines secrets for connectors when type is `.slack`. type: object properties: - ecs_mapping: - $ref: '#/components/schemas/Security_Solution_Detections_API_EcsMapping' - id: - description: Query ID + token: + description: Slack bot user OAuth token. + type: string + required: + - token + title: Connector secrets properties for a Web API Slack connector + Connectors_secrets_properties_slack_webhook: + description: Defines secrets for connectors when type is `.slack`. + type: object + properties: + webhookUrl: + description: Slack webhook url. type: string - platform: + required: + - webhookUrl + title: Connector secrets properties for a Webhook Slack connector + Connectors_secrets_properties_swimlane: + description: Defines secrets for connectors when type is `.swimlane`. + properties: + apiToken: + description: Swimlane API authentication token. type: string - query: - description: Query to run + title: Connector secrets properties for a Swimlane connector + type: object + Connectors_secrets_properties_teams: + description: Defines secrets for connectors when type is `.teams`. + properties: + webhookUrl: + description: > + The URL of the incoming webhook. If you are using the + `xpack.actions.allowedHosts` setting, add the hostname to the + allowed hosts. type: string - removed: - type: boolean - snapshot: - type: boolean - version: - description: Query version + required: + - webhookUrl + title: Connector secrets properties for a Microsoft Teams connector + type: object + Connectors_secrets_properties_tines: + description: Defines secrets for connectors when type is `.tines`. + properties: + email: + description: The email used to sign in to Tines. + type: string + token: + description: The Tines API token. type: string required: - - id - - query - Security_Solution_Detections_API_OsqueryResponseAction: + - email + - token + title: Connector secrets properties for a Tines connector type: object + Connectors_secrets_properties_torq: + description: Defines secrets for connectors when type is `.torq`. properties: - action_type_id: - enum: - - .osquery + token: + description: The secret of the webhook authentication header. + type: string + required: + - token + title: Connector secrets properties for a Torq connector + type: object + Connectors_secrets_properties_webhook: + description: Defines secrets for connectors when type is `.webhook`. + properties: + crt: + description: >- + If `authType` is `webhook-authentication-ssl` and `certType` is + `ssl-crt-key`, it is a base64 encoded version of the CRT or CERT + file. + type: string + key: + description: >- + If `authType` is `webhook-authentication-ssl` and `certType` is + `ssl-crt-key`, it is a base64 encoded version of the KEY file. + type: string + password: + description: > + The password for HTTP basic authentication or the passphrase for the + SSL certificate files. If `hasAuth` is set to `true` and `authType` + is `webhook-authentication-basic`, this property is required. type: string - params: - $ref: '#/components/schemas/Security_Solution_Detections_API_OsqueryParams' - required: - - action_type_id - - params - Security_Solution_Detections_API_PlatformErrorResponse: - type: object - properties: - error: + pfx: + description: >- + If `authType` is `webhook-authentication-ssl` and `certType` is + `ssl-pfx`, it is a base64 encoded version of the PFX or P12 file. type: string - message: + user: + description: > + The username for HTTP basic authentication. If `hasAuth` is set to + `true` and `authType` is `webhook-authentication-basic`, this + property is required. type: string - statusCode: - type: integer - required: - - statusCode - - error - - message - Security_Solution_Detections_API_ProcessesParams: + title: Connector secrets properties for a Webhook connector type: object + Connectors_secrets_properties_xmatters: + description: Defines secrets for connectors when type is `.xmatters`. properties: - command: - enum: - - kill-process - - suspend-process + password: + description: > + A user name for HTTP basic authentication. It is applicable only + when `usesBasic` is `true`. type: string - comment: + secretsUrl: + description: > + The request URL for the Elastic Alerts trigger in xMatters with the + API key included in the URL. It is applicable only when `usesBasic` + is `false`. type: string - config: - type: object - properties: - field: - description: Field to use instead of process.pid - type: string - overwrite: - default: true - description: Whether to overwrite field with process.pid - type: boolean - required: - - field - required: - - command - - config - Security_Solution_Detections_API_QueryRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleResponseFields - Security_Solution_Detections_API_QueryRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleDefaultableFields - Security_Solution_Detections_API_QueryRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleCreateFields - Security_Solution_Detections_API_QueryRuleDefaultableFields: - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - Security_Solution_Detections_API_QueryRuleOptionalFields: + user: + description: > + A password for HTTP basic authentication. It is applicable only when + `usesBasic` is `true`. + type: string + title: Connector secrets properties for an xMatters connector type: object - properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - data_view_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_DataViewId' - filters: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFilterArray - index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray - response_actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ResponseAction - type: array - saved_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_SavedQueryId' - Security_Solution_Detections_API_QueryRulePatchFields: - allOf: - - type: object - properties: - type: - description: Rule type - enum: - - query - type: string + Connectors_update_connector_request: + description: The properties vary depending on the connector type. + oneOf: + - $ref: '#/components/schemas/Connectors_update_connector_request_bedrock' + - $ref: '#/components/schemas/Connectors_update_connector_request_gemini' - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleOptionalFields + #/components/schemas/Connectors_update_connector_request_cases_webhook + - $ref: '#/components/schemas/Connectors_update_connector_request_d3security' + - $ref: '#/components/schemas/Connectors_update_connector_request_email' + - $ref: '#/components/schemas/Connectors_create_connector_request_genai' + - $ref: '#/components/schemas/Connectors_update_connector_request_index' + - $ref: '#/components/schemas/Connectors_update_connector_request_jira' + - $ref: '#/components/schemas/Connectors_update_connector_request_opsgenie' + - $ref: '#/components/schemas/Connectors_update_connector_request_pagerduty' + - $ref: '#/components/schemas/Connectors_update_connector_request_resilient' + - $ref: '#/components/schemas/Connectors_update_connector_request_sentinelone' + - $ref: '#/components/schemas/Connectors_update_connector_request_serverlog' + - $ref: '#/components/schemas/Connectors_update_connector_request_servicenow' - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleDefaultableFields - Security_Solution_Detections_API_QueryRulePatchProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion + #/components/schemas/Connectors_update_connector_request_servicenow_itom + - $ref: '#/components/schemas/Connectors_update_connector_request_slack_api' - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRulePatchFields - Security_Solution_Detections_API_QueryRuleRequiredFields: + #/components/schemas/Connectors_update_connector_request_slack_webhook + - $ref: '#/components/schemas/Connectors_update_connector_request_swimlane' + - $ref: '#/components/schemas/Connectors_update_connector_request_teams' + - $ref: '#/components/schemas/Connectors_update_connector_request_tines' + - $ref: '#/components/schemas/Connectors_update_connector_request_torq' + - $ref: '#/components/schemas/Connectors_update_connector_request_webhook' + - $ref: '#/components/schemas/Connectors_update_connector_request_xmatters' + title: Update connector request body properties + Connectors_update_connector_request_bedrock: + title: Update Amazon Bedrock connector request type: object properties: - type: - description: Rule type - enum: - - query + config: + $ref: '#/components/schemas/Connectors_config_properties_bedrock' + name: + description: The display name for the connector. type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_bedrock' required: - - type - Security_Solution_Detections_API_QueryRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleOptionalFields - - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - required: - - query - - language - Security_Solution_Detections_API_QueryRuleUpdateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleCreateFields - Security_Solution_Detections_API_RelatedIntegration: - description: > - Related integration is a potential dependency of a rule. It's assumed - that if the user installs - - one of the related integrations of a rule, the rule might start to work - properly because it will - - have source events (generated by this integration) potentially matching - the rule's query. - - - NOTE: Proper work is not guaranteed, because a related integration, if - installed, can be - - configured differently or generate data that is not necessarily relevant - for this rule. - - - Related integration is a combination of a Fleet package and (optionally) - one of the - - package's "integrations" that this package contains. It is represented - by 3 properties: - - - - `package`: name of the package (required, unique id) - - - `version`: version of the package (required, semver-compatible) - - - `integration`: name of the integration of this package (optional, id - within the package) - - - There are Fleet packages like `windows` that contain only one - integration; in this case, - - `integration` should be unspecified. There are also packages like `aws` - and `azure` that contain - - several integrations; in this case, `integration` should be specified. - - - @example - - const x: RelatedIntegration = { - package: 'windows', - version: '1.5.x', - }; - - - @example - - const x: RelatedIntegration = { - package: 'azure', - version: '~1.1.6', - integration: 'activitylogs', - }; + - config + - name + Connectors_update_connector_request_cases_webhook: + title: Update Webhook - Case Managment connector request type: object properties: - integration: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - package: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - version: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' + config: + $ref: '#/components/schemas/Connectors_config_properties_cases_webhook' + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_cases_webhook' required: - - package - - version - Security_Solution_Detections_API_RelatedIntegrationArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegration - type: array - Security_Solution_Detections_API_RequiredField: - description: > - Describes an Elasticsearch field that is needed for the rule to - function. - - - Almost all types of Security rules check source event documents for a - match to some kind of - - query or filter. If a document has certain field with certain values, - then it's a match and - - the rule will generate an alert. - - - Required field is an event field that must be present in the source - indices of a given rule. - - - @example - - const standardEcsField: RequiredField = { - name: 'event.action', - type: 'keyword', - ecs: true, - }; - - - @example - - const nonEcsField: RequiredField = { - name: 'winlog.event_data.AttributeLDAPDisplayName', - type: 'keyword', - ecs: false, - }; + - config + - name + Connectors_update_connector_request_d3security: + title: Update D3 Security connector request type: object properties: - ecs: - description: Whether the field is an ECS field - type: boolean + config: + $ref: '#/components/schemas/Connectors_config_properties_d3security' name: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - description: Name of an Elasticsearch field - type: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - description: Type of the Elasticsearch field + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_d3security' required: + - config - name - - type - - ecs - Security_Solution_Detections_API_RequiredFieldArray: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_RequiredField' - type: array - Security_Solution_Detections_API_RequiredFieldInput: - description: >- - Input parameters to create a RequiredField. Does not include the `ecs` - field, because `ecs` is calculated on the backend based on the field - name and type. + - secrets + Connectors_update_connector_request_email: + title: Update email connector request type: object properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_email' name: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - description: Name of an Elasticsearch field - type: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - description: Type of an Elasticsearch field + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_email' required: + - config - name - - type - Security_Solution_Detections_API_ResponseAction: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_OsqueryResponseAction - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EndpointResponseAction - Security_Solution_Detections_API_ResponseFields: + Connectors_update_connector_request_gemini: + title: Update Google Gemini connector request type: object properties: - created_at: - format: date-time - type: string - created_by: - type: string - execution_summary: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExecutionSummary - id: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleObjectId' - immutable: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleImmutable - required_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldArray - revision: - minimum: 0 - type: integer - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_source: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleSource' - updated_at: - format: date-time - type: string - updated_by: + config: + $ref: '#/components/schemas/Connectors_config_properties_gemini' + name: + description: The display name for the connector. type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_gemini' required: - - id - - rule_id - - immutable - - updated_at - - updated_by - - created_at - - created_by - - revision - - related_integrations - - required_fields - Security_Solution_Detections_API_RiskScore: - description: Risk score (0 to 100) - maximum: 100 - minimum: 0 - type: integer - Security_Solution_Detections_API_RiskScoreMapping: - description: >- - Overrides generated alerts' risk_score with a value from the source - event - items: - type: object - properties: - field: - type: string - operator: - enum: - - equals - type: string - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - value: - type: string - required: - - field - - operator - - value - type: array - Security_Solution_Detections_API_RuleAction: + - config + - name + Connectors_update_connector_request_index: + title: Update index connector request type: object properties: - action_type_id: - description: The action type used for sending notifications. + config: + $ref: '#/components/schemas/Connectors_config_properties_index' + name: + description: The display name for the connector. type: string - alerts_filter: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionAlertsFilter - frequency: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionFrequency - group: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionGroup - id: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleActionId' - params: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionParams - uuid: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' required: - - action_type_id - - id - - params - Security_Solution_Detections_API_RuleActionAlertsFilter: - additionalProperties: true - type: object - Security_Solution_Detections_API_RuleActionFrequency: - description: >- - The action frequency defines when the action runs (for example, only on - rule execution or at specific time intervals). + - config + - name + Connectors_update_connector_request_jira: + title: Update Jira connector request type: object properties: - notifyWhen: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionNotifyWhen - summary: - description: >- - Action summary indicates whether we will send a summary notification - about all the generate alerts or notification per individual alert - type: boolean - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - nullable: true + config: + $ref: '#/components/schemas/Connectors_config_properties_jira' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_jira' required: - - summary - - notifyWhen - - throttle - Security_Solution_Detections_API_RuleActionGroup: - description: >- - Optionally groups actions by use cases. Use `default` for alert - notifications. - type: string - Security_Solution_Detections_API_RuleActionId: - description: The connector ID. - type: string - Security_Solution_Detections_API_RuleActionNotifyWhen: - description: >- - The condition for throttling the notification: `onActionGroupChange`, - `onActiveAlert`, or `onThrottleInterval` - enum: - - onActiveAlert - - onThrottleInterval - - onActionGroupChange - type: string - Security_Solution_Detections_API_RuleActionParams: - additionalProperties: true - description: >- - Object containing the allowed connector fields, which varies according - to the connector type. + - config + - name + - secrets + Connectors_update_connector_request_opsgenie: + title: Update Opsgenie connector request type: object - Security_Solution_Detections_API_RuleActionThrottle: - description: Defines how often rule actions are taken. - oneOf: - - enum: - - no_actions - - rule - type: string - - description: 'Time interval in seconds, minutes, hours, or days.' - example: 1h - pattern: '^[1-9]\d*[smhd]$' + properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_opsgenie' + name: + description: The display name for the connector. type: string - Security_Solution_Detections_API_RuleAuthorArray: - items: - type: string - type: array - Security_Solution_Detections_API_RuleCreateProps: - anyOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleCreateProps - discriminator: - propertyName: type - Security_Solution_Detections_API_RuleDescription: - minLength: 1 - type: string - Security_Solution_Detections_API_RuleDetailsInError: + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_opsgenie' + required: + - config + - name + - secrets + Connectors_update_connector_request_pagerduty: + title: Update PagerDuty connector request type: object properties: - id: - type: string + config: + $ref: '#/components/schemas/Connectors_config_properties_pagerduty' name: + description: The display name for the connector. type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_pagerduty' required: - - id - Security_Solution_Detections_API_RuleExceptionList: + - config + - name + - secrets + Connectors_update_connector_request_resilient: + title: Update IBM Resilient connector request type: object properties: - id: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - description: ID of the exception container - list_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - description: List ID of the exception container - namespace_type: - description: Determines the exceptions validity in rule's Kibana space - enum: - - agnostic - - single + config: + $ref: '#/components/schemas/Connectors_config_properties_resilient' + name: + description: The display name for the connector. type: string - type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ExceptionListType + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_resilient' required: - - id - - list_id - - type - - namespace_type - Security_Solution_Detections_API_RuleExecutionMetrics: + - config + - name + - secrets + Connectors_update_connector_request_sentinelone: + title: Update SentinelOne connector request type: object properties: - execution_gap_duration_s: - description: Duration in seconds of execution gap - minimum: 0 - type: integer - total_enrichment_duration_ms: - description: >- - Total time spent enriching documents during current rule execution - cycle - minimum: 0 - type: integer - total_indexing_duration_ms: - description: >- - Total time spent indexing documents during current rule execution - cycle - minimum: 0 - type: integer - total_search_duration_ms: - description: >- - Total time spent performing ES searches as measured by Kibana; - includes network latency and time spent serializing/deserializing - request/response - minimum: 0 - type: integer - Security_Solution_Detections_API_RuleExecutionStatus: - description: >- - Custom execution status of Security rules that is different from the - status used in the Alerting Framework. We merge our custom status with - the Framework's status to determine the resulting status of a rule. - - - going to run - @deprecated Replaced by the 'running' status but left - for backwards compatibility with rule execution events already written - to Event Log in the prior versions of Kibana. Don't use when writing - rule status changes. - - - running - Rule execution started but not reached any intermediate or - final status. - - - partial failure - Rule can partially fail for various reasons either - in the middle of an execution (in this case we update its status right - away) or in the end of it. So currently this status can be both - intermediate and final at the same time. A typical reason for a partial - failure: not all the indices that the rule searches over actually exist. - - - failed - Rule failed to execute due to unhandled exception or a reason - defined in the business logic of its executor function. - - - succeeded - Rule executed successfully without any issues. Note: this - status is just an indication of a rule's "health". The rule might or - might not generate any alerts despite of it. - enum: - - going to run - - running - - partial failure - - failed - - succeeded - type: string - Security_Solution_Detections_API_RuleExecutionStatusOrder: - type: integer - Security_Solution_Detections_API_RuleExecutionSummary: + config: + $ref: '#/components/schemas/Connectors_config_properties_sentinelone' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_sentinelone' + required: + - config + - name + - secrets + Connectors_update_connector_request_serverlog: + title: Update server log connector request type: object properties: - last_execution: - type: object - properties: - date: - description: Date of the last execution - format: date-time - type: string - message: - type: string - metrics: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExecutionMetrics - status: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExecutionStatus - description: Status of the last execution - status_order: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExecutionStatusOrder - required: - - date - - status - - status_order - - message - - metrics + name: + description: The display name for the connector. + type: string required: - - last_execution - Security_Solution_Detections_API_RuleFalsePositiveArray: - items: - type: string - type: array - Security_Solution_Detections_API_RuleFilterArray: - items: {} - type: array - Security_Solution_Detections_API_RuleInterval: - description: >- - Frequency of rule execution, using a date math range. For example, "1h" - means the rule runs every hour. Defaults to 5m (5 minutes). - type: string - Security_Solution_Detections_API_RuleIntervalFrom: - description: >- - Time from which data is analyzed each time the rule runs, using a date - math range. For example, now-4200s means the rule analyzes data from 70 - minutes before its start time. Defaults to now-6m (analyzes data from 6 - minutes before the start time). - format: date-math - type: string - Security_Solution_Detections_API_RuleIntervalTo: - type: string - Security_Solution_Detections_API_RuleLicense: - description: The rule's license. - type: string - Security_Solution_Detections_API_RuleMetadata: - additionalProperties: true - type: object - Security_Solution_Detections_API_RuleName: - minLength: 1 - type: string - Security_Solution_Detections_API_RuleNameOverride: - description: Sets the source field for the alert's signal.rule.name value - type: string - Security_Solution_Detections_API_RuleObjectId: - $ref: '#/components/schemas/Security_Solution_Detections_API_UUID' - Security_Solution_Detections_API_RulePatchProps: - anyOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRulePatchProps - Security_Solution_Detections_API_RulePreviewLogs: + - name + Connectors_update_connector_request_servicenow: + title: Update ServiceNow ITSM connector or ServiceNow SecOps request type: object properties: - duration: - description: Execution duration in milliseconds - type: integer - errors: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - type: array - startedAt: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - warnings: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - type: array + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' required: - - errors - - warnings - - duration - Security_Solution_Detections_API_RulePreviewParams: + - config + - name + - secrets + Connectors_update_connector_request_servicenow_itom: + title: Create ServiceNow ITOM connector request type: object properties: - invocationCount: - type: integer - timeframeEnd: - format: date-time + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow_itom' + name: + description: The display name for the connector. type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' required: - - invocationCount - - timeframeEnd - Security_Solution_Detections_API_RuleQuery: - type: string - Security_Solution_Detections_API_RuleReferenceArray: - items: - type: string - type: array - Security_Solution_Detections_API_RuleResponse: - anyOf: - - $ref: '#/components/schemas/Security_Solution_Detections_API_EqlRule' - - $ref: '#/components/schemas/Security_Solution_Detections_API_QueryRule' - - $ref: '#/components/schemas/Security_Solution_Detections_API_SavedQueryRule' - - $ref: '#/components/schemas/Security_Solution_Detections_API_ThresholdRule' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRule - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRule - - $ref: '#/components/schemas/Security_Solution_Detections_API_NewTermsRule' - - $ref: '#/components/schemas/Security_Solution_Detections_API_EsqlRule' - discriminator: - propertyName: type - Security_Solution_Detections_API_RuleSignatureId: - description: 'Could be any string, not necessarily a UUID' - type: string - Security_Solution_Detections_API_RuleSource: - description: >- - Discriminated union that determines whether the rule is internally - sourced (created within the Kibana app) or has an external source, such - as the Elastic Prebuilt rules repo. - discriminator: - propertyName: type - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ExternalRuleSource - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InternalRuleSource - Security_Solution_Detections_API_RuleTagArray: - description: >- - String array containing words and phrases to help categorize, filter, - and search rules. Defaults to an empty array. - items: - type: string - type: array - Security_Solution_Detections_API_RuleUpdateProps: - anyOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleUpdateProps - discriminator: - propertyName: type - Security_Solution_Detections_API_RuleVersion: - description: The rule's version number. - minimum: 1 - type: integer - Security_Solution_Detections_API_SavedObjectResolveAliasPurpose: - enum: - - savedObjectConversion - - savedObjectImport - type: string - Security_Solution_Detections_API_SavedObjectResolveAliasTargetId: - type: string - Security_Solution_Detections_API_SavedObjectResolveOutcome: - enum: - - exactMatch - - aliasMatch - - conflict - type: string - Security_Solution_Detections_API_SavedQueryId: - type: string - Security_Solution_Detections_API_SavedQueryRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleResponseFields - Security_Solution_Detections_API_SavedQueryRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleDefaultableFields - Security_Solution_Detections_API_SavedQueryRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleCreateFields - Security_Solution_Detections_API_SavedQueryRuleDefaultableFields: + - config + - name + - secrets + Connectors_update_connector_request_slack_api: + title: Update Slack connector request type: object properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - Security_Solution_Detections_API_SavedQueryRuleOptionalFields: + config: + $ref: '#/components/schemas/Connectors_config_properties_slack_api' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_slack_api' + required: + - name + - secrets + Connectors_update_connector_request_slack_webhook: + title: Update Slack connector request type: object properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - data_view_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_DataViewId' - filters: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFilterArray - index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - response_actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ResponseAction - type: array - Security_Solution_Detections_API_SavedQueryRulePatchFields: - allOf: - - type: object - properties: - saved_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryId - type: - description: Rule type - enum: - - saved_query - type: string - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleDefaultableFields - Security_Solution_Detections_API_SavedQueryRulePatchProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRulePatchFields - Security_Solution_Detections_API_SavedQueryRuleRequiredFields: + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_slack_webhook' + required: + - name + - secrets + Connectors_update_connector_request_swimlane: + title: Update Swimlane connector request type: object properties: - saved_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_SavedQueryId' - type: - description: Rule type - enum: - - saved_query + config: + $ref: '#/components/schemas/Connectors_config_properties_swimlane' + name: + description: The display name for the connector. + example: my-connector type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_swimlane' required: - - type - - saved_id - Security_Solution_Detections_API_SavedQueryRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleOptionalFields - - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - required: - - language - Security_Solution_Detections_API_SavedQueryRuleUpdateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleCreateFields - Security_Solution_Detections_API_SetAlertsStatusByIds: + - config + - name + - secrets + Connectors_update_connector_request_teams: + title: Update Microsoft Teams connector request type: object properties: - signal_ids: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - minItems: 1 - type: array - status: - $ref: '#/components/schemas/Security_Solution_Detections_API_AlertStatus' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_teams' required: - - signal_ids - - status - Security_Solution_Detections_API_SetAlertsStatusByQuery: + - name + - secrets + Connectors_update_connector_request_tines: + title: Update Tines connector request type: object properties: - conflicts: - default: abort - enum: - - abort - - proceed + config: + $ref: '#/components/schemas/Connectors_config_properties_tines' + name: + description: The display name for the connector. type: string - query: - additionalProperties: true - type: object - status: - $ref: '#/components/schemas/Security_Solution_Detections_API_AlertStatus' + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_tines' required: - - query - - status - Security_Solution_Detections_API_SetAlertTags: + - config + - name + - secrets + Connectors_update_connector_request_torq: + title: Update Torq connector request type: object properties: - tags_to_add: - $ref: '#/components/schemas/Security_Solution_Detections_API_AlertTags' - tags_to_remove: - $ref: '#/components/schemas/Security_Solution_Detections_API_AlertTags' + config: + $ref: '#/components/schemas/Connectors_config_properties_torq' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_torq' required: - - tags_to_add - - tags_to_remove - Security_Solution_Detections_API_SetupGuide: - type: string - Security_Solution_Detections_API_Severity: - description: Severity of the rule - enum: - - low - - medium - - high - - critical - type: string - Security_Solution_Detections_API_SeverityMapping: - description: Overrides generated alerts' severity with values from the source event - items: - type: object - properties: - field: - type: string - operator: - enum: - - equals - type: string - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - value: - type: string - required: - - field - - operator - - severity - - value - type: array - Security_Solution_Detections_API_SiemErrorResponse: + - config + - name + - secrets + Connectors_update_connector_request_webhook: + title: Update Webhook connector request + type: object + properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_webhook' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_webhook' + required: + - config + - name + - secrets + Connectors_update_connector_request_xmatters: + title: Update xMatters connector request type: object properties: - message: + config: + $ref: '#/components/schemas/Connectors_config_properties_xmatters' + name: + description: The display name for the connector. type: string - status_code: - type: integer + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_xmatters' required: - - status_code - - message - Security_Solution_Detections_API_SortOrder: - enum: - - asc - - desc - type: string - Security_Solution_Detections_API_Threat: + - config + - name + - secrets + Data_views_400_response: + title: Bad request type: object properties: - framework: - description: Relevant attack framework + error: + example: Bad Request type: string - tactic: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThreatTactic' - technique: - description: Array containing information on the attack techniques (optional) - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatTechnique - type: array + message: + type: string + statusCode: + example: 400 + type: number required: - - framework - - tactic - Security_Solution_Detections_API_ThreatArray: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_Threat' - type: array - Security_Solution_Detections_API_ThreatFilters: - items: - description: >- - Query and filter context array used to filter documents from the - Elasticsearch index containing the threat values - type: array - Security_Solution_Detections_API_ThreatIndex: - items: - type: string - type: array - Security_Solution_Detections_API_ThreatIndicatorPath: - description: >- - Defines the path to the threat indicator in the indicator documents - (optional) - type: string - Security_Solution_Detections_API_ThreatMapping: - items: - type: object - properties: - entries: - items: - type: object - properties: - field: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - type: - enum: - - mapping - type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - required: - - field - - type - - value - type: array - required: - - entries - minItems: 1 - type: array - Security_Solution_Detections_API_ThreatMatchRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleResponseFields - Security_Solution_Detections_API_ThreatMatchRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleDefaultableFields - Security_Solution_Detections_API_ThreatMatchRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleCreateFields - Security_Solution_Detections_API_ThreatMatchRuleDefaultableFields: + - statusCode + - error + - message + Data_views_404_response: type: object properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - Security_Solution_Detections_API_ThreatMatchRuleOptionalFields: + error: + enum: + - Not Found + example: Not Found + type: string + message: + example: >- + Saved object [index-pattern/caaad6d0-920c-11ed-b36a-874bd1548a00] + not found + type: string + statusCode: + enum: + - 404 + example: 404 + type: integer + Data_views_allownoindex: + description: Allows the data view saved object to exist before the data is available. + type: boolean + Data_views_create_data_view_request_object: + title: Create data view request type: object properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - concurrent_searches: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ConcurrentSearches - data_view_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_DataViewId' - filters: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFilterArray - index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray - items_per_search: - $ref: '#/components/schemas/Security_Solution_Detections_API_ItemsPerSearch' - saved_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_SavedQueryId' - threat_filters: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThreatFilters' - threat_indicator_path: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatIndicatorPath - threat_language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - Security_Solution_Detections_API_ThreatMatchRulePatchFields: - allOf: - - type: object - properties: - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - threat_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatIndex - threat_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMapping - threat_query: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatQuery - type: - description: Rule type - enum: - - threat_match - type: string - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleDefaultableFields - Security_Solution_Detections_API_ThreatMatchRulePatchProps: - allOf: - - type: object + data_view: + description: The data view object. + type: object properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom + allowNoIndex: + $ref: '#/components/schemas/Data_views_allownoindex' + fieldAttrs: + additionalProperties: + $ref: '#/components/schemas/Data_views_fieldattrs' + type: object + fieldFormats: + $ref: '#/components/schemas/Data_views_fieldformats' + fields: + type: object id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata + type: string name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo + description: The data view name. + type: string + namespaces: + $ref: '#/components/schemas/Data_views_namespaces' + runtimeFieldMap: + additionalProperties: + $ref: '#/components/schemas/Data_views_runtimefieldmap' + type: object + sourceFilters: + $ref: '#/components/schemas/Data_views_sourcefilters' + timeFieldName: + $ref: '#/components/schemas/Data_views_timefieldname' + title: + $ref: '#/components/schemas/Data_views_title' + type: + $ref: '#/components/schemas/Data_views_type' + typeMeta: + $ref: '#/components/schemas/Data_views_typemeta' version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRulePatchFields - Security_Solution_Detections_API_ThreatMatchRuleRequiredFields: + type: string + required: + - title + override: + default: false + description: >- + Override an existing data view if a data view with the provided + title already exists. + type: boolean + required: + - data_view + Data_views_data_view_response_object: + title: Data view response properties type: object properties: - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - threat_index: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThreatIndex' - threat_mapping: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThreatMapping' - threat_query: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThreatQuery' - type: - description: Rule type - enum: - - threat_match - type: string - required: - - type - - query - - threat_query - - threat_mapping - - threat_index - Security_Solution_Detections_API_ThreatMatchRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleOptionalFields - - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - required: - - language - Security_Solution_Detections_API_ThreatMatchRuleUpdateProps: - allOf: - - type: object + data_view: + type: object properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom + allowNoIndex: + $ref: '#/components/schemas/Data_views_allownoindex' + fieldAttrs: + additionalProperties: + $ref: '#/components/schemas/Data_views_fieldattrs' + type: object + fieldFormats: + $ref: '#/components/schemas/Data_views_fieldformats' + fields: + type: object id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata + example: ff959d40-b880-11e8-a6d9-e546fe2bba5f + type: string name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo + description: The data view name. + type: string + namespaces: + $ref: '#/components/schemas/Data_views_namespaces' + runtimeFieldMap: + additionalProperties: + $ref: '#/components/schemas/Data_views_runtimefieldmap' + type: object + sourceFilters: + $ref: '#/components/schemas/Data_views_sourcefilters' + timeFieldName: + $ref: '#/components/schemas/Data_views_timefieldname' + title: + $ref: '#/components/schemas/Data_views_title' + typeMeta: + $ref: '#/components/schemas/Data_views_typemeta_response' version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleCreateFields - Security_Solution_Detections_API_ThreatQuery: - description: Query to run - type: string - Security_Solution_Detections_API_ThreatSubtechnique: + example: WzQ2LDJd + type: string + Data_views_fieldattrs: + description: A map of field attributes by field name. type: object properties: - id: - description: Subtechnique ID - type: string - name: - description: Subtechnique name + count: + description: Popularity count for the field. + type: integer + customDescription: + description: Custom description for the field. + maxLength: 300 type: string - reference: - description: Subtechnique reference + customLabel: + description: Custom label for the field. type: string - required: - - id - - name - - reference - Security_Solution_Detections_API_ThreatTactic: + Data_views_fieldformats: + description: A map of field formats by field name. + type: object + Data_views_namespaces: + description: >- + An array of space identifiers for sharing the data view between multiple + spaces. + items: + default: default + type: string + type: array + Data_views_runtimefieldmap: + description: A map of runtime field definitions by field name. type: object properties: - id: - description: Tactic ID - type: string - name: - description: Tactic name - type: string - reference: - description: Tactic reference + script: + type: object + properties: + source: + description: Script for the runtime field. + type: string + type: + description: Mapping type of the runtime field. type: string required: - - id - - name - - reference - Security_Solution_Detections_API_ThreatTechnique: + - script + - type + Data_views_sourcefilters: + description: The array of field names you want to filter out in Discover. + items: + type: object + properties: + value: + type: string + required: + - value + type: array + Data_views_swap_data_view_request_object: + title: Data view reference swap request type: object properties: - id: - description: Technique ID + delete: + description: Deletes referenced saved object if all references are removed. + type: boolean + forId: + description: Limit the affected saved objects to one or more by identifier. + oneOf: + - type: string + - items: + type: string + type: array + forType: + description: Limit the affected saved objects by type. type: string - name: - description: Technique name + fromId: + description: The saved object reference to change. + type: string + fromType: + description: > + Specify the type of the saved object reference to alter. The default + value is `index-pattern` for data views. type: string - reference: - description: Technique reference + toId: + description: New saved object reference value to replace the old value. type: string - subtechnique: - description: Array containing more specific information on the attack technique - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatSubtechnique - type: array required: - - id - - name - - reference - Security_Solution_Detections_API_Threshold: + - fromId + - toId + Data_views_timefieldname: + description: 'The timestamp field name, which you use for time-based data views.' + type: string + Data_views_title: + description: >- + Comma-separated list of data streams, indices, and aliases that you want + to search. Supports wildcards (`*`). + type: string + Data_views_type: + description: 'When set to `rollup`, identifies the rollup data views.' + type: string + Data_views_typemeta: + description: >- + When you use rollup indices, contains the field list for the rollup data + view API endpoints. type: object properties: - cardinality: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdCardinality - field: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThresholdField' - value: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThresholdValue' + aggs: + description: A map of rollup restrictions by aggregation type and field name. + type: object + params: + description: Properties for retrieving rollup fields. + type: object required: - - field - - value - Security_Solution_Detections_API_ThresholdAlertSuppression: + - aggs + - params + Data_views_typemeta_response: + description: >- + When you use rollup indices, contains the field list for the rollup data + view API endpoints. + nullable: true type: object properties: - duration: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppressionDuration - required: - - duration - Security_Solution_Detections_API_ThresholdCardinality: - items: - type: object - properties: - field: - type: string - value: - minimum: 0 - type: integer - required: - - field - - value - type: array - Security_Solution_Detections_API_ThresholdField: - description: Field to aggregate on - oneOf: - - type: string - - items: - type: string - type: array - Security_Solution_Detections_API_ThresholdRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleResponseFields - Security_Solution_Detections_API_ThresholdRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleDefaultableFields - Security_Solution_Detections_API_ThresholdRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleCreateFields - Security_Solution_Detections_API_ThresholdRuleDefaultableFields: + aggs: + description: A map of rollup restrictions by aggregation type and field name. + type: object + params: + description: Properties for retrieving rollup fields. + type: object + Data_views_update_data_view_request_object: + title: Update data view request type: object properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - Security_Solution_Detections_API_ThresholdRuleOptionalFields: + data_view: + description: > + The data view properties you want to update. Only the specified + properties are updated in the data view. Unspecified fields stay as + they are persisted. + type: object + properties: + allowNoIndex: + $ref: '#/components/schemas/Data_views_allownoindex' + fieldFormats: + $ref: '#/components/schemas/Data_views_fieldformats' + fields: + type: object + name: + type: string + runtimeFieldMap: + additionalProperties: + $ref: '#/components/schemas/Data_views_runtimefieldmap' + type: object + sourceFilters: + $ref: '#/components/schemas/Data_views_sourcefilters' + timeFieldName: + $ref: '#/components/schemas/Data_views_timefieldname' + title: + $ref: '#/components/schemas/Data_views_title' + type: + $ref: '#/components/schemas/Data_views_type' + typeMeta: + $ref: '#/components/schemas/Data_views_typemeta' + refresh_fields: + default: false + description: Reloads the data view fields after the data view is updated. + type: boolean + required: + - data_view + Fleet_agent: + title: Agent type: object properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdAlertSuppression - data_view_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_DataViewId' - filters: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFilterArray - index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray - saved_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_SavedQueryId' - Security_Solution_Detections_API_ThresholdRulePatchFields: - allOf: - - type: object + access_api_key: + type: string + access_api_key_id: + type: string + active: + type: boolean + components: + items: + $ref: '#/components/schemas/Fleet_agent_component' + type: array + default_api_key: + type: string + default_api_key_id: + type: string + enrolled_at: + type: string + id: + type: string + last_checkin: + type: string + local_metadata: + $ref: '#/components/schemas/Fleet_agent_metadata' + metrics: + type: object properties: - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - threshold: - $ref: '#/components/schemas/Security_Solution_Detections_API_Threshold' + cpu_avg: + description: >- + Average agent CPU usage during the last 5 minutes, number + between 0-1 + type: number + memory_size_byte_avg: + description: Average agent memory consumption during the last 5 minutes + type: number + policy_id: + type: string + policy_revision: + type: number + status: + $ref: '#/components/schemas/Fleet_agent_status' + type: + $ref: '#/components/schemas/Fleet_agent_type' + unenrolled_at: + type: string + unenrollment_started_at: + type: string + user_provided_metadata: + $ref: '#/components/schemas/Fleet_agent_metadata' + required: + - type + - active + - enrolled_at + - id + - status + Fleet_agent_action: + oneOf: + - properties: + ack_data: + type: string + data: + type: string type: - description: Rule type enum: - - threshold + - UNENROLL + - UPGRADE + - POLICY_REASSIGN type: string - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleDefaultableFields - Security_Solution_Detections_API_ThresholdRulePatchProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRulePatchFields - Security_Solution_Detections_API_ThresholdRuleRequiredFields: + - properties: + data: + type: object + properties: + log_level: + enum: + - debug + - info + - warning + - error + nullable: true + type: string + type: + type: string + title: Agent action + Fleet_agent_component: + title: Agent component type: object properties: - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - threshold: - $ref: '#/components/schemas/Security_Solution_Detections_API_Threshold' + id: + type: string + message: + type: string + status: + $ref: '#/components/schemas/Fleet_agent_component_status' type: - description: Rule type - enum: - - threshold type: string - required: - - type - - query - - threshold - Security_Solution_Detections_API_ThresholdRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleOptionalFields - - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - required: - - language - Security_Solution_Detections_API_ThresholdRuleUpdateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleCreateFields - Security_Solution_Detections_API_ThresholdValue: - description: Threshold value - minimum: 1 - type: integer - Security_Solution_Detections_API_ThrottleForBulkActions: - description: >- - The condition for throttling the notification: 'rule', 'no_actions', or - time duration + units: + items: + $ref: '#/components/schemas/Fleet_agent_component_unit' + type: array + Fleet_agent_component_status: enum: - - rule - - 1h - - 1d - - 7d - type: string - Security_Solution_Detections_API_TiebreakerField: - description: Sets a secondary field for sorting events - type: string - Security_Solution_Detections_API_TimelineTemplateId: - description: Timeline template ID - type: string - Security_Solution_Detections_API_TimelineTemplateTitle: - description: Timeline template title - type: string - Security_Solution_Detections_API_TimestampField: - description: Contains the event timestamp used for sorting a sequence of events - type: string - Security_Solution_Detections_API_TimestampOverride: - description: Sets the time field used to query indices - type: string - Security_Solution_Detections_API_TimestampOverrideFallbackDisabled: - description: Disables the fallback to the event's @timestamp field - type: boolean - Security_Solution_Detections_API_UUID: - description: A universally unique identifier - format: uuid + - starting + - configuring + - healthy + - degraded + - failed + - stopping + - stopped + title: Agent component status type: string - Security_Solution_Detections_API_WarningSchema: + Fleet_agent_component_unit: + title: Agent component unit type: object properties: - actionPath: - type: string - buttonLabel: + id: type: string message: type: string - type: - type: string - required: - - type - - message - - actionPath - Security_Solution_Endpoint_Exceptions_API_EndpointList: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionList - - additionalProperties: false + payload: type: object - Security_Solution_Endpoint_Exceptions_API_EndpointListItem: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItem - Security_Solution_Endpoint_Exceptions_API_ExceptionList: + status: + $ref: '#/components/schemas/Fleet_agent_component_status' + type: + $ref: '#/components/schemas/Fleet_agent_component_unit_type' + Fleet_agent_component_unit_type: + enum: + - input + - output + title: Agent component unit type + type: string + Fleet_agent_diagnostics: + title: Agent diagnostics type: object properties: - _version: + actionId: type: string - created_at: - format: date-time + createTime: type: string - created_by: + filePath: type: string - description: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListDescription id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListId - immutable: - type: boolean - list_id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListMeta - name: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionNamespaceType - os_types: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListOsTypeArray - tags: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListTags - tie_breaker_id: - type: string - type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListType - updated_at: - format: date-time type: string - updated_by: + name: type: string - version: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListVersion + status: + enum: + - READY + - AWAITING_UPLOAD + - DELETED + - IN_PROGRESS required: - id - - list_id - - type - name - - description - - immutable - - namespace_type - - version - - tie_breaker_id - - created_at - - created_by - - updated_at - - updated_by - Security_Solution_Endpoint_Exceptions_API_ExceptionListDescription: - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListHumanId: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - description: 'Human readable string identifier, e.g. `trusted-linux-processes`' - Security_Solution_Endpoint_Exceptions_API_ExceptionListId: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - Security_Solution_Endpoint_Exceptions_API_ExceptionListItem: + - createTime + - filePath + - actionId + - status + Fleet_agent_get_by_actions: + items: + items: + type: string + type: array + title: Agents get by action ids + type: array + Fleet_agent_metadata: + title: Agent metadata + type: object + Fleet_agent_policy: + title: Agent Policy type: object properties: - _version: + advanced_settings: + description: >- + Advanced settings stored in the agent policy, e.g. + agent_limits_go_max_procs + nullable: true + type: object + agent_features: + items: + type: object + properties: + enabled: + type: boolean + name: + type: string + required: + - name + - enabled + type: array + agents: + type: number + data_output_id: + nullable: true type: string - comments: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemCommentArray - created_at: - format: date-time + description: type: string - created_by: + download_source_id: + nullable: true type: string - description: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryArray - expire_time: - format: date-time + fleet_server_host_id: + nullable: true type: string + global_data_tags: + items: + additionalProperties: + oneOf: + - type: string + - type: number + description: >- + User defined data tags that are added to all of the inputs. The + values can be strings or numbers. + type: object + type: array id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemId - item_id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemHumanId - list_id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemMeta + type: string + inactivity_timeout: + type: integer + is_protected: + description: >- + Indicates whether the agent policy has tamper protection enabled. + Default false. + type: boolean + keep_monitoring_alive: + description: >- + When set to true, monitoring will be enabled but logs/metrics + collection will be disabled + nullable: true + type: boolean + monitoring_enabled: + items: + enum: + - metrics + - logs + type: string + type: array + monitoring_output_id: + nullable: true + type: string name: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionNamespaceType - os_types: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray - tags: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemTags - tie_breaker_id: type: string - type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemType - updated_at: - format: date-time + namespace: type: string + overrides: + description: >- + Override settings that are defined in the agent policy. Input + settings cannot be overridden. The override option should be used + only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + package_policies: + description: >- + This field is present only when retrieving a single agent policy, or + when retrieving a list of agent policies with the ?full=true + parameter + items: + $ref: '#/components/schemas/Fleet_package_policy' + type: array + revision: + type: number + supports_agentless: + description: >- + Indicates whether the agent policy supports agentless integrations. + Only allowed in a serverless environment. + type: boolean + unenroll_timeout: + type: integer + unprivileged_agents: + type: number updated_by: type: string + updated_on: + format: date-time + type: string required: - id - - item_id - - list_id - - type + - status - name - - description - - entries - - namespace_type - - comments - - tie_breaker_id - - created_at - - created_by - - updated_at - - updated_by - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemComment: + - namespace + Fleet_agent_policy_create_request: + title: Create agent policy request type: object properties: - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - created_at: - format: date-time + agent_features: + items: + type: object + properties: + enabled: + type: boolean + name: + type: string + required: + - name + - enabled + type: array + data_output_id: + nullable: true + type: string + description: + type: string + download_source_id: + nullable: true + type: string + fleet_server_host_id: + nullable: true + type: string + force: + description: Force agent policy creation even if packages are not verified. + type: boolean + global_data_tags: + items: + additionalProperties: + oneOf: + - type: string + - type: number + description: >- + User defined data tags that are added to all of the inputs. The + values can be strings or numbers. + type: object + type: array + id: + type: string + inactivity_timeout: + type: integer + is_protected: + type: boolean + monitoring_enabled: + items: + enum: + - metrics + - logs + type: string + type: array + monitoring_output_id: + nullable: true type: string - created_by: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - updated_at: - format: date-time + name: type: string - updated_by: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - required: - - id - - comment - - created_at - - created_by - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemCommentArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemComment - type: array - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemDescription: - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntry: - anyOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatch - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatchAny - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryList - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryExists - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryNested - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatchWildcard - discriminator: - propertyName: type - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntry - type: array - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryExists: - type: object - properties: - field: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - operator: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - exists + namespace: type: string + unenroll_timeout: + type: integer required: - - type - - field - - operator - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryList: - type: object - properties: - field: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - list: - type: object + - name + - namespace + Fleet_agent_policy_full: + oneOf: + - type: object properties: - id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ListId - type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ListType - required: - - id - - type - operator: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - list - type: string - required: - - type - - field - - list - - operator - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatch: + item: + type: string + - type: object + properties: + item: + $ref: '#/components/schemas/Fleet_full_agent_policy' + title: Agent policy full response + type: object + Fleet_agent_policy_update_request: + title: Update agent policy request type: object properties: - field: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - operator: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - match + agent_features: + items: + type: object + properties: + enabled: + type: boolean + name: + type: string + required: + - name + - enabled + type: array + data_output_id: + nullable: true type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString + description: + type: string + download_source_id: + nullable: true + type: string + fleet_server_host_id: + nullable: true + type: string + force: + description: Force agent policy creation even if packages are not verified. + type: boolean + inactivity_timeout: + type: integer + is_protected: + type: boolean + monitoring_enabled: + items: + enum: + - metrics + - logs + type: string + type: array + monitoring_output_id: + nullable: true + type: string + name: + type: string + namespace: + type: string + unenroll_timeout: + type: integer required: - - type - - field - - value - - operator - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatchAny: + - name + - namespace + Fleet_agent_status: + enum: + - offline + - error + - online + - inactive + - warning + title: Elastic Agent status + type: string + Fleet_agent_type: + enum: + - PERMANENT + - EPHEMERAL + - TEMPORARY + title: Agent type + type: string + Fleet_bulk_install_packages_response: + title: Bulk install packages response type: object properties: - field: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - operator: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - match_any - type: string - value: + items: items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - minItems: 1 + type: object + properties: + name: + type: string + version: + type: string + type: array + response: + deprecated: true + items: + type: object + properties: + name: + type: string + version: + type: string type: array required: - - type - - field - - value - - operator - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatchWildcard: + - items + Fleet_bulk_upgrade_agents: + title: Bulk upgrade agents type: object properties: - field: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - operator: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - wildcard + agents: + oneOf: + - description: 'KQL query string, leave empty to action all agents' + type: string + - description: list of agent IDs + items: + type: string + type: array + force: + description: 'Force upgrade, skipping validation (should be used with caution)' + type: boolean + rollout_duration_seconds: + description: rolling upgrade window duration in seconds + type: number + skipRateLimitCheck: + description: Skip rate limit check for upgrade + type: boolean + source_uri: + description: alternative upgrade binary download url + type: string + start_time: + description: start time of upgrade in ISO 8601 format + type: string + version: + description: version to upgrade to type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString required: - - type - - field - - value - - operator - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryNested: + - agents + - version + Fleet_data_stream: + title: Data stream type: object properties: - entries: + dashboard: items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryNestedEntryItem - minItems: 1 + type: object + properties: + id: + type: string + title: + type: string type: array - field: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString + dataset: + type: string + index: + type: string + last_activity_ms: + type: number + namespace: + type: string + package: + type: string + package_version: + type: string + size_in_bytes: + type: number + size_in_bytes_formatted: + type: string type: - enum: - - nested type: string - required: - - type - - field - - entries - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryNestedEntryItem: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatch - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatchAny - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryExists - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryOperator: - enum: - - excluded - - included - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemHumanId: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemId: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemMeta: - additionalProperties: true - type: object - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemName: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListOsType - type: array - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemTags: - items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - type: array - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemType: - enum: - - simple - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListMeta: - additionalProperties: true - type: object - Security_Solution_Endpoint_Exceptions_API_ExceptionListName: - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListOsType: - enum: - - linux - - macos - - windows - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListOsTypeArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListOsType - type: array - Security_Solution_Endpoint_Exceptions_API_ExceptionListTags: - items: - type: string - type: array - Security_Solution_Endpoint_Exceptions_API_ExceptionListType: - enum: - - detection - - rule_default - - endpoint - - endpoint_trusted_apps - - endpoint_events - - endpoint_host_isolation_exceptions - - endpoint_blocklists - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListVersion: - minimum: 1 - type: integer - Security_Solution_Endpoint_Exceptions_API_ExceptionNamespaceType: - description: > - Determines whether the exception container is available in all Kibana - spaces or just the space - - in which it is created, where: - - - - `single`: Only available in the Kibana space in which it is created. - - - `agnostic`: Available in all Kibana spaces. - enum: - - agnostic - - single - type: string - Security_Solution_Endpoint_Exceptions_API_FindEndpointListItemsFilter: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - Security_Solution_Endpoint_Exceptions_API_ListId: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - Security_Solution_Endpoint_Exceptions_API_ListType: - enum: - - binary - - boolean - - byte - - date - - date_nanos - - date_range - - double - - double_range - - float - - float_range - - geo_point - - geo_shape - - half_float - - integer - - integer_range - - ip - - ip_range - - keyword - - long - - long_range - - shape - - short - - text - type: string - Security_Solution_Endpoint_Exceptions_API_NonEmptyString: - description: A string that is not empty and does not contain only whitespace - minLength: 1 - pattern: ^(?! *$).+$ - type: string - Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse: + Fleet_download_sources: + title: Download Source type: object properties: - error: + host: type: string - message: + id: + type: string + is_default: + type: boolean + name: + type: string + proxy_id: + description: >- + The ID of the proxy to use for this download source. See the proxies + API for more information. + nullable: true type: string - statusCode: - type: integer required: - - statusCode - - error - - message - Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse: + - is_default + - name + - host + Fleet_elasticsearch_asset_type: + enum: + - component_template + - ingest_pipeline + - index_template + - ilm_policy + - transform + - data_stream_ilm_policy + title: Elasticsearch asset type + type: string + Fleet_enrollment_api_key: + title: Enrollment API key type: object properties: - message: + active: + type: boolean + api_key: + type: string + api_key_id: + type: string + created_at: + type: string + id: + type: string + name: + type: string + policy_id: type: string - status_code: - type: integer required: - - status_code - - message - Security_Solution_Endpoint_Management_API_ActionLogRequestQuery: + - id + - api_key_id + - api_key + - active + - created_at + Fleet_fleet_server_host: + title: Fleet Server Host type: object properties: - end_date: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndDate - page: - $ref: '#/components/schemas/Security_Solution_Endpoint_Management_API_Page' - page_size: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PageSize - start_date: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_StartDate - Security_Solution_Endpoint_Management_API_ActionStateSuccessResponse: + host_urls: + items: + type: string + type: array + id: + type: string + is_default: + type: boolean + is_internal: + type: boolean + is_preconfigured: + type: boolean + name: + type: string + proxy_id: + type: string + required: + - fleet_server_hosts + - id + - is_default + - is_preconfigured + - host_urls + Fleet_fleet_settings_enrollment_response: + title: Fleet settings response type: object properties: - body: + download_source: + $ref: '#/components/schemas/Fleet_download_sources' + fleet_server: type: object properties: - data: - type: object - properties: - canEncrypt: - type: boolean + has_active: + type: boolean + host: + $ref: '#/components/schemas/Fleet_fleet_server_host' + host_proxy: + $ref: '#/components/schemas/Fleet_proxies' + policies: + items: + type: object + properties: + download_source_id: + type: string + fleet_server_host_id: + type: string + has_fleet_server: + type: boolean + id: + type: string + is_default_fleet_server: + type: boolean + is_managed: + type: boolean + name: + type: string + required: + - id + - name + - is_managed + type: array required: - - data + - agent_policies + - has_active required: - - body - Security_Solution_Endpoint_Management_API_ActionStatusSuccessResponse: + - fleet_server + Fleet_fleet_settings_response: + title: Fleet settings response type: object properties: - body: - type: object - properties: - data: - type: object - properties: - agent_id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentId - pending_actions: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionsSchema - required: - - agent_id - - pending_actions - required: - - data + item: + $ref: '#/components/schemas/Fleet_settings' required: - - body - Security_Solution_Endpoint_Management_API_AgentId: - description: Agent ID - type: string - Security_Solution_Endpoint_Management_API_AgentIds: - minLength: 1 - oneOf: - - items: - minLength: 1 - type: string - maxItems: 50 - minItems: 1 - type: array - - minLength: 1 - type: string - Security_Solution_Endpoint_Management_API_AgentTypes: - enum: - - endpoint - - sentinel_one - - crowdstrike - type: string - Security_Solution_Endpoint_Management_API_AlertIds: - description: A list of alerts ids. - items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_NonEmptyString - minItems: 1 - type: array - Security_Solution_Endpoint_Management_API_CaseIds: - description: Case IDs to be updated (cannot contain empty strings) - items: - minLength: 1 - type: string - minItems: 1 - type: array - Security_Solution_Endpoint_Management_API_Command: - description: The command to be executed (cannot be an empty string) - enum: - - isolate - - unisolate - - kill-process - - suspend-process - - running-processes - - get-file - - execute - - upload - - scan - minLength: 1 - type: string - Security_Solution_Endpoint_Management_API_Commands: - items: - $ref: '#/components/schemas/Security_Solution_Endpoint_Management_API_Command' - type: array - Security_Solution_Endpoint_Management_API_Comment: - description: Optional comment - type: string - Security_Solution_Endpoint_Management_API_EndDate: - description: End date - type: string - Security_Solution_Endpoint_Management_API_EndpointIds: - description: List of endpoint IDs (cannot contain empty strings) - items: - minLength: 1 - type: string - minItems: 1 - type: array - Security_Solution_Endpoint_Management_API_ExecuteRouteRequestBody: - allOf: - - type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids - - type: object - properties: - parameters: - type: object - properties: - command: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Command - timeout: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Timeout - required: - - command - required: - - parameters - Security_Solution_Endpoint_Management_API_GetEndpointActionListRouteQuery: + - item + Fleet_fleet_setup_response: + title: Fleet Setup response type: object properties: - agentIds: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentIds - agentTypes: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - commands: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Commands - endDate: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndDate - page: - $ref: '#/components/schemas/Security_Solution_Endpoint_Management_API_Page' - pageSize: - default: 10 - description: Number of items per page - maximum: 10000 - minimum: 1 - type: integer - startDate: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_StartDate - types: - $ref: '#/components/schemas/Security_Solution_Endpoint_Management_API_Types' - userIds: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_UserIds - withOutputs: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_WithOutputs - Security_Solution_Endpoint_Management_API_GetFileRouteRequestBody: - allOf: - - type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids - - type: object - properties: - parameters: - type: object - properties: - path: - type: string - required: - - path - required: - - parameters - Security_Solution_Endpoint_Management_API_GetProcessesRouteRequestBody: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_NoParametersRequestSchema - Security_Solution_Endpoint_Management_API_IsolateRouteRequestBody: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_NoParametersRequestSchema - Security_Solution_Endpoint_Management_API_KillOrSuspendActionSchema: - allOf: - - type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids - - type: object - properties: - parameters: - oneOf: - - type: object - properties: - pid: - minimum: 1 - type: integer - - type: object - properties: - entity_id: - minLength: 1 - type: string - required: - - parameters - Security_Solution_Endpoint_Management_API_ListRequestQuery: + isInitialized: + type: boolean + nonFatalErrors: + items: + type: object + properties: + message: + type: string + name: + type: string + required: + - name + - message + type: array + required: + - isInitialized + - nonFatalErrors + Fleet_fleet_status_response: + title: Fleet status response type: object properties: - hostStatuses: + isReady: + type: boolean + missing_optional_features: items: enum: - - healthy - - offline - - updating - - inactive - - unenrolled + - encrypted_saved_object_encryption_key_required type: string type: array - kuery: - nullable: true - type: string - page: - default: 0 - description: Page number - minimum: 0 - type: integer - pageSize: - default: 10 - description: Number of items per page - maximum: 10000 - minimum: 1 - type: integer - sortDirection: - enum: - - asc - - desc - nullable: true - type: string - sortField: - enum: - - enrolled_at - - metadata.host.hostname - - host_status - - metadata.Endpoint.policy.applied.name - - metadata.Endpoint.policy.applied.status - - metadata.host.os.name - - metadata.host.ip - - metadata.agent.version - - last_checkin + missing_requirements: + items: + enum: + - tls_required + - api_keys + - fleet_admin_user + - fleet_server + type: string + type: array + package_verification_key_id: type: string required: - - hostStatuses - Security_Solution_Endpoint_Management_API_NonEmptyString: - description: A string that is not empty and does not contain only whitespace - minLength: 1 - pattern: ^(?! *$).+$ - type: string - Security_Solution_Endpoint_Management_API_NoParametersRequestSchema: + - isReady + - missing_requirements + - missing_optional_features + Fleet_full_agent_policy: + title: Full agent policy type: object properties: - body: + agent: + nullable: true + type: string + fleet: + oneOf: + - type: object + properties: + hosts: + items: + type: string + type: array + proxy_headers: {} + proxy_url: + type: string + ssl: + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string + renegotiation: + type: string + verification_mode: + type: string + - type: object + properties: + kibana: + type: object + properties: + hosts: + items: + type: string + type: array + path: + type: string + protocol: + type: string + id: + type: string + inputs: + type: string + output_permissions: + additionalProperties: + type: object + properties: + data: + $ref: >- + #/components/schemas/Fleet_full_agent_policy_output_permissions + output: + type: integer type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids + outputs: + additionalProperties: + $ref: '#/components/schemas/Fleet_full_agent_policy_output' + type: object + revision: + type: number + secret_references: + items: + type: object + properties: + id: + type: string + type: array required: - - body - Security_Solution_Endpoint_Management_API_Page: - default: 1 - description: Page number - minimum: 1 - type: integer - Security_Solution_Endpoint_Management_API_PageSize: - default: 10 - description: Number of items per page - maximum: 100 - minimum: 1 - type: integer - Security_Solution_Endpoint_Management_API_Parameters: - description: Optional parameters object - type: object - Security_Solution_Endpoint_Management_API_PendingActionDataType: - type: integer - Security_Solution_Endpoint_Management_API_PendingActionsSchema: - oneOf: - - type: object - properties: - execute: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - get-file: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - isolate: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - kill-process: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - running-processes: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - scan: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - suspend-process: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - unisolate: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - upload: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType + - id + - outputs + - inputs + Fleet_full_agent_policy_input: + allOf: - additionalProperties: true type: object - Security_Solution_Endpoint_Management_API_ProtectionUpdatesNoteResponse: - type: object - properties: - note: - type: string - Security_Solution_Endpoint_Management_API_ScanRouteRequestBody: - allOf: - - type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids - - type: object properties: - parameters: + data_stream: type: object properties: - path: + namespace: type: string required: - - path + - namespace + id: + type: string + meta: + additionalProperties: true + type: object + properties: + package: + type: object + properties: + name: + type: string + version: + type: string + required: + - name + - version + name: + type: string + revision: + type: number + streams: + $ref: '#/components/schemas/Fleet_full_agent_policy_input_stream' + type: + type: string + use_output: + type: string required: - - parameters - Security_Solution_Endpoint_Management_API_StartDate: - description: Start date - type: string - Security_Solution_Endpoint_Management_API_SuccessResponse: - type: object - properties: {} - Security_Solution_Endpoint_Management_API_Timeout: - description: The maximum timeout value in milliseconds (optional) - minimum: 1 - type: integer - Security_Solution_Endpoint_Management_API_Type: - description: Type of response action - enum: - - automated - - manual - type: string - Security_Solution_Endpoint_Management_API_Types: - description: List of types of response actions - items: - $ref: '#/components/schemas/Security_Solution_Endpoint_Management_API_Type' - maxLength: 2 - minLength: 1 - type: array - Security_Solution_Endpoint_Management_API_UnisolateRouteRequestBody: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_NoParametersRequestSchema - Security_Solution_Endpoint_Management_API_UploadRouteRequestBody: + - id + - name + - revision + - type + - data_stream + - use_output + title: Full agent policy input + Fleet_full_agent_policy_input_stream: allOf: - - type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids - - type: object + - additionalProperties: true + type: object properties: - file: - format: binary - type: string - parameters: + data_stream: type: object properties: - overwrite: - default: false - type: boolean + dataset: + type: string + type: + type: string + required: + - dataset + - type + id: + type: string required: - - parameters - - file - Security_Solution_Endpoint_Management_API_UserIds: - description: User IDs - oneOf: - - items: - minLength: 1 + - id + - data_stream + title: Full agent policy input stream + Fleet_full_agent_policy_output: + title: Full agent policy + type: object + properties: + additionalProperties: + type: object + properties: + text: {} + ca_sha256: + nullable: true + type: string + hosts: + items: type: string - minItems: 1 type: array - - minLength: 1 + proxy_headers: {} + proxy_url: type: string - Security_Solution_Endpoint_Management_API_WithOutputs: - description: Shows detailed outputs for an action response - oneOf: - - items: - minLength: 1 + type: {} + required: + - type + - hosts + - ca_sha256 + Fleet_full_agent_policy_output_permissions: + additionalProperties: + type: object + properties: + data: + type: object + properties: + cluster: + items: + type: string + type: array + indices: + items: + type: object + properties: + names: + items: + type: string + type: array + privileges: + items: + type: string + type: array + type: array + packagePolicyName: type: string - minItems: 1 - type: array - - minLength: 1 - type: string - Security_Solution_Entity_Analytics_API_AssetCriticalityBulkUploadErrorItem: + title: Full agent policy output permissions + Fleet_get_agent_tags_response: + title: Get Agent Tags response type: object properties: - index: - type: integer - message: - type: string - required: - - message - - index - Security_Solution_Entity_Analytics_API_AssetCriticalityBulkUploadStats: + items: + items: + type: string + type: array + Fleet_get_agents_response: + title: Get Agent response type: object properties: - failed: - type: integer - successful: - type: integer + items: + items: + $ref: '#/components/schemas/Fleet_agent' + type: array + list: + deprecated: true + items: + $ref: '#/components/schemas/Fleet_agent' + type: array + page: + type: number + perPage: + type: number + statusSummary: + type: object + properties: + degraded': + type: number + enrolling: + type: number + error: + type: number + inactive: + type: number + offline: + type: number + online: + type: number + unenrolled: + type: number + unenrolling: + type: number + updating: + type: number total: - type: integer + type: number required: - - successful - - failed + - items - total - Security_Solution_Entity_Analytics_API_AssetCriticalityLevel: - description: The criticality level of the asset. - enum: - - low_impact - - medium_impact - - high_impact - - extreme_impact - type: string - Security_Solution_Entity_Analytics_API_AssetCriticalityRecord: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_CreateAssetCriticalityRecord - - type: object - properties: - '@timestamp': - description: The time the record was created or updated. - example: '2017-07-21T17:32:28Z' - format: date-time - type: string - required: - - '@timestamp' - Security_Solution_Entity_Analytics_API_AssetCriticalityRecordIdParts: - type: object + - page + - perPage + Fleet_get_bulk_assets_response: + deprecated: true properties: - id_field: - $ref: '#/components/schemas/Security_Solution_Entity_Analytics_API_IdField' - description: The field representing the ID. - example: host.name - id_value: - description: The ID value of the asset. - type: string + items: + items: + type: object + properties: + appLink: + type: string + attributes: + type: object + properties: + description: + type: string + title: + type: string + id: + type: string + type: + $ref: '#/components/schemas/Fleet_saved_object_type' + updatedAt: + type: string + type: array required: - - id_value - - id_field - Security_Solution_Entity_Analytics_API_CreateAssetCriticalityRecord: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityRecordIdParts - - type: object - properties: - criticality_level: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityLevel - required: - - criticality_level - Security_Solution_Entity_Analytics_API_IdField: - enum: - - host.name - - user.name - type: string - Security_Solution_Exceptions_API_CreateExceptionListItemComment: + - items + title: Bulk get assets response type: object - properties: - comment: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - required: - - comment - Security_Solution_Exceptions_API_CreateExceptionListItemCommentArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_CreateExceptionListItemComment - type: array - Security_Solution_Exceptions_API_CreateRuleExceptionListItemComment: + Fleet_get_categories_response: + title: Get categories response type: object properties: - comment: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' + items: + items: + type: object + properties: + count: + type: number + id: + type: string + title: + type: string + required: + - id + - title + - count + type: array + response: + items: + deprecated: true + type: object + properties: + count: + type: number + id: + type: string + title: + type: string + required: + - id + - title + - count + type: array required: - - comment - Security_Solution_Exceptions_API_CreateRuleExceptionListItemCommentArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_CreateRuleExceptionListItemComment - type: array - Security_Solution_Exceptions_API_CreateRuleExceptionListItemProps: + - items + Fleet_get_packages_response: + title: Get Packages response type: object properties: - comments: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_CreateRuleExceptionListItemCommentArray - default: [] - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryArray - expire_time: - format: date-time - type: string - item_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemMeta - name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemOsTypeArray - default: [] - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemTags - default: [] - type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemType + items: + items: + $ref: '#/components/schemas/Fleet_search_result' + type: array + response: + deprecated: true + items: + $ref: '#/components/schemas/Fleet_search_result' + type: array required: - - type - - name - - description - - entries - Security_Solution_Exceptions_API_ExceptionList: + - items + Fleet_installation_info: + title: Installation info object type: object properties: - _version: - type: string created_at: - format: date-time type: string - created_by: + experimental_data_stream_features: + type: array + properties: + data_stream: + type: string + features: + type: object + properties: + doc_value_only_numeric: + nullable: true + type: boolean + doc_value_only_other: + nullable: true + type: boolean + synthetic_source: + nullable: true + type: boolean + tsdb: + nullable: true + type: boolean + install_format_schema_version: + type: string + install_kibana_space_id: type: string - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListDescription - id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - immutable: - type: boolean - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListMeta + install_source: + enum: + - registry + - upload + - bundled + type: string + install_status: + enum: + - installed + - installing + - install_failed + type: string + installed_es: + type: object + properties: + deferred: + type: boolean + id: + type: string + type: + $ref: '#/components/schemas/Fleet_elasticsearch_asset_type' + installed_kibana: + type: object + properties: + id: + type: string + type: + $ref: '#/components/schemas/Fleet_kibana_saved_object_type' + latest_executed_state: + description: Latest successfully executed state in package install state machine + type: object + properties: + error: + type: string + name: + enum: + - create_restart_installation + - install_kibana_assets + - install_ilm_policies + - install_ml_model + - install_index_template_pipelines + - remove_legacy_templates + - update_current_write_indices + - install_transforms + - delete_previous_pipelines + - save_archive_entries_from_assets_map + - update_so + type: string + started_at: + type: string + latest_install_failed_attempts: + description: Latest failed install errors + items: + type: object + properties: + created_at: + type: string + error: + type: object + properties: + message: + type: string + name: + type: string + stack: + type: string + target_version: + type: string + type: array name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListOsTypeArray - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListTags - tie_breaker_id: type: string + namespaces: + items: + type: string + type: array type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListType + type: string updated_at: - format: date-time type: string - updated_by: + verification_key_id: + nullable: true + type: string + verification_status: + enum: + - verified + - unverified + - unknown type: string version: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListVersion + type: string required: - - id - - list_id - - type + - installed_kibana + - installed_es - name - - description - - immutable - - namespace_type - version - - tie_breaker_id - - created_at - - created_by - - updated_at - - updated_by - Security_Solution_Exceptions_API_ExceptionListDescription: + - install_status + - install_version + - install_started_at + - install_source + - verification_status + - latest_install_failed_attempts + Fleet_kibana_saved_object_type: + enum: + - dashboard + - visualization + - search + - index-pattern + - map + - lens + - ml-module + - security-rule + - csp_rule_template + title: Kibana saved object asset type type: string - Security_Solution_Exceptions_API_ExceptionListHumanId: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - description: 'Human readable string identifier, e.g. `trusted-linux-processes`' - Security_Solution_Exceptions_API_ExceptionListId: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - Security_Solution_Exceptions_API_ExceptionListItem: - type: object + Fleet_new_package_policy: + description: '' properties: - _version: - type: string - comments: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemCommentArray - created_at: - format: date-time - type: string - created_by: - type: string description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryArray - expire_time: - format: date-time type: string - id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemId - item_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemMeta + enabled: + type: boolean + inputs: + items: + type: object + properties: + config: + type: object + enabled: + type: boolean + processors: + items: + type: string + type: array + streams: + items: {} + type: array + type: + type: string + vars: + type: object + required: + - type + - enabled + type: array name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemOsTypeArray - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemTags - tie_breaker_id: type: string - type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemType - updated_at: - format: date-time + namespace: type: string - updated_by: + output_id: + type: string + overrides: + type: object + package: + type: object + properties: + name: + type: string + requires_root: + type: boolean + title: + type: string + version: + type: string + required: + - name + - version + policy_id: + deprecated: true type: string + policy_ids: + items: + type: string + type: array required: - - id - - item_id - - list_id - - type + - inputs - name - - description - - entries - - namespace_type - - comments - - tie_breaker_id - - created_at - - created_by - - updated_at - - updated_by - Security_Solution_Exceptions_API_ExceptionListItemComment: + title: New package policy type: object - properties: - comment: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - created_at: - format: date-time - type: string - created_by: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - id: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - updated_at: - format: date-time - type: string - updated_by: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - required: - - id - - comment - - created_at - - created_by - Security_Solution_Exceptions_API_ExceptionListItemCommentArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemComment - type: array - Security_Solution_Exceptions_API_ExceptionListItemDescription: - type: string - Security_Solution_Exceptions_API_ExceptionListItemEntry: - anyOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryMatch - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryMatchAny - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryList - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryExists - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryNested - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryMatchWildcard + Fleet_output_create_request: discriminator: + mapping: + elasticsearch: '#/components/schemas/Fleet_output_create_request_elasticsearch' + kafka: '#/components/schemas/Fleet_output_create_request_kafka' + logstash: '#/components/schemas/Fleet_output_create_request_logstash' + remote_elasticsearch: >- + #/components/schemas/Fleet_output_create_request_remote_elasticsearch propertyName: type - Security_Solution_Exceptions_API_ExceptionListItemEntryArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntry - type: array - Security_Solution_Exceptions_API_ExceptionListItemEntryExists: + oneOf: + - $ref: '#/components/schemas/Fleet_output_create_request_elasticsearch' + - $ref: '#/components/schemas/Fleet_output_create_request_kafka' + - $ref: '#/components/schemas/Fleet_output_create_request_logstash' + - $ref: >- + #/components/schemas/Fleet_output_create_request_remote_elasticsearch + title: Output + Fleet_output_create_request_elasticsearch: + title: elasticsearch type: object properties: - field: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - operator: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryOperator - type: + ca_sha256: + type: string + ca_trusted_fingerprint: + type: string + config: + type: object + config_yaml: + type: string + hosts: + items: + type: string + type: array + id: + type: string + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: + type: boolean + name: + type: string + preset: enum: - - exists + - balanced + - custom + - throughput + - scale + - latency type: string - required: - - type - - field - - operator - Security_Solution_Exceptions_API_ExceptionListItemEntryList: - type: object - properties: - field: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - list: + proxy_id: + type: string + shipper: type: object properties: - id: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_ListId' - type: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_ListType' - required: - - id - - type - operator: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryOperator + compression_level: + type: number + disk_queue_compression_enabled: + type: boolean + disk_queue_enabled: + type: boolean + disk_queue_encryption_enabled: + type: boolean + disk_queue_max_size: + type: number + disk_queue_path: + type: string + loadbalance: + type: boolean + ssl: + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string type: enum: - - list + - elasticsearch type: string required: - - type - - field - - list - - operator - Security_Solution_Exceptions_API_ExceptionListItemEntryMatch: + - name + Fleet_output_create_request_kafka: + title: kafka type: object properties: - field: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - operator: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - match + auth_type: type: string - value: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - required: - - type - - field - - value - - operator - Security_Solution_Exceptions_API_ExceptionListItemEntryMatchAny: - type: object - properties: - field: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - operator: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryOperator - type: + broker_timeout: + type: number + ca_sha256: + type: string + ca_trusted_fingerprint: + type: string + client_id: + type: string + compression: + type: string + compression_level: + type: number + config: + type: object + config_yaml: + type: string + connection_type: enum: - - match_any + - plaintext + - encryption type: string - value: + headers: items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_NonEmptyString - minItems: 1 + type: object + properties: + key: + type: string + value: + type: string type: array - required: - - type - - field - - value - - operator - Security_Solution_Exceptions_API_ExceptionListItemEntryMatchWildcard: - type: object - properties: - field: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - operator: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - wildcard - type: string - value: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - required: - - type - - field - - value - - operator - Security_Solution_Exceptions_API_ExceptionListItemEntryNested: - type: object - properties: - entries: + hosts: items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryNestedEntryItem - minItems: 1 + type: string type: array - field: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - type: - enum: - - nested + id: type: string - required: - - type - - field - - entries - Security_Solution_Exceptions_API_ExceptionListItemEntryNestedEntryItem: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryMatch - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryMatchAny - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryExists - Security_Solution_Exceptions_API_ExceptionListItemEntryOperator: - enum: - - excluded - - included - type: string - Security_Solution_Exceptions_API_ExceptionListItemHumanId: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - Security_Solution_Exceptions_API_ExceptionListItemId: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - Security_Solution_Exceptions_API_ExceptionListItemMeta: - additionalProperties: true - type: object - Security_Solution_Exceptions_API_ExceptionListItemName: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - Security_Solution_Exceptions_API_ExceptionListItemOsTypeArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListOsType - type: array - Security_Solution_Exceptions_API_ExceptionListItemTags: - items: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - type: array - Security_Solution_Exceptions_API_ExceptionListItemType: - enum: - - simple - type: string - Security_Solution_Exceptions_API_ExceptionListMeta: - additionalProperties: true - type: object - Security_Solution_Exceptions_API_ExceptionListName: - type: string - Security_Solution_Exceptions_API_ExceptionListOsType: - enum: - - linux - - macos - - windows - type: string - Security_Solution_Exceptions_API_ExceptionListOsTypeArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListOsType - type: array - Security_Solution_Exceptions_API_ExceptionListsImportBulkError: - type: object - properties: - error: + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: + type: boolean + key: + type: string + name: + type: string + partition: + type: string + password: + type: string + proxy_id: + type: string + random: type: object properties: - message: + group_events: + type: number + required_acks: + type: number + round_robin: + type: object + properties: + group_events: + type: number + sasl: + type: object + properties: + mechanism: type: string - status_code: - type: integer - required: - - status_code - - message - id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - item_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - required: - - error - Security_Solution_Exceptions_API_ExceptionListsImportBulkErrorArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListsImportBulkError - type: array - Security_Solution_Exceptions_API_ExceptionListTags: - items: - type: string - type: array - Security_Solution_Exceptions_API_ExceptionListType: - enum: - - detection - - rule_default - - endpoint - - endpoint_trusted_apps - - endpoint_events - - endpoint_host_isolation_exceptions - - endpoint_blocklists - type: string - Security_Solution_Exceptions_API_ExceptionListVersion: - minimum: 1 - type: integer - Security_Solution_Exceptions_API_ExceptionNamespaceType: - description: > - Determines whether the exception container is available in all Kibana - spaces or just the space - - in which it is created, where: - - - - `single`: Only available in the Kibana space in which it is created. - - - `agnostic`: Available in all Kibana spaces. - enum: - - agnostic - - single - type: string - Security_Solution_Exceptions_API_FindExceptionListItemsFilter: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - Security_Solution_Exceptions_API_FindExceptionListsFilter: - type: string - Security_Solution_Exceptions_API_ListId: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - Security_Solution_Exceptions_API_ListType: - enum: - - binary - - boolean - - byte - - date - - date_nanos - - date_range - - double - - double_range - - float - - float_range - - geo_point - - geo_shape - - half_float - - integer - - integer_range - - ip - - ip_range - - keyword - - long - - long_range - - shape - - short - - text - type: string - Security_Solution_Exceptions_API_NonEmptyString: - description: A string that is not empty and does not contain only whitespace - minLength: 1 - pattern: ^(?! *$).+$ - type: string - Security_Solution_Exceptions_API_PlatformErrorResponse: - type: object - properties: - error: + secrets: + type: object + properties: + password: + type: string + ssl: + type: object + properties: + key: + type: string + shipper: + type: object + properties: + compression_level: + type: number + disk_queue_compression_enabled: + type: boolean + disk_queue_enabled: + type: boolean + disk_queue_encryption_enabled: + type: boolean + disk_queue_max_size: + type: number + disk_queue_path: + type: string + loadbalance: + type: boolean + ssl: + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string + verification_mode: + enum: + - none + - full + - certificate + - strict + type: string + timeout: + type: number + topic: + type: string + topics: + deprecated: true + description: Use topic instead. + items: + type: object + properties: + topic: + type: string + when: + deprecated: true + description: >- + Deprecated, kafka output do not support conditionnal topics + anymore. + type: object + properties: + condition: + type: string + type: + type: string + type: array + type: + enum: + - kafka + type: string + username: type: string - message: + version: type: string - statusCode: - type: integer required: - - statusCode - - error - - message - Security_Solution_Exceptions_API_RuleId: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_UUID' - Security_Solution_Exceptions_API_SiemErrorResponse: + - name + - type + - topics + - auth_type + - hosts + Fleet_output_create_request_logstash: + title: logstash type: object properties: - message: + ca_sha256: + type: string + ca_trusted_fingerprint: + type: string + config: + type: object + config_yaml: + type: string + hosts: + items: + type: string + type: array + id: + type: string + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: + type: boolean + name: + type: string + proxy_id: + type: string + secrets: + type: object + properties: + ssl: + type: object + properties: + key: + type: string + shipper: + type: object + properties: + compression_level: + type: number + disk_queue_compression_enabled: + type: boolean + disk_queue_enabled: + type: boolean + disk_queue_encryption_enabled: + type: boolean + disk_queue_max_size: + type: number + disk_queue_path: + type: string + loadbalance: + type: boolean + ssl: + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string + type: + enum: + - logstash type: string - status_code: - type: integer required: - - status_code - - message - Security_Solution_Exceptions_API_UpdateExceptionListItemComment: + - name + - hosts + - type + Fleet_output_create_request_remote_elasticsearch: + title: remote_elasticsearch type: object properties: - comment: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' + hosts: + items: + type: string + type: array id: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' + type: string + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: + type: boolean + name: + type: string + secrets: + type: object + properties: + service_token: + type: string + service_token: + type: string + type: + enum: + - remote_elasticsearch + type: string required: - - comment - Security_Solution_Exceptions_API_UpdateExceptionListItemCommentArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_UpdateExceptionListItemComment - type: array - Security_Solution_Exceptions_API_UUID: - description: A universally unique identifier - format: uuid - type: string - Security_Solution_Lists_API_FindListItemsCursor: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_FindListItemsFilter: - type: string - Security_Solution_Lists_API_FindListsCursor: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_FindListsFilter: - type: string - Security_Solution_Lists_API_List: + - name + Fleet_output_update_request: + discriminator: + mapping: + elasticsearch: '#/components/schemas/Fleet_output_update_request_elasticsearch' + kafka: '#/components/schemas/Fleet_output_update_request_kafka' + logstash: '#/components/schemas/Fleet_output_update_request_logstash' + propertyName: type + oneOf: + - $ref: '#/components/schemas/Fleet_output_update_request_elasticsearch' + - $ref: '#/components/schemas/Fleet_output_update_request_kafka' + - $ref: '#/components/schemas/Fleet_output_update_request_logstash' + title: Output + Fleet_output_update_request_elasticsearch: + title: elasticsearch type: object properties: - _version: - type: string - '@timestamp': - format: date-time - type: string - created_at: - format: date-time + ca_sha256: type: string - created_by: + ca_trusted_fingerprint: type: string - description: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListDescription' - deserializer: + config: + type: object + config_yaml: type: string + hosts: + items: + type: string + type: array id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - immutable: + type: string + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: type: boolean - meta: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListMetadata' name: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListName' - serializer: type: string - tie_breaker_id: + preset: + enum: + - balanced + - custom + - throughput + - scale + - latency type: string - type: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListType' - updated_at: - format: date-time + proxy_id: type: string - updated_by: + shipper: + type: object + properties: + compression_level: + type: number + disk_queue_compression_enabled: + type: boolean + disk_queue_enabled: + type: boolean + disk_queue_encryption_enabled: + type: boolean + disk_queue_max_size: + type: number + disk_queue_path: + type: string + loadbalance: + type: boolean + ssl: + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string + type: + enum: + - elasticsearch type: string - version: - minimum: 1 - type: integer required: - - id - - type - name - - description - - immutable - - version - - tie_breaker_id - - created_at - - created_by - - updated_at - - updated_by - Security_Solution_Lists_API_ListDescription: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_ListId: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_ListItem: + - hosts + - type + Fleet_output_update_request_kafka: + title: kafka type: object properties: - _version: + auth_type: type: string - '@timestamp': - format: date-time + broker_timeout: + type: number + ca_sha256: type: string - created_at: - format: date-time + ca_trusted_fingerprint: + type: string + client_id: + type: string + compression: type: string - created_by: + compression_level: + type: number + config: + type: object + config_yaml: type: string - deserializer: + connection_type: + enum: + - plaintext + - encryption type: string + headers: + items: + type: object + properties: + key: + type: string + value: + type: string + type: array + hosts: + items: + type: string + type: array id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItemId' - list_id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - meta: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItemMetadata' - serializer: type: string - tie_breaker_id: + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: + type: boolean + key: type: string - type: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListType' - updated_at: - format: date-time + name: type: string - updated_by: + partition: type: string - value: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItemValue' - required: - - id - - type - - list_id - - value - - tie_breaker_id - - created_at - - created_by - - updated_at - - updated_by - Security_Solution_Lists_API_ListItemId: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_ListItemMetadata: - additionalProperties: true - type: object - Security_Solution_Lists_API_ListItemPrivileges: - type: object - properties: - application: - additionalProperties: - type: boolean - type: object - cluster: - additionalProperties: - type: boolean + password: + type: string + proxy_id: + type: string + random: type: object - has_all_requested: - type: boolean - index: - additionalProperties: - additionalProperties: - type: boolean - type: object + properties: + group_events: + type: number + required_acks: + type: number + round_robin: type: object - username: - type: string - required: - - username - - has_all_requested - - cluster - - index - - application - Security_Solution_Lists_API_ListItemValue: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_ListMetadata: - additionalProperties: true - type: object - Security_Solution_Lists_API_ListName: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_ListPrivileges: - type: object - properties: - application: - additionalProperties: - type: boolean + properties: + group_events: + type: number + sasl: type: object - cluster: - additionalProperties: - type: boolean + properties: + mechanism: + type: string + shipper: type: object - has_all_requested: - type: boolean - index: - additionalProperties: - additionalProperties: + properties: + compression_level: + type: number + disk_queue_compression_enabled: type: boolean - type: object + disk_queue_enabled: + type: boolean + disk_queue_encryption_enabled: + type: boolean + disk_queue_max_size: + type: number + disk_queue_path: + type: string + loadbalance: + type: boolean + ssl: type: object - username: + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string + verification_mode: + enum: + - none + - full + - certificate + - strict + type: string + timeout: + type: number + topic: type: string - required: - - username - - has_all_requested - - cluster - - index - - application - Security_Solution_Lists_API_ListType: - enum: - - binary - - boolean - - byte - - date - - date_nanos - - date_range - - double - - double_range - - float - - float_range - - geo_point - - geo_shape - - half_float - - integer - - integer_range - - ip - - ip_range - - keyword - - long - - long_range - - shape - - short - - text - type: string - Security_Solution_Lists_API_NonEmptyString: - description: A string that is not empty and does not contain only whitespace - minLength: 1 - pattern: ^(?! *$).+$ - type: string - Security_Solution_Lists_API_PlatformErrorResponse: - type: object - properties: - error: + topics: + deprecated: true + description: Use topic instead. + items: + type: object + properties: + topic: + type: string + when: + deprecated: true + description: >- + Deprecated, kafka output do not support conditionnal topics + anymore. + type: object + properties: + condition: + type: string + type: + type: string + type: array + type: + enum: + - kafka type: string - message: + username: type: string - statusCode: - type: integer - required: - - statusCode - - error - - message - Security_Solution_Lists_API_SiemErrorResponse: - type: object - properties: - message: + version: type: string - status_code: - type: integer required: - - status_code - - message - Security_Solution_Osquery_API_ArrayQueries: - items: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ArrayQueriesItem' - type: array - Security_Solution_Osquery_API_ArrayQueriesItem: - type: object - properties: - ecs_mapping: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_ECSMappingOrUndefined - id: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Id' - platform: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PlatformOrUndefined - query: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Query' - removed: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_RemovedOrUndefined - snapshot: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SnapshotOrUndefined - version: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_VersionOrUndefined - Security_Solution_Osquery_API_CreateLiveQueryRequestBody: + - name + Fleet_output_update_request_logstash: + title: logstash type: object properties: - agent_all: - type: boolean - agent_ids: + ca_sha256: + type: string + ca_trusted_fingerprint: + type: string + config: + type: object + config_yaml: + type: string + hosts: items: type: string type: array - agent_platforms: + id: + type: string + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: + type: boolean + name: + type: string + proxy_id: + type: string + shipper: + type: object + properties: + compression_level: + type: number + disk_queue_compression_enabled: + type: boolean + disk_queue_enabled: + type: boolean + disk_queue_encryption_enabled: + type: boolean + disk_queue_max_size: + type: number + disk_queue_path: + type: string + loadbalance: + type: boolean + ssl: + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string + type: + enum: + - logstash + type: string + required: + - name + Fleet_package_info: + title: Package information + type: object + properties: + assets: items: type: string type: array - agent_policy_ids: + categories: items: type: string type: array - alert_ids: + conditions: + type: object + properties: + elasticsearch: + type: object + properties: + subscription: + enum: + - basic + - gold + - platinum + - enterprise + type: string + kibana: + type: object + properties: + versions: + type: string + data_streams: items: - type: string + type: object + properties: + ingeset_pipeline: + type: string + name: + type: string + package: + type: string + release: + type: string + title: + type: string + type: + type: string + vars: + items: + type: object + properties: + default: + type: string + name: + type: string + required: + - name + - default + type: array + required: + - title + - name + - release + - ingeset_pipeline + - type + - package type: array - case_ids: + description: + type: string + download: + type: string + elasticsearch: + type: object + properties: + privileges: + type: object + properties: + cluster: + items: + type: string + type: array + format_version: + type: string + icons: items: type: string type: array - ecs_mapping: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_ECSMappingOrUndefined - event_ids: + internal: + type: boolean + name: + type: string + path: + type: string + readme: + type: string + release: + deprecated: true + description: >- + release label is deprecated, derive from the version instead + (packages follow semver) + enum: + - experimental + - beta + - ga + type: string + screenshots: items: - type: string + type: object + properties: + path: + type: string + size: + type: string + src: + type: string + title: + type: string + type: + type: string + required: + - src + - path type: array - metadata: - nullable: true + source: type: object - pack_id: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackIdOrUndefined' - queries: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ArrayQueries' - query: - $ref: '#/components/schemas/Security_Solution_Osquery_API_QueryOrUndefined' - saved_query_id: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SavedQueryIdOrUndefined - Security_Solution_Osquery_API_CreatePacksRequestBody: - type: object - properties: - description: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DescriptionOrUndefined - enabled: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_EnabledOrUndefined - name: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackName' - policy_ids: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PolicyIdsOrUndefined - queries: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ObjectQueries' - shards: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Shards' - Security_Solution_Osquery_API_CreateSavedQueryRequestBody: - type: object - properties: - description: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DescriptionOrUndefined - ecs_mapping: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_ECSMappingOrUndefined - id: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SavedQueryId' - interval: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Interval' - platform: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DescriptionOrUndefined - query: - $ref: '#/components/schemas/Security_Solution_Osquery_API_QueryOrUndefined' - removed: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_RemovedOrUndefined - snapshot: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SnapshotOrUndefined - version: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_VersionOrUndefined - Security_Solution_Osquery_API_DefaultSuccessResponse: - type: object - properties: {} - Security_Solution_Osquery_API_Description: - type: string - Security_Solution_Osquery_API_DescriptionOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Description' - nullable: true - Security_Solution_Osquery_API_ECSMapping: - additionalProperties: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ECSMappingItem' - type: object - Security_Solution_Osquery_API_ECSMappingItem: - type: object - properties: - field: + properties: + license: + enum: + - Apache-2.0 + - Elastic-2.0 + type: string + title: type: string - value: - oneOf: - - type: string - - items: - type: string - type: array - Security_Solution_Osquery_API_ECSMappingOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ECSMapping' - nullable: true - Security_Solution_Osquery_API_Enabled: - type: boolean - Security_Solution_Osquery_API_EnabledOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Enabled' - nullable: true - Security_Solution_Osquery_API_FindLiveQueryRequestQuery: - type: object - properties: - kuery: - $ref: '#/components/schemas/Security_Solution_Osquery_API_KueryOrUndefined' - page: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PageOrUndefined' - pageSize: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PageSizeOrUndefined - sort: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SortOrUndefined' - sortOrder: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SortOrderOrUndefined - Security_Solution_Osquery_API_FindPacksRequestQuery: - type: object - properties: - page: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PageOrUndefined' - pageSize: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PageSizeOrUndefined - sort: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SortOrUndefined' - sortOrder: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SortOrderOrUndefined - Security_Solution_Osquery_API_FindSavedQueryRequestQuery: - type: object - properties: - page: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PageOrUndefined' - pageSize: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PageSizeOrUndefined - sort: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SortOrUndefined' - sortOrder: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SortOrderOrUndefined - Security_Solution_Osquery_API_GetLiveQueryResultsRequestQuery: - type: object - properties: - kuery: - $ref: '#/components/schemas/Security_Solution_Osquery_API_KueryOrUndefined' - page: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PageOrUndefined' - pageSize: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PageSizeOrUndefined - sort: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SortOrUndefined' - sortOrder: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SortOrderOrUndefined - Security_Solution_Osquery_API_Id: - type: string - Security_Solution_Osquery_API_Interval: - type: string - Security_Solution_Osquery_API_IntervalOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Interval' - nullable: true - Security_Solution_Osquery_API_KueryOrUndefined: - nullable: true - type: string - Security_Solution_Osquery_API_ObjectQueries: - additionalProperties: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ObjectQueriesItem' - type: object - Security_Solution_Osquery_API_ObjectQueriesItem: - type: object - properties: - ecs_mapping: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_ECSMappingOrUndefined - id: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Id' - platform: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PlatformOrUndefined - query: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Query' - removed: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_RemovedOrUndefined - saved_query_id: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SavedQueryIdOrUndefined - snapshot: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SnapshotOrUndefined - version: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_VersionOrUndefined - Security_Solution_Osquery_API_PackId: - type: string - Security_Solution_Osquery_API_PackIdOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackId' - nullable: true - Security_Solution_Osquery_API_PackName: - type: string - Security_Solution_Osquery_API_PageOrUndefined: - nullable: true - type: integer - Security_Solution_Osquery_API_PageSizeOrUndefined: - nullable: true - type: integer - Security_Solution_Osquery_API_Platform: - type: string - Security_Solution_Osquery_API_PlatformOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Platform' - nullable: true - Security_Solution_Osquery_API_PolicyIds: - items: - type: string - type: array - Security_Solution_Osquery_API_PolicyIdsOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PolicyIds' - nullable: true - Security_Solution_Osquery_API_Query: - type: string - Security_Solution_Osquery_API_QueryOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Query' - nullable: true - Security_Solution_Osquery_API_Removed: - type: boolean - Security_Solution_Osquery_API_RemovedOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Removed' - nullable: true - Security_Solution_Osquery_API_SavedQueryId: - type: string - Security_Solution_Osquery_API_SavedQueryIdOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SavedQueryId' - nullable: true - Security_Solution_Osquery_API_Shards: - additionalProperties: - type: number - type: object - Security_Solution_Osquery_API_Snapshot: - type: boolean - Security_Solution_Osquery_API_SnapshotOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Snapshot' - nullable: true - Security_Solution_Osquery_API_SortOrderOrUndefined: - oneOf: - - nullable: true + type: type: string - - enum: - - asc - - desc - Security_Solution_Osquery_API_SortOrUndefined: - nullable: true - type: string - Security_Solution_Osquery_API_UpdatePacksRequestBody: - type: object - properties: - description: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DescriptionOrUndefined - enabled: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_EnabledOrUndefined - id: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackId' - policy_ids: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PolicyIdsOrUndefined - queries: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ObjectQueries' - shards: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Shards' - Security_Solution_Osquery_API_UpdateSavedQueryRequestBody: - type: object - properties: - description: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DescriptionOrUndefined - ecs_mapping: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_ECSMappingOrUndefined - id: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SavedQueryId' - interval: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_IntervalOrUndefined - platform: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DescriptionOrUndefined - query: - $ref: '#/components/schemas/Security_Solution_Osquery_API_QueryOrUndefined' - removed: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_RemovedOrUndefined - snapshot: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SnapshotOrUndefined version: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_VersionOrUndefined - Security_Solution_Osquery_API_Version: - type: string - Security_Solution_Osquery_API_VersionOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Version' - nullable: true - Security_Solution_Timeline_API_BareNote: + type: string + required: + - name + - title + - version + - description + - type + - categories + - conditions + - assets + - format_version + - download + - path + Fleet_package_policy: + allOf: + - type: object + properties: + id: + type: string + inputs: + oneOf: + - items: {} + type: array + - type: object + revision: + type: number + required: + - id + - revision + - $ref: '#/components/schemas/Fleet_new_package_policy' + title: Package policy + Fleet_package_policy_request: + title: Package Policy Request type: object properties: - created: - nullable: true - type: number - createdBy: - nullable: true + description: + description: Package policy description + example: my description type: string - eventId: - nullable: true + force: + description: >- + Force package policy creation even if package is not verified, or if + the agent policy is managed. + type: boolean + id: + description: Package policy unique identifier type: string - note: - nullable: true + inputs: + additionalProperties: + type: object + properties: + enabled: + description: 'enable or disable that input, (default to true)' + type: boolean + streams: + additionalProperties: + type: object + properties: + enabled: + description: 'enable or disable that stream, (default to true)' + type: boolean + vars: + description: >- + Stream level variable (see integration documentation for + more information) + type: object + description: >- + Input streams (see integration documentation to know what + streams are available) + type: object + vars: + description: >- + Input level variable (see integration documentation for more + information) + type: object + description: >- + Package policy inputs (see integration documentation to know what + inputs are available) + example: + nginx-logfile: + enabled: true + streams: + nginx.access: + enabled: true + vars: + ignore_older: 72h + paths: + - /var/log/nginx/access.log* + preserve_original_event: false + tags: + - nginx-access + type: object + name: + description: Package policy name (should be unique) + example: nginx-123 type: string - timelineId: - nullable: true + namespace: + description: >- + The package policy namespace. Leave blank to inherit the agent + policy's namespace. + example: customnamespace type: string - updated: - nullable: true - type: number - updatedBy: + overrides: + description: >- + Override settings that are defined in the package policy. The + override option should be used only in unusual circumstances and not + as a routine procedure. nullable: true + type: object + properties: + inputs: + type: object + package: + type: object + properties: + name: + description: Package name + example: nginx + type: string + version: + description: Package version + example: 1.6.0 + type: string + required: + - name + - version + policy_id: + deprecated: true + description: Agent policy ID where that package policy will be added + example: agent-policy-id type: string + policy_ids: + description: Agent policy IDs where that package policy will be added + example: + - agent-policy-id + items: + type: string + type: array + vars: + description: >- + Package root level variable (see integration documentation for more + information) + type: object required: - - timelineId - Security_Solution_Timeline_API_ColumnHeaderResult: + - name + - package + Fleet_package_usage_stats: + title: Package usage stats type: object properties: - aggregatable: - type: boolean - category: + agent_policy_count: + type: integer + required: + - agent_policy_count + Fleet_proxies: + title: Fleet Proxy + type: object + properties: + certificate: type: string - columnHeaderType: + certificate_authorities: type: string - description: + certificate_key: type: string - example: - oneOf: - - type: string - - type: number id: type: string - indexes: - items: - type: string - type: array name: type: string - placeholder: + proxy_headers: + type: object + url: type: string - searchable: - type: boolean - type: + required: + - name + - url + Fleet_saved_object_type: + oneOf: + - enum: + - dashboard + - visualization + - search + - index_pattern + - map + - lens + - security_rule + - csp_rule_template + - ml_module + - tag + - osquery_pack_asset + - osquery_saved_query + type: string + - enum: + - index + - component_template + - ingest_pipeline + - index_template + - ilm_policy + - transform + - data_stream_ilm_policy + - ml_model type: string - Security_Solution_Timeline_API_DataProviderQueryMatch: + title: Saved Object type + Fleet_search_result: + title: Search result type: object properties: - enabled: - nullable: true - type: boolean - excluded: - nullable: true - type: boolean - id: - nullable: true + description: type: string - kqlQuery: - nullable: true + download: + type: string + icons: type: string + installationInfo: + $ref: '#/components/schemas/Fleet_installation_info' name: - nullable: true type: string - queryMatch: - $ref: '#/components/schemas/Security_Solution_Timeline_API_QueryMatchResult' - Security_Solution_Timeline_API_DataProviderResult: - type: object - properties: - and: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_DataProviderQueryMatch - nullable: true - type: array - enabled: - nullable: true - type: boolean - excluded: - nullable: true - type: boolean - id: - nullable: true + path: type: string - kqlQuery: - nullable: true + savedObject: + deprecated: true + type: object + status: type: string - name: - nullable: true + title: type: string - queryMatch: - $ref: '#/components/schemas/Security_Solution_Timeline_API_QueryMatchResult' - nullable: true type: - $ref: '#/components/schemas/Security_Solution_Timeline_API_DataProviderType' - nullable: true - Security_Solution_Timeline_API_DataProviderType: - description: >- - The type of data provider to create. Valid values are `default` and - `template`. - enum: - - default - - template - type: string - Security_Solution_Timeline_API_DocumentIds: - oneOf: - - items: - type: string - type: array - - type: string - Security_Solution_Timeline_API_FavoriteTimelineResponse: + type: string + version: + type: string + required: + - description + - download + - icons + - name + - path + - title + - type + - version + - status + Fleet_settings: + title: Settings type: object properties: - code: - nullable: true - type: number - favorite: + fleet_server_hosts: + deprecated: true items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_FavoriteTimelineResult + type: string type: array - message: - nullable: true - type: string - savedObjectId: + has_seen_add_data_notice: + type: boolean + id: type: string - templateTimelineId: - nullable: true + prerelease_integrations_enabled: + type: boolean + required: + - fleet_server_hosts + - id + Fleet_upgrade_agent: + title: Upgrade agent + type: object + properties: + force: + description: 'Force upgrade, skipping validation (should be used with caution)' + type: boolean + skipRateLimitCheck: + description: Skip rate limit check for upgrade + type: boolean + source_uri: type: string - templateTimelineVersion: - nullable: true - type: number - timelineType: - $ref: '#/components/schemas/Security_Solution_Timeline_API_TimelineType' version: type: string required: - - savedObjectId - version - Security_Solution_Timeline_API_FavoriteTimelineResult: + Fleet_upgrade_agent_diff: + items: + items: + $ref: '#/components/schemas/Fleet_full_agent_policy_input' + type: array + title: Package policy Upgrade dryrun + type: array + Fleet_upgrade_diff: + items: + allOf: + - $ref: '#/components/schemas/Fleet_package_policy' + - allOf: + - $ref: '#/components/schemas/Fleet_new_package_policy' + - type: object + properties: + errors: + items: + type: object + properties: + key: + type: string + message: + type: string + type: array + missingVars: + items: + type: string + type: array + type: object + title: Package policy Upgrade dryrun + type: array + Kibana_HTTP_APIs_core_status_redactedResponse: + additionalProperties: false + description: A minimal representation of Kibana's operational status. type: object properties: - favoriteDate: - nullable: true - type: number - fullName: - nullable: true - type: string - userName: - nullable: true - type: string - Security_Solution_Timeline_API_FilterTimelineResult: + status: + additionalProperties: false + type: object + properties: + overall: + additionalProperties: false + type: object + properties: + level: + description: Service status levels as human and machine readable values. + enum: + - available + - degraded + - unavailable + - critical + type: string + required: + - level + required: + - overall + required: + - status + Kibana_HTTP_APIs_core_status_response: + additionalProperties: false + description: >- + Kibana's operational status as well as a detailed breakdown of plugin + statuses indication of various loads (like event loop utilization and + network traffic) at time of request. type: object properties: - exists: - type: boolean - match_all: - type: string - meta: + metrics: + additionalProperties: false + description: Metric groups collected by Kibana. type: object properties: - alias: - type: string - controlledBy: - type: string - disabled: - type: boolean - field: - type: string - formattedValue: - type: string - index: - type: string - key: - type: string - negate: - type: boolean - params: - type: string - type: - type: string - value: + collection_interval_in_millis: + description: The interval at which metrics should be collected. + type: number + elasticsearch_client: + additionalProperties: false + description: Current network metrics of Kibana's Elasticsearch client. + type: object + properties: + totalActiveSockets: + description: Count of network sockets currently in use. + type: number + totalIdleSockets: + description: Count of network sockets currently idle. + type: number + totalQueuedRequests: + description: Count of requests not yet assigned to sockets. + type: number + required: + - totalActiveSockets + - totalIdleSockets + - totalQueuedRequests + last_updated: + description: The time metrics were collected. type: string - missing: - type: string - query: - type: string - range: - type: string - script: + required: + - elasticsearch_client + - last_updated + - collection_interval_in_millis + name: + description: Kibana instance name. type: string - Security_Solution_Timeline_API_ImportTimelineResult: - type: object - properties: - errors: - items: - type: object - properties: - error: + status: + additionalProperties: false + type: object + properties: + core: + additionalProperties: false + description: Statuses of core Kibana services. + type: object + properties: + elasticsearch: + additionalProperties: false + type: object + properties: + detail: + description: Human readable detail of the service status. + type: string + documentationUrl: + description: A URL to further documentation regarding this service. + type: string + level: + description: >- + Service status levels as human and machine readable + values. + enum: + - available + - degraded + - unavailable + - critical + type: string + meta: + additionalProperties: {} + description: >- + An unstructured set of extra metadata about this + service. + type: object + summary: + description: A human readable summary of the service status. + type: string + required: + - level + - summary + - meta + savedObjects: + additionalProperties: false + type: object + properties: + detail: + description: Human readable detail of the service status. + type: string + documentationUrl: + description: A URL to further documentation regarding this service. + type: string + level: + description: >- + Service status levels as human and machine readable + values. + enum: + - available + - degraded + - unavailable + - critical + type: string + meta: + additionalProperties: {} + description: >- + An unstructured set of extra metadata about this + service. + type: object + summary: + description: A human readable summary of the service status. + type: string + required: + - level + - summary + - meta + required: + - elasticsearch + - savedObjects + overall: + additionalProperties: false + type: object + properties: + detail: + description: Human readable detail of the service status. + type: string + documentationUrl: + description: A URL to further documentation regarding this service. + type: string + level: + description: Service status levels as human and machine readable values. + enum: + - available + - degraded + - unavailable + - critical + type: string + meta: + additionalProperties: {} + description: An unstructured set of extra metadata about this service. + type: object + summary: + description: A human readable summary of the service status. + type: string + required: + - level + - summary + - meta + plugins: + additionalProperties: + additionalProperties: false type: object properties: - message: + detail: + description: Human readable detail of the service status. type: string - status_code: - type: number - id: - type: string - type: array - success: - type: boolean - success_count: - type: number - timelines_installed: - type: number - timelines_updated: - type: number - Security_Solution_Timeline_API_ImportTimelines: - allOf: - - $ref: '#/components/schemas/Security_Solution_Timeline_API_SavedTimeline' - - type: object + documentationUrl: + description: A URL to further documentation regarding this service. + type: string + level: + description: >- + Service status levels as human and machine readable + values. + enum: + - available + - degraded + - unavailable + - critical + type: string + meta: + additionalProperties: {} + description: An unstructured set of extra metadata about this service. + type: object + summary: + description: A human readable summary of the service status. + type: string + required: + - level + - summary + - meta + description: A dynamic mapping of plugin ID to plugin status. + type: object + required: + - overall + - core + - plugins + uuid: + description: >- + Unique, generated Kibana instance UUID. This UUID should persist + even if the Kibana process restarts. + type: string + version: + additionalProperties: false + type: object properties: - eventNotes: - items: - $ref: '#/components/schemas/Security_Solution_Timeline_API_BareNote' - nullable: true - type: array - globalNotes: - items: - $ref: '#/components/schemas/Security_Solution_Timeline_API_BareNote' - nullable: true - type: array - pinnedEventIds: - items: - type: string - nullable: true - type: array - savedObjectId: - nullable: true + build_date: + description: The date and time of this build. type: string - version: - nullable: true + build_flavor: + description: >- + The build flavour determines configuration and behavior of + Kibana. On premise users will almost always run the + "traditional" flavour, while other flavours are reserved for + Elastic-specific use cases. + enum: + - serverless + - traditional type: string - Security_Solution_Timeline_API_Note: - allOf: - - $ref: '#/components/schemas/Security_Solution_Timeline_API_BareNote' - - type: object - properties: - noteId: + build_hash: + description: >- + A unique hash value representing the git commit of this Kibana + build. type: string - version: + build_number: + description: >- + A monotonically increasing number, each subsequent build will + have a higher number. + type: number + build_snapshot: + description: Whether this build is a snapshot build. + type: boolean + number: + description: A semantic version number. type: string - Security_Solution_Timeline_API_PinnedEvent: - type: object - properties: - created: - nullable: true - type: number - createdBy: - nullable: true - type: string - eventId: - type: string - pinnedEventId: - type: string - timelineId: - type: string - updated: - nullable: true - type: number - updatedBy: - nullable: true - type: string - version: - type: string + required: + - number + - build_hash + - build_number + - build_snapshot + - build_flavor + - build_date required: - - eventId - - pinnedEventId - - timelineId + - name + - uuid - version - Security_Solution_Timeline_API_QueryMatchResult: + - status + - metrics + Machine_learning_APIs_mlSync200Response: + properties: + datafeedsAdded: + additionalProperties: + $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseDatafeeds' + description: >- + If a saved object for an anomaly detection job is missing a datafeed + identifier, it is added when you run the sync machine learning saved + objects API. + type: object + datafeedsRemoved: + additionalProperties: + $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseDatafeeds' + description: >- + If a saved object for an anomaly detection job references a datafeed + that no longer exists, it is deleted when you run the sync machine + learning saved objects API. + type: object + savedObjectsCreated: + $ref: >- + #/components/schemas/Machine_learning_APIs_mlSyncResponseSavedObjectsCreated + savedObjectsDeleted: + $ref: >- + #/components/schemas/Machine_learning_APIs_mlSyncResponseSavedObjectsDeleted + title: Successful sync API response type: object + Machine_learning_APIs_mlSync4xxResponse: properties: - displayField: - nullable: true - type: string - displayValue: - nullable: true - type: string - field: - nullable: true - type: string - operator: - nullable: true + error: + example: Unauthorized type: string - value: - nullable: true + message: type: string - Security_Solution_Timeline_API_Readable: + statusCode: + example: 401 + type: integer + title: Unsuccessful sync API response type: object + Machine_learning_APIs_mlSyncResponseAnomalyDetectors: + description: >- + The sync machine learning saved objects API response contains this + object when there are anomaly detection jobs affected by the + synchronization. There is an object for each relevant job, which + contains the synchronization status. properties: - _data: - additionalProperties: true - type: object - _encoding: - type: string - _events: - additionalProperties: true - type: object - _eventsCount: - type: number - _maxListeners: - additionalProperties: true + success: + $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' + title: Sync API response for anomaly detection jobs + type: object + Machine_learning_APIs_mlSyncResponseDatafeeds: + description: >- + The sync machine learning saved objects API response contains this + object when there are datafeeds affected by the synchronization. There + is an object for each relevant datafeed, which contains the + synchronization status. + properties: + success: + $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' + title: Sync API response for datafeeds + type: object + Machine_learning_APIs_mlSyncResponseDataFrameAnalytics: + description: >- + The sync machine learning saved objects API response contains this + object when there are data frame analytics jobs affected by the + synchronization. There is an object for each relevant job, which + contains the synchronization status. + properties: + success: + $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' + title: Sync API response for data frame analytics jobs + type: object + Machine_learning_APIs_mlSyncResponseSavedObjectsCreated: + description: >- + If saved objects are missing for machine learning jobs or trained + models, they are created when you run the sync machine learning saved + objects API. + properties: + anomaly-detector: + additionalProperties: + $ref: >- + #/components/schemas/Machine_learning_APIs_mlSyncResponseAnomalyDetectors + description: >- + If saved objects are missing for anomaly detection jobs, they are + created. type: object - _position: - type: number - _read: - additionalProperties: true + data-frame-analytics: + additionalProperties: + $ref: >- + #/components/schemas/Machine_learning_APIs_mlSyncResponseDataFrameAnalytics + description: >- + If saved objects are missing for data frame analytics jobs, they are + created. type: object - _readableState: - additionalProperties: true + trained-model: + additionalProperties: + $ref: >- + #/components/schemas/Machine_learning_APIs_mlSyncResponseTrainedModels + description: 'If saved objects are missing for trained models, they are created.' type: object - readable: - type: boolean - Security_Solution_Timeline_API_RowRendererId: - enum: - - alert - - alerts - - auditd - - auditd_file - - library - - netflow - - plain - - registry - - suricata - - system - - system_dns - - system_endgame_process - - system_file - - system_fim - - system_security_event - - system_socket - - threat_match - - zeek - type: string - Security_Solution_Timeline_API_SavedTimeline: + title: Sync API response for created saved objects type: object + Machine_learning_APIs_mlSyncResponseSavedObjectsDeleted: + description: >- + If saved objects exist for machine learning jobs or trained models that + no longer exist, they are deleted when you run the sync machine learning + saved objects API. properties: - columns: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_ColumnHeaderResult - nullable: true - type: array - created: - nullable: true - type: number - createdBy: - nullable: true - type: string - dataProviders: - items: + anomaly-detector: + additionalProperties: $ref: >- - #/components/schemas/Security_Solution_Timeline_API_DataProviderResult - nullable: true - type: array - dataViewId: - nullable: true - type: string - dateRange: - nullable: true - type: object - properties: - end: - oneOf: - - type: string - - type: number - start: - oneOf: - - type: string - - type: number - description: - nullable: true - type: string - eqlOptions: - nullable: true + #/components/schemas/Machine_learning_APIs_mlSyncResponseAnomalyDetectors + description: >- + If there are saved objects exist for nonexistent anomaly detection + jobs, they are deleted. type: object - properties: - eventCategoryField: - nullable: true - type: string - query: - nullable: true - type: string - size: - oneOf: - - nullable: true - type: string - - nullable: true - type: number - tiebreakerField: - nullable: true - type: string - timestampField: - nullable: true - type: string - eventType: - nullable: true - type: string - excludedRowRendererIds: - items: - $ref: '#/components/schemas/Security_Solution_Timeline_API_RowRendererId' - nullable: true - type: array - favorite: - items: + data-frame-analytics: + additionalProperties: $ref: >- - #/components/schemas/Security_Solution_Timeline_API_FavoriteTimelineResult - nullable: true - type: array - filters: - items: + #/components/schemas/Machine_learning_APIs_mlSyncResponseDataFrameAnalytics + description: >- + If there are saved objects exist for nonexistent data frame + analytics jobs, they are deleted. + type: object + trained-model: + additionalProperties: $ref: >- - #/components/schemas/Security_Solution_Timeline_API_FilterTimelineResult - nullable: true - type: array - indexNames: - items: - type: string - nullable: true - type: array - kqlMode: - nullable: true - type: string - kqlQuery: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_SerializedFilterQueryResult - nullable: true - savedQueryId: - nullable: true - type: string - savedSearchId: - nullable: true - type: string - sort: - $ref: '#/components/schemas/Security_Solution_Timeline_API_Sort' - nullable: true - status: - enum: - - active - - draft - - immutable - nullable: true - type: string - templateTimelineId: - nullable: true - type: string - templateTimelineVersion: - nullable: true - type: number - timelineType: - $ref: '#/components/schemas/Security_Solution_Timeline_API_TimelineType' - nullable: true - title: - nullable: true - type: string - updated: - nullable: true - type: number - updatedBy: - nullable: true - type: string - Security_Solution_Timeline_API_SerializedFilterQueryResult: - type: object - properties: - filterQuery: - nullable: true + #/components/schemas/Machine_learning_APIs_mlSyncResponseTrainedModels + description: >- + If there are saved objects exist for nonexistent trained models, + they are deleted. type: object - properties: - kuery: - nullable: true - type: object - properties: - expression: - nullable: true - type: string - kind: - nullable: true - type: string - serializedQuery: - nullable: true - type: string - Security_Solution_Timeline_API_Sort: - oneOf: - - $ref: '#/components/schemas/Security_Solution_Timeline_API_SortObject' - - items: - $ref: '#/components/schemas/Security_Solution_Timeline_API_SortObject' - type: array - Security_Solution_Timeline_API_SortFieldTimeline: - description: The field to sort the timelines by. - enum: - - title - - description - - updated - - created - type: string - Security_Solution_Timeline_API_SortObject: + title: Sync API response for deleted saved objects type: object - properties: - columnId: - nullable: true - type: string - columnType: - nullable: true - type: string - sortDirection: - nullable: true - type: string - Security_Solution_Timeline_API_TimelineResponse: - allOf: - - $ref: '#/components/schemas/Security_Solution_Timeline_API_SavedTimeline' - - type: object - properties: - eventIdToNoteIds: - items: - $ref: '#/components/schemas/Security_Solution_Timeline_API_Note' - type: array - noteIds: - items: - type: string - type: array - notes: - items: - $ref: '#/components/schemas/Security_Solution_Timeline_API_Note' - type: array - pinnedEventIds: - items: - type: string - type: array - pinnedEventsSaveObject: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_PinnedEvent - type: array - savedObjectId: - type: string - version: - type: string - required: - - savedObjectId - - version - Security_Solution_Timeline_API_TimelineStatus: - description: >- - The status of the timeline. Valid values are `active`, `draft`, and - `immutable`. - enum: - - active - - draft - - immutable - type: string - Security_Solution_Timeline_API_TimelineType: + Machine_learning_APIs_mlSyncResponseSuccess: + description: The success or failure of the synchronization. + type: boolean + Machine_learning_APIs_mlSyncResponseTrainedModels: description: >- - The type of timeline to create. Valid values are `default` and - `template`. - enum: - - default - - template - type: string + The sync machine learning saved objects API response contains this + object when there are trained models affected by the synchronization. + There is an object for each relevant trained model, which contains the + synchronization status. + properties: + success: + $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' + title: Sync API response for trained models + type: object Serverless_saved_objects_400_response: title: Bad request type: object @@ -25587,16 +14735,19 @@ components: title: Update SLO request type: object securitySchemes: - apiKeyAuth: - description: > - These APIs use key-based authentication. You must create an API key and - use the encoded value in the request header. For example: - `Authorization: ApiKey base64AccessApiKey` - in: header - name: Authorization - type: apiKey + BasicAuth: + scheme: basic + type: http + Fleet_basicAuth: + scheme: basic + type: http + Kibana_HTTP_APIs_basicAuth: + scheme: basic + type: http security: - - apiKeyAuth: [] + - BasicAuth: [] + - Kibana_HTTP_APIs_basicAuth: [] + - Fleet_basicAuth: [] tags: - description: > Configure APM agent keys to authorize requests from APM agents to the APM @@ -25609,40 +14760,32 @@ tags: name: APM annotations - description: Connector APIs enable you to create and manage connectors. name: connectors + - name: Data streams - description: >- Data view APIs enable you to manage data views, formerly known as Kibana index patterns. name: data views + - name: Elastic Agent actions + - name: Elastic Agent binary download sources + - name: Elastic Agent policies + - name: Elastic Agent status + - name: Elastic Agents + - name: Elastic Package Manager (EPM) + - name: Fleet enrollment API keys + - name: Fleet internals + - name: Fleet Kubernetes + - name: Fleet outputs + - name: Fleet package policies + - name: Fleet proxies + - name: Fleet Server hosts + - name: Fleet service tokens + - name: Fleet uninstall tokens - description: Machine learning name: ml - description: >- Manage Kibana saved objects, including dashboards, visualizations, and more. name: saved objects - - description: Manage and interact with Security Assistant resources. - name: Security AI Assistant API - - 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. - name: Security Solution Detections API - - description: Interact with and manage endpoints running the Elastic Defend integration. - name: Security Solution Endpoint Management API - - description: '' - name: Security Solution Entity Analytics API - - description: >- - Exceptions API allows you to manage detection rule exceptions to prevent a - rule from generating an alert from incoming events even when the rule's - other criteria are met. - name: Security Solution Exceptions API - - description: 'Lists API allows you to manage lists of keywords, IPs or IP ranges items.' - name: Security Solution Lists API - - description: 'Run live queries, manage packs and saved queries.' - name: Security Solution Osquery API - - description: >- - You can create Timelines and Timeline templates via the API, as well as - import new Timelines from an ndjson file. - name: Security Solution Timeline API - description: 'SLO APIs enable you to define, manage and track service-level objectives' name: slo - name: system diff --git a/oas_docs/output/kibana.yaml b/oas_docs/output/kibana.yaml index 977a910dabf6b..bd576d13ca355 100644 --- a/oas_docs/output/kibana.yaml +++ b/oas_docs/output/kibana.yaml @@ -57,158 +57,212 @@ servers: kibana_url: default: 'localhost:5601' paths: - /api/actions: + /agent_download_sources: get: - deprecated: true - description: Deprecated in 7.13.0. Use the get all connectors API instead. - operationId: legacyGetConnectors + operationId: get-download-sources responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - items: - $ref: '#/components/schemas/Connectors_action_response_properties' - type: array - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - summary: Get all connectors + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_download_sources' + type: array + page: + type: integer + perPage: + type: integer + total: + type: integer + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List agent binary download sources tags: - - connectors + - Elastic Agent binary download sources post: - deprecated: true - description: Deprecated in 7.13.0. Use the create connector API instead. - operationId: legacyCreateConnector - parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' + operationId: post-download-sources requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - title: Legacy create connector request properties type: object properties: - actionTypeId: - description: The connector type identifier. + host: type: string - config: - description: >- - The configuration for the connector. Configuration - properties vary depending on the connector type. - type: object + id: + type: string + is_default: + type: boolean name: - description: The display name for the connector. type: string - secrets: - 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. - type: object - required: true + required: + - name + - host + - is_default responses: '200': - $ref: '#/components/responses/Connectors_200_actions' - '401': - $ref: '#/components/responses/Connectors_401' - summary: Create a connector + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_download_sources' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Create agent binary download source tags: - - connectors - '/api/actions/action/{actionId}': + - Elastic Agent binary download sources + '/agent_download_sources/{sourceId}': delete: - deprecated: true - description: > - Deprecated in 7.13.0. Use the delete connector API instead. WARNING: - When you delete a connector, it cannot be recovered. - operationId: legacyDeleteConnector + operationId: delete-download-source parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - $ref: '#/components/parameters/Connectors_action_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: - '204': - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - summary: Delete a connector + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + id: + type: string + required: + - id + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete agent binary download source by ID tags: - - connectors + - Elastic Agent binary download sources get: - deprecated: true - description: Deprecated in 7.13.0. Use the get connector API instead. - operationId: legacyGetConnector - parameters: - - $ref: '#/components/parameters/Connectors_action_id' + operationId: get-one-download-source responses: '200': - $ref: '#/components/responses/Connectors_200_actions' - '401': - $ref: '#/components/responses/Connectors_401' - summary: Get connector information + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_download_sources' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get agent binary download source by ID tags: - - connectors + - Elastic Agent binary download sources + parameters: + - in: path + name: sourceId + required: true + schema: + type: string put: - deprecated: true - description: Deprecated in 7.13.0. Use the update connector API instead. - operationId: legacyUpdateConnector + operationId: update-download-source parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - $ref: '#/components/parameters/Connectors_action_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - description: The properties vary depending on the connector type. + type: object properties: - config: - description: >- - The new connector configuration. Configuration properties - vary depending on the connector type. - type: object + host: + type: string + is_default: + type: boolean name: - description: The new name for the connector. type: string - secrets: - description: >- - The updated secrets configuration for the connector. Secrets - properties vary depending on the connector type. - type: object - title: Legacy update connector request body properties - type: object - required: true + required: + - name + - is_default + - host responses: '200': - $ref: '#/components/responses/Connectors_200_actions' - '404': - $ref: '#/components/responses/Connectors_404' - summary: Update a connector + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_download_sources' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Update agent binary download source by ID tags: - - connectors - '/api/actions/action/{actionId}/_execute': + - Elastic Agent binary download sources + /agent_policies: + get: + description: '' + operationId: agent-policy-list + parameters: + - $ref: '#/components/parameters/Fleet_page_size' + - $ref: '#/components/parameters/Fleet_page_index' + - $ref: '#/components/parameters/Fleet_kuery' + - description: >- + When set to true, retrieve the related package policies for each + agent policy. + in: query + name: full + schema: + type: boolean + - description: >- + When set to true, do not count how many agents are in the agent + policy, this can improve performance if you are searching over a + large number of agent policies. The "agents" property will always be + 0 if set to true. + in: query + name: noAgentCount + schema: + type: boolean + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_agent_policy' + type: array + page: + type: number + perPage: + type: number + total: + type: number + required: + - items + - total + - page + - perPage + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List agent policies + tags: + - Elastic Agent policies post: - deprecated: true - description: Deprecated in 7.13.0. Use the run connector API instead. - operationId: legacyRunConnector + operationId: create-agent-policy parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - $ref: '#/components/parameters/Connectors_action_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - description: The properties vary depending on the connector type. - properties: - params: - description: >- - The parameters of the connector. Parameter properties vary - depending on the connector type. - type: object - required: - - params - title: Legacy run connector request body properties - type: object - required: true + $ref: '#/components/schemas/Fleet_agent_policy_create_request' responses: '200': content: @@ -216,448 +270,477 @@ paths: schema: type: object properties: - actionId: - type: string - data: - oneOf: - - additionalProperties: true - description: Information returned from the action. - type: object - - description: An array of information returned from the action. - items: - type: object - type: array - status: - description: The status of the action. - type: string - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - summary: Run a connector + item: + $ref: '#/components/schemas/Fleet_agent_policy' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Create agent policy tags: - - connectors - /api/actions/connector: + - Elastic Agent policies + /agent_policies/_bulk_get: post: - description: The connector identifier is randomly generated. - operationId: createConnector - parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' + operationId: bulk-get-agent-policies + parameters: [] requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - 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 schema: - $ref: '#/components/schemas/Connectors_create_connector_request' - required: true + type: object + properties: + full: + description: get full policies with package policies populated + type: boolean + ids: + description: list of agent policy ids + items: + type: string + type: array + ignoreMissing: + type: boolean + required: + - ids responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - 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 schema: - $ref: '#/components/schemas/Connectors_connector_response_properties' - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - summary: Create a connector with a random ID + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_agent_policy' + type: array + required: + - items + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Bulk get agent policies tags: - - connectors - /api/actions/connector_types: + - Elastic Agent policies + '/agent_policies/{agentPolicyId}': get: - operationId: getConnectorTypes - parameters: - - description: >- - A filter to limit the retrieved connector types to those that - support a specific feature (such as alerting or cases). - in: query - name: feature_id - schema: - $ref: '#/components/schemas/Connectors_features' + description: Get one agent policy + operationId: agent-policy-info + parameters: [] responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - getConnectorTypesServerlessResponse: - $ref: >- - #/components/examples/Connectors_get_connector_types_generativeai_response schema: - description: The properties vary for each connector type. - items: - type: object - properties: - enabled: - description: >- - Indicates whether the connector type is enabled in - Kibana. - example: true - type: boolean - enabled_in_config: - description: >- - Indicates whether the connector type is enabled in the - Kibana configuration file. - example: true - type: boolean - enabled_in_license: - description: >- - Indicates whether the connector is enabled in the - license. - example: true - type: boolean - id: - $ref: '#/components/schemas/Connectors_connector_types' - is_system_action_type: - example: false - type: boolean - minimum_license_required: - description: The license that is required to use the connector type. - example: basic - type: string - name: - description: The name of the connector type. - example: Index - type: string - supported_feature_ids: - description: The features that are supported by the connector type. - example: - - alerting - - cases - - siem - items: - $ref: '#/components/schemas/Connectors_features' - type: array - title: Get connector types response body properties - type: array - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - summary: Get all connector types - tags: - - connectors - '/api/actions/connector/{connectorId}': - delete: - operationId: deleteConnector - parameters: - - $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' - summary: Delete a connector + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_agent_policy' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get agent policy by ID tags: - - connectors - get: - operationId: getConnector + - Elastic Agent policies + parameters: + - in: path + name: agentPolicyId + required: true + schema: + type: string + put: + operationId: update-agent-policy parameters: - - $ref: '#/components/parameters/Connectors_connector_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Fleet_agent_policy_update_request' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - getConnectorResponse: - $ref: '#/components/examples/Connectors_get_connector_response' schema: - $ref: '#/components/schemas/Connectors_connector_response_properties' - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - '404': - $ref: '#/components/responses/Connectors_404' - summary: Get a connector information + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_agent_policy' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Update agent policy by ID tags: - - connectors + - Elastic Agent policies + '/agent_policies/{agentPolicyId}/copy': + parameters: + - in: path + name: agentPolicyId + required: true + schema: + type: string post: - operationId: createConnectorId + operationId: agent-policy-copy parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - description: > - A UUID v1 or v4 identifier for the connector. If you omit this - parameter, an identifier is randomly generated. - in: path - name: connectorId - required: true - schema: - example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 - type: string + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - createIndexConnectorRequest: - $ref: >- - #/components/examples/Connectors_create_index_connector_request schema: - $ref: '#/components/schemas/Connectors_create_connector_request' - required: true + type: object + properties: + description: + type: string + name: + type: string + required: + - name + description: '' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - createIndexConnectorResponse: - $ref: >- - #/components/examples/Connectors_create_index_connector_response schema: - $ref: '#/components/schemas/Connectors_connector_response_properties' - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - summary: Create a connector + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_agent_policy' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Copy agent policy by ID tags: - - connectors - put: - operationId: updateConnector - parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - $ref: '#/components/parameters/Connectors_connector_id' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - examples: - updateIndexConnectorRequest: - $ref: >- - #/components/examples/Connectors_update_index_connector_request - schema: - $ref: '#/components/schemas/Connectors_update_connector_request' + - Elastic Agent policies + '/agent_policies/{agentPolicyId}/download': + get: + operationId: agent-policy-download + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + item: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Download agent policy by ID + tags: + - Elastic Agent policies + parameters: + - in: path + name: agentPolicyId required: true + schema: + type: string + - in: query + name: download + required: false + schema: + type: string + - in: query + name: standalone + required: false + schema: + type: string + - in: query + name: kubernetes + required: false + schema: + type: string + '/agent_policies/{agentPolicyId}/full': + get: + operationId: agent-policy-full responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Connectors_connector_response_properties' - description: Indicates a successful call. + type: object + properties: + item: + oneOf: + - type: string + - $ref: '#/components/schemas/Fleet_agent_policy_full' + description: OK '400': - $ref: '#/components/responses/Connectors_401' - '401': - $ref: '#/components/responses/Connectors_401' - '404': - $ref: '#/components/responses/Connectors_404' - summary: Update a connector + $ref: '#/components/responses/Fleet_error' + summary: Get full agent policy by ID tags: - - connectors - '/api/actions/connector/{connectorId}/_execute': + - Elastic Agent policies + parameters: + - in: path + name: agentPolicyId + required: true + schema: + type: string + - in: query + name: download + required: false + schema: + type: string + - in: query + name: standalone + required: false + schema: + type: string + - in: query + name: kubernetes + required: false + schema: + type: string + /agent_policies/delete: + parameters: [] post: - 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. - operationId: runConnector + operationId: delete-agent-policy parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - $ref: '#/components/parameters/Connectors_connector_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - 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 schema: - $ref: '#/components/schemas/Connectors_run_connector_request' - required: true + type: object + properties: + agentPolicyId: + type: string + force: + description: >- + bypass validation checks that can prevent agent policy + deletion + type: boolean + required: + - agentPolicyId responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - 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 schema: type: object properties: - connector_id: - description: The identifier for the connector. - type: string - data: - oneOf: - - additionalProperties: true - description: Information returned from the action. - type: object - - description: An array of information returned from the action. - items: - type: object - type: array - status: - description: The status of the action. - enum: - - error - - ok + id: type: string + success: + type: boolean required: - - connector_id - - status - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - summary: Run a connector + - id + - success + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete agent policy by ID tags: - - connectors - /api/actions/connectors: + - Elastic Agent policies + /agent_status: get: - operationId: getConnectors + operationId: get-agent-status + parameters: + - in: query + name: policyId + required: false + schema: + type: string + - deprecated: true + in: query + name: kuery + required: false + schema: + type: string responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - getConnectorsResponse: - $ref: '#/components/examples/Connectors_get_connectors_response' schema: - items: - $ref: >- - #/components/schemas/Connectors_connector_response_properties - type: array - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - summary: Get all connectors + type: object + properties: + active: + type: integer + all: + type: integer + error: + type: integer + events: + type: integer + inactive: + type: integer + offline: + type: integer + online: + type: integer + other: + type: integer + total: + deprecated: true + type: integer + unenrolled: + type: integer + updating: + type: integer + required: + - active + - all + - error + - events + - inactive + - offline + - online + - other + - total + - updating + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get agent status summary tags: - - connectors - /api/actions/list_action_types: + - Elastic Agent status + /agent_status/data: + get: + operationId: get-agent-data + parameters: + - in: query + name: agentsIds + required: true + schema: + items: + type: string + type: array + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + items: + items: + additionalProperties: + type: object + properties: + data: + type: boolean + type: object + type: array + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get incoming agent data + tags: + - Elastic Agent status + /agent-status: get: deprecated: true - description: Deprecated in 7.13.0. Use the get all connector types API instead. - operationId: legacyGetConnectorTypes + operationId: get-agent-status-deprecated + parameters: + - in: query + name: policyId + required: false + schema: + type: string responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - description: The properties vary for each connector type. - items: - type: object - properties: - enabled: - description: >- - Indicates whether the connector type is enabled in - Kibana. - type: boolean - enabledInConfig: - description: >- - Indicates whether the connector type is enabled in the - Kibana `.yml` file. - type: boolean - enabledInLicense: - description: >- - Indicates whether the connector is enabled in the - license. - example: true - type: boolean - id: - description: The unique identifier for the connector type. - type: string - minimumLicenseRequired: - description: The license that is required to use the connector type. - type: string - name: - description: The name of the connector type. - type: string - title: Legacy get connector types response body properties - type: array - description: Indicates a successful call. - '401': - $ref: '#/components/responses/Connectors_401' - summary: Get connector types + type: object + properties: + error: + type: integer + events: + type: integer + inactive: + type: integer + offline: + type: integer + online: + type: integer + other: + type: integer + total: + type: integer + updating: + type: integer + required: + - error + - events + - inactive + - offline + - online + - other + - total + - updating + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get agent status summary tags: - - connectors - /api/apm/agent_keys: + - Elastic Agent status + /agents: + get: + operationId: get-agents + parameters: + - $ref: '#/components/parameters/Fleet_page_size' + - $ref: '#/components/parameters/Fleet_page_index' + - $ref: '#/components/parameters/Fleet_kuery' + - $ref: '#/components/parameters/Fleet_show_inactive' + - $ref: '#/components/parameters/Fleet_show_upgradeable' + - $ref: '#/components/parameters/Fleet_sort_field' + - $ref: '#/components/parameters/Fleet_sort_order' + - $ref: '#/components/parameters/Fleet_with_metrics' + - in: query + name: getStatusSummary + required: false + schema: + type: boolean + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Fleet_get_agents_response' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List agents + tags: + - Elastic Agents post: - description: Create a new agent key for APM. - operationId: createAgentKey + operationId: get-agents-by-actions + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - name: - type: string - privileges: + actionIds: items: - enum: - - 'event:write' - - 'config_agent:read' type: string type: array + required: + - policy_id required: true + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Fleet_agent_get_by_actions' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List agents by action ids + tags: + - Elastic Agents + '/agents/{agentId}': + delete: + operationId: delete-agent + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: @@ -665,53 +748,61 @@ paths: schema: type: object properties: - api_key: - type: string - encoded: - type: string - expiration: - format: int64 - type: integer - id: - type: string - name: + action: + enum: + - deleted type: string - description: Agent key created successfully - summary: Create an APM agent key + required: + - action + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete agent by ID tags: - - APM agent keys - '/api/apm/services/{serviceName}/annotation': - post: - description: Create a new annotation for a specific service. - operationId: createAnnotation + - Elastic Agents + get: + operationId: get-agent parameters: - - description: The name of the service - in: path - name: serviceName - required: true - schema: - type: string + - $ref: '#/components/parameters/Fleet_with_metrics' + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_agent' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get agent by ID + tags: + - Elastic Agents + parameters: + - in: path + name: agentId + required: true + schema: + type: string + put: + operationId: update-agent + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - '@timestamp': - type: string - message: - type: string - service: - type: object - properties: - environment: - type: string - version: - type: string tags: items: type: string type: array + user_provided_metadata: + type: object required: true responses: '200': @@ -720,70 +811,36 @@ paths: schema: type: object properties: - _id: - type: string - _index: - type: string - _source: - type: object - properties: - '@timestamp': - type: string - annotation: - type: string - event: - type: object - properties: - created: - type: string - message: - type: string - service: - type: object - properties: - environment: - type: string - name: - type: string - version: - type: string - tags: - items: - type: string - type: array - description: Annotation created successfully - summary: Create a service annotation + item: + $ref: '#/components/schemas/Fleet_agent' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Update agent by ID tags: - - APM annotations - '/api/apm/services/{serviceName}/annotation/search': - get: - description: Search for annotations related to a specific service. - operationId: getAnnotation + - Elastic Agents + '/agents/{agentId}/actions': + parameters: + - in: path + name: agentId + required: true + schema: + type: string + post: + operationId: new-agent-action parameters: - - description: The name of the service - in: path - name: serviceName - required: true - schema: - type: string - - description: The environment to filter annotations by - in: query - name: environment - required: false - schema: - type: string - - description: The start date for the search - in: query - name: start - required: false - schema: - type: string - - description: The end date for the search - in: query - name: end - required: false - schema: - type: string + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + action: + $ref: '#/components/schemas/Fleet_agent_action' + required: true responses: '200': content: @@ -791,51 +848,36 @@ paths: schema: type: object properties: - annotations: + body: items: - type: object - properties: - '@timestamp': - type: number - id: - type: string - text: - type: string - type: - enum: - - version - type: string + type: number type: array - description: Successful response - summary: Search for annotations + headers: + type: string + statusCode: + type: number + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Create agent action tags: - - APM annotations - /api/asset_criticality: - delete: - operationId: DeleteAssetCriticalityRecord + - Elastic Agent actions + '/agents/{agentId}/actions/{actionId}/cancel': + parameters: + - in: path + name: agentId + required: true + schema: + type: string + - in: path + name: actionId + required: true + schema: + type: string + post: + operationId: agent-action-cancel parameters: - - description: The ID value of the asset. - in: query - name: id_value - required: true - schema: - type: string - - description: The field representing the ID. - example: host.name - in: query - name: id_field - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_IdField - - description: If 'wait_for' the request will wait for the index refresh. - in: query - name: refresh - required: false - schema: - enum: - - wait_for - type: string + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: @@ -843,389 +885,409 @@ paths: schema: type: object properties: - deleted: - description: >- - If the record was deleted. If false the record did not - exist. - type: boolean - record: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityRecord - required: - - deleted - description: Successful response + item: + $ref: '#/components/schemas/Fleet_agent_action' + description: OK '400': - description: Invalid request - summary: Delete Criticality Record + $ref: '#/components/responses/Fleet_error' + summary: Cancel agent action tags: - - Security Solution Entity Analytics API - get: - operationId: GetAssetCriticalityRecord + - Elastic Agent actions + '/agents/{agentId}/reassign': + parameters: + - in: path + name: agentId + required: true + schema: + type: string + post: + operationId: reassign-agent parameters: - - description: The ID value of the asset. - in: query - name: id_value - required: true - schema: - type: string - - description: The field representing the ID. - example: host.name - in: query - name: id_field - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_IdField + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + policy_id: + type: string + required: + - policy_id + required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityRecord - description: Successful response + type: object + description: OK '400': - description: Invalid request - '404': - description: Criticality record not found - summary: Get Criticality Record + $ref: '#/components/responses/Fleet_error' + summary: Reassign agent tags: - - Security Solution Entity Analytics API - post: - operationId: CreateAssetCriticalityRecord + - Elastic Agents + put: + deprecated: true + operationId: reassign-agent-deprecated + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_CreateAssetCriticalityRecord - - type: object - properties: - refresh: - description: >- - If 'wait_for' the request will wait for the index - refresh. - enum: - - wait_for - type: string + type: object + properties: + policy_id: + type: string + required: + - policy_id required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityRecord - description: Successful response + type: object + description: OK '400': - description: Invalid request - summary: Create Criticality Record + $ref: '#/components/responses/Fleet_error' + summary: Reassign agent tags: - - Security Solution Entity Analytics API - /api/asset_criticality/bulk: + - Elastic Agents + '/agents/{agentId}/request_diagnostics': + parameters: + - in: path + name: agentId + required: true + schema: + type: string post: - operationId: BulkUpsertAssetCriticalityRecords + operationId: request-diagnostics-agent + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - example: - records: - - criticality_level: low_impact - id_field: host.name - id_value: host-1 - - criticality_level: medium_impact - id_field: host.name - id_value: host-2 type: object properties: - records: + additional_metrics: items: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_CreateAssetCriticalityRecord - maxItems: 1000 - minItems: 1 + oneOf: + - enum: + - CPU + type: string type: array - required: - - records responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - example: - errors: - - index: 0 - message: Invalid ID field - stats: - failed: 1 - successful: 1 - total: 2 type: object properties: - errors: - items: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityBulkUploadErrorItem - type: array - stats: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityBulkUploadStats - required: - - errors - - stats - description: Bulk upload successful - '413': - description: File too large - summary: >- - Bulk upsert asset criticality data, creating or updating records as - needed + actionId: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Request agent diagnostics tags: - - Security Solution Entity Analytics API - /api/asset_criticality/list: + - Elastic Agents + '/agents/{agentId}/unenroll': + parameters: + - in: path + name: agentId + required: true + schema: + type: string post: - operationId: FindAssetCriticalityRecords + operationId: unenroll-agent parameters: - - description: The field to sort by. - in: query - name: sort_field - required: false - schema: - enum: - - id_value - - id_field - - criticality_level - - \@timestamp - type: string - - description: The order to sort by. - in: query - name: sort_direction - required: false - schema: - enum: - - asc - - desc - type: string - - description: The page number to return. - in: query - name: page - required: false - schema: - minimum: 1 - type: integer - - description: The number of records to return per page. - in: query - name: per_page - required: false - schema: - maximum: 1000 - minimum: 1 - type: integer - - description: The kuery to filter by. - in: query - name: kuery - required: false - schema: - type: string - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - page: - minimum: 1 - type: integer - per_page: - maximum: 1000 - minimum: 1 - type: integer - records: - items: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityRecord - type: array - total: - minimum: 0 - type: integer - required: - - records - - page - - per_page - - total - description: Bulk upload successful - summary: 'List asset criticality data, filtering and sorting as needed' - tags: - - Security Solution Entity Analytics API - /api/data_views: - get: - operationId: getAllDataViewsDefault + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + force: + type: boolean + revoke: + type: boolean responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - getAllDataViewsResponse: - $ref: '#/components/examples/Data_views_get_data_views_response' schema: type: object - properties: - data_view: - items: - type: object - properties: - id: - type: string - name: - type: string - namespaces: - items: - type: string - type: array - title: - type: string - typeMeta: - type: object - type: array - description: Indicates a successful call. + description: OK '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Get all data views + type: object + properties: + error: + type: string + message: + type: string + statusCode: + enum: + - 400 + type: number + description: BAD REQUEST + summary: Unenroll agent tags: - - data views - /api/data_views/data_view: + - Elastic Agents + '/agents/{agentId}/upgrade': + parameters: + - in: path + name: agentId + required: true + schema: + type: string post: - operationId: createDataViewDefaultw + operationId: upgrade-agent parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - createDataViewRequest: - $ref: '#/components/examples/Data_views_create_data_view_request' schema: - $ref: '#/components/schemas/Data_views_create_data_view_request_object' + $ref: '#/components/schemas/Fleet_upgrade_agent' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_data_view_response_object' - description: Indicates a successful call. + $ref: '#/components/schemas/Fleet_upgrade_agent' + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Create a data view + $ref: '#/components/responses/Fleet_error' + summary: Upgrade agent tags: - - data views - '/api/data_views/data_view/{viewId}': - delete: - description: | - WARNING: When you delete a data view, it cannot be recovered. - operationId: deleteDataViewDefault - parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - $ref: '#/components/parameters/Data_views_view_id' + - Elastic Agents + '/agents/{agentId}/uploads': + get: + operationId: list-agent-uploads responses: - '204': - description: Indicates a successful call. - '404': + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_404_response' - description: Object is not found. - summary: Delete a data view + type: object + properties: + body: + type: object + properties: + item: + items: + $ref: '#/components/schemas/Fleet_agent_diagnostics' + type: array + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List agent uploads tags: - - data views + - Elastic Agents + parameters: + - in: path + name: agentId + required: true + schema: + type: string + /agents/action_status: get: - operationId: getDataViewDefault + operationId: agents-action-status parameters: - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Fleet_page_size' + - $ref: '#/components/parameters/Fleet_page_index' + - in: query + name: errorSize + schema: + default: 5 + type: integer responses: '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - examples: - getDataViewResponse: - $ref: '#/components/examples/Data_views_get_data_view_response' - schema: - $ref: '#/components/schemas/Data_views_data_view_response_object' - description: Indicates a successful call. - '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_404_response' - description: Object is not found. - summary: Get a data view + type: object + properties: + items: + items: + type: object + properties: + actionId: + type: string + cancellationTime: + type: string + completionTime: + type: string + creationTime: + description: creation time of action + type: string + expiration: + type: string + latestErrors: + description: >- + latest errors that happened when the agents executed + the action + items: + type: object + properties: + agentId: + type: string + error: + type: string + timestamp: + type: string + type: array + nbAgentsAck: + description: number of agents that acknowledged the action + type: number + nbAgentsActionCreated: + description: number of agents included in action from kibana + type: number + nbAgentsActioned: + description: number of agents actioned + type: number + nbAgentsFailed: + description: number of agents that failed to execute the action + type: number + newPolicyId: + description: new policy id (POLICY_REASSIGN action) + type: string + policyId: + description: policy id (POLICY_CHANGE action) + type: string + revision: + description: new policy revision (POLICY_CHANGE action) + type: string + startTime: + description: start time of action (scheduled actions) + type: string + status: + enum: + - COMPLETE + - EXPIRED + - CANCELLED + - FAILED + - IN_PROGRESS + - ROLLOUT_PASSED + type: string + type: + enum: + - POLICY_REASSIGN + - UPGRADE + - UNENROLL + - FORCE_UNENROLL + - UPDATE_TAGS + - CANCEL + - REQUEST_DIAGNOSTICS + - SETTINGS + - POLICY_CHANGE + - INPUT_ACTION + type: string + version: + description: agent version number (UPGRADE action) + type: string + required: + - actionId + - complete + - nbAgentsActioned + - nbAgentsActionCreated + - nbAgentsAck + - nbAgentsFailed + - status + - creationTime + - type + type: array + required: + - items + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get agent action status tags: - - data views + - Elastic Agent actions + /agents/bulk_reassign: post: - operationId: updateDataViewDefault + operationId: bulk-reassign-agents parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - updateDataViewRequest: - $ref: '#/components/examples/Data_views_update_data_view_request' + example: + agents: 'fleet-agents.policy_id : ("policy1" or "policy2")' + policy_id: policy_id schema: - $ref: '#/components/schemas/Data_views_update_data_view_request_object' - required: true + type: object + properties: + agents: + oneOf: + - description: 'KQL query string, leave empty to action all agents' + type: string + - description: list of agent IDs + items: + type: string + type: array + policy_id: + description: new agent policy id + type: string + required: + - policy_id + - agents responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_data_view_response_object' - description: Indicates a successful call. + type: object + properties: + actionId: + type: string + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Update a data view + $ref: '#/components/responses/Fleet_error' + summary: Bulk reassign agents tags: - - data views - '/api/data_views/data_view/{viewId}/fields': + - Elastic Agents + /agents/bulk_request_diagnostics: post: - description: > - Update fields presentation metadata such as count, customLabel, - customDescription, and format. - operationId: updateFieldsMetadataDefault + operationId: bulk-request-diagnostics parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - updateFieldsMetadataRequest: - $ref: '#/components/examples/Data_views_update_field_metadata_request' + example: + agents: 'fleet-agents.policy_id : ("policy1" or "policy2")' schema: type: object properties: - fields: - description: The field object. - type: object + additional_metrics: + items: + oneOf: + - enum: + - CPU + type: string + type: array + agents: + oneOf: + - description: 'KQL query string, leave empty to action all agents' + type: string + - description: list of agent IDs + items: + type: string + type: array + batchSize: + type: number required: - - fields - required: true + - agents responses: '200': content: @@ -1233,87 +1295,106 @@ paths: schema: type: object properties: - acknowledged: - type: boolean - description: Indicates a successful call. + actionId: + type: string + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Update data view fields metadata + $ref: '#/components/responses/Fleet_error' + summary: Bulk request diagnostics from agents tags: - - data views - '/api/data_views/data_view/{viewId}/runtime_field': + - Elastic Agents + /agents/bulk_unenroll: post: - operationId: createRuntimeFieldDefault + operationId: bulk-unenroll-agents parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - createRuntimeFieldRequest: - $ref: '#/components/examples/Data_views_create_runtime_field_request' + example: + agents: + - agent1 + - agent2 + force: false + revoke: true schema: type: object properties: - name: - description: | - The name for a runtime field. - type: string - runtimeField: - description: | - The runtime field definition object. - type: object - required: - - name - - runtimeField - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: + agents: + oneOf: + - description: 'KQL query string, leave empty to action all agents' + type: string + - description: list of agent IDs + items: + type: string + type: array + force: + description: Unenrolls hosted agents too + type: boolean + includeInactive: + description: >- + When passing agents by KQL query, unenrolls inactive agents + too + type: boolean + revoke: + description: Revokes API keys of agents + type: boolean + required: + - agents + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: type: object - description: Indicates a successful call. - summary: Create a runtime field + properties: + actionId: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Bulk unenroll agents tags: - - data views - put: - operationId: createUpdateRuntimeFieldDefault + - Elastic Agents + /agents/bulk_update_agent_tags: + post: + operationId: bulk-update-agent-tags parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - description: | - The ID of the data view fields you want to update. - in: path - name: viewId - required: true - schema: - type: string + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - updateRuntimeFieldRequest: - $ref: '#/components/examples/Data_views_create_runtime_field_request' + example: + agents: + - agent1 + - agent2 + tagsToAdd: + - newTag + tagsToRemove: + - existingTag schema: type: object properties: - name: - description: | - The name for a runtime field. - type: string - runtimeField: - description: | - The runtime field definition object. - type: object + agents: + oneOf: + - description: 'KQL query string, leave empty to action all agents' + type: string + - description: list of agent IDs + items: + type: string + type: array + batchSize: + type: number + tagsToAdd: + items: + type: string + type: array + tagsToRemove: + items: + type: string + type: array required: - - name - - runtimeField - required: true + - agents responses: '200': content: @@ -1321,245 +1402,322 @@ paths: schema: type: object properties: - data_view: - type: object - fields: - items: - type: object - type: array - description: Indicates a successful call. + actionId: + type: string + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Bulk update agent tags + tags: + - Elastic Agents + /agents/bulk_upgrade: + post: + operationId: bulk-upgrade-agents + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + example: + agents: + - agent1 + - agent2 + rollout_duration_seconds: 3600 + source_uri: 'https://artifacts.elastic.co/downloads/beats/elastic-agent' + start_time: '2022-08-03T14:00:00.000Z' + version: 8.4.0 + schema: + $ref: '#/components/schemas/Fleet_bulk_upgrade_agents' + required: true + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Create or update a runtime field + type: object + properties: + actionId: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Bulk upgrade agents tags: - - data views - '/api/data_views/data_view/{viewId}/runtime_field/{fieldName}': + - Elastic Agents + '/agents/files/{fileId}': delete: - operationId: deleteRuntimeFieldDefault - parameters: - - $ref: '#/components/parameters/Data_views_field_name' - - $ref: '#/components/parameters/Data_views_view_id' + operationId: delete-agent-upload-file responses: '200': - description: Indicates a successful call. - '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_404_response' - description: Object is not found. - summary: Delete a runtime field from a data view + type: object + properties: + body: + type: object + properties: + deleted: + type: boolean + id: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete file uploaded by agent tags: - - data views + - Elastic Agents + parameters: + - in: path + name: fileId + required: true + schema: + type: string + '/agents/files/{fileId}/{fileName}': get: - operationId: getRuntimeFieldDefault - parameters: - - $ref: '#/components/parameters/Data_views_field_name' - - $ref: '#/components/parameters/Data_views_view_id' + operationId: get-agent-upload-file responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - getRuntimeFieldResponse: - $ref: '#/components/examples/Data_views_get_runtime_field_response' schema: type: object properties: - data_view: + body: type: object - fields: - items: - type: object - type: array - description: Indicates a successful call. - '404': + properties: + items: + type: object + properties: + body: {} + headers: {} + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get file uploaded by agent + tags: + - Elastic Agents + parameters: + - in: path + name: fileId + required: true + schema: + type: string + - in: path + name: fileName + required: true + schema: + type: string + /agents/setup: + get: + operationId: get-agents-setup-status + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_404_response' - description: Object is not found. - summary: Get a runtime field + $ref: '#/components/schemas/Fleet_fleet_status_response' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get agent setup info tags: - - data views + - Elastic Agents post: - operationId: updateRuntimeFieldDefault + operationId: setup-agents parameters: - - $ref: '#/components/parameters/Data_views_field_name' - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - updateRuntimeFieldRequest: - $ref: '#/components/examples/Data_views_update_runtime_field_request' schema: type: object properties: - runtimeField: - description: | - The runtime field definition object. - - You can update following fields: - - - `type` - - `script` - type: object + admin_password: + type: string + admin_username: + type: string required: - - runtimeField - required: true + - admin_username + - admin_password responses: '200': - description: Indicates a successful call. - '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Update a runtime field + $ref: '#/components/schemas/Fleet_fleet_setup_response' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Initiate agent setup tags: - - data views - /api/data_views/default: + - Elastic Agents + /agents/tags: get: - operationId: getDefaultDataViewDefault + operationId: get-agent-tags responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - getDefaultDataViewResponse: - $ref: >- - #/components/examples/Data_views_get_default_data_view_response schema: - type: object - properties: - data_view_id: - type: string - description: Indicates a successful call. + $ref: '#/components/schemas/Fleet_get_agent_tags_response' + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: List agent tags + tags: + - Elastic Agents + /api/actions: + get: + deprecated: true + description: Deprecated in 7.13.0. Use the get all connectors API instead. + operationId: legacyGetConnectors + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Get the default data view + items: + $ref: '#/components/schemas/Connectors_action_response_properties' + type: array + description: Indicates a successful call. + '401': + $ref: '#/components/responses/Connectors_401' + summary: Get all connectors tags: - - data views + - connectors post: - operationId: setDefaultDatailViewDefault + deprecated: true + description: Deprecated in 7.13.0. Use the create connector API instead. + operationId: legacyCreateConnector parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - setDefaultDataViewRequest: - $ref: '#/components/examples/Data_views_set_default_data_view_request' schema: + title: Legacy create connector request properties type: object properties: - data_view_id: - 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. - nullable: true + actionTypeId: + description: The connector type identifier. type: string - force: - default: false - description: Update an existing default data view identifier. - type: boolean - required: - - data_view_id + config: + description: >- + The configuration for the connector. Configuration + properties vary depending on the connector type. + type: object + name: + description: The display name for the connector. + type: string + secrets: + 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. + type: object required: true responses: '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - acknowledged: - type: boolean - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Data_views_400_response' - description: Bad request - summary: Set the default data view + $ref: '#/components/responses/Connectors_200_actions' + '401': + $ref: '#/components/responses/Connectors_401' + summary: Create a connector tags: - - data views - /api/data_views/swap_references: - post: + - connectors + '/api/actions/action/{actionId}': + delete: + deprecated: true 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. - operationId: swapDataViewsDefault + Deprecated in 7.13.0. Use the delete connector API instead. WARNING: + When you delete a connector, it cannot be recovered. + operationId: legacyDeleteConnector parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_action_id' + responses: + '204': + description: Indicates a successful call. + '401': + $ref: '#/components/responses/Connectors_401' + summary: Delete a connector + tags: + - connectors + get: + deprecated: true + description: Deprecated in 7.13.0. Use the get connector API instead. + operationId: legacyGetConnector + parameters: + - $ref: '#/components/parameters/Connectors_action_id' + responses: + '200': + $ref: '#/components/responses/Connectors_200_actions' + '401': + $ref: '#/components/responses/Connectors_401' + summary: Get connector information + tags: + - connectors + put: + deprecated: true + description: Deprecated in 7.13.0. Use the update connector API instead. + operationId: legacyUpdateConnector + parameters: + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_action_id' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - swapDataViewRequest: - $ref: '#/components/examples/Data_views_swap_data_view_request' schema: - $ref: '#/components/schemas/Data_views_swap_data_view_request_object' + description: The properties vary depending on the connector type. + properties: + config: + description: >- + The new connector configuration. Configuration properties + vary depending on the connector type. + type: object + name: + description: The new name for the connector. + type: string + secrets: + description: >- + The updated secrets configuration for the connector. Secrets + properties vary depending on the connector type. + type: object + title: Legacy update connector request body properties + type: object required: true responses: '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - deleteStatus: - type: object - properties: - deletePerformed: - type: boolean - remainingRefs: - type: integer - result: - items: - type: object - properties: - id: - description: A saved object identifier. - type: string - type: - description: The saved object type. - type: string - type: array - description: Indicates a successful call. - summary: Swap saved object references + $ref: '#/components/responses/Connectors_200_actions' + '404': + $ref: '#/components/responses/Connectors_404' + summary: Update a connector tags: - - data views - /api/data_views/swap_references/_preview: + - connectors + '/api/actions/action/{actionId}/_execute': post: - description: > - Preview the impact of swapping saved object references from one data - view identifier to another. - operationId: previewSwapDataViewsDefault + deprecated: true + description: Deprecated in 7.13.0. Use the run connector API instead. + operationId: legacyRunConnector parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_action_id' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - examples: - previewSwapDataViewRequest: - $ref: >- - #/components/examples/Data_views_preview_swap_data_view_request schema: - $ref: '#/components/schemas/Data_views_swap_data_view_request_object' + description: The properties vary depending on the connector type. + properties: + params: + description: >- + The parameters of the connector. Parameter properties vary + depending on the connector type. + type: object + required: + - params + title: Legacy run connector request body properties + type: object required: true responses: '200': @@ -1568,710 +1726,574 @@ paths: schema: type: object properties: - result: - items: - type: object - properties: - id: - description: A saved object identifier. - type: string - type: - description: The saved object type. - type: string - type: array + actionId: + type: string + data: + oneOf: + - additionalProperties: true + description: Information returned from the action. + type: object + - description: An array of information returned from the action. + items: + type: object + type: array + status: + description: The status of the action. + type: string description: Indicates a successful call. - summary: Preview a saved object reference swap + '401': + $ref: '#/components/responses/Connectors_401' + summary: Run a connector tags: - - data views - /api/detection_engine/index: - delete: - operationId: DeleteAlertsIndex + - connectors + /api/actions/connector: + post: + description: The connector identifier is randomly generated. + operationId: createConnector + parameters: + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + 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 + schema: + $ref: '#/components/schemas/Connectors_create_connector_request' + required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + 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 schema: - type: object - properties: - acknowledged: - type: boolean - required: - - acknowledged - description: Successful response + $ref: '#/components/schemas/Connectors_connector_response_properties' + description: Indicates a successful call. '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Not enough permissions response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: string - description: Index does not exist response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Delete an alerts index + $ref: '#/components/responses/Connectors_401' + summary: Create a connector with a random ID tags: - - Security Solution Detections API - - Alert index API + - connectors + /api/actions/connector_types: get: - operationId: ReadAlertsIndex + operationId: getConnectorTypes + parameters: + - description: >- + A filter to limit the retrieved connector types to those that + support a specific feature (such as alerting or cases). + in: query + name: feature_id + schema: + $ref: '#/components/schemas/Connectors_features' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getConnectorTypesServerlessResponse: + $ref: >- + #/components/examples/Connectors_get_connector_types_generativeai_response schema: - type: object - properties: - index_mapping_outdated: - nullable: true - type: boolean - name: - type: string - required: - - name - - index_mapping_outdated - description: Successful response + description: The properties vary for each connector type. + items: + type: object + properties: + enabled: + description: >- + Indicates whether the connector type is enabled in + Kibana. + example: true + type: boolean + enabled_in_config: + description: >- + Indicates whether the connector type is enabled in the + Kibana configuration file. + example: true + type: boolean + enabled_in_license: + description: >- + Indicates whether the connector is enabled in the + license. + example: true + type: boolean + id: + $ref: '#/components/schemas/Connectors_connector_types' + is_system_action_type: + example: false + type: boolean + minimum_license_required: + description: The license that is required to use the connector type. + example: basic + type: string + name: + description: The name of the connector type. + example: Index + type: string + supported_feature_ids: + description: The features that are supported by the connector type. + example: + - alerting + - cases + - siem + items: + $ref: '#/components/schemas/Connectors_features' + type: array + title: Get connector types response body properties + type: array + description: Indicates a successful call. '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Not enough permissions response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Not found - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Reads the alert index name if it exists + $ref: '#/components/responses/Connectors_401' + summary: Get all connector types tags: - - Security Solution Detections API - - Alert index API - post: - operationId: CreateAlertsIndex + - connectors + '/api/actions/connector/{connectorId}': + delete: + operationId: deleteConnector + parameters: + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_connector_id' responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - acknowledged: - type: boolean - required: - - acknowledged - description: Successful response + '204': + description: Indicates a successful call. '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Not enough permissions response + $ref: '#/components/responses/Connectors_401' '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Not found - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Create an alerts index + $ref: '#/components/responses/Connectors_404' + summary: Delete a connector tags: - - Security Solution Detections API - - Alert index API - /api/detection_engine/privileges: + - connectors get: - description: > - Retrieves whether or not the user is authenticated, and the user's - Kibana - - space and index privileges, which determine if the user can create an - - index for the Elastic Security alerts generated by - - detection engine rules. - operationId: ReadPrivileges - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - has_encryption_key: - type: boolean - is_authenticated: - type: boolean - required: - - is_authenticated - - has_encryption_key - description: Successful response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Returns user privileges for the Kibana space - tags: - - Security Solution Detections API - - Privileges API - /api/detection_engine/rules: - delete: - description: Delete a detection rule using the `rule_id` or `id` field. - operationId: DeleteRule + operationId: getConnector parameters: - - description: The rule's `id` value. - in: query - name: id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleObjectId' - - description: The rule's `rule_id` value. - in: query - name: rule_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId + - $ref: '#/components/parameters/Connectors_connector_id' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getConnectorResponse: + $ref: '#/components/examples/Connectors_get_connector_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleResponse + $ref: '#/components/schemas/Connectors_connector_response_properties' description: Indicates a successful call. - summary: Delete a detection rule + '401': + $ref: '#/components/responses/Connectors_401' + '404': + $ref: '#/components/responses/Connectors_404' + summary: Get a connector information tags: - - Security Solution Detections API - - Rules API - get: - description: Retrieve a detection rule using the `rule_id` or `id` field. - operationId: ReadRule + - connectors + post: + operationId: createConnectorId parameters: - - description: The rule's `id` value. - in: query - name: id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleObjectId' - - description: The rule's `rule_id` value. - in: query - name: rule_id - required: false + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - description: > + A UUID v1 or v4 identifier for the connector. If you omit this + parameter, an identifier is randomly generated. + in: path + name: connectorId + required: true schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleResponse - description: Indicates a successful call. - summary: Retrieve a detection rule - tags: - - Security Solution Detections API - - Rules API - patch: - description: >- - Update specific fields of an existing detection rule using the `rule_id` - or `id` field. - operationId: PatchRule + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + type: string requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePatchProps - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: + examples: + createIndexConnectorRequest: $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleResponse - description: Indicates a successful call. - summary: Patch a detection rule - tags: - - Security Solution Detections API - - Rules API - post: - description: Create a new detection rule. - operationId: CreateRule - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: + #/components/examples/Connectors_create_index_connector_request schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleCreateProps + $ref: '#/components/schemas/Connectors_create_connector_request' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + createIndexConnectorResponse: + $ref: >- + #/components/examples/Connectors_create_index_connector_response schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleResponse + $ref: '#/components/schemas/Connectors_connector_response_properties' description: Indicates a successful call. - summary: Create a detection rule + '401': + $ref: '#/components/responses/Connectors_401' + summary: Create a connector tags: - - Security Solution Detections API - - Rules API + - connectors put: - description: > - Update a detection rule using the `rule_id` or `id` field. The original - rule is replaced, and all unspecified fields are deleted. - - > info - - > You cannot modify the `id` or `rule_id` values. - operationId: UpdateRule + operationId: updateConnector + parameters: + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_connector_id' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + updateIndexConnectorRequest: + $ref: >- + #/components/examples/Connectors_update_index_connector_request schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleUpdateProps + $ref: '#/components/schemas/Connectors_update_connector_request' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleResponse + $ref: '#/components/schemas/Connectors_connector_response_properties' description: Indicates a successful call. - summary: Update a detection rule + '400': + $ref: '#/components/responses/Connectors_401' + '401': + $ref: '#/components/responses/Connectors_401' + '404': + $ref: '#/components/responses/Connectors_404' + summary: Update a connector tags: - - Security Solution Detections API - - Rules API - /api/detection_engine/rules/_bulk_action: + - connectors + '/api/actions/connector/{connectorId}/_execute': post: - description: >- - Apply a bulk action, such as bulk edit, duplicate, or delete, to - multiple detection rules. The bulk action is applied to all rules that - match the query or to the rules listed by their IDs. - operationId: PerformRulesBulkAction + 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. + operationId: runConnector parameters: - - description: Enables dry run mode for the request call. - in: query - name: dry_run - required: false - schema: - type: boolean + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_connector_id' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkDeleteRules - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkDisableRules - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkEnableRules - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkExportRules - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkDuplicateRules - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkManualRuleRun - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkEditRules - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkEditActionResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkExportActionResponse - description: OK - summary: Apply a bulk action to detection rules - tags: - - Security Solution Detections API - - Bulk API - /api/detection_engine/rules/_bulk_create: - post: - deprecated: true - description: Create new detection rules in bulk. - operationId: BulkCreateRules - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - items: + examples: + runCasesWebhookConnectorRequest: $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleCreateProps - type: array - description: 'A JSON array of rules, where each rule contains the required fields.' - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: + #/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/schemas/Security_Solution_Detections_API_BulkCrudRulesResponse - description: Indicates a successful call. - summary: Create multiple detection rules - tags: - - Security Solution Detections API - - Bulk API - /api/detection_engine/rules/_bulk_delete: - delete: - deprecated: true - description: Delete detection rules in bulk. - operationId: BulkDeleteRules - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: + #/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 schema: - items: - type: object - properties: - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - type: array - description: >- - A JSON array of `id` or `rule_id` fields of the rules you want to - delete. + $ref: '#/components/schemas/Connectors_run_connector_request' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + 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 schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkCrudRulesResponse + type: object + properties: + connector_id: + description: The identifier for the connector. + type: string + data: + oneOf: + - additionalProperties: true + description: Information returned from the action. + type: object + - description: An array of information returned from the action. + items: + type: object + type: array + status: + description: The status of the action. + enum: + - error + - ok + type: string + required: + - connector_id + - status description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Delete multiple detection rules + $ref: '#/components/responses/Connectors_401' + summary: Run a connector tags: - - Security Solution Detections API - - Bulk API - post: - deprecated: true - description: Deletes multiple rules. - operationId: BulkDeleteRulesPost - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - items: - type: object - properties: - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - type: array - description: >- - A JSON array of `id` or `rule_id` fields of the rules you want to - delete. - required: true + - connectors + /api/actions/connectors: + get: + operationId: getConnectors responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getConnectorsResponse: + $ref: '#/components/examples/Connectors_get_connectors_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkCrudRulesResponse + items: + $ref: >- + #/components/schemas/Connectors_connector_response_properties + type: array description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Delete multiple detection rules + $ref: '#/components/responses/Connectors_401' + summary: Get all connectors tags: - - Security Solution Detections API - - Bulk API - /api/detection_engine/rules/_bulk_update: - patch: + - connectors + /api/actions/list_action_types: + get: deprecated: true - description: >- - Update specific fields of existing detection rules using the `rule_id` - or `id` field. - operationId: BulkPatchRules - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePatchProps - type: array - description: 'A JSON array of rules, where each rule contains the required fields.' - required: true + description: Deprecated in 7.13.0. Use the get all connector types API instead. + operationId: legacyGetConnectorTypes responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkCrudRulesResponse + description: The properties vary for each connector type. + items: + type: object + properties: + enabled: + description: >- + Indicates whether the connector type is enabled in + Kibana. + type: boolean + enabledInConfig: + description: >- + Indicates whether the connector type is enabled in the + Kibana `.yml` file. + type: boolean + enabledInLicense: + description: >- + Indicates whether the connector is enabled in the + license. + example: true + type: boolean + id: + description: The unique identifier for the connector type. + type: string + minimumLicenseRequired: + description: The license that is required to use the connector type. + type: string + name: + description: The name of the connector type. + type: string + title: Legacy get connector types response body properties + type: array description: Indicates a successful call. - summary: Patch multiple detection rules + '401': + $ref: '#/components/responses/Connectors_401' + summary: Get connector types tags: - - Security Solution Detections API - - Bulk API - put: - deprecated: true - description: > - Update multiple detection rules using the `rule_id` or `id` field. The - original rules are replaced, and all unspecified fields are deleted. - - > info - - > You cannot modify the `id` or `rule_id` values. - operationId: BulkUpdateRules + - connectors + /api/apm/agent_keys: + post: + description: Create a new agent key for APM. + operationId: createAgentKey requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleUpdateProps - type: array - description: >- - A JSON array where each element includes the `id` or `rule_id` field - of the rule you want to update and the fields you want to modify. + type: object + properties: + name: + type: string + privileges: + items: + enum: + - 'event:write' + - 'config_agent:read' + type: string + type: array required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkCrudRulesResponse - description: Indicates a successful call. - summary: Update multiple detection rules + type: object + properties: + api_key: + type: string + encoded: + type: string + expiration: + format: int64 + type: integer + id: + type: string + name: + type: string + description: Agent key created successfully + summary: Create an APM agent key tags: - - Security Solution Detections API - - Bulk API - /api/detection_engine/rules/_export: + - APM agent keys + '/api/apm/services/{serviceName}/annotation': post: - description: > - Export detection rules to an `.ndjson` file. The following configuration - items are also included in the `.ndjson` file: - - - Actions - - - Exception lists - - > info - - > You cannot export prebuilt rules. - operationId: ExportRules + description: Create a new annotation for a specific service. + operationId: createAnnotation parameters: - - description: Determines whether a summary of the exported rules is returned. - in: query - name: exclude_export_details - required: false - schema: - default: false - type: boolean - - description: File name for saving the exported rules. - in: query - name: file_name - required: false + - description: The name of the service + in: path + name: serviceName + required: true schema: - default: export.ndjson type: string requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - nullable: true type: object properties: - objects: - description: >- - Array of `rule_id` fields. Exports all rules when - unspecified. + '@timestamp': + type: string + message: + type: string + service: + type: object + properties: + environment: + type: string + version: + type: string + tags: items: - type: object - properties: - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - required: - - rule_id + type: string type: array - required: - - objects - required: false + required: true responses: '200': content: - application/ndjson; Elastic-Api-Version=2023-10-31: + application/json; Elastic-Api-Version=2023-10-31: schema: - description: An `.ndjson` file containing the returned rules. - format: binary - type: string - description: Indicates a successful call. - summary: Export detection rules + type: object + properties: + _id: + type: string + _index: + type: string + _source: + type: object + properties: + '@timestamp': + type: string + annotation: + type: string + event: + type: object + properties: + created: + type: string + message: + type: string + service: + type: object + properties: + environment: + type: string + name: + type: string + version: + type: string + tags: + items: + type: string + type: array + description: Annotation created successfully + summary: Create a service annotation tags: - - Security Solution Detections API - - Import/Export API - /api/detection_engine/rules/_find: + - APM annotations + '/api/apm/services/{serviceName}/annotation/search': get: - description: >- - Retrieve a paginated list of detection rules. By default, the first page - is returned, with 20 results per page. - operationId: FindRules + description: Search for annotations related to a specific service. + operationId: getAnnotation parameters: - - in: query - name: fields - required: false - schema: - items: - type: string - type: array - - description: Search query - in: query - name: filter - required: false + - description: The name of the service + in: path + name: serviceName + required: true schema: type: string - - description: Field to sort by - in: query - name: sort_field - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_FindRulesSortField - - description: Sort order + - description: The environment to filter annotations by in: query - name: sort_order + name: environment required: false schema: - $ref: '#/components/schemas/Security_Solution_Detections_API_SortOrder' - - description: Page number + type: string + - description: The start date for the search in: query - name: page + name: start required: false schema: - default: 1 - minimum: 1 - type: integer - - description: Rules per page + type: string + - description: The end date for the search in: query - name: per_page + name: end required: false schema: - default: 20 - minimum: 0 - type: integer + type: string responses: '200': content: @@ -2279,1437 +2301,1622 @@ paths: schema: type: object properties: - data: + annotations: items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleResponse + type: object + properties: + '@timestamp': + type: number + id: + type: string + text: + type: string + type: + enum: + - version + type: string type: array - page: - type: integer - perPage: - type: integer - total: - type: integer - required: - - page - - perPage - - total - - data description: Successful response - summary: List all detection rules + summary: Search for annotations tags: - - Security Solution Detections API - - Rules API - /api/detection_engine/rules/_import: - post: + - APM annotations + /api/cases: + delete: description: > - Import detection rules from an `.ndjson` file, including actions and - exception lists. The request must include: - - - The `Content-Type: multipart/form-data` HTTP header. - - - A link to the `.ndjson` file containing the rules. - operationId: ImportRules + 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. + operationId: deleteCaseDefaultSpace parameters: - - description: >- - Determines whether existing rules with the same `rule_id` are - overwritten. - in: query - name: overwrite - required: false - schema: - default: false - type: boolean - - description: >- - Determines whether existing exception lists with the same `list_id` - are overwritten. - in: query - name: overwrite_exceptions - required: false - schema: - default: false - type: boolean - - description: >- - Determines whether existing actions with the same - `kibana.alert.rule.actions.id` are overwritten. - in: query - name: overwrite_action_connectors - required: false - schema: - default: false - type: boolean - - description: Generates a new list ID for each imported exception list. - in: query - name: as_new_list - required: false - schema: - default: false - type: boolean - requestBody: - content: - multipart/form-data; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - file: - description: The `.ndjson` file containing the rules. - format: binary - type: string - required: true + - $ref: '#/components/parameters/Cases_kbn_xsrf' + - $ref: '#/components/parameters/Cases_ids' responses: - '200': + '204': + description: Indicates a successful call. + '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - additionalProperties: false - type: object - properties: - action_connectors_errors: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ErrorSchema - type: array - action_connectors_success: - type: boolean - action_connectors_success_count: - minimum: 0 - type: integer - action_connectors_warnings: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_WarningSchema - type: array - errors: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ErrorSchema - type: array - exceptions_errors: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ErrorSchema - type: array - exceptions_success: - type: boolean - exceptions_success_count: - minimum: 0 - type: integer - rules_count: - minimum: 0 - type: integer - success: - type: boolean - success_count: - minimum: 0 - type: integer - required: - - exceptions_success - - exceptions_success_count - - exceptions_errors - - rules_count - - success - - success_count - - errors - - action_connectors_errors - - action_connectors_warnings - - action_connectors_success - - action_connectors_success_count - description: Indicates a successful call. - summary: Import detection rules + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Delete cases tags: - - Security Solution Detections API - - Import/Export API - '/api/detection_engine/rules/{id}/exceptions': - post: - operationId: CreateRuleExceptionListItems + - cases + patch: + 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. + operationId: updateCaseDefaultSpace parameters: - - description: Detection rule's identifier - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_RuleId' + - $ref: '#/components/parameters/Cases_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + updateCaseRequest: + $ref: '#/components/examples/Cases_update_case_request' schema: - type: object - properties: - items: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_CreateRuleExceptionListItemProps - type: array - required: - - items - description: Rule exception list items - required: true + $ref: '#/components/schemas/Cases_update_case_request' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + updateCaseResponse: + $ref: '#/components/examples/Cases_update_case_response' schema: items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItem + $ref: '#/components/schemas/Cases_case_response_properties' type: array - description: Successful response - '400': + description: Indicates a successful call. + '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Update cases + tags: + - cases + post: + 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. + operationId: createCaseDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + examples: + createCaseRequest: + $ref: '#/components/examples/Cases_create_case_request' + schema: + $ref: '#/components/schemas/Cases_create_case_request' + required: true + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + createCaseResponse: + $ref: '#/components/examples/Cases_create_case_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '500': + $ref: '#/components/schemas/Cases_case_response_properties' + description: Indicates a successful call. + '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Creates rule exception list items + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Create a case tags: - - Security Solution Exceptions API - /api/detection_engine/rules/prepackaged: - put: - description: Install and update all Elastic prebuilt detection rules and Timelines. - operationId: InstallPrebuiltRulesAndTimelines + - cases + /api/cases/_find: + get: + 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. + operationId: findCasesDefaultSpace + parameters: + - $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': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + findCaseResponse: + $ref: '#/components/examples/Cases_find_case_response' schema: - additionalProperties: false type: object properties: - rules_installed: - description: The number of rules installed - minimum: 0 + cases: + items: + $ref: '#/components/schemas/Cases_case_response_properties' + maxItems: 10000 + type: array + count_closed_cases: type: integer - rules_updated: - description: The number of rules updated - minimum: 0 + count_in_progress_cases: type: integer - timelines_installed: - description: The number of timelines installed - minimum: 0 + count_open_cases: type: integer - timelines_updated: - description: The number of timelines updated - minimum: 0 + page: type: integer - required: - - rules_installed - - rules_updated - - timelines_installed - - timelines_updated - description: Indicates a successful call - summary: Install prebuilt detection rules and Timelines + per_page: + type: integer + total: + type: integer + description: Indicates a successful call. + '401': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Search cases tags: - - Security Solution Detections API - - Prebuilt Rules API - /api/detection_engine/rules/prepackaged/_status: + - cases + '/api/cases/{caseId}': get: - description: >- - Retrieve the status of all Elastic prebuilt detection rules and - Timelines. - operationId: ReadPrebuiltRulesAndTimelinesStatus + 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: getCaseDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_case_id' + - $ref: '#/components/parameters/Cases_includeComments' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getDefaultCaseResponse: + $ref: '#/components/examples/Cases_get_case_response' + getDefaultObservabilityCaseReponse: + $ref: '#/components/examples/Cases_get_case_observability_response' schema: - additionalProperties: false - type: object - properties: - rules_custom_installed: - description: The total number of custom rules - minimum: 0 - type: integer - rules_installed: - description: The total number of installed prebuilt rules - minimum: 0 - type: integer - rules_not_installed: - description: >- - The total number of available prebuilt rules that are not - installed - minimum: 0 - type: integer - rules_not_updated: - description: The total number of outdated prebuilt rules - minimum: 0 - type: integer - timelines_installed: - description: The total number of installed prebuilt timelines - minimum: 0 - type: integer - timelines_not_installed: - description: >- - The total number of available prebuilt timelines that are - not installed - minimum: 0 - type: integer - timelines_not_updated: - description: The total number of outdated prebuilt timelines - minimum: 0 - type: integer - required: - - rules_custom_installed - - rules_installed - - rules_not_installed - - rules_not_updated - - timelines_installed - - timelines_not_installed - - timelines_not_updated - description: Indicates a successful call - summary: Retrieve the status of prebuilt detection rules and Timelines + $ref: '#/components/schemas/Cases_case_response_properties' + description: Indicates a successful call. + '401': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Get case information tags: - - Security Solution Detections API - - Prebuilt Rules API - /api/detection_engine/rules/preview: - post: - operationId: RulePreview - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - anyOf: - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewParams - discriminator: - propertyName: type - description: >- - An object containing tags to add or remove and alert ids the changes - will be applied - required: true + - cases + '/api/cases/{caseId}/alerts': + get: + 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. + operationId: getCaseAlertsDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_case_id' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getCaseAlertsResponse: + $ref: '#/components/examples/Cases_get_case_alerts_response' schema: - type: object - properties: - isAborted: - type: boolean - logs: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RulePreviewLogs - type: array - previewId: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - required: - - logs - description: Successful response - '400': + items: + $ref: '#/components/schemas/Cases_alert_response_properties' + type: array + description: Indicates a successful call. + '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Get all alerts for a case + tags: + - cases + x-technical-preview: true + '/api/cases/{caseId}/comments': + delete: + 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. + operationId: deleteCaseCommentsDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_kbn_xsrf' + - $ref: '#/components/parameters/Cases_case_id' + responses: + '204': + description: Indicates a successful call. '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Delete all case comments and alerts + tags: + - cases + get: + deprecated: true + 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. + operationId: getAllCaseCommentsDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_case_id' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Preview rule alerts generated on specified time range + $ref: '#/components/schemas/Cases_case_response_properties' + description: Indicates a successful call. + '401': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Get all case comments tags: - - Security Solution Detections API - - Rule preview API - /api/detection_engine/signals/assignees: - post: - description: | - Assign users to detection alerts, and unassign them from alerts. - > info - > You cannot add and remove the same assignee in the same request. - operationId: SetAlertAssignees + - cases + patch: + 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. + operationId: updateCaseCommentDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_kbn_xsrf' + - $ref: '#/components/parameters/Cases_case_id' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + updateCaseCommentRequest: + $ref: '#/components/examples/Cases_update_comment_request' schema: - type: object - properties: - assignees: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertAssignees - description: Details about the assignees to assign and unassign. - ids: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertIds - description: List of alerts ids to assign and unassign passed assignees. - required: - - assignees - - ids + $ref: '#/components/schemas/Cases_update_case_comment_request' required: true responses: '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + examples: + updateCaseCommentResponse: + $ref: '#/components/examples/Cases_update_comment_response' + schema: + $ref: '#/components/schemas/Cases_case_response_properties' description: Indicates a successful call. - '400': - description: Invalid request. - summary: Assign and unassign users from detection alerts + '401': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Update a case comment or alert tags: - - Security Solution Detections API - /api/detection_engine/signals/finalize_migration: + - cases post: description: > - Finalize successful migrations of detection alerts. This replaces the - original index's alias with the successfully migrated index's alias. - - The endpoint is idempotent; therefore, it can safely be used to poll a - given migration and, upon completion, - - finalize it. - operationId: FinalizeAlertsMigration + 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. + operationId: addCaseCommentDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_kbn_xsrf' + - $ref: '#/components/parameters/Cases_case_id' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + createCaseCommentRequest: + $ref: '#/components/examples/Cases_add_comment_request' schema: - type: object - properties: - migration_ids: - items: - type: string - minItems: 1 - type: array - required: - - migration_ids - description: Array of `migration_id`s to finalize + $ref: '#/components/schemas/Cases_add_case_comment_request' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + createCaseCommentResponse: + $ref: '#/components/examples/Cases_add_comment_response' schema: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MigrationFinalizationResult - type: array - description: Successful response - '400': + $ref: '#/components/schemas/Cases_case_response_properties' + description: Indicates a successful call. + '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response - '401': + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Add a case comment or alert + tags: + - cases + '/api/cases/{caseId}/comments/_find': + get: + 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. + operationId: findCaseCommentsDefaultSpace + 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': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': + $ref: '#/components/schemas/Cases_case_response_properties' + description: Indicates a successful call. + '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Finalize detection alert migrations + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Find case comments and alerts tags: - - Security Solution Detections API - - Alerts migration API - /api/detection_engine/signals/migration: + - cases + '/api/cases/{caseId}/comments/{commentId}': delete: description: > - Migrations favor data integrity over shard size. Consequently, unused or - orphaned indices are artifacts of - - the migration process. A successful migration will result in both the - old and new indices being present. - - As such, the old, orphaned index can (and likely should) be deleted. - - - While you can delete these indices manually, - - the endpoint accomplishes this task by applying a deletion policy to the - relevant index, causing it to be deleted - - after 30 days. It also deletes other artifacts specific to the migration - implementation. - operationId: AlertsMigrationCleanup - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - migration_ids: - items: - type: string - minItems: 1 - type: array - required: - - migration_ids - description: Array of `migration_id`s to cleanup - required: true + 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. + operationId: deleteCaseCommentDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_kbn_xsrf' + - $ref: '#/components/parameters/Cases_case_id' + - $ref: '#/components/parameters/Cases_comment_id' responses: - '200': + '204': + description: Indicates a successful call. + '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MigrationCleanupResult - type: array - description: Successful response - '400': + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Delete a case comment or alert + tags: + - cases + get: + 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. + operationId: getCaseCommentDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_case_id' + - $ref: '#/components/parameters/Cases_comment_id' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getCaseCommentResponse: + $ref: '#/components/examples/Cases_get_comment_response' schema: oneOf: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse + #/components/schemas/Cases_alert_comment_response_properties - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response + #/components/schemas/Cases_user_comment_response_properties + description: Indicates a successful call. '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Clean up detection alert migrations + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Get a case comment or alert tags: - - Security Solution Detections API - - Alerts migration API + - cases + '/api/cases/{caseId}/connector/{connectorId}/_push': post: description: > - Initiate a migration of detection alerts. - - Migrations are initiated per index. While the process is neither - destructive nor interferes with existing data, it may be - resource-intensive. As such, it is recommended that you plan your - migrations accordingly. - operationId: CreateAlertsMigration + 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 + parameters: + - $ref: '#/components/parameters/Cases_case_id' + - $ref: '#/components/parameters/Cases_connector_id' + - $ref: '#/components/parameters/Cases_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - allOf: - - type: object - properties: - index: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - minItems: 1 - type: array - required: - - index - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsReindexOptions - description: Alerts migration parameters - required: true + nullable: true + type: object responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + pushCaseResponse: + $ref: '#/components/examples/Cases_push_case_response' schema: - type: object - properties: - indices: - items: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexMigrationSuccess - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexMigrationError - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SkippedAlertsIndexMigration - type: array - required: - - indices - description: Successful response - '400': + $ref: '#/components/schemas/Cases_case_response_properties' + description: Indicates a successful call. + '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response - '401': + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Push a case to an external service + tags: + - cases + '/api/cases/{caseId}/user_actions': + get: + deprecated: true + 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. + operationId: getCaseActivityDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_case_id' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': + items: + $ref: '#/components/schemas/Cases_user_actions_response_properties' + type: array + description: Indicates a successful call. + '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Initiate a detection alert migration + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Get case activity tags: - - Security Solution Detections API - - Alerts migration API - /api/detection_engine/signals/migration_status: - post: - description: >- - Retrieve indices that contain detection alerts of a particular age, - along with migration information for each of those indices. - operationId: ReadAlertsMigrationStatus + - cases + '/api/cases/{caseId}/user_actions/_find': + get: + 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 parameters: - - description: Maximum age of qualifying detection alerts - in: query - name: from - required: true - schema: - description: > - Time from which data is analyzed. For example, now-4200s means the - rule analyzes data from 70 minutes - - before its start time. Defaults to now-6m (analyzes data from 6 - minutes before the start time). - format: date-math - type: string + - $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': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + findCaseActivityResponse: + $ref: '#/components/examples/Cases_find_case_activity_response' schema: type: object properties: - indices: + page: + type: integer + perPage: + type: integer + total: + type: integer + userActions: items: $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexMigrationStatus + #/components/schemas/Cases_user_actions_find_response_properties + maxItems: 10000 type: array - required: - - indices - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response + description: Indicates a successful call. '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Retrieve the status of detection alert migrations + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Find case activity tags: - - Security Solution Detections API - - Alerts migration API - /api/detection_engine/signals/search: - post: - description: Find and/or aggregate detection alerts that match the given query. - operationId: SearchAlerts - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - description: Elasticsearch query and aggregation request - type: object - properties: - _source: - oneOf: - - type: boolean - - type: string - - items: - type: string - type: array - aggs: - additionalProperties: true - type: object - fields: - items: - type: string - type: array - query: - additionalProperties: true - type: object - runtime_mappings: - additionalProperties: true - type: object - size: - minimum: 0 - type: integer - sort: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsSort - track_total_hits: - type: boolean - description: Search and/or aggregation query - required: true + - cases + '/api/cases/alerts/{alertId}': + get: + 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. + operationId: getCasesByAlertDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_alert_id' + - $ref: '#/components/parameters/Cases_owner' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - additionalProperties: true - description: Elasticsearch search response - type: object - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response + example: + - id: 06116b80-e1c3-11ec-be9b-9b1838238ee6 + title: security_case + items: + type: object + properties: + id: + description: The case identifier. + type: string + title: + description: The case title. + type: string + maxItems: 10000 + type: array + description: Indicates a successful call. '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Find and/or aggregate detection alerts + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Get cases for an alert tags: - - Security Solution Detections API - - Alerts API - /api/detection_engine/signals/status: - post: - description: Set the status of one or more detection alerts. - operationId: SetAlertsStatus - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SetAlertsStatusByIds - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SetAlertsStatusByQuery - description: >- - An object containing desired status and explicit alert ids or a query - to select alerts - required: true + - cases + x-technical-preview: true + /api/cases/configure: + get: + 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. + operationId: getCaseConfigurationDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_owner' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getConfigurationResponse: + $ref: '#/components/examples/Cases_get_case_configuration_response' schema: - additionalProperties: true - description: Elasticsearch update by query response - type: object - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response + 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. + example: none + type: string + 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. + example: none + type: string + type: + $ref: '#/components/schemas/Cases_connector_types' + created_at: + example: '2022-06-01T17:07:17.767Z' + format: date-time + type: string + created_by: + type: object + properties: + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + required: + - email + - full_name + - username + customFields: + description: Custom fields configuration details. + items: + type: object + properties: + defaultValue: + 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. + oneOf: + - type: string + - type: 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. + maxLength: 36 + minLength: 1 + type: string + label: + description: >- + The custom field label that is displayed in the + case. + maxLength: 50 + minLength: 1 + type: string + type: + description: The type of the custom field. + enum: + - text + - toggle + type: string + 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: array + error: + example: null + nullable: true + type: string + id: + example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + type: string + mappings: + items: + type: object + properties: + action_type: + example: overwrite + type: string + source: + example: title + type: string + target: + example: summary + type: string + type: array + owner: + $ref: '#/components/schemas/Cases_owners' + templates: + $ref: '#/components/schemas/Cases_templates' + updated_at: + example: '2022-06-01T19:58:48.169Z' + format: date-time + nullable: true + type: string + updated_by: + nullable: true + type: object + properties: + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + required: + - email + - full_name + - username + version: + example: WzIwNzMsMV0= + type: string + type: array + description: Indicates a successful call. '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Set a detection alert status + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Get case settings tags: - - Security Solution Detections API - - Alerts API - /api/detection_engine/signals/tags: + - cases post: - description: | - And tags to detection alerts, and remove them from alerts. - > info - > You cannot add and remove the same alert tag in the same request. - operationId: SetAlertTags + 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. + operationId: setCaseConfigurationDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + setCaseConfigRequest: + $ref: '#/components/examples/Cases_set_case_configuration_request' schema: - type: object - properties: - ids: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertIds - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SetAlertTags - required: - - ids - - tags - description: >- - An object containing tags to add or remove and alert ids the changes - will be applied - required: true + $ref: '#/components/schemas/Cases_set_case_configuration_request' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + setCaseConfigResponse: + $ref: '#/components/examples/Cases_set_case_configuration_response' schema: - additionalProperties: true - description: Elasticsearch update by query response type: object - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_PlatformErrorResponse - description: Unsuccessful authentication response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SiemErrorResponse - description: Internal server error response - summary: Add and remove detection alert tags - tags: - - Security Solution Detections API - - Alerts API - /api/detection_engine/tags: - get: - description: List all unique tags from all detection rules. - operationId: ReadTags - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - description: Indicates a successful call - summary: List all detection rule tags - tags: - - Security Solution Detections API - - Tags API - /api/encrypted_saved_objects/_rotate_key: - post: - 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. - operationId: rotateEncryptionKey + 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. + example: none + type: string + 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. + example: none + type: string + type: + $ref: '#/components/schemas/Cases_connector_types' + created_at: + example: '2022-06-01T17:07:17.767Z' + format: date-time + type: string + created_by: + type: object + properties: + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + required: + - email + - full_name + - username + customFields: + description: Custom fields configuration details. + items: + type: object + properties: + defaultValue: + 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. + oneOf: + - type: string + - type: 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. + maxLength: 36 + minLength: 1 + type: string + label: + description: >- + The custom field label that is displayed in the + case. + maxLength: 50 + minLength: 1 + type: string + type: + description: The type of the custom field. + enum: + - text + - toggle + type: string + 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: array + error: + example: null + nullable: true + type: string + id: + example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + type: string + mappings: + items: + type: object + properties: + action_type: + example: overwrite + type: string + source: + example: title + type: string + target: + example: summary + type: string + type: array + owner: + $ref: '#/components/schemas/Cases_owners' + templates: + $ref: '#/components/schemas/Cases_templates' + updated_at: + example: '2022-06-01T19:58:48.169Z' + format: date-time + nullable: true + type: string + updated_by: + nullable: true + type: object + properties: + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + required: + - email + - full_name + - username + version: + example: WzIwNzMsMV0= + type: string + description: Indicates a successful call. + '401': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Add case settings + tags: + - cases + '/api/cases/configure/{configurationId}': + patch: + 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. + operationId: updateCaseConfigurationDefaultSpace parameters: - - 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: batch_size - required: false - schema: - default: 10000 - type: number - - 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. - in: query - name: type - required: false - schema: - type: string + - $ref: '#/components/parameters/Cases_kbn_xsrf' + - $ref: '#/components/parameters/Cases_configuration_id' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + examples: + updateCaseConfigurationRequest: + $ref: '#/components/examples/Cases_update_case_configuration_request' + schema: + $ref: '#/components/schemas/Cases_update_case_configuration_request' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: examples: - rotateEncryptionKeyResponse: - $ref: '#/components/examples/Saved_objects_key_rotation_response' + updateCaseConfigurationResponse: + $ref: >- + #/components/examples/Cases_update_case_configuration_response schema: type: object properties: - failed: - 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. - type: number - successful: - 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. - type: number - total: - description: > - Indicates the total number of all encrypted saved objects - (optionally filtered by the requested `type`), regardless - of the key Kibana used for encryption. - type: number + 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. + example: none + type: string + 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. + example: none + type: string + type: + $ref: '#/components/schemas/Cases_connector_types' + created_at: + example: '2022-06-01T17:07:17.767Z' + format: date-time + type: string + created_by: + type: object + properties: + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + required: + - email + - full_name + - username + customFields: + description: Custom fields configuration details. + items: + type: object + properties: + defaultValue: + 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. + oneOf: + - type: string + - type: 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. + maxLength: 36 + minLength: 1 + type: string + label: + description: >- + The custom field label that is displayed in the + case. + maxLength: 50 + minLength: 1 + type: string + type: + description: The type of the custom field. + enum: + - text + - toggle + type: string + 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: array + error: + example: null + nullable: true + type: string + id: + example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + type: string + mappings: + items: + type: object + properties: + action_type: + example: overwrite + type: string + source: + example: title + type: string + target: + example: summary + type: string + type: array + owner: + $ref: '#/components/schemas/Cases_owners' + templates: + $ref: '#/components/schemas/Cases_templates' + updated_at: + example: '2022-06-01T19:58:48.169Z' + format: date-time + nullable: true + type: string + updated_by: + nullable: true + type: object + properties: + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + required: + - email + - full_name + - username + version: + example: WzIwNzMsMV0= + type: string description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - description: Bad request - '429': + '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - type: object - description: Already in progress. - summary: Rotate a key for encrypted saved objects + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Update case settings tags: - - saved objects - /api/endpoint_list: - post: - description: Creates an endpoint list or does nothing if the list already exists - operationId: CreateEndpointList + - cases + /api/cases/configure/connectors/_find: + get: + 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. + operationId: findCaseConnectorsDefaultSpace responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + findConnectorResponse: + $ref: '#/components/examples/Cases_find_connector_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_EndpointList - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Invalid input data + items: + type: object + properties: + actionTypeId: + $ref: '#/components/schemas/Cases_connector_types' + config: + additionalProperties: true + type: object + properties: + apiUrl: + type: string + projectKey: + type: string + id: + type: string + isDeprecated: + type: boolean + isMissingSecrets: + type: boolean + isPreconfigured: + type: boolean + name: + type: string + referencedByCount: + type: integer + maxItems: 1000 + type: array + description: Indicates a successful call. '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Insufficient privileges - '500': + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Get case connectors + tags: + - cases + /api/cases/reporters: + get: + 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. + operationId: getCaseReportersDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_owner' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getReportersResponse: + $ref: '#/components/examples/Cases_get_reporters_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Internal server error - summary: Creates an endpoint list - /api/endpoint_list/items: - delete: - operationId: DeleteEndpointListItem - parameters: - - description: Either `id` or `item_id` must be specified - in: query - name: id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemId - - description: Either `id` or `item_id` must be specified - in: query - name: item_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemHumanId - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_EndpointListItem - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Invalid input data + items: + type: object + properties: + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + required: + - email + - full_name + - username + maxItems: 10000 + type: array + description: Indicates a successful call. '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Insufficient privileges - '404': + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Get case creators + tags: + - cases + /api/cases/status: + get: + deprecated: true + 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. + operationId: getCaseStatusDefaultSpace + parameters: + - $ref: '#/components/parameters/Cases_owner' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Endpoint list item not found - '500': + type: object + properties: + count_closed_cases: + type: integer + count_in_progress_cases: + type: integer + count_open_cases: + type: integer + description: Indicates a successful call. + '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Internal server error - summary: Deletes an endpoint list item + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Get case status summary + tags: + - cases + /api/cases/tags: get: - operationId: ReadEndpointListItem + 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. + operationId: getCaseTagsDefaultSpace parameters: - - description: Either `id` or `item_id` must be specified - in: query - name: id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemId - - description: Either `id` or `item_id` must be specified - in: query - name: item_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemHumanId + - $ref: '#/components/parameters/Cases_owner' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getTagsResponse: + $ref: '#/components/examples/Cases_get_tags_response' schema: items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_EndpointListItem + type: string + maxItems: 10000 type: array - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Invalid input data + description: Indicates a successful call. '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Insufficient privileges - '404': + $ref: '#/components/schemas/Cases_4xx_response' + description: Authorization information is missing or invalid. + summary: Get case tags + tags: + - cases + /api/data_views: + get: + operationId: getAllDataViewsDefault + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getAllDataViewsResponse: + $ref: '#/components/examples/Data_views_get_data_views_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Endpoint list item not found - '500': + type: object + properties: + data_view: + items: + type: object + properties: + id: + type: string + name: + type: string + namespaces: + items: + type: string + type: array + title: + type: string + typeMeta: + type: object + type: array + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Internal server error - summary: Reads an endpoint list item + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Get all data views + tags: + - data views + /api/data_views/data_view: post: - operationId: CreateEndpointListItem + operationId: createDataViewDefaultw + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + createDataViewRequest: + $ref: '#/components/examples/Data_views_create_data_view_request' schema: - type: object - properties: - comments: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemCommentArray - default: [] - description: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryArray - item_id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemMeta - name: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemName - os_types: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray - default: [] - tags: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemTags - default: [] - type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemType - required: - - type - - name - - description - - entries - description: Exception list item's properties + $ref: '#/components/schemas/Data_views_create_data_view_request_object' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_EndpointListItem - description: Successful response + $ref: '#/components/schemas/Data_views_data_view_response_object' + description: Indicates a successful call. '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Invalid input data - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication - '403': + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Create a data view + tags: + - data views + '/api/data_views/data_view/{viewId}': + delete: + description: | + WARNING: When you delete a data view, it cannot be recovered. + operationId: deleteDataViewDefault + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Data_views_view_id' + responses: + '204': + description: Indicates a successful call. + '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Insufficient privileges - '409': + $ref: '#/components/schemas/Data_views_404_response' + description: Object is not found. + summary: Delete a data view + tags: + - data views + get: + operationId: getDataViewDefault + parameters: + - $ref: '#/components/parameters/Data_views_view_id' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getDataViewResponse: + $ref: '#/components/examples/Data_views_get_data_view_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Endpoint list item already exists - '500': + $ref: '#/components/schemas/Data_views_data_view_response_object' + description: Indicates a successful call. + '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Internal server error - summary: Creates an endpoint list item - put: - operationId: UpdateEndpointListItem + $ref: '#/components/schemas/Data_views_404_response' + description: Object is not found. + summary: Get a data view + tags: + - data views + post: + operationId: updateDataViewDefault + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Data_views_view_id' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + updateDataViewRequest: + $ref: '#/components/examples/Data_views_update_data_view_request' schema: - type: object - properties: - _version: - type: string - comments: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemCommentArray - default: [] - description: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryArray - id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemId - description: Either `id` or `item_id` must be specified - item_id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemHumanId - description: Either `id` or `item_id` must be specified - meta: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemMeta - name: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemName - os_types: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray - default: [] - tags: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemTags - type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemType - required: - - type - - name - - description - - entries - description: Exception list item's properties + $ref: '#/components/schemas/Data_views_update_data_view_request_object' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_EndpointListItem - description: Successful response + $ref: '#/components/schemas/Data_views_data_view_response_object' + description: Indicates a successful call. '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Invalid input data - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication - '403': + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Update a data view + tags: + - data views + '/api/data_views/data_view/{viewId}/fields': + post: + description: > + Update fields presentation metadata such as count, customLabel, + customDescription, and format. + operationId: updateFieldsMetadataDefault + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Data_views_view_id' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + examples: + updateFieldsMetadataRequest: + $ref: '#/components/examples/Data_views_update_field_metadata_request' + schema: + type: object + properties: + fields: + description: The field object. + type: object + required: + - fields + required: true + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Insufficient privileges - '404': + type: object + properties: + acknowledged: + type: boolean + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Endpoint list item not found - '500': + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Update data view fields metadata + tags: + - data views + '/api/data_views/data_view/{viewId}/runtime_field': + post: + operationId: createRuntimeFieldDefault + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Data_views_view_id' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + examples: + createRuntimeFieldRequest: + $ref: '#/components/examples/Data_views_create_runtime_field_request' + schema: + type: object + properties: + name: + description: | + The name for a runtime field. + type: string + runtimeField: + description: | + The runtime field definition object. + type: object + required: + - name + - runtimeField + required: true + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Internal server error - summary: Updates an endpoint list item - /api/endpoint_list/items/_find: - get: - operationId: FindEndpointListItems + type: object + description: Indicates a successful call. + summary: Create a runtime field + tags: + - data views + put: + operationId: createUpdateRuntimeFieldDefault parameters: - - description: > - Filters the returned results according to the value of the specified - field, - - using the `:` syntax. - in: query - name: filter - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_FindEndpointListItemsFilter - - description: The page number to return - in: query - name: page - required: false - schema: - minimum: 0 - type: integer - - description: The number of exception list items to return per page - in: query - name: per_page - required: false - schema: - minimum: 0 - type: integer - - description: Determines which field is used to sort the results - in: query - name: sort_field - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - - description: 'Determines the sort order, which can be `desc` or `asc`' - in: query - name: sort_order - required: false + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - description: | + The ID of the data view fields you want to update. + in: path + name: viewId + required: true schema: - enum: - - desc - - asc type: string + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + examples: + updateRuntimeFieldRequest: + $ref: '#/components/examples/Data_views_create_runtime_field_request' + schema: + type: object + properties: + name: + description: | + The name for a runtime field. + type: string + runtimeField: + description: | + The runtime field definition object. + type: object + required: + - name + - runtimeField + required: true responses: '200': content: @@ -3717,1912 +3924,1693 @@ paths: schema: type: object properties: - data: + data_view: + type: object + fields: items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_EndpointListItem + type: object type: array - page: - minimum: 0 - type: integer - per_page: - minimum: 0 - type: integer - pit: - type: string - total: - minimum: 0 - type: integer - required: - - data - - page - - per_page - - total - description: Successful response + description: Indicates a successful call. '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Invalid input data - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse - description: Insufficient privileges - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Endpoint list not found - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse - description: Internal server error - summary: Finds endpoint list items - /api/endpoint/action: - get: - description: Get a list of action requests and their responses - operationId: EndpointGetActionsList + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Create or update a runtime field + tags: + - data views + '/api/data_views/data_view/{viewId}/runtime_field/{fieldName}': + delete: + operationId: deleteRuntimeFieldDefault parameters: - - in: query - name: query - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_GetEndpointActionListRouteQuery + - $ref: '#/components/parameters/Data_views_field_name' + - $ref: '#/components/parameters/Data_views_view_id' responses: '200': + description: Indicates a successful call. + '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get Actions List schema + $ref: '#/components/schemas/Data_views_404_response' + description: Object is not found. + summary: Delete a runtime field from a data view tags: - - Security Solution Endpoint Management API - '/api/endpoint/action_log/{agent_id}': + - data views get: - deprecated: true - description: Get action requests log - operationId: EndpointGetActionLog + operationId: getRuntimeFieldDefault parameters: - - in: path - name: agent_id - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentId - - in: query - name: query - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ActionLogRequestQuery + - $ref: '#/components/parameters/Data_views_field_name' + - $ref: '#/components/parameters/Data_views_view_id' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getRuntimeFieldResponse: + $ref: '#/components/examples/Data_views_get_runtime_field_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get action requests log schema - tags: - - Security Solution Endpoint Management API - /api/endpoint/action_status: - get: - description: Get action status - operationId: EndpointGetActionsStatus - parameters: - - in: query - name: query - required: true - schema: - type: object - properties: - agent_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentIds - responses: - '200': + type: object + properties: + data_view: + type: object + fields: + items: + type: object + type: array + description: Indicates a successful call. + '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ActionStatusSuccessResponse - description: OK - summary: Get Actions status schema + $ref: '#/components/schemas/Data_views_404_response' + description: Object is not found. + summary: Get a runtime field tags: - - Security Solution Endpoint Management API - '/api/endpoint/action/{action_id}': - get: - description: Get action details - operationId: EndpointGetActionsDetails + - data views + post: + operationId: updateRuntimeFieldDefault parameters: - - in: path - name: action_id - required: true - schema: - type: string + - $ref: '#/components/parameters/Data_views_field_name' + - $ref: '#/components/parameters/Data_views_view_id' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + examples: + updateRuntimeFieldRequest: + $ref: '#/components/examples/Data_views_update_runtime_field_request' + schema: + type: object + properties: + runtimeField: + description: | + The runtime field definition object. + + You can update following fields: + + - `type` + - `script` + type: object + required: + - runtimeField + required: true responses: '200': + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get Action details schema + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Update a runtime field tags: - - Security Solution Endpoint Management API - '/api/endpoint/action/{action_id}/file/{file_id}/download`': + - data views + /api/data_views/default: get: - description: Download a file from an endpoint - operationId: EndpointFileDownload - parameters: - - in: path - name: action_id - required: true - schema: - type: string - - in: path - name: file_id - required: true - schema: - type: string + operationId: getDefaultDataViewDefault responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + getDefaultDataViewResponse: + $ref: >- + #/components/examples/Data_views_get_default_data_view_response schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: File Download schema - tags: - - Security Solution Endpoint Management API - '/api/endpoint/action/{action_id}/file/{file_id}`': - get: - description: Get file info - operationId: EndpointFileInfo - parameters: - - in: path - name: action_id - required: true - schema: - type: string - - in: path - name: file_id - required: true - schema: - type: string - responses: - '200': + type: object + properties: + data_view_id: + type: string + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: File Info schema + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Get the default data view tags: - - Security Solution Endpoint Management API - /api/endpoint/action/execute: + - data views post: - description: Execute a given command on an endpoint - operationId: EndpointExecuteAction + operationId: setDefaultDatailViewDefault + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + setDefaultDataViewRequest: + $ref: '#/components/examples/Data_views_set_default_data_view_request' schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ExecuteRouteRequestBody + type: object + properties: + data_view_id: + 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. + nullable: true + type: string + force: + default: false + description: Update an existing default data view identifier. + type: boolean + required: + - data_view_id required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Execute Action - tags: - - Security Solution Endpoint Management API - /api/endpoint/action/get_file: - post: - description: Get a file from an endpoint - operationId: EndpointGetFileAction - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_GetFileRouteRequestBody - required: true - responses: - '200': + type: object + properties: + acknowledged: + type: boolean + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get File Action + $ref: '#/components/schemas/Data_views_400_response' + description: Bad request + summary: Set the default data view tags: - - Security Solution Endpoint Management API - /api/endpoint/action/isolate: + - data views + /api/data_views/swap_references: post: - description: Isolate an endpoint - operationId: EndpointIsolateAction + 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. + operationId: swapDataViewsDefault + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + swapDataViewRequest: + $ref: '#/components/examples/Data_views_swap_data_view_request' schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_IsolateRouteRequestBody + $ref: '#/components/schemas/Data_views_swap_data_view_request_object' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Isolate Action + type: object + properties: + deleteStatus: + type: object + properties: + deletePerformed: + type: boolean + remainingRefs: + type: integer + result: + items: + type: object + properties: + id: + description: A saved object identifier. + type: string + type: + description: The saved object type. + type: string + type: array + description: Indicates a successful call. + summary: Swap saved object references tags: - - Security Solution Endpoint Management API - /api/endpoint/action/kill_process: + - data views + /api/data_views/swap_references/_preview: post: - description: Kill a running process on an endpoint - operationId: EndpointKillProcessAction + description: > + Preview the impact of swapping saved object references from one data + view identifier to another. + operationId: previewSwapDataViewsDefault + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_KillOrSuspendActionSchema - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: + examples: + previewSwapDataViewRequest: $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Kill process Action - tags: - - Security Solution Endpoint Management API - /api/endpoint/action/running_procs: - post: - description: Get list of running processes on an endpoint - operationId: EndpointGetProcessesAction - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: + #/components/examples/Data_views_preview_swap_data_view_request schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_GetProcessesRouteRequestBody + $ref: '#/components/schemas/Data_views_swap_data_view_request_object' required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get Running Processes Action + type: object + properties: + result: + items: + type: object + properties: + id: + description: A saved object identifier. + type: string + type: + description: The saved object type. + type: string + type: array + description: Indicates a successful call. + summary: Preview a saved object reference swap tags: - - Security Solution Endpoint Management API - /api/endpoint/action/scan: + - data views + /api/encrypted_saved_objects/_rotate_key: post: - description: Scan a file or directory - operationId: EndpointScanAction - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ScanRouteRequestBody - required: true + 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. + operationId: rotateEncryptionKey + parameters: + - 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: batch_size + required: false + schema: + default: 10000 + type: number + - 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. + in: query + name: type + required: false + schema: + type: string responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + rotateEncryptionKeyResponse: + $ref: '#/components/examples/Saved_objects_key_rotation_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Scan Action - tags: - - Security Solution Endpoint Management API - /api/endpoint/action/state: - get: - operationId: EndpointGetActionsState - responses: - '200': + type: object + properties: + failed: + 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. + type: number + successful: + 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. + type: number + total: + description: > + Indicates the total number of all encrypted saved objects + (optionally filtered by the requested `type`), regardless + of the key Kibana used for encryption. + type: number + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ActionStateSuccessResponse - description: OK - summary: Get Action State schema + $ref: '#/components/schemas/Saved_objects_400_response' + description: Bad request + '429': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + description: Already in progress. + summary: Rotate a key for encrypted saved objects tags: - - Security Solution Endpoint Management API - /api/endpoint/action/suspend_process: - post: - description: Suspend a running process on an endpoint - operationId: EndpointSuspendProcessAction - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_KillOrSuspendActionSchema - required: true + - saved objects + /api/ml/saved_objects/sync: + get: + 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 + parameters: + - $ref: '#/components/parameters/Machine_learning_APIs_simulateParam' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + syncExample: + $ref: '#/components/examples/Machine_learning_APIs_mlSyncExample' schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Suspend process Action + $ref: '#/components/schemas/Machine_learning_APIs_mlSync200Response' + description: Indicates a successful call + '401': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Machine_learning_APIs_mlSync4xxResponse' + description: Authorization information is missing or invalid. + summary: Sync saved objects in the default space tags: - - Security Solution Endpoint Management API - /api/endpoint/action/unisolate: + - ml + /api/saved_objects/_bulk_create: post: - description: Release an endpoint - operationId: EndpointUnisolateAction + deprecated: true + operationId: bulkCreateSavedObjects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - description: 'When true, overwrites the document with the same identifier.' + in: query + name: overwrite + schema: + type: boolean requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_UnisolateRouteRequestBody + items: + type: object + type: array required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Unisolate Action + type: object + description: Indicates a successful call. + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + description: Bad request + summary: Create saved objects tags: - - Security Solution Endpoint Management API - /api/endpoint/action/upload: + - saved objects + /api/saved_objects/_bulk_delete: post: - description: Upload a file to an endpoint - operationId: EndpointUploadAction + deprecated: true + description: | + WARNING: When you delete a saved object, it cannot be recovered. + operationId: bulkDeleteSavedObjects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - 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. + in: query + name: force + schema: + type: boolean requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_UploadRouteRequestBody + items: + type: object + type: array required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Upload Action + type: object + 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. + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + description: Bad request + summary: Delete saved objects tags: - - Security Solution Endpoint Management API - /api/endpoint/isolate: + - saved objects + /api/saved_objects/_bulk_get: post: deprecated: true - operationId: EndpointIsolateRedirect + operationId: bulkGetSavedObjects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids + items: + type: object + type: array required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - '308': - description: Permanent Redirect - headers: - Location: - description: Permanently redirects to "/api/endpoint/action/isolate" - schema: - example: /api/endpoint/action/isolate - type: string - summary: Permanently redirects to a new location - tags: - - Security Solution Endpoint Management API - /api/endpoint/metadata: - get: - operationId: GetEndpointMetadataList - parameters: - - in: query - name: query - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ListRequestQuery - responses: - '200': + type: object + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get Metadata List schema + $ref: '#/components/schemas/Saved_objects_400_response' + description: Bad request + summary: Get saved objects tags: - - Security Solution Endpoint Management API - '/api/endpoint/metadata/{id}': - get: - operationId: GetEndpointMetadata + - saved objects + /api/saved_objects/_bulk_resolve: + post: + 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. + operationId: bulkResolveSavedObjects parameters: - - in: path - name: id - required: true - schema: - type: string + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + items: + type: object + type: array + required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get Metadata schema - tags: - - Security Solution Endpoint Management API - /api/endpoint/metadata/transforms: - get: - operationId: GetEndpointMetadataTransform - responses: - '200': + type: object + 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. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get Metadata Transform schema + $ref: '#/components/schemas/Saved_objects_400_response' + description: Bad request + summary: Resolve saved objects tags: - - Security Solution Endpoint Management API - /api/endpoint/policy_response: - get: - operationId: GetPolicyResponse + - saved objects + /api/saved_objects/_bulk_update: + post: + deprecated: true + description: Update the attributes for multiple Kibana saved objects. + operationId: bulkUpdateSavedObjects parameters: - - in: query - name: query - required: true - schema: - type: object - properties: - agentId: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentId + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + items: + type: object + type: array + required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get Policy Response schema + type: object + 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. + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + description: Bad request + summary: Update saved objects tags: - - Security Solution Endpoint Management API - /api/endpoint/policy/summaries: - get: - deprecated: true - operationId: GetAgentPolicySummary - parameters: - - in: query - name: query - required: true - schema: - type: object - properties: - package_name: - type: string - policy_id: - nullable: true - type: string - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get Agent Policy Summary schema - tags: - - Security Solution Endpoint Management API - '/api/endpoint/protection_updates_note/{package_policy_id}': - get: - operationId: GetProtectionUpdatesNote - parameters: - - in: path - name: package_policy_id - required: true - schema: - type: string - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ProtectionUpdatesNoteResponse - description: OK - summary: Get Protection Updates Note schema - tags: - - Security Solution Endpoint Management API + - saved objects + /api/saved_objects/_export: post: - operationId: CreateUpdateProtectionUpdatesNote + 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. + operationId: exportSavedObjectsDefault parameters: - - in: path - name: package_policy_id - required: true - schema: - type: string + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: + examples: + exportSavedObjectsRequest: + $ref: '#/components/examples/Saved_objects_export_objects_request' schema: type: object properties: - note: - type: string + excludeExportDetails: + default: false + description: Do not add export details entry at the end of the stream. + type: boolean + includeReferencesDeep: + description: >- + Includes all of the referenced objects in the exported + objects. + type: boolean + objects: + description: A list of objects to export. + items: + type: object + type: array + type: + description: >- + The saved object types to include in the export. Use `*` to + export all the types. + oneOf: + - type: string + - items: + type: string + type: array required: true responses: '200': content: - application/json; Elastic-Api-Version=2023-10-31: + application/x-ndjson; Elastic-Api-Version=2023-10-31: + examples: + exportSavedObjectsResponse: + $ref: '#/components/examples/Saved_objects_export_objects_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_ProtectionUpdatesNoteResponse - description: OK - summary: Create Update Protection Updates Note schema - tags: - - Security Solution Endpoint Management API - '/api/endpoint/suggestions/{suggestion_type}': - post: - operationId: GetEndpointSuggestions - parameters: - - in: path - name: suggestion_type - required: true - schema: - enum: - - eventFilters - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - field: - type: string - fieldMeta: {} - filters: {} - query: - type: string - required: - - parameters - required: true - responses: - '200': + additionalProperties: true + type: object + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - summary: Get suggestions + $ref: '#/components/schemas/Saved_objects_400_response' + description: Bad request. + summary: Export saved objects tags: - - Security Solution Endpoint Management API - /api/endpoint/unisolate: - post: + - saved objects + /api/saved_objects/_find: + get: deprecated: true - operationId: EndpointUnisolateRedirect - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_SuccessResponse - description: OK - '308': - description: Permanent Redirect - headers: - Location: - description: Permanently redirects to "/api/endpoint/action/unisolate" - schema: - example: /api/endpoint/action/unisolate - type: string - summary: Permanently redirects to a new location - tags: - - Security Solution Endpoint Management API - /api/exception_lists: - delete: - operationId: DeleteExceptionList + description: Retrieve a paginated set of Kibana saved objects. + operationId: findSavedObjects parameters: - - description: Either `id` or `list_id` must be specified + - 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. in: query - name: id - required: false + name: aggs schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - - description: Either `id` or `list_id` must be specified + type: string + - description: The default operator to use for the `simple_query_string`. in: query - name: list_id - required: false + name: default_search_operator schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - - in: query - name: namespace_type - required: false + type: string + - description: The fields to return in the attributes key of the response. + in: query + name: fields schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Deletes an exception list - tags: - - Security Solution Exceptions API - get: - operationId: ReadExceptionList - parameters: - - description: Either `id` or `list_id` must be specified + oneOf: + - type: string + - type: array + - 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`. in: query - name: id - required: false + name: filter schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - - description: Either `id` or `list_id` must be specified + type: string + - description: >- + Filters to objects that do not have a relationship with the type and + identifier combination. in: query - name: list_id - required: false + name: has_no_reference schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - - in: query - name: namespace_type - required: false + type: object + - description: >- + The operator to use for the `has_no_reference` parameter. Either + `OR` or `AND`. Defaults to `OR`. + in: query + name: has_no_reference_operator schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': + type: string + - description: >- + Filters to objects that have a relationship with the type and ID + combination. + in: query + name: has_reference + schema: + type: object + - description: >- + The operator to use for the `has_reference` parameter. Either `OR` + or `AND`. Defaults to `OR`. + in: query + name: has_reference_operator + schema: + type: string + - description: The page of objects to return. + in: query + name: page + schema: + type: integer + - description: The number of objects to return per page. + in: query + name: per_page + schema: + type: integer + - description: >- + An Elasticsearch `simple_query_string` query that filters the + objects in the response. + in: query + name: search + schema: + type: string + - description: >- + The fields to perform the `simple_query_string` parsed query + against. + in: query + name: search_fields + schema: + oneOf: + - type: string + - type: array + - 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. + in: query + name: sort_field + schema: + type: string + - description: The saved object types to include. + in: query + name: type + required: true + schema: + oneOf: + - type: string + - type: array + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list item not found response - '500': + type: object + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Retrieves an exception list using its `id` or `list_id` field + $ref: '#/components/schemas/Saved_objects_400_response' + description: Bad request + summary: Search for saved objects tags: - - Security Solution Exceptions API + - saved objects + /api/saved_objects/_import: post: - operationId: CreateExceptionList + 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. + operationId: importSavedObjectsDefault + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - 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: createNewCopies + required: false + schema: + type: boolean + - 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: overwrite + required: false + schema: + type: boolean + - 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. + in: query + name: compatibilityMode + required: false + schema: + type: boolean requestBody: content: - application/json; Elastic-Api-Version=2023-10-31: + multipart/form-data; Elastic-Api-Version=2023-10-31: + examples: + importObjectsRequest: + $ref: '#/components/examples/Saved_objects_import_objects_request' schema: type: object properties: - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListDescription - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListMeta - name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListOsTypeArray - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListTags - default: [] - type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListType - version: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListVersion - default: 1 - required: - - name - - description - - type - description: Exception list's 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. required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + importObjectsResponse: + $ref: '#/components/examples/Saved_objects_import_objects_response' schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList - description: Successful response + type: object + properties: + errors: + 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. + items: + type: object + type: array + success: + 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. + type: boolean + successCount: + description: Indicates the number of successfully imported records. + type: integer + successResults: + 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. + items: + type: object + type: array + description: Indicates a successful call. '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list already exists response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Creates an exception list + $ref: '#/components/schemas/Saved_objects_400_response' + description: Bad request. + summary: Import saved objects tags: - - Security Solution Exceptions API - put: - operationId: UpdateExceptionList - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - _version: - type: string - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListDescription - id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListMeta - name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListOsTypeArray - default: [] - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListTags - type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListType - version: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListVersion + - saved objects + /api/saved_objects/_resolve_import_errors: + post: + 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. + operationId: resolveImportErrors + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - 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: compatibilityMode + required: false + schema: + type: boolean + - 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. + in: query + name: createNewCopies + required: false + schema: + type: boolean + requestBody: + content: + multipart/form-data; Elastic-Api-Version=2023-10-31: + examples: + resolveImportErrorsRequest: + $ref: >- + #/components/examples/Saved_objects_resolve_missing_reference_request + schema: + type: object + properties: + file: + description: The same file given to the import API. + format: binary + type: string + retries: + description: >- + The retry operations, which can specify how to resolve + different types of errors. + items: + type: object + properties: + destinationId: + description: >- + Specifies the destination ID that the imported object + should have, if different from the current ID. + type: string + id: + description: The saved object ID. + type: string + ignoreMissingReferences: + description: >- + When set to `true`, ignores missing reference errors. + When set to `false`, does nothing. + type: boolean + overwrite: + description: >- + When set to `true`, the source object overwrites the + conflicting destination object. When set to `false`, + does nothing. + type: boolean + replaceReferences: + description: >- + A list of `type`, `from`, and `to` used to change the + object references. + items: + type: object + properties: + from: + type: string + to: + type: string + type: + type: string + type: array + type: + description: The saved object type. + type: string + required: + - type + - id + type: array required: - - name - - description - - type - description: Exception list's properties + - retries required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: + examples: + resolveImportErrorsResponse: + $ref: >- + #/components/examples/Saved_objects_resolve_missing_reference_response schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList - description: Successful response + type: object + properties: + errors: + 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 + type: array + success: + 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. + type: boolean + successCount: + description: | + Indicates the number of successfully resolved records. + type: number + successResults: + 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 + type: array + description: Indicates a successful call. '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Updates an exception list + $ref: '#/components/schemas/Saved_objects_400_response' + description: Bad request. + summary: Resolve import errors tags: - - Security Solution Exceptions API - /api/exception_lists/_duplicate: + - saved objects + '/api/saved_objects/{type}': post: - operationId: DuplicateExceptionList + deprecated: true + description: Create a Kibana saved object with a randomly generated identifier. + operationId: createSavedObject parameters: - - description: Exception list's human identifier - in: query - name: list_id - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - - in: query - name: namespace_type - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - - description: >- - Determines whether to include expired exceptions in the exported - list + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - $ref: '#/components/parameters/Saved_objects_saved_object_type' + - description: 'If true, overwrites the document with the same identifier.' in: query - name: include_expired_exceptions - required: true + name: overwrite schema: - default: 'true' - enum: - - 'true' - - 'false' - type: string + type: boolean + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + attributes: + $ref: '#/components/schemas/Saved_objects_attributes' + initialNamespaces: + $ref: '#/components/schemas/Saved_objects_initial_namespaces' + references: + $ref: '#/components/schemas/Saved_objects_references' + required: + - attributes + required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': + type: object + description: Indicates a successful call. + '409': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '405': + type: object + description: Indicates a conflict error. + summary: Create a saved object + tags: + - saved objects + '/api/saved_objects/{type}/{id}': + get: + deprecated: true + description: Retrieve a single Kibana saved object by identifier. + operationId: getSavedObject + parameters: + - $ref: '#/components/parameters/Saved_objects_saved_object_id' + - $ref: '#/components/parameters/Saved_objects_saved_object_type' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list to duplicate not found response - '500': + type: object + description: Indicates a successful call. + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Duplicates an exception list + $ref: '#/components/schemas/Saved_objects_400_response' + description: Bad request. + summary: Get a saved object tags: - - Security Solution Exceptions API - /api/exception_lists/_export: + - saved objects post: - description: Exports an exception list and its associated items to an .ndjson file - operationId: ExportExceptionList + deprecated: true + description: >- + Create a Kibana saved object and specify its identifier instead of using + a randomly generated ID. + operationId: createSavedObjectId parameters: - - description: Exception list's identifier - in: query - name: id - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - - description: Exception list's human identifier - in: query - name: list_id - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - - in: query - name: namespace_type - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - - description: >- - Determines whether to include expired exceptions in the exported - list + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - $ref: '#/components/parameters/Saved_objects_saved_object_id' + - $ref: '#/components/parameters/Saved_objects_saved_object_type' + - description: 'If true, overwrites the document with the same identifier.' in: query - name: include_expired_exceptions - required: true + name: overwrite schema: - default: 'true' - enum: - - 'true' - - 'false' - type: string + type: boolean + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + attributes: + $ref: '#/components/schemas/Saved_objects_attributes' + initialNamespaces: + $ref: '#/components/schemas/Saved_objects_initial_namespaces' + references: + $ref: '#/components/schemas/Saved_objects_initial_namespaces' + required: + - attributes + required: true responses: '200': - content: - application/ndjson; Elastic-Api-Version=2023-10-31: - schema: - description: >- - A `.ndjson` file containing specified exception list and its - items - format: binary - type: string - description: Successful response - '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': + type: object + description: Indicates a successful call. + '409': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': + type: object + description: Indicates a conflict error. + summary: Create a saved object + tags: + - saved objects + put: + deprecated: true + description: Update the attributes for Kibana saved objects. + operationId: updateSavedObject + 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: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + required: true + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response + type: object + description: Indicates a successful call. '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list not found response - '500': + type: object + description: Indicates the object was not found. + '409': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Exports an exception list + type: object + description: Indicates a conflict error. + summary: Update a saved object tags: - - Security Solution Exceptions API - /api/exception_lists/_find: + - saved objects + '/api/saved_objects/resolve/{type}/{id}': get: - operationId: FindExceptionLists + deprecated: true + 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. + operationId: resolveSavedObject parameters: - - description: > - Filters the returned results according to the value of the specified - field. - - - Uses the `so type.field name:field` value syntax, where `so type` - can be: - - - - `exception-list`: Specify a space-aware exception list. - - - `exception-list-agnostic`: Specify an exception list that is - shared across spaces. - in: query - name: filter - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_FindExceptionListsFilter - - description: > - Determines whether the returned containers are Kibana associated - with a Kibana space - - or available in all spaces (`agnostic` or `single`) - in: query - name: namespace_type - required: false - schema: - default: - - single - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - type: array - - description: The page number to return - in: query - name: page - required: false - schema: - minimum: 1 - type: integer - - description: The number of exception lists to return per page - in: query - name: per_page - required: false - schema: - minimum: 1 - type: integer - - description: Determines which field is used to sort the results - in: query - name: sort_field - required: false - schema: - type: string - - description: 'Determines the sort order, which can be `desc` or `asc`' - in: query - name: sort_order - required: false - schema: - enum: - - desc - - asc - type: string + - $ref: '#/components/parameters/Saved_objects_saved_object_id' + - $ref: '#/components/parameters/Saved_objects_saved_object_type' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object - properties: - data: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList - type: array - page: - minimum: 1 - type: integer - per_page: - minimum: 1 - type: integer - total: - minimum: 0 - type: integer - required: - - data - - page - - per_page - - total - description: Successful response + description: Indicates a successful call. '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Finds exception lists + $ref: '#/components/schemas/Saved_objects_400_response' + description: Bad request. + summary: Resolve a saved object tags: - - Security Solution Exceptions API - /api/exception_lists/_import: - post: - description: Imports an exception list and associated items - operationId: ImportExceptionList + - saved objects + /api/status: + get: + operationId: /api/status#0 parameters: - - description: > - Determines whether existing exception lists with the same `list_id` - are overwritten. - - If any exception items have the same `item_id`, those are also - overwritten. - in: query - name: overwrite - required: false - schema: - default: false - type: boolean - - in: query - name: overwrite_exceptions - required: false + - description: The version of the API to use + in: header + name: elastic-api-version schema: - default: false - type: boolean - - in: query - name: overwrite_action_connectors + 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: - default: false type: boolean - - description: > - Determines whether the list being imported will have a new `list_id` - generated. - - Additional `item_id`'s are generated for each exception item. Both - the exception - - list and its items are overwritten. + - description: Set to "true" to get the response in v8 format. in: query - name: as_new_list + name: v8format required: false schema: - default: false type: boolean - requestBody: - content: - multipart/form-data; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - file: - description: A `.ndjson` file containing the exception list - format: binary - type: string - required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - type: object - properties: - errors: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListsImportBulkErrorArray - success: - type: boolean - success_count: - minimum: 0 - type: integer - success_count_exception_list_items: - minimum: 0 - type: integer - success_count_exception_lists: - minimum: 0 - type: integer - success_exception_list_items: - type: boolean - success_exception_lists: - type: boolean - required: - - errors - - success - - success_count - - success_exception_lists - - success_count_exception_lists - - success_exception_list_items - - success_count_exception_list_items - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_core_status_response' - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': + #/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: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': + 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 + /data_streams: + get: + operationId: data-streams-list + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '500': + type: object + properties: + data_streams: + items: + $ref: '#/components/schemas/Fleet_data_stream' + type: array + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List data streams + tags: + - Data streams + parameters: [] + /enrollment_api_keys: + get: + operationId: get-enrollment-api-keys + parameters: [] + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Imports an exception list + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + type: array + list: + deprecated: true + items: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + type: array + page: + type: number + perPage: + type: number + total: + type: number + required: + - items + - page + - perPage + - total + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List enrollment API keys tags: - - Security Solution Exceptions API - /api/exception_lists/items: - delete: - operationId: DeleteExceptionListItem + - Fleet enrollment API keys + post: + operationId: create-enrollment-api-keys parameters: - - description: Either `id` or `item_id` must be specified - in: query - name: id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemId - - description: Either `id` or `item_id` must be specified - in: query - name: item_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - - in: query - name: namespace_type - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItem - description: Successful response + type: object + properties: + action: + enum: + - created + type: string + item: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list item not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Deletes an exception list item + $ref: '#/components/responses/Fleet_error' + summary: Create enrollment API key tags: - - Security Solution Exceptions API - get: - operationId: ReadExceptionListItem + - Fleet enrollment API keys + '/enrollment_api_keys/{keyId}': + delete: + operationId: delete-enrollment-api-key parameters: - - description: Either `id` or `item_id` must be specified - in: query - name: id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemId - - description: Either `id` or `item_id` must be specified - in: query - name: item_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - - in: query - name: namespace_type - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItem - description: Successful response + type: object + properties: + action: + enum: + - deleted + type: string + required: + - action + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete enrollment API key by ID + tags: + - Fleet enrollment API keys + get: + operationId: get-enrollment-api-key + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get enrollment API key by ID + tags: + - Fleet enrollment API keys + parameters: + - in: path + name: keyId + required: true + schema: + type: string + /enrollment-api-keys: + get: + deprecated: true + operationId: get-enrollment-api-keys-deprecated + parameters: [] + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + type: array + list: + deprecated: true + items: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + type: array + page: + type: number + perPage: + type: number + total: + type: number + required: + - items + - page + - perPage + - total + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List enrollment API keys + tags: + - Fleet enrollment API keys + post: + deprecated: true + operationId: create-enrollment-api-keys-deprecated + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': + type: object + properties: + action: + enum: + - created + type: string + item: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Create enrollment API key + tags: + - Fleet enrollment API keys + '/enrollment-api-keys/{keyId}': + delete: + deprecated: true + operationId: delete-enrollment-api-key-deprecated + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list item not found response - '500': + type: object + properties: + action: + enum: + - deleted + type: string + required: + - action + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete enrollment API key by ID + tags: + - Fleet enrollment API keys + get: + deprecated: true + operationId: get-enrollment-api-key-deprecated + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Gets an exception list item + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_enrollment_api_key' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get enrollment API key by ID tags: - - Security Solution Exceptions API + - Fleet enrollment API keys + parameters: + - in: path + name: keyId + required: true + schema: + type: string + /epm/bulk_assets: post: - operationId: CreateExceptionListItem + operationId: bulk-get-assets requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - comments: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_CreateExceptionListItemCommentArray - default: [] - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryArray - expire_time: - format: date-time - type: string - item_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemMeta - name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemOsTypeArray - default: [] - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemTags - default: [] - type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemType + assetIds: + description: list of items necessary to fetch assets + items: + type: object + properties: + id: + type: string + type: + type: string + type: array required: - - list_id - - type - - name - - description - - entries - description: Exception list item's properties - required: true + - assetIds responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItem - description: Successful response + $ref: '#/components/schemas/Fleet_get_bulk_assets_response' + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Bulk get assets + tags: + - Elastic Package Manager (EPM) + /epm/categories: + get: + operationId: get-package-categories + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list item already exists response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Creates an exception list item - tags: - - Security Solution Exceptions API - put: - operationId: UpdateExceptionListItem - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - _version: - type: string - comments: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_UpdateExceptionListItemCommentArray - default: [] - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryArray - expire_time: - format: date-time - type: string - id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemId - description: Either `id` or `item_id` must be specified - item_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - description: Either `id` or `item_id` must be specified - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemMeta - name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemOsTypeArray - default: [] - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemTags - type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemType - required: - - type - - name - - description - - entries - description: Exception list item's properties - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItem - description: Successful response + $ref: '#/components/schemas/Fleet_get_categories_response' + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list item not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Updates an exception list item + $ref: '#/components/responses/Fleet_error' + summary: List package categories tags: - - Security Solution Exceptions API - /api/exception_lists/items/_find: + - Elastic Package Manager (EPM) + parameters: + - description: >- + Whether to include prerelease packages in categories count (e.g. beta, + rc, preview) + in: query + name: prerelease + schema: + default: false + type: boolean + - deprecated: true + in: query + name: experimental + schema: + default: false + type: boolean + - in: query + name: include_policy_templates + schema: + default: false + type: boolean + /epm/packages: get: - operationId: FindExceptionListItems + operationId: list-all-packages parameters: - - description: List's id + - description: >- + Whether to exclude the install status of each package. Enabling this + option will opt in to caching for the response via `cache-control` + headers. If you don't need up-to-date installation info for a + package, and are querying for a list of available packages, + providing this flag can improve performance substantially. in: query - name: list_id - required: true + name: excludeInstallStatus schema: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - type: array - - description: > - Filters the returned results according to the value of the specified - field, - - using the `:` syntax. + default: false + type: boolean + - description: >- + Whether to return prerelease versions of packages (e.g. beta, rc, + preview) in: query - name: filter - required: false + name: prerelease schema: - default: [] - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_FindExceptionListItemsFilter - type: array - - description: > - Determines whether the returned containers are Kibana associated - with a Kibana space - - or available in all spaces (`agnostic` or `single`) + default: false + type: boolean + - deprecated: true in: query - name: namespace_type - required: false + name: experimental schema: - default: - - single - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - type: array + default: false + type: boolean - in: query - name: search - required: false + name: category schema: type: string - - description: The page number to return - in: query - name: page - required: false - schema: - minimum: 0 - type: integer - - description: The number of exception list items to return per page - in: query - name: per_page - required: false - schema: - minimum: 0 - type: integer - - description: Determines which field is used to sort the results + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Fleet_get_packages_response' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List packages + tags: + - Elastic Package Manager (EPM) + post: + description: '' + operationId: install-package-by-upload + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - description: avoid erroring out on unexpected mapping update errors in: query - name: sort_field - required: false + name: ignoreMappingUpdateErrors schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_NonEmptyString - - description: 'Determines the sort order, which can be `desc` or `asc`' + default: false + type: boolean + - description: >- + Skip data stream rollover during index template mapping or settings + update in: query - name: sort_order - required: false + name: skipDataStreamRollover schema: - enum: - - desc - - asc - type: string + default: false + type: boolean + requestBody: + content: + application/gzip; Elastic-Api-Version=2023-10-31: + schema: + format: binary + type: string + application/zip; Elastic-Api-Version=2023-10-31: + schema: + format: binary + type: string responses: '200': content: @@ -5630,100 +5618,110 @@ paths: schema: type: object properties: - data: + _meta: + type: object + properties: + install_source: + enum: + - upload + - registry + - bundled + type: string + items: items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItem + type: object + properties: + id: + type: string + type: + oneOf: + - $ref: >- + #/components/schemas/Fleet_kibana_saved_object_type + - $ref: >- + #/components/schemas/Fleet_elasticsearch_asset_type + required: + - id + - type type: array - page: - minimum: 1 - type: integer - per_page: - minimum: 1 - type: integer - pit: - type: string - total: - minimum: 0 - type: integer required: - - data - - page - - per_page - - total - description: Successful response + - items + description: OK '400': + $ref: '#/components/responses/Fleet_error' + '429': + $ref: '#/components/responses/Fleet_error' + summary: Install by package by direct upload + tags: + - Elastic Package Manager (EPM) + /epm/packages/_bulk: + post: + operationId: bulk-install-packages + parameters: + - description: >- + Whether to return prerelease versions of packages (e.g. beta, rc, + preview) + in: query + name: prerelease + schema: + default: false + type: boolean + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + force: + description: force install to ignore package verification errors + type: boolean + packages: + description: list of packages to install + items: + oneOf: + - description: package name + type: string + - type: object + properties: + name: + description: package name + type: string + version: + description: package version + type: string + type: array + required: + - packages + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Finds exception list items + $ref: '#/components/schemas/Fleet_bulk_install_packages_response' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Bulk install packages tags: - - Security Solution Exceptions API - /api/exception_lists/summary: - get: - operationId: ReadExceptionListSummary + - Elastic Package Manager (EPM) + '/epm/packages/{pkgkey}': + delete: + deprecated: true + operationId: delete-package-deprecated parameters: - - description: Exception list's identifier generated upon creation - in: query - name: id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - - description: Exception list's human readable identifier - in: query - name: list_id - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - - in: query - name: namespace_type - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - - description: Search filter clause - in: query - name: filter - required: false + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - in: path + name: pkgkey + required: true schema: type: string + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + force: + type: boolean responses: '200': content: @@ -5731,544 +5729,812 @@ paths: schema: type: object properties: - linux: - minimum: 0 - type: integer - macos: - minimum: 0 - type: integer - total: - minimum: 0 - type: integer - windows: - minimum: 0 - type: integer - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list not found response - '500': + response: + items: + type: object + properties: + id: + type: string + type: + oneOf: + - $ref: >- + #/components/schemas/Fleet_kibana_saved_object_type + - $ref: >- + #/components/schemas/Fleet_elasticsearch_asset_type + required: + - id + - type + type: array + required: + - response + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete ackage + tags: + - Elastic Package Manager (EPM) + get: + deprecated: true + operationId: get-package-deprecated + parameters: + - in: path + name: pkgkey + required: true + schema: + type: string + - description: >- + Whether to return prerelease versions of packages (e.g. beta, rc, + preview) + in: query + name: prerelease + schema: + default: false + type: boolean + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Retrieves an exception list summary + allOf: + - properties: + response: + $ref: '#/components/schemas/Fleet_package_info' + - properties: + savedObject: + type: string + status: + enum: + - installed + - installing + - install_failed + - not_installed + type: string + required: + - status + - savedObject + type: object + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get package tags: - - Security Solution Exceptions API - /api/exceptions/shared: + - Elastic Package Manager (EPM) post: - operationId: CreateSharedExceptionList + deprecated: true + description: '' + operationId: install-package-deprecated + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - in: path + name: pkgkey + required: true + schema: + type: string + - description: avoid erroring out on unexpected mapping update errors + in: query + name: ignoreMappingUpdateErrors + schema: + default: false + type: boolean + - description: >- + Skip data stream rollover during index template mapping or settings + update + in: query + name: skipDataStreamRollover + schema: + default: false + type: boolean requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListDescription - name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListName - required: - - name - - description - required: true + force: + type: boolean responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionList - description: Successful response + type: object + properties: + response: + items: + type: object + properties: + id: + type: string + type: + oneOf: + - $ref: >- + #/components/schemas/Fleet_kibana_saved_object_type + - $ref: >- + #/components/schemas/Fleet_elasticsearch_asset_type + required: + - id + - type + type: array + required: + - response + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_PlatformErrorResponse - description: Not enough privileges response - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Exception list already exists response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_SiemErrorResponse - description: Internal server error response - summary: Creates a shared exception list + $ref: '#/components/responses/Fleet_error' + summary: Install package tags: - - Security Solution Exceptions API - /api/lists: + - Elastic Package Manager (EPM) + '/epm/packages/{pkgName}/{pkgVersion}': delete: - operationId: DeleteList + operationId: delete-package parameters: - - description: List's `id` value + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - description: delete package even if policies used by agents in: query - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - in: query - name: deleteReferences - required: false - schema: - default: false - type: boolean - - in: query - name: ignoreReferences - required: false + name: force schema: - default: false type: boolean + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + deprecated: true + type: object + properties: + force: + type: boolean responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' - description: Successful response + type: object + properties: + items: + items: + type: object + properties: + id: + type: string + type: + oneOf: + - $ref: >- + #/components/schemas/Fleet_kibana_saved_object_type + - $ref: >- + #/components/schemas/Fleet_elasticsearch_asset_type + required: + - id + - type + type: array + required: + - items + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Deletes a list + $ref: '#/components/responses/Fleet_error' + summary: Delete package tags: - - Security Solution Lists API + - Elastic Package Manager (EPM) get: - operationId: ReadList - parameters: - - description: List's `id` value - in: query - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' + operationId: get-package responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' - description: Successful response + allOf: + - properties: + item: + $ref: '#/components/schemas/Fleet_package_info' + - properties: + keepPoliciesUpToDate: + type: boolean + latestVersion: + type: string + licensePath: + type: string + notice: + type: string + savedObject: + deprecated: true + type: object + status: + enum: + - installed + - installing + - install_failed + - not_installed + type: string + required: + - status + - savedObject + type: object + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Retrieves a list using its id field + $ref: '#/components/responses/Fleet_error' + summary: Get package tags: - - Security Solution Lists API - patch: - operationId: PatchList + - Elastic Package Manager (EPM) + parameters: + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: true + schema: + type: string + - description: Ignore if the package is fails signature verification + in: query + name: ignoreUnverified + schema: + type: boolean + - description: >- + Return all fields from the package manifest, not just those supported + by the Elastic Package Registry + in: query + name: full + schema: + type: boolean + - description: >- + Whether to return prerelease versions of packages (e.g. beta, rc, + preview) + in: query + name: prerelease + schema: + default: false + type: boolean + post: + description: '' + operationId: install-package + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - description: avoid erroring out on unexpected mapping update errors + in: query + name: ignoreMappingUpdateErrors + schema: + default: false + type: boolean + - description: >- + Skip data stream rollover during index template mapping or settings + update + in: query + name: skipDataStreamRollover + schema: + default: false + type: boolean requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - _version: - type: string - description: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListDescription - id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - meta: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListMetadata - name: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListName' - version: - minimum: 1 - type: integer - required: - - id - description: List's properties - required: true + force: + type: boolean + ignore_constraints: + type: boolean responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': + type: object + properties: + _meta: + type: object + properties: + install_source: + enum: + - registry + - upload + - bundled + type: string + items: + items: + type: object + properties: + id: + type: string + type: + oneOf: + - $ref: >- + #/components/schemas/Fleet_kibana_saved_object_type + - $ref: >- + #/components/schemas/Fleet_elasticsearch_asset_type + required: + - id + - type + type: array + required: + - items + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Install package + tags: + - Elastic Package Manager (EPM) + put: + description: '' + operationId: update-package + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + keepPoliciesUpToDate: + type: boolean + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List not found response - '500': + type: object + properties: + items: + items: + type: object + properties: + id: + type: string + type: + oneOf: + - $ref: >- + #/components/schemas/Fleet_kibana_saved_object_type + - $ref: >- + #/components/schemas/Fleet_elasticsearch_asset_type + required: + - id + - type + type: array + required: + - items + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Update package settings + tags: + - Elastic Package Manager (EPM) + '/epm/packages/{pkgName}/{pkgVersion}/{filePath}': + get: + operationId: packages-get-file + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Patches a list + type: object + properties: + body: + type: object + headers: + type: object + statusCode: + type: number + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get package file tags: - - Security Solution Lists API + - Elastic Package Manager (EPM) + parameters: + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: true + schema: + type: string + - in: path + name: filePath + required: true + schema: + type: string + '/epm/packages/{pkgName}/{pkgVersion}/transforms/authorize': post: - operationId: CreateList + description: '' + operationId: reauthorize-transforms + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: true + schema: + type: string + - description: >- + Whether to include prerelease packages in categories count (e.g. + beta, rc, preview) + in: query + name: prerelease + schema: + default: false + type: boolean requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - description: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListDescription - deserializer: - type: string - id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - meta: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListMetadata - name: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListName' - serializer: - type: string - type: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListType' - version: - default: 1 - minimum: 1 - type: integer - required: - - name - - description - - type - description: List's properties - required: true + transforms: + items: + type: object + properties: + transformId: + type: string + type: array responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' - description: Successful response + type: object + properties: + items: + items: + type: object + properties: + error: + type: string + success: + type: boolean + transformId: + type: string + required: + - transformId + - error + type: array + required: + - items + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Authorize transforms + tags: + - Elastic Package Manager (EPM) + '/epm/packages/{pkgName}/stats': + get: + operationId: get-package-stats + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': + type: object + properties: + response: + $ref: '#/components/schemas/Fleet_package_usage_stats' + required: + - response + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get package stats + tags: + - Elastic Package Manager (EPM) + parameters: + - in: path + name: pkgName + required: true + schema: + type: string + /epm/packages/limited: + get: + operationId: list-limited-packages + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '409': + type: object + properties: + items: + items: + type: string + type: array + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get limited package list + tags: + - Elastic Package Manager (EPM) + parameters: [] + '/epm/templates/{pkgName}/{pkgVersion}/inputs': + get: + operationId: get-inputs-template + responses: + '200': + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get inputs template + tags: + - Elastic Package Manager (EPM) + parameters: + - in: path + name: pkgName + required: true + schema: + type: string + - in: path + name: pkgVersion + required: true + schema: + type: string + - description: Format of response - json or yaml + in: query + name: format + schema: + enum: + - json + - yaml + - yml + type: string + - description: Specify if version is prerelease + in: query + name: prerelease + schema: + type: boolean + - description: Ignore if the package is fails signature verification + in: query + name: ignoreUnverified + schema: + type: boolean + /epm/verification_key_id: + get: + operationId: packages-get-verification-key-id + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List already exists response - '500': + type: object + properties: + body: + type: object + properties: + id: + description: >- + the key ID of the GPG key used to verify package + signatures + nullable: true + type: string + headers: + type: object + statusCode: + type: number + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get package signature verification key ID + tags: + - Elastic Package Manager (EPM) + parameters: [] + /fleet_server_hosts: + get: + operationId: get-fleet-server-hosts + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Creates a list + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_fleet_server_host' + type: array + page: + type: integer + perPage: + type: integer + total: + type: integer + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List Fleet Server hosts tags: - - Security Solution Lists API - put: - operationId: UpdateList + - Fleet Server hosts + post: + operationId: post-fleet-server-hosts requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - _version: - type: string - description: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListDescription + host_urls: + items: + type: string + type: array id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - meta: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListMetadata + type: string + is_default: + type: boolean + is_internal: + type: boolean name: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListName' - version: - minimum: 1 - type: integer + type: string + proxy_id: + description: >- + The ID of the proxy to use for this fleet server host. See + the proxies API for more information. + type: string required: - - id - name - - description - description: List's properties - required: true + - host_urls responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' - description: Successful response + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_fleet_server_host' + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Create Fleet Server host + tags: + - Fleet Server hosts + '/fleet_server_hosts/{itemId}': + delete: + operationId: delete-fleet-server-hosts + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': + type: object + properties: + id: + type: string + required: + - id + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete Fleet Server host by ID + tags: + - Fleet Server hosts + get: + operationId: get-one-fleet-server-hosts + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_fleet_server_host' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get Fleet Server host by ID + tags: + - Fleet Server hosts + parameters: + - in: path + name: itemId + required: true + schema: + type: string + put: + operationId: update-fleet-server-hosts + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + host_urls: + items: + type: string + type: array + is_default: + type: boolean + is_internal: + type: boolean + name: + type: string + proxy_id: + description: >- + The ID of the proxy to use for this fleet server host. See + the proxies API for more information. + nullable: true + type: string + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List not found response - '500': + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_fleet_server_host' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Update Fleet Server host by ID + tags: + - Fleet Server hosts + /health_check: + post: + operationId: fleet-server-health-check + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + host: + deprecated: true + type: string + id: + type: string + required: + - id + required: true + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Updates a list + type: object + properties: + host: + deprecated: true + type: string + id: + description: Fleet Server host id + type: string + status: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Fleet Server health check tags: - - Security Solution Lists API - /api/lists/_find: + - Fleet internals + /kubernetes: get: - operationId: FindLists + operationId: get-full-k8s-manifest parameters: - - description: The page number to return - in: query - name: page - required: false - schema: - type: integer - - description: The number of lists to return per page - in: query - name: per_page - required: false - schema: - type: integer - - description: Determines which field is used to sort the results - in: query - name: sort_field + - in: query + name: download required: false schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - - description: 'Determines the sort order, which can be `desc` or `asc`' - in: query - name: sort_order + type: boolean + - in: query + name: fleetServer required: false schema: - enum: - - desc - - asc type: string - - description: > - Returns the list that come after the last list returned in the - previous call - - (use the cursor value returned in the previous call). This parameter - uses - - the `tie_breaker_id` field to ensure all lists are sorted and - returned correctly. - in: query - name: cursor - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_FindListsCursor' - - description: > - Filters the returned results according to the value of the specified - field, - - using the : syntax. - in: query - name: filter + - in: query + name: enrolToken required: false schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_FindListsFilter' + type: string responses: '200': content: @@ -6276,66 +6542,88 @@ paths: schema: type: object properties: - cursor: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_FindListsCursor - data: + item: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get full K8s agent manifest + tags: + - Fleet Kubernetes + /logstash_api_keys: + post: + operationId: generate-logstash-api-key + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + api_key: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Generate Logstash API key + tags: + - Fleet outputs + /outputs: + get: + operationId: get-outputs + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + items: items: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' + $ref: '#/components/schemas/Fleet_output_create_request' type: array page: - minimum: 0 type: integer - per_page: - minimum: 0 + perPage: type: integer total: - minimum: 0 type: integer - required: - - data - - page - - per_page - - total - - cursor - description: Successful response + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: List outputs + tags: + - Fleet outputs + post: + operationId: post-outputs + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Fleet_output_create_request' + required: true + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Finds lists + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_output_create_request' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Create output tags: - - Security Solution Lists API - /api/lists/index: + - Fleet outputs + '/outputs/{outputId}': delete: - operationId: DeleteListIndex + operationId: delete-output + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: @@ -6343,54 +6631,18 @@ paths: schema: type: object properties: - acknowledged: - type: boolean + id: + type: string required: - - acknowledged - description: Successful response + - id + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List data stream not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Deletes list data streams + $ref: '#/components/responses/Fleet_error' + summary: Delete output by ID tags: - - Security Solution Lists API + - Fleet outputs get: - operationId: ReadListIndex + operationId: get-output responses: '200': content: @@ -6398,57 +6650,83 @@ paths: schema: type: object properties: - list_index: - type: boolean - list_item_index: - type: boolean - required: - - list_index - - list_item_index - description: Successful response + item: + $ref: '#/components/schemas/Fleet_output_create_request' + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Get output by ID + tags: + - Fleet outputs + parameters: + - in: path + name: outputId + required: true + schema: + type: string + put: + operationId: update-output + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Fleet_output_update_request' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List data stream(s) not found response - '500': + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_output_update_request' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Update output by ID + tags: + - Fleet outputs + '/outputs/{outputId}/health': + get: + operationId: get-output-health + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Get list data stream existence status + type: object + properties: + message: + description: long message if unhealthy + type: string + state: + description: 'state of output, HEALTHY or DEGRADED' + type: string + timestamp: + description: timestamp of reported state + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get latest output health tags: - - Security Solution Lists API - post: - operationId: CreateListIndex + - Fleet outputs + parameters: + - in: path + name: outputId + required: true + schema: + type: string + /package_policies: + get: + operationId: get-package-policies + parameters: + - $ref: '#/components/parameters/Fleet_page_size' + - $ref: '#/components/parameters/Fleet_page_index' + - $ref: '#/components/parameters/Fleet_kuery' + - $ref: '#/components/parameters/Fleet_format' responses: '200': content: @@ -6456,951 +6734,925 @@ paths: schema: type: object properties: - acknowledged: - type: boolean + items: + items: + $ref: '#/components/schemas/Fleet_package_policy' + type: array + page: + type: number + perPage: + type: number + total: + type: number required: - - acknowledged - description: Successful response + - items + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: List package policies + tags: + - Fleet package policies + parameters: [] + post: + operationId: create-package-policy + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - $ref: '#/components/parameters/Fleet_format' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Fleet_package_policy_request' + description: >- + You should use inputs as an object and not use the deprecated inputs + array. + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_package_policy' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' '409': + $ref: '#/components/responses/Fleet_error' + summary: Create package policy + tags: + - Fleet package policies + /package_policies/_bulk_get: + post: + operationId: bulk-get-package-policies + parameters: + - $ref: '#/components/parameters/Fleet_format' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + ids: + description: list of package policy ids + items: + type: string + type: array + ignoreMissing: + type: boolean + required: + - ids + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List data stream exists response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Creates necessary list data streams + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_package_policy' + type: array + required: + - items + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Bulk get package policies tags: - - Security Solution Lists API - /api/lists/items: + - Fleet package policies + '/package_policies/{packagePolicyId}': delete: - operationId: DeleteListItem + operationId: delete-package-policy parameters: - - description: Required if `list_id` and `value` are not specified - in: query - name: id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - description: Required if `id` is not specified - in: query - name: list_id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - description: Required if `id` is not specified - in: query - name: value - required: false - schema: - type: string - - description: >- - Determines when changes made by the request are made visible to - search - in: query - name: refresh - required: false + - in: query + name: force schema: - default: 'false' - enum: - - 'true' - - 'false' - - wait_for - type: string + type: boolean responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItem' - - items: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItem - type: array - description: Successful response + type: object + properties: + id: + type: string + required: + - id + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List item not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Deletes a list item + $ref: '#/components/responses/Fleet_error' + summary: Delete package policy by ID tags: - - Security Solution Lists API + - Fleet package policies get: - operationId: ReadListItem + operationId: get-package-policy parameters: - - description: Required if `list_id` and `value` are not specified - in: query - name: id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - description: Required if `id` is not specified - in: query - name: list_id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - description: Required if `id` is not specified - in: query - name: value - required: false - schema: - type: string + - $ref: '#/components/parameters/Fleet_format' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItem' - - items: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItem - type: array - description: Successful response + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_package_policy' + required: + - item + description: OK '400': + $ref: '#/components/responses/Fleet_error' + summary: Get package policy by ID + tags: + - Fleet package policies + parameters: + - in: path + name: packagePolicyId + required: true + schema: + type: string + put: + operationId: update-package-policy + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + - $ref: '#/components/parameters/Fleet_format' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Fleet_package_policy_request' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List item not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Gets a list item + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_package_policy' + sucess: + type: boolean + required: + - item + - sucess + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Update package policy by ID tags: - - Security Solution Lists API - patch: - operationId: PatchListItem + - Fleet package policies + /package_policies/delete: + post: + operationId: post-delete-package-policy + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - _version: - type: string - id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItemId' - meta: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemMetadata - refresh: - description: >- - Determines when changes made by the request are made visible - to search - enum: - - 'true' - - 'false' - - wait_for - type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemValue + force: + type: boolean + packagePolicyIds: + items: + type: string + type: array required: - - id - description: List item's properties - required: true + - packagePolicyIds responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItem' - description: Successful response + items: + type: object + properties: + id: + type: string + name: + type: string + success: + type: boolean + required: + - id + - success + type: array + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List item not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Patches a list item + $ref: '#/components/responses/Fleet_error' + summary: Delete package policy tags: - - Security Solution Lists API + - Fleet package policies + /package_policies/upgrade: post: - operationId: CreateListItem + operationId: upgrade-package-policy requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItemId' - list_id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - meta: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemMetadata - refresh: - description: >- - Determines when changes made by the request are made visible - to search - enum: - - 'true' - - 'false' - - wait_for - type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemValue + packagePolicyIds: + items: + type: string + type: array required: - - list_id - - value - description: List item's properties - required: true + - packagePolicyIds responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItem' - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response - '401': + items: + type: object + properties: + id: + type: string + name: + type: string + success: + type: boolean + required: + - id + - success + type: array + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + '409': + $ref: '#/components/responses/Fleet_error' + summary: Upgrade package policy to a newer package version + tags: + - Fleet package policies + /package_policies/upgrade/dryrun: + post: + operationId: upgrade-package-policy-dry-run + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + packagePolicyIds: + items: + type: string + type: array + packageVersion: + type: string + required: + - packagePolicyIds + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response - '403': + items: + type: object + properties: + agent_diff: + $ref: '#/components/schemas/Fleet_upgrade_agent_diff' + diff: + $ref: '#/components/schemas/Fleet_upgrade_diff' + hasErrors: + type: boolean + required: + - hasErrors + type: array + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Dry run package policy upgrade + tags: + - Fleet package policies + /proxies: + get: + operationId: get-fleet-proxies + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '409': + type: object + properties: + items: + items: + $ref: '#/components/schemas/Fleet_proxies' + type: array + page: + type: integer + perPage: + type: integer + total: + type: integer + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: List proxies + tags: + - Fleet proxies + post: + operationId: post-fleet-proxies + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + certificate: + type: string + certificate_authorities: + type: string + certificate_key: + type: string + id: + type: string + name: + type: string + proxy_headers: + type: object + url: + type: string + required: + - name + - url + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List item already exists response - '500': + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_proxies' + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Create proxy + tags: + - Fleet proxies + '/proxies/{itemId}': + delete: + operationId: delete-fleet-proxies + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' + responses: + '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Creates a list item + type: object + properties: + id: + type: string + required: + - id + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Delete proxy by ID + tags: + - Fleet proxies + get: + operationId: get-one-fleet-proxies + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_proxies' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get proxy by ID tags: - - Security Solution Lists API + - Fleet proxies + parameters: + - in: path + name: itemId + required: true + schema: + type: string put: - operationId: UpdateListItem + operationId: update-fleet-proxies + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: type: object properties: - _version: + certificate: + type: string + certificate_authorities: + type: string + certificate_key: + type: string + name: + type: string + proxy_headers: + type: object + url: type: string - id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItemId' - meta: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemMetadata - value: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemValue - required: - - id - - value - description: List item's properties - required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItem' - description: Successful response + type: object + properties: + item: + $ref: '#/components/schemas/Fleet_proxies' + required: + - item + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Update proxy by ID + tags: + - Fleet proxies + '/s/{spaceId}/api/observability/slos': + get: + description: > + You must have the `read` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: findSlosOp + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - description: A valid kql query to filter the SLO with + example: 'slo.name:latency* and slo.tags : "prod"' + in: query + name: kqlQuery + schema: + type: string + - description: 'The page to use for pagination, must be greater or equal than 1' + example: 1 + in: query + name: page + schema: + default: 1 + type: integer + - description: Number of SLOs returned by page + example: 25 + in: query + name: perPage + schema: + default: 25 + maximum: 5000 + type: integer + - description: Sort by field + example: status + in: query + name: sortBy + schema: + default: status + enum: + - sli_value + - status + - error_budget_consumed + - error_budget_remaining + type: string + - description: Sort order + example: asc + in: query + name: sortDirection + schema: + default: asc + enum: + - asc + - desc + type: string + - description: >- + Hide stale SLOs from the list as defined by stale SLO threshold in + SLO settings + in: query + name: hideStale + schema: + type: boolean + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_find_slo_response' + description: Successful request '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List item not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Updates a list item + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Get a paginated list of SLOs tags: - - Security Solution Lists API - /api/lists/items/_export: + - slo post: - description: Exports list item values from the specified list - operationId: ExportListItems + description: > + You must have `all` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: createSloOp parameters: - - description: List's id to export - in: query - name: list_id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_create_slo_request' + required: true responses: '200': content: - application/ndjson; Elastic-Api-Version=2023-10-31: + application/json; Elastic-Api-Version=2023-10-31: schema: - description: A `.txt` file containing list items from the specified list - format: binary - type: string - description: Successful response + $ref: '#/components/schemas/SLOs_create_slo_response' + description: Successful request '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '404': + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response + '409': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List not found response - '500': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Exports list items + $ref: '#/components/schemas/SLOs_409_response' + description: Conflict - The SLO id already exists + summary: Create an SLO tags: - - Security Solution Lists API - /api/lists/items/_find: - get: - operationId: FindListItems + - slo + '/s/{spaceId}/api/observability/slos/_delete_instances': + post: + 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. + operationId: deleteSloInstancesOp parameters: - - description: List's id - in: query - name: list_id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - description: The page number to return - in: query - name: page - required: false - schema: - type: integer - - description: The number of list items to return per page - in: query - name: per_page - required: false - schema: - type: integer - - description: Determines which field is used to sort the results - in: query - name: sort_field - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - - description: 'Determines the sort order, which can be `desc` or `asc`' - in: query - name: sort_order - required: false - schema: - enum: - - desc - - asc - type: string - - description: > - Returns the list that come after the last list returned in the - previous call - - (use the cursor value returned in the previous call). This parameter - uses - - the `tie_breaker_id` field to ensure all lists are sorted and - returned correctly. - in: query - name: cursor - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_FindListItemsCursor - - description: > - Filters the returned results according to the value of the specified - field, - - using the : syntax. - in: query - name: filter - required: false - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_FindListItemsFilter + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_delete_slo_instances_request' + required: true responses: - '200': + '204': + description: Successful request + '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - type: object - properties: - cursor: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_FindListItemsCursor - data: - items: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItem - type: array - page: - minimum: 0 - type: integer - per_page: - minimum: 0 - type: integer - total: - minimum: 0 - type: integer - required: - - data - - page - - per_page - - total - - cursor - description: Successful response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request + '401': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response + '403': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response + summary: Batch delete rollup and summary data + tags: + - slo + '/s/{spaceId}/api/observability/slos/{sloId}': + delete: + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: deleteSloOp + 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': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '500': + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response + '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Finds list items + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Delete an SLO tags: - - Security Solution Lists API - /api/lists/items/_import: - post: + - slo + get: description: > - Imports a list of items from a `.txt` or `.csv` file. The maximum file - size is 9 million bytes. - - - You can import items to a new or existing list. - operationId: ImportListItems + You must have the `read` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: getSloOp parameters: - - description: | - List's id. - - Required when importing to an existing list. - in: query - name: list_id - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - - description: > - Type of the importing list. - - - Required when importing a new list that is `list_id` is not - specified. - in: query - name: type - required: false - schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListType' - - in: query - name: serializer - required: false - schema: - type: string - - in: query - name: deserializer - required: false - schema: - type: string - - description: >- - Determines when changes made by the request are made visible to - search + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' + - description: the specific instanceId used by the summary calculation + example: host-abcde in: query - name: refresh - required: false + name: instanceId schema: - enum: - - 'true' - - 'false' - - wait_for type: string - requestBody: - content: - multipart/form-data; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - file: - description: >- - A `.txt` or `.csv` file containing newline separated list - items - format: binary - type: string - required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Security_Solution_Lists_API_List' - description: Successful response + $ref: '#/components/schemas/SLOs_slo_with_summary_response' + description: Successful request '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: List with specified list_id does not exist response - '500': + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response + '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Imports list items + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Get an SLO tags: - - Security Solution Lists API - /api/lists/privileges: - get: - operationId: ReadListPrivileges + - slo + put: + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: updateSloOp + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' + requestBody: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_update_slo_request' + required: true responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - type: object - properties: - is_authenticated: - type: boolean - listItems: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListItemPrivileges - lists: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_ListPrivileges - required: - - lists - - listItems - - is_authenticated - description: Successful response + $ref: '#/components/schemas/SLOs_slo_definition_response' + description: Successful request '400': content: application/json; Elastic-Api-Version=2023-10-31: schema: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Invalid input data response + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Unsuccessful authentication response + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response '403': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_PlatformErrorResponse - description: Not enough privileges response - '500': + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response + '404': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Lists_API_SiemErrorResponse - description: Internal server error response - summary: Gets list privileges + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Update an SLO tags: - - Security Solution Lists API - /api/ml/saved_objects/sync: - get: + - slo + '/s/{spaceId}/api/observability/slos/{sloId}/_reset': + post: 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 - parameters: - - $ref: '#/components/parameters/Machine_learning_APIs_simulateParam' + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: resetSloOp + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' responses: - '200': + '204': content: application/json; Elastic-Api-Version=2023-10-31: - examples: - syncExample: - $ref: '#/components/examples/Machine_learning_APIs_mlSyncExample' schema: - $ref: '#/components/schemas/Machine_learning_APIs_mlSync200Response' - description: Indicates a successful call + $ref: '#/components/schemas/SLOs_slo_definition_response' + description: Successful request + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request '401': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: '#/components/schemas/Machine_learning_APIs_mlSync4xxResponse' - description: Authorization information is missing or invalid. - summary: Sync saved objects in the default space + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response + '403': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response + '404': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Reset an SLO tags: - - ml - /api/note: - delete: - operationId: DeleteNote - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - oneOf: - - nullable: true - type: object - properties: - noteId: - type: string - required: - - noteId - - type: object - properties: - noteIds: - items: - type: string - nullable: true - type: array - required: - - noteIds - description: The id of the note to delete. - required: true + - slo + '/s/{spaceId}/api/observability/slos/{sloId}/disable': + post: + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: disableSloOp + 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': content: application/json; Elastic-Api-Version=2023-10-31: schema: - type: object - properties: - data: - type: object - description: Indicates the note was successfully deleted. - summary: Deletes a note from a timeline. + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request + '401': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response + '403': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response + '404': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Disable an SLO tags: - - Security Solution Timeline API - - 'access:securitySolution' - get: - description: Gets notes - operationId: GetNotes + - slo + '/s/{spaceId}/api/observability/slos/{sloId}/enable': + post: + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + operationId: enableSloOp parameters: - - in: query - name: documentIds - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Timeline_API_DocumentIds' - - in: query - name: page - schema: - nullable: true - type: number - - in: query - name: perPage - schema: - nullable: true - type: number - - in: query - name: search - schema: - nullable: true - type: string - - in: query - name: sortField - schema: - nullable: true - type: string - - in: query - name: sortOrder - schema: - nullable: true - type: string - - in: query - name: filter - schema: - nullable: true - type: string + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' + responses: + '204': + description: Successful request + '400': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_400_response' + description: Bad request + '401': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_401_response' + description: Unauthorized response + '403': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_403_response' + description: Unauthorized response + '404': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/SLOs_404_response' + description: Not found response + summary: Enable an SLO + tags: + - slo + /service_tokens: + post: + operationId: generate-service-token + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': - description: Indicates the requested notes were returned. - summary: Get all notes for a given document. + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + name: + type: string + value: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Create service token tags: - - Security Solution Timeline API - - 'access:securitySolution' - patch: - operationId: PersistNoteRoute - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - eventDataView: - nullable: true - type: string - eventIngested: - nullable: true - type: string - eventTimestamp: - nullable: true - type: string - note: - $ref: '#/components/schemas/Security_Solution_Timeline_API_BareNote' - noteId: - nullable: true - type: string - overrideOwner: - nullable: true - type: boolean - version: - nullable: true - type: string - required: - - note - description: The note to persist or update along with additional metadata. - required: true + - Fleet service tokens + /service-tokens: + post: + deprecated: true + operationId: generate-service-token-deprecated + parameters: + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: @@ -7408,362 +7660,178 @@ paths: schema: type: object properties: - data: - type: object - properties: - persistNote: - type: object - properties: - code: - type: number - message: - type: string - note: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_Note - required: - - code - - message - - note - required: - - persistNote - required: - - data - description: Indicates the note was successfully created. - summary: Persists a note to a timeline. + name: + type: string + value: + type: string + description: OK + '400': + $ref: '#/components/responses/Fleet_error' + summary: Create service token tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/osquery/live_queries: + - Fleet service tokens + /settings: get: - operationId: OsqueryFindLiveQueries - parameters: - - in: query - name: query - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_FindLiveQueryRequestQuery + operationId: get-settings responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse + $ref: '#/components/schemas/Fleet_fleet_settings_response' description: OK - summary: Find live queries + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get settings tags: - - Security Solution Osquery API - post: - operationId: OsqueryCreateLiveQuery + - Fleet internals + put: + operationId: update-settings requestBody: content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_CreateLiveQueryRequestBody - required: true + type: object + properties: + additional_yaml_config: + type: string + fleet_server_hosts: + description: Protocol and path must be the same for each URL + items: + type: string + type: array + has_seen_add_data_notice: + type: boolean responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse + $ref: '#/components/schemas/Fleet_fleet_settings_response' description: OK - summary: Create a live query + '400': + $ref: '#/components/responses/Fleet_error' + summary: Update settings tags: - - Security Solution Osquery API - '/api/osquery/live_queries/{id}': + - Fleet internals + /settings/enrollment: get: - operationId: OsqueryGetLiveQueryDetails + operationId: get-enrollment-settings parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Id' - - in: query - name: query + - description: >- + An agent policy ID to scope the enrollment settings to. For example, + that policy's Fleet Server host, its proxy, download location, etc. + If not provided, the default Fleet Server policy is used (if any). + in: query + name: agentPolicyId + required: false schema: - additionalProperties: true - type: object + type: string responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse + $ref: '#/components/schemas/Fleet_fleet_settings_enrollment_response' description: OK - summary: Get live query details + '400': + $ref: '#/components/responses/Fleet_error' + summary: Get enrollment settings tags: - - Security Solution Osquery API - '/api/osquery/live_queries/{id}/results/{actionId}': - get: - operationId: OsqueryGetLiveQueryResults + - Fleet internals + /setup: + post: + operationId: setup parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Id' - - in: path - name: actionId - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Id' - - in: query - name: query - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_GetLiveQueryResultsRequestQuery - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Get live query results - tags: - - Security Solution Osquery API - /api/osquery/packs: - get: - operationId: OsqueryFindPacks - parameters: - - in: query - name: query - required: true - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_FindPacksRequestQuery - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Find packs - tags: - - Security Solution Osquery API - post: - operationId: OsqueryCreatePacks - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_CreatePacksRequestBody - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Create a packs - tags: - - Security Solution Osquery API - '/api/osquery/packs/{id}': - delete: - operationId: OsqueryDeletePacks - parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackId' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Delete packs - tags: - - Security Solution Osquery API - get: - operationId: OsqueryGetPacksDetails - parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackId' + - $ref: '#/components/parameters/Fleet_kbn_xsrf' responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse + $ref: '#/components/schemas/Fleet_fleet_setup_response' description: OK - summary: Get packs details - tags: - - Security Solution Osquery API - put: - operationId: OsqueryUpdatePacks - parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackId' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_UpdatePacksRequestBody - required: true - responses: - '200': + '400': + $ref: '#/components/responses/Fleet_error' + '500': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Update packs + type: object + properties: + message: + type: string + description: Internal Server Error + summary: Initiate Fleet setup tags: - - Security Solution Osquery API - /api/osquery/saved_queries: + - Fleet internals + /uninstall_tokens: get: - operationId: OsqueryFindSavedQueries + operationId: get-uninstall-tokens parameters: - - in: query - name: query - required: true + - description: The number of items to return + in: query + name: perPage + required: false schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_FindSavedQueryRequestQuery - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Find saved queries - tags: - - Security Solution Osquery API - post: - operationId: OsqueryCreateSavedQuery - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_CreateSavedQueryRequestBody - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Create a saved query - tags: - - Security Solution Osquery API - '/api/osquery/saved_queries/{id}': - delete: - operationId: OsqueryDeleteSavedQuery - parameters: - - in: path - name: id - required: true + default: 20 + minimum: 5 + type: integer + - $ref: '#/components/parameters/Fleet_page_index' + - description: Partial match filtering for policy IDs + in: query + name: policyId + required: false schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SavedQueryId' + type: string responses: '200': content: application/json; Elastic-Api-Version=2023-10-31: schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse + type: object + properties: + items: + items: + type: object + properties: + created_at: + type: string + id: + type: string + policy_id: + type: string + required: + - id + - policy_id + - created_at + type: array + page: + type: number + perPage: + type: number + total: + type: number + required: + - items + - total + - page + - perPage description: OK - summary: Delete saved query + '400': + $ref: '#/components/responses/Fleet_error' + summary: List metadata for latest uninstall tokens per agent policy tags: - - Security Solution Osquery API + - Fleet uninstall tokens + '/uninstall_tokens/{uninstallTokenId}': get: - operationId: OsqueryGetSavedQueryDetails - parameters: - - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SavedQueryId' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Get saved query details - tags: - - Security Solution Osquery API - put: - operationId: OsqueryUpdateSavedQuery + operationId: get-uninstall-token parameters: - in: path - name: id + name: uninstallTokenId required: true schema: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SavedQueryId' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_UpdateSavedQueryRequestBody - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DefaultSuccessResponse - description: OK - summary: Update saved query - tags: - - Security Solution Osquery API - /api/pinned_event: - patch: - operationId: PersistPinnedEventRoute - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - eventId: - type: string - pinnedEventId: - nullable: true - type: string - timelineId: - type: string - required: - - eventId - - timelineId - description: The pinned event to persist or update along with additional metadata. - required: true + type: string responses: '200': content: @@ -7771,20065 +7839,12675 @@ paths: schema: type: object properties: - data: + item: type: object properties: - persistPinnedEventOnTimeline: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_PinnedEvent - - type: object - properties: - code: - type: number - message: - type: string + created_at: + type: string + id: + type: string + policy_id: + type: string + token: + type: string required: - - persistPinnedEventOnTimeline + - id + - token + - policy_id + - created_at required: - - data - description: Indicate the event was successfully pinned in the timeline. - summary: Persists a pinned event to a timeline. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/saved_objects/_bulk_create: - post: - deprecated: true - operationId: bulkCreateSavedObjects - parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - - description: 'When true, overwrites the document with the same identifier.' - in: query - name: overwrite - schema: - type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - items: - type: object - type: array - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - description: Indicates a successful call. + - item + description: OK '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - description: Bad request - summary: Create saved objects + $ref: '#/components/responses/Fleet_error' + summary: Get one decrypted uninstall token by its ID tags: - - saved objects - /api/saved_objects/_bulk_delete: - post: - deprecated: true - description: | - WARNING: When you delete a saved object, it cannot be recovered. - operationId: bulkDeleteSavedObjects - parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - - 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. - in: query - name: force - schema: - type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - items: - type: object - type: array - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - 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. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - description: Bad request - summary: Delete saved objects - tags: - - saved objects - /api/saved_objects/_bulk_get: - post: - deprecated: true - operationId: bulkGetSavedObjects - parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - items: - type: object - type: array - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - description: Bad request - summary: Get saved objects - tags: - - saved objects - /api/saved_objects/_bulk_resolve: - post: - 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. - operationId: bulkResolveSavedObjects - parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - items: - type: object - type: array - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - 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. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - description: Bad request - summary: Resolve saved objects - tags: - - saved objects - /api/saved_objects/_bulk_update: - post: - deprecated: true - description: Update the attributes for multiple Kibana saved objects. - operationId: bulkUpdateSavedObjects - parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - items: - type: object - type: array - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - 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. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - description: Bad request - summary: Update saved objects - tags: - - saved objects - /api/saved_objects/_export: - post: - 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. - operationId: exportSavedObjectsDefault - parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - examples: - exportSavedObjectsRequest: - $ref: '#/components/examples/Saved_objects_export_objects_request' - schema: - type: object - properties: - excludeExportDetails: - default: false - description: Do not add export details entry at the end of the stream. - type: boolean - includeReferencesDeep: - description: >- - Includes all of the referenced objects in the exported - objects. - type: boolean - objects: - description: A list of objects to export. - items: - type: object - type: array - type: - description: >- - The saved object types to include in the export. Use `*` to - export all the types. - oneOf: - - type: string - - items: - type: string - type: array - required: true - responses: - '200': - content: - application/x-ndjson; Elastic-Api-Version=2023-10-31: - examples: - exportSavedObjectsResponse: - $ref: '#/components/examples/Saved_objects_export_objects_response' - schema: - additionalProperties: true - type: object - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - description: Bad request. - summary: Export saved objects - tags: - - saved objects - /api/saved_objects/_find: - get: - deprecated: true - description: Retrieve a paginated set of Kibana saved objects. - operationId: findSavedObjects - parameters: - - 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. - in: query - name: aggs - schema: - type: string - - description: The default operator to use for the `simple_query_string`. - in: query - name: default_search_operator - schema: - type: string - - description: The fields to return in the attributes key of the response. - in: query - name: fields - schema: - oneOf: - - type: string - - type: array - - 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`. - in: query - name: filter - schema: - type: string - - description: >- - Filters to objects that do not have a relationship with the type and - identifier combination. - in: query - name: has_no_reference - schema: - type: object - - description: >- - The operator to use for the `has_no_reference` parameter. Either - `OR` or `AND`. Defaults to `OR`. - in: query - name: has_no_reference_operator - schema: - type: string - - description: >- - Filters to objects that have a relationship with the type and ID - combination. - in: query - name: has_reference - schema: - type: object - - description: >- - The operator to use for the `has_reference` parameter. Either `OR` - or `AND`. Defaults to `OR`. - in: query - name: has_reference_operator - schema: - type: string - - description: The page of objects to return. - in: query - name: page - schema: - type: integer - - description: The number of objects to return per page. - in: query - name: per_page - schema: - type: integer - - description: >- - An Elasticsearch `simple_query_string` query that filters the - objects in the response. - in: query - name: search - schema: - type: string - - description: >- - The fields to perform the `simple_query_string` parsed query - against. - in: query - name: search_fields - schema: - oneOf: - - type: string - - type: array - - 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. - in: query - name: sort_field - schema: - type: string - - description: The saved object types to include. - in: query - name: type - required: true - schema: - oneOf: - - type: string - - type: array - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - description: Bad request - summary: Search for saved objects - tags: - - saved objects - /api/saved_objects/_import: - post: - 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. - operationId: importSavedObjectsDefault - parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - - 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: createNewCopies - required: false - schema: - type: boolean - - 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: overwrite - required: false - schema: - type: boolean - - 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. - in: query - name: compatibilityMode - required: false - schema: - type: boolean - requestBody: - content: - multipart/form-data; Elastic-Api-Version=2023-10-31: - examples: - importObjectsRequest: - $ref: '#/components/examples/Saved_objects_import_objects_request' - 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. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - examples: - importObjectsResponse: - $ref: '#/components/examples/Saved_objects_import_objects_response' - schema: - type: object - properties: - errors: - 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. - items: - type: object - type: array - success: - 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. - type: boolean - successCount: - description: Indicates the number of successfully imported records. - type: integer - successResults: - 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. - items: - type: object - type: array - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - description: Bad request. - summary: Import saved objects - tags: - - saved objects - /api/saved_objects/_resolve_import_errors: - post: - 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. - operationId: resolveImportErrors - parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - - 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: compatibilityMode - required: false - schema: - type: boolean - - 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. - in: query - name: createNewCopies - required: false - schema: - type: boolean - requestBody: - content: - multipart/form-data; Elastic-Api-Version=2023-10-31: - examples: - resolveImportErrorsRequest: - $ref: >- - #/components/examples/Saved_objects_resolve_missing_reference_request - schema: - type: object - properties: - file: - description: The same file given to the import API. - format: binary - type: string - retries: - description: >- - The retry operations, which can specify how to resolve - different types of errors. - items: - type: object - properties: - destinationId: - description: >- - Specifies the destination ID that the imported object - should have, if different from the current ID. - type: string - id: - description: The saved object ID. - type: string - ignoreMissingReferences: - description: >- - When set to `true`, ignores missing reference errors. - When set to `false`, does nothing. - type: boolean - overwrite: - description: >- - When set to `true`, the source object overwrites the - conflicting destination object. When set to `false`, - does nothing. - type: boolean - replaceReferences: - description: >- - A list of `type`, `from`, and `to` used to change the - object references. - items: - type: object - properties: - from: - type: string - to: - type: string - type: - type: string - type: array - type: - description: The saved object type. - type: string - required: - - type - - id - type: array - required: - - retries - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - examples: - resolveImportErrorsResponse: - $ref: >- - #/components/examples/Saved_objects_resolve_missing_reference_response - schema: - type: object - properties: - errors: - 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 - type: array - success: - 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. - type: boolean - successCount: - description: | - Indicates the number of successfully resolved records. - type: number - successResults: - 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 - type: array - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - description: Bad request. - summary: Resolve import errors - tags: - - saved objects - '/api/saved_objects/{type}': - post: - deprecated: true - description: Create a Kibana saved object with a randomly generated identifier. - operationId: createSavedObject - parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - - $ref: '#/components/parameters/Saved_objects_saved_object_type' - - description: 'If true, overwrites the document with the same identifier.' - in: query - name: overwrite - schema: - type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - attributes: - $ref: '#/components/schemas/Saved_objects_attributes' - initialNamespaces: - $ref: '#/components/schemas/Saved_objects_initial_namespaces' - references: - $ref: '#/components/schemas/Saved_objects_references' - required: - - attributes - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - description: Indicates a successful call. - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - description: Indicates a conflict error. - summary: Create a saved object - tags: - - saved objects - '/api/saved_objects/{type}/{id}': - get: - deprecated: true - description: Retrieve a single Kibana saved object by identifier. - operationId: getSavedObject - parameters: - - $ref: '#/components/parameters/Saved_objects_saved_object_id' - - $ref: '#/components/parameters/Saved_objects_saved_object_type' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - description: Bad request. - summary: Get a saved object - tags: - - saved objects - post: - deprecated: true - description: >- - Create a Kibana saved object and specify its identifier instead of using - a randomly generated ID. - operationId: createSavedObjectId - parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - - $ref: '#/components/parameters/Saved_objects_saved_object_id' - - $ref: '#/components/parameters/Saved_objects_saved_object_type' - - description: 'If true, overwrites the document with the same identifier.' - in: query - name: overwrite - schema: - type: boolean - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - attributes: - $ref: '#/components/schemas/Saved_objects_attributes' - initialNamespaces: - $ref: '#/components/schemas/Saved_objects_initial_namespaces' - references: - $ref: '#/components/schemas/Saved_objects_initial_namespaces' - required: - - attributes - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - description: Indicates a successful call. - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - description: Indicates a conflict error. - summary: Create a saved object - tags: - - saved objects - put: - deprecated: true - description: Update the attributes for Kibana saved objects. - operationId: updateSavedObject - 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: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - description: Indicates a successful call. - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - description: Indicates the object was not found. - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - description: Indicates a conflict error. - summary: Update a saved object - tags: - - saved objects - '/api/saved_objects/resolve/{type}/{id}': - get: - deprecated: true - 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. - operationId: resolveSavedObject - parameters: - - $ref: '#/components/parameters/Saved_objects_saved_object_id' - - $ref: '#/components/parameters/Saved_objects_saved_object_type' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - description: Bad request. - summary: Resolve a saved object - tags: - - saved objects - /api/security_ai_assistant/anonymization_fields/_bulk_action: - post: - description: >- - The bulk action is applied to all anonymization fields that match the - filter or to the list of anonymization fields by their IDs. - operationId: PerformAnonymizationFieldsBulkAction - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - create: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldCreateProps - type: array - delete: - type: object - properties: - ids: - description: Array of anonymization fields IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter anonymization fields - type: string - update: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldUpdateProps - type: array - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResponse - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Applies a bulk action to multiple anonymization fields - tags: - - Security AI Assistant API - - Bulk API - /api/security_ai_assistant/anonymization_fields/_find: - get: - description: Finds anonymization fields that match the given query. - operationId: FindAnonymizationFields - parameters: - - in: query - name: fields - required: false - schema: - items: - type: string - type: array - - description: Search query - in: query - name: filter - required: false - schema: - type: string - - description: Field to sort by - in: query - name: sort_field - required: false - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_FindAnonymizationFieldsSortField - - description: Sort order - in: query - name: sort_order - required: false - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_SortOrder' - - description: Page number - in: query - name: page - required: false - schema: - default: 1 - minimum: 1 - type: integer - - description: AnonymizationFields per page - in: query - name: per_page - required: false - schema: - default: 20 - minimum: 0 - type: integer - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldResponse - type: array - page: - type: integer - perPage: - type: integer - total: - type: integer - required: - - page - - perPage - - total - - data - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Finds anonymization fields that match the given query. - tags: - - Security AI Assistant API - - AnonymizationFields API - /api/security_ai_assistant/chat/complete: - post: - description: Creates a model response for the given chat conversation. - operationId: ChatComplete - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_ChatCompleteProps' - required: true - responses: - '200': - content: - application/octet-stream; Elastic-Api-Version=2023-10-31: - schema: - format: binary - type: string - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Creates a model response for the given chat conversation. - tags: - - Security AI Assistant API - - Chat Complete API - /api/security_ai_assistant/current_user/conversations: - post: - description: Create a conversation - operationId: CreateConversation - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationCreateProps - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationResponse - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Create a conversation - tags: - - Security AI Assistant API - - Conversation API - /api/security_ai_assistant/current_user/conversations/_find: - get: - description: Finds conversations that match the given query. - operationId: FindConversations - parameters: - - in: query - name: fields - required: false - schema: - items: - type: string - type: array - - description: Search query - in: query - name: filter - required: false - schema: - type: string - - description: Field to sort by - in: query - name: sort_field - required: false - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_FindConversationsSortField - - description: Sort order - in: query - name: sort_order - required: false - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_SortOrder' - - description: Page number - in: query - name: page - required: false - schema: - default: 1 - minimum: 1 - type: integer - - description: Conversations per page - in: query - name: per_page - required: false - schema: - default: 20 - minimum: 0 - type: integer - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationResponse - type: array - page: - type: integer - perPage: - type: integer - total: - type: integer - required: - - page - - perPage - - total - - data - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Finds conversations that match the given query. - tags: - - Security AI Assistant API - - Conversations API - '/api/security_ai_assistant/current_user/conversations/{id}': - delete: - description: Deletes a single conversation using the `id` field. - operationId: DeleteConversation - parameters: - - description: The conversation's `id` value. - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationResponse - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Deletes a single conversation using the `id` field. - tags: - - Security AI Assistant API - - Conversation API - get: - description: Read a single conversation - operationId: ReadConversation - parameters: - - description: The conversation's `id` value. - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationResponse - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Read a single conversation - tags: - - Security AI Assistant API - - Conversations API - put: - description: Update a single conversation - operationId: UpdateConversation - parameters: - - description: The conversation's `id` value. - in: path - name: id - required: true - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationUpdateProps - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationResponse - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Update a conversation - tags: - - Security AI Assistant API - - Conversation API - /api/security_ai_assistant/prompts/_bulk_action: - post: - description: >- - The bulk action is applied to all prompts that match the filter or to - the list of prompts by their IDs. - operationId: PerformPromptsBulkAction - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - create: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptCreateProps - type: array - delete: - type: object - properties: - ids: - description: Array of prompts IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter promps - type: string - update: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptUpdateProps - type: array - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptsBulkCrudActionResponse - description: Indicates a successful call. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Applies a bulk action to multiple prompts - tags: - - Security AI Assistant API - - Bulk API - /api/security_ai_assistant/prompts/_find: - get: - description: Finds prompts that match the given query. - operationId: FindPrompts - parameters: - - in: query - name: fields - required: false - schema: - items: - type: string - type: array - - description: Search query - in: query - name: filter - required: false - schema: - type: string - - description: Field to sort by - in: query - name: sort_field - required: false - schema: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_FindPromptsSortField - - description: Sort order - in: query - name: sort_order - required: false - schema: - $ref: '#/components/schemas/Security_AI_Assistant_API_SortOrder' - - description: Page number - in: query - name: page - required: false - schema: - default: 1 - minimum: 1 - type: integer - - description: Prompts per page - in: query - name: per_page - required: false - schema: - default: 20 - minimum: 0 - type: integer - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptResponse - type: array - page: - type: integer - perPage: - type: integer - total: - type: integer - required: - - page - - perPage - - total - - data - description: Successful response - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - error: - type: string - message: - type: string - statusCode: - type: number - description: Generic Error - summary: Finds prompts that match the given query. - tags: - - Security AI Assistant API - - Prompts API - /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 - /api/timeline: - delete: - operationId: DeleteTimelines - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - savedObjectIds: - items: - type: string - type: array - searchIds: - description: >- - Saved search ids that should be deleted alongside the - timelines - items: - type: string - type: array - required: - - savedObjectIds - description: The ids of the timelines or timeline templates to delete. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - deleteTimeline: - type: boolean - required: - - deleteTimeline - required: - - data - description: Indicates the timeline was successfully deleted. - summary: Deletes one or more timelines or timeline templates. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - get: - operationId: GetTimeline - parameters: - - description: The ID of the template timeline to retrieve - in: query - name: template_timeline_id - schema: - type: string - - description: The ID of the timeline to retrieve - in: query - name: id - schema: - type: string - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - getOneTimeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - nullable: true - required: - - getOneTimeline - required: - - data - description: Indicates that the (template) timeline was found and returned. - summary: >- - Get an existing saved timeline or timeline template. This API is used to - retrieve an existing saved timeline or timeline template. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - patch: - description: >- - Updates an existing timeline. This API is used to update the title, - description, date range, pinned events, pinned queries, and/or pinned - saved queries of an existing timeline. - operationId: PatchTimeline - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - timeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_SavedTimeline - timelineId: - nullable: true - type: string - version: - nullable: true - type: string - required: - - timelineId - - version - - timeline - description: The timeline updates along with the timeline ID and version. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - persistTimeline: - type: object - properties: - timeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - required: - - timeline - required: - - persistTimeline - required: - - data - description: >- - Indicates that the draft timeline was successfully created. In the - event the user already has a draft timeline, the existing draft - timeline is cleared and returned. - '405': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - body: - type: string - statusCode: - type: number - description: >- - Indicates that the user does not have the required access to create - a draft timeline. - summary: Updates an existing timeline. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - post: - operationId: CreateTimelines - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - status: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineStatus - nullable: true - templateTimelineId: - nullable: true - type: string - templateTimelineVersion: - nullable: true - type: number - timeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_SavedTimeline - timelineId: - nullable: true - type: string - timelineType: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineType - nullable: true - version: - nullable: true - type: string - required: - - timeline - description: >- - The required timeline fields used to create a new timeline along with - optional fields that will be created if not provided. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - persistTimeline: - type: object - properties: - timeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - required: - - persistTimeline - required: - - data - description: Indicates the timeline was successfully created. - '405': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - body: - type: string - statusCode: - type: number - description: Indicates that there was an error in the timeline creation. - summary: Creates a new timeline. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timeline/_draft: - get: - operationId: GetDraftTimelines - parameters: - - in: query - name: timelineType - required: true - schema: - $ref: '#/components/schemas/Security_Solution_Timeline_API_TimelineType' - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - persistTimeline: - type: object - properties: - timeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - required: - - timeline - required: - - persistTimeline - required: - - data - description: Indicates that the draft timeline was successfully retrieved. - '403': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - message: - type: string - status_code: - type: number - description: >- - If a draft timeline was not found and we attempted to create one, it - indicates that the user does not have the required permissions to - create a draft timeline. - '409': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - message: - type: string - status_code: - type: number - description: >- - This should never happen, but if a draft timeline was not found and - we attempted to create one, it indicates that there is already a - draft timeline with the given timelineId. - summary: >- - Retrieves the draft timeline for the current user. If the user does not - have a draft timeline, an empty timeline is returned. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - post: - description: > - Retrieves a clean draft timeline. If a draft timeline does not exist, it - is created and returned. - operationId: CleanDraftTimelines - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - timelineType: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineType - required: - - timelineType - description: >- - The type of timeline to create. Valid values are `default` and - `template`. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - persistTimeline: - type: object - properties: - timeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - required: - - timeline - required: - - persistTimeline - required: - - data - description: >- - Indicates that the draft timeline was successfully created. In the - event the user already has a draft timeline, the existing draft - timeline is cleared and returned. - '403': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - message: - type: string - status_code: - type: number - description: >- - Indicates that the user does not have the required permissions to - create a draft timeline. - '409': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - message: - type: string - status_code: - type: number - description: >- - Indicates that there is already a draft timeline with the given - timelineId. - summary: Retrieves a draft timeline or timeline template. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timeline/_export: - post: - operationId: ExportTimelines - parameters: - - description: The name of the file to export - in: query - name: file_name - required: true - schema: - type: string - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - ids: - items: - type: string - nullable: true - type: array - description: The ids of the timelines to export - required: true - responses: - '200': - content: - application/ndjson; Elastic-Api-Version=2023-10-31: - schema: - description: NDJSON of the exported timelines - type: string - description: Indicates the timelines were successfully exported - '400': - content: - application/ndjson; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - body: - type: string - statusCode: - type: number - description: Indicates that the export size limit was exceeded - summary: Exports timelines as an NDJSON file - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timeline/_favorite: - patch: - operationId: PersistFavoriteRoute - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - templateTimelineId: - nullable: true - type: string - templateTimelineVersion: - nullable: true - type: number - timelineId: - nullable: true - type: string - timelineType: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineType - nullable: true - required: - - timelineId - - templateTimelineId - - templateTimelineVersion - - timelineType - description: The required fields used to favorite a (template) timeline. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - persistFavorite: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_FavoriteTimelineResponse - required: - - persistFavorite - required: - - data - description: Indicates the favorite status was successfully updated. - '403': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - body: - type: string - statusCode: - type: number - description: >- - Indicates the user does not have the required permissions to persist - the favorite status. - summary: Persists a given users favorite status of a timeline. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timeline/_import: - post: - operationId: ImportTimelines - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - file: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_Readable - - type: object - properties: - hapi: - type: object - properties: - filename: - type: string - headers: - type: object - isImmutable: - enum: - - 'true' - - 'false' - type: string - required: - - filename - - headers - required: - - hapi - description: The timelines to import as a readable stream. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_ImportTimelineResult - required: - - data - description: Indicates the import of timelines was successful. - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - body: - type: string - id: - type: string - statusCode: - type: number - description: >- - Indicates the import of timelines was unsuccessful because of an - invalid file extension. - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - id: - type: string - statusCode: - type: number - description: >- - Indicates that we were unable to locate the saved object client - necessary to handle the import. - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - body: - type: string - id: - type: string - statusCode: - type: number - description: Indicates the import of timelines was unsuccessful. - summary: Imports timelines. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timeline/_prepackaged: - post: - operationId: InstallPrepackedTimelines - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - prepackagedTimelines: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_SavedTimeline - type: array - timelinesToInstall: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_ImportTimelines - nullable: true - type: array - timelinesToUpdate: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_ImportTimelines - nullable: true - type: array - required: - - timelinesToInstall - - timelinesToUpdate - - prepackagedTimelines - description: The timelines to install or update. - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_ImportTimelineResult - required: - - data - description: Indicates the installation of prepackaged timelines was successful. - '500': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - body: - type: string - statusCode: - type: number - description: >- - Indicates the installation of prepackaged timelines was - unsuccessful. - summary: Installs prepackaged timelines. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timeline/resolve: - get: - operationId: ResolveTimeline - parameters: - - description: The ID of the template timeline to resolve - in: query - name: template_timeline_id - schema: - type: string - - description: The ID of the timeline to resolve - in: query - name: id - schema: - type: string - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - getOneTimeline: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - nullable: true - required: - - getOneTimeline - required: - - data - description: The (template) timeline has been found - '400': - description: The request is missing parameters - '404': - description: The (template) timeline was not found - summary: Get an existing saved timeline or timeline template. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - /api/timelines: - get: - operationId: GetTimelines - parameters: - - description: >- - If true, only timelines that are marked as favorites by the user are - returned. - in: query - name: only_user_favorite - schema: - enum: - - 'true' - - 'false' - nullable: true - type: string - - in: query - name: timeline_type - schema: - $ref: '#/components/schemas/Security_Solution_Timeline_API_TimelineType' - nullable: true - - in: query - name: sort_field - schema: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_SortFieldTimeline - - in: query - name: sort_order - schema: - enum: - - asc - - desc - type: string - - in: query - name: page_size - schema: - nullable: true - type: string - - in: query - name: page_index - schema: - nullable: true - type: string - - in: query - name: search - schema: - nullable: true - type: string - - in: query - name: status - schema: - $ref: '#/components/schemas/Security_Solution_Timeline_API_TimelineStatus' - nullable: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - type: object - properties: - data: - type: object - properties: - customTemplateTimelineCount: - type: number - defaultTimelineCount: - type: number - elasticTemplateTimelineCount: - type: number - favoriteCount: - type: number - templateTimelineCount: - type: number - timelines: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_TimelineResponse - type: array - totalCount: - type: number - required: - - timelines - - totalCount - - defaultTimelineCount - - templateTimelineCount - - favoriteCount - - elasticTemplateTimelineCount - - customTemplateTimelineCount - required: - - data - description: Indicates that the (template) timelines were found and returned. - '400': - content: - 'application:json; Elastic-Api-Version=2023-10-31': - schema: - type: object - properties: - body: - type: string - statusCode: - type: number - description: Bad request. The user supplied invalid data. - summary: >- - This API is used to retrieve a list of existing saved timelines or - timeline templates. - tags: - - Security Solution Timeline API - - 'access:securitySolution' - '/s/{spaceId}/api/observability/slos': - get: - description: > - You must have the `read` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: findSlosOp - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - description: A valid kql query to filter the SLO with - example: 'slo.name:latency* and slo.tags : "prod"' - in: query - name: kqlQuery - schema: - type: string - - description: 'The page to use for pagination, must be greater or equal than 1' - example: 1 - in: query - name: page - schema: - default: 1 - type: integer - - description: Number of SLOs returned by page - example: 25 - in: query - name: perPage - schema: - default: 25 - maximum: 5000 - type: integer - - description: Sort by field - example: status - in: query - name: sortBy - schema: - default: status - enum: - - sli_value - - status - - error_budget_consumed - - error_budget_remaining - type: string - - description: Sort order - example: asc - in: query - name: sortDirection - schema: - default: asc - enum: - - asc - - desc - type: string - - description: >- - Hide stale SLOs from the list as defined by stale SLO threshold in - SLO settings - in: query - name: hideStale - schema: - type: boolean - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_find_slo_response' - description: Successful request - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Get a paginated list of SLOs - tags: - - slo - post: - description: > - You must have `all` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: createSloOp - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_create_slo_request' - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_create_slo_response' - description: Successful request - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '409': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_409_response' - description: Conflict - The SLO id already exists - summary: Create an SLO - tags: - - slo - '/s/{spaceId}/api/observability/slos/_delete_instances': - post: - 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. - operationId: deleteSloInstancesOp - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_delete_slo_instances_request' - required: true - responses: - '204': - description: Successful request - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - summary: Batch delete rollup and summary data - tags: - - slo - '/s/{spaceId}/api/observability/slos/{sloId}': - delete: - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: deleteSloOp - 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': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Delete an SLO - tags: - - slo - get: - description: > - You must have the `read` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: getSloOp - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - $ref: '#/components/parameters/SLOs_slo_id' - - description: the specific instanceId used by the summary calculation - example: host-abcde - in: query - name: instanceId - schema: - type: string - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_slo_with_summary_response' - description: Successful request - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Get an SLO - tags: - - slo - put: - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: updateSloOp - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - $ref: '#/components/parameters/SLOs_slo_id' - requestBody: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_update_slo_request' - required: true - responses: - '200': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_slo_definition_response' - description: Successful request - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Update an SLO - tags: - - slo - '/s/{spaceId}/api/observability/slos/{sloId}/_reset': - post: - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: resetSloOp - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - $ref: '#/components/parameters/SLOs_slo_id' - responses: - '204': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_slo_definition_response' - description: Successful request - '400': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Reset an SLO - tags: - - slo - '/s/{spaceId}/api/observability/slos/{sloId}/disable': - post: - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: disableSloOp - 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': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Disable an SLO - tags: - - slo - '/s/{spaceId}/api/observability/slos/{sloId}/enable': - post: - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - operationId: enableSloOp - 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': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_400_response' - description: Bad request - '401': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_401_response' - description: Unauthorized response - '403': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_403_response' - description: Unauthorized response - '404': - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/SLOs_404_response' - description: Not found response - summary: Enable an SLO - tags: - - slo -components: - examples: - Connectors_create_email_connector_request: - summary: Create an email connector. - value: - config: - from: tester@example.com - hasAuth: true - host: 'https://example.com' - port: 1025 - secure: false - service: other - connector_type_id: .email - name: email-connector-1 - secrets: - password: password - user: username - Connectors_create_email_connector_response: - summary: A new email connector. - value: - config: - clientId: null - from: tester@example.com - hasAuth: true - host: 'https://example.com' - oauthTokenUrl: null - port: 1025 - secure: false - service: other - tenantId: null - connector_type_id: .email - id: 90a82c60-478f-11ee-a343-f98a117c727f - is_deprecated: false - is_missing_secrets: false - is_preconfigured: false - is_system_action: false - name: email-connector-1 - Connectors_create_index_connector_request: - summary: Create an index connector. - value: - config: - index: test-index - connector_type_id: .index - name: my-connector - Connectors_create_index_connector_response: - summary: A new index connector. - value: - config: - executionTimeField: null - index: test-index - refresh: false - connector_type_id: .index - id: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad - is_deprecated: false - is_missing_secrets: false - is_preconfigured: false - is_system_action: false - name: my-connector - Connectors_create_webhook_connector_request: - summary: Create a webhook connector with SSL authentication. - value: - config: - authType: webhook-authentication-ssl - certType: ssl-crt-key - method: post - url: 'https://example.com' - connector_type_id: .webhook - name: my-webhook-connector - secrets: - crt: QmFnIEF0dH... - key: LS0tLS1CRUdJ... - password: my-passphrase - Connectors_create_webhook_connector_response: - summary: A new webhook connector. - value: - config: - authType: webhook-authentication-ssl - certType: ssl-crt-key - hasAuth: true - headers: null - method: post - url: 'https://example.com' - verificationMode: full - connector_type_id: .webhook - id: 900eb010-3b9d-11ee-a642-8ffbb94e38bd - is_deprecated: false - is_missing_secrets: false - is_preconfigured: false - is_system_action: false - name: my-webhook-connector - Connectors_create_xmatters_connector_request: - summary: Create an xMatters connector with URL authentication. - value: - config: - usesBasic: false - connector_type_id: .xmatters - name: my-xmatters-connector - secrets: - secretsUrl: 'https://example.com?apiKey=xxxxx' - Connectors_create_xmatters_connector_response: - summary: A new xMatters connector. - value: - config: - configUrl: null - usesBasic: false - connector_type_id: .xmatters - id: 4d2d8da0-4d1f-11ee-9367-577408be4681 - is_deprecated: false - is_missing_secrets: false - is_preconfigured: false - is_system_action: false - name: my-xmatters-connector - Connectors_get_connector_response: - summary: Get connector details. - value: - config: {} - connector_type_id: .server-log - id: df770e30-8b8b-11ed-a780-3b746c987a81 - is_deprecated: false - is_missing_secrets: false - is_preconfigured: false - is_system_action: false - name: my_server_log_connector - Connectors_get_connector_types_generativeai_response: - summary: A list of connector types for the `generativeAI` feature. - value: - - enabled: true - enabled_in_config: true - enabled_in_license: true - id: .gen-ai - is_system_action_type: false - minimum_license_required: enterprise - name: OpenAI - supported_feature_ids: - - generativeAIForSecurity - - generativeAIForObservability - - generativeAIForSearchPlayground - - enabled: true - enabled_in_config: true - enabled_in_license: true - id: .bedrock - is_system_action_type: false - minimum_license_required: enterprise - name: AWS Bedrock - supported_feature_ids: - - generativeAIForSecurity - - generativeAIForObservability - - generativeAIForSearchPlayground - - enabled: true - enabled_in_config: true - enabled_in_license: true - id: .gemini - is_system_action_type: false - minimum_license_required: enterprise - name: Google Gemini - supported_feature_ids: - - generativeAIForSecurity - Connectors_get_connectors_response: - summary: A list of connectors - value: - - connector_type_id: .email - id: preconfigured-email-connector - is_deprecated: false - is_preconfigured: true - is_system_action: false - name: my-preconfigured-email-notification - referenced_by_count: 0 - - config: - executionTimeField: null - index: test-index - refresh: false - connector_type_id: .index - id: e07d0c80-8b8b-11ed-a780-3b746c987a81 - is_deprecated: false - is_missing_secrets: false - is_preconfigured: false - is_system_action: false - name: my-index-connector - referenced_by_count: 2 - Connectors_run_cases_webhook_connector_request: - summary: Run a Webhook - Case Management connector to create a case. - value: - params: - subAction: pushToService - subActionParams: - comments: - - comment: A comment about the incident. - commentId: 1 - incident: - description: Description of the incident. - id: caseID - severity: low - status: open - tags: - - tag1 - - tag2 - title: Case title - Connectors_run_cases_webhook_connector_response: - summary: >- - Response from a pushToService action for a Webhook - Case Management - connector. - value: - connector_id: 1824b5b8-c005-4dcc-adac-57f92db46459 - data: - comments: - - commentId: 1 - pushedDate: '2023-12-05T19:43:36.360Z' - id: 100665 - pushedDate: '2023-12-05T19:43:36.360Z' - title: TEST-29034 - url: 'https://example.com/browse/TEST-29034' - status: ok - Connectors_run_email_connector_request: - summary: Send an email message from an email connector. - value: - params: - bcc: - - user1@example.com - cc: - - user2@example.com - - user3@example.com - message: Test email message. - subject: Test message subject - to: - - user4@example.com - Connectors_run_email_connector_response: - summary: Response for sending a message from an email connector. - value: - connector_id: 7fc7b9a0-ecc9-11ec-8736-e7d63118c907 - data: - accepted: - - user1@example.com - - user2@example.com - - user3@example.com - - user4@example.com - envelope: - from: tester@example.com - to: - - user1@example.com - - user2@example.com - - user3@example.com - - user4@example.com - envelopeTime: 8 - messageId: <08a92d29-642a-0706-750c-de5996bd5cf3@example.com> - messageSize: 729 - messageTime: 3 - rejected: [] - response: 250 Message queued as QzEXKcGJ - status: ok - Connectors_run_index_connector_request: - summary: Run an index connector. - value: - params: - documents: - - id: my_doc_id - message: 'hello, world' - name: my_doc_name - Connectors_run_index_connector_response: - summary: Response from running an index connector. - value: - connector_id: fd38c600-96a5-11ed-bb79-353b74189cba - data: - errors: false - items: - - create: - _id: 4JtvwYUBrcyxt2NnfW3y - _index: my-index - _primary_term: 1 - _seq_no: 0 - _shards: - failed: 0 - successful: 1 - total: 2 - _version: 1 - result: created - status: 201 - took: 135 - status: ok - Connectors_run_jira_connector_request: - summary: Run a Jira connector to retrieve the list of issue types. - value: - params: - subAction: issueTypes - Connectors_run_jira_connector_response: - summary: Response from retrieving the list of issue types for a Jira connector. - value: - connector_id: b3aad810-edbe-11ec-82d1-11348ecbf4a6 - data: - - id: 10024 - name: Improvement - - id: 10006 - name: Task - - id: 10007 - name: Sub-task - - id: 10025 - name: New Feature - - id: 10023 - name: Bug - - id: 10000 - name: Epic - status: ok - Connectors_run_pagerduty_connector_request: - summary: Run a PagerDuty connector to trigger an alert. - value: - params: - customDetails: - my_data_1: test data - eventAction: trigger - links: - - href: 'http://example.com/pagerduty' - text: An example link - summary: A brief event summary - Connectors_run_pagerduty_connector_response: - summary: Response from running a PagerDuty connector. - value: - connector_id: 45de9f70-954f-4608-b12a-db7cf808e49d - data: - dedup_key: 5115e138b26b484a81eaea779faa6016 - message: Event processed - status: success - status: ok - Connectors_run_server_log_connector_request: - summary: Run a server log connector. - value: - params: - level: warn - message: Test warning message. - Connectors_run_server_log_connector_response: - summary: Response from running a server log connector. - value: - connector_id: 7fc7b9a0-ecc9-11ec-8736-e7d63118c907 - status: ok - Connectors_run_servicenow_itom_connector_request: - summary: Run a ServiceNow ITOM connector to retrieve the list of choices. - value: - params: - subAction: getChoices - subActionParams: - fields: - - severity - - urgency - Connectors_run_servicenow_itom_connector_response: - summary: >- - Response from retrieving the list of choices for a ServiceNow ITOM - connector. - value: - connector_id: 9d9be270-2fd2-11ed-b0e0-87533c532698 - data: - - dependent_value: '' - element: severity - label: Critical - value: 1 - - dependent_value: '' - element: severity - label: Major - value: 2 - - dependent_value: '' - element: severity - label: Minor - value: 3 - - dependent_value: '' - element: severity - label: Warning - value: 4 - - dependent_value: '' - element: severity - label: OK - value: 5 - - dependent_value: '' - element: severity - label: Clear - value: 0 - - dependent_value: '' - element: urgency - label: 1 - High - value: 1 - - dependent_value: '' - element: urgency - label: 2 - Medium - value: 2 - - dependent_value: '' - element: urgency - label: 3 - Low - value: 3 - status: ok - Connectors_run_slack_api_connector_request: - summary: >- - Run a Slack connector that uses the web API method to post a message on - a channel. - value: - params: - subAction: postMessage - subActionParams: - channelIds: - - C123ABC456 - text: A test message. - Connectors_run_slack_api_connector_response: - summary: Response from posting a message with a Slack connector. - value: - connector_id: .slack_api - data: - channel: C123ABC456 - message: - app_id: A01BC2D34EF - blocks: - - block_id: /NXe - elements: - - elements: - - text: A test message. - type: text - type: rich_text_section - type: rich_text - bot_id: B12BCDEFGHI - bot_profile: - app_id: A01BC2D34EF - deleted: false - icons: - image_36: 'https://a.slack-edge.com/80588/img/plugins/app/bot_36.png' - id: B12BCDEFGHI - name: test - team_id: T01ABCDE2F - updated: 1672169705 - team: T01ABCDE2F - text: A test message - ts: '1234567890.123456' - type: message - user: U12A345BC6D - ok: true - ts: '1234567890.123456' - status: ok - Connectors_run_swimlane_connector_request: - summary: Run a Swimlane connector to create an incident. - value: - params: - subAction: pushToService - subActionParams: - comments: - - comment: A comment about the incident. - commentId: 1 - incident: - caseId: '1000' - caseName: Case name - description: Description of the incident. - Connectors_run_swimlane_connector_response: - summary: Response from creating a Swimlane incident. - value: - connector_id: a4746470-2f94-11ed-b0e0-87533c532698 - data: - comments: - - commentId: 1 - pushedDate: '2022-09-08T16:52:27.865Z' - id: aKPmBHWzmdRQtx6Mx - pushedDate: '2022-09-08T16:52:27.866Z' - title: TEST-457 - url: >- - https://elastic.swimlane.url.us/record/aNcL2xniGHGpa2AHb/aKPmBHWzmdRQtx6Mx - status: ok - Connectors_update_index_connector_request: - summary: Update an index connector. - value: - config: - index: updated-index - name: updated-connector - Data_views_create_data_view_request: - summary: Create a data view with runtime fields. - value: - data_view: - name: My Logstash data view - runtimeFieldMap: - runtime_shape_name: - script: - source: 'emit(doc[''shape_name''].value)' - type: keyword - title: logstash-* - Data_views_create_runtime_field_request: - summary: Create a runtime field. - value: - name: runtimeFoo - runtimeField: - script: - source: 'emit(doc["foo"].value)' - type: long - Data_views_get_data_view_response: - summary: >- - The get data view API returns a JSON object that contains information - about the data view. - value: - data_view: - allowNoIndex: false - fieldAttrs: - products.manufacturer: - count: 1 - products.price: - count: 1 - products.product_name: - count: 1 - total_quantity: - count: 1 - fieldFormats: - products.base_price: - id: number - params: - pattern: '$0,0.00' - products.base_unit_price: - id: number - params: - pattern: '$0,0.00' - products.min_price: - id: number - params: - pattern: '$0,0.00' - products.price: - id: number - params: - pattern: '$0,0.00' - products.taxful_price: - id: number - params: - pattern: '$0,0.00' - products.taxless_price: - id: number - params: - pattern: '$0,0.00' - taxful_total_price: - id: number - params: - pattern: '$0,0.[00]' - taxless_total_price: - id: number - params: - pattern: '$0,0.00' - fields: - _id: - aggregatable: false - count: 0 - esTypes: - - _id - format: - id: string - isMapped: true - name: _id - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - _index: - aggregatable: true - count: 0 - esTypes: - - _index - format: - id: string - isMapped: true - name: _index - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - _score: - aggregatable: false - count: 0 - format: - id: number - isMapped: true - name: _score - readFromDocValues: false - scripted: false - searchable: false - shortDotsEnable: false - type: number - _source: - aggregatable: false - count: 0 - esTypes: - - _source - format: - id: _source - isMapped: true - name: _source - readFromDocValues: false - scripted: false - searchable: false - shortDotsEnable: false - type: _source - category: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: category - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - category.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: category.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: category - type: string - currency: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: currency - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - customer_birth_date: - aggregatable: true - count: 0 - esTypes: - - date - format: - id: date - isMapped: true - name: customer_birth_date - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: date - customer_first_name: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: customer_first_name - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - customer_first_name.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: customer_first_name.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: customer_first_name - type: string - customer_full_name: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: customer_full_name - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - customer_full_name.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: customer_full_name.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: customer_full_name - type: string - customer_gender: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: customer_gender - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - customer_id: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: customer_id - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - customer_last_name: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: customer_last_name - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - customer_last_name.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: customer_last_name.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: customer_last_name - type: string - customer_phone: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: customer_phone - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - day_of_week: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: day_of_week - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - day_of_week_i: - aggregatable: true - count: 0 - esTypes: - - integer - format: - id: number - isMapped: true - name: day_of_week_i - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - email: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: email - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - event.dataset: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: event.dataset - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - geoip.city_name: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: geoip.city_name - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - geoip.continent_name: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: geoip.continent_name - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - geoip.country_iso_code: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: geoip.country_iso_code - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - geoip.location: - aggregatable: true - count: 0 - esTypes: - - geo_point - format: - id: geo_point - params: - transform: wkt - isMapped: true - name: geoip.location - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: geo_point - geoip.region_name: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: geoip.region_name - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - manufacturer: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: manufacturer - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - manufacturer.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: manufacturer.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: manufacturer - type: string - order_date: - aggregatable: true - count: 0 - esTypes: - - date - format: - id: date - isMapped: true - name: order_date - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: date - order_id: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: order_id - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - products._id: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: products._id - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - products._id.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: products._id.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: products._id - type: string - products.base_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: products.base_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.base_unit_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: products.base_unit_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.category: - aggregatable: false - count: 0 - esTypes: - - text - format: - id: string - isMapped: true - name: products.category - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - products.category.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: products.category.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: products.category - type: string - products.created_on: - aggregatable: true - count: 0 - esTypes: - - date - format: - id: date - isMapped: true - name: products.created_on - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: date - products.discount_amount: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - isMapped: true - name: products.discount_amount - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.discount_percentage: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - isMapped: true - name: products.discount_percentage - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.manufacturer: - aggregatable: false - count: 1 - esTypes: - - text - format: - id: string - isMapped: true - name: products.manufacturer - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - products.manufacturer.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: products.manufacturer.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: products.manufacturer - type: string - products.min_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: products.min_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.price: - aggregatable: true - count: 1 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: products.price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.product_id: - aggregatable: true - count: 0 - esTypes: - - long - format: - id: number - isMapped: true - name: products.product_id - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.product_name: - aggregatable: false - count: 1 - esTypes: - - text - format: - id: string - isMapped: true - name: products.product_name - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - products.product_name.keyword: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: products.product_name.keyword - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - subType: - multi: - parent: products.product_name - type: string - products.quantity: - aggregatable: true - count: 0 - esTypes: - - integer - format: - id: number - isMapped: true - name: products.quantity - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.sku: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: products.sku - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - products.tax_amount: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - isMapped: true - name: products.tax_amount - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.taxful_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: products.taxful_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.taxless_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: products.taxless_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - products.unit_discount_amount: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - isMapped: true - name: products.unit_discount_amount - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - sku: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: sku - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - taxful_total_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.[00]' - isMapped: true - name: taxful_total_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - taxless_total_price: - aggregatable: true - count: 0 - esTypes: - - half_float - format: - id: number - params: - pattern: '$0,0.00' - isMapped: true - name: taxless_total_price - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - total_quantity: - aggregatable: true - count: 1 - esTypes: - - integer - format: - id: number - isMapped: true - name: total_quantity - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - total_unique_products: - aggregatable: true - count: 0 - esTypes: - - integer - format: - id: number - isMapped: true - name: total_unique_products - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - type: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: type - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - user: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: user - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - id: ff959d40-b880-11e8-a6d9-e546fe2bba5f - name: Kibana Sample Data eCommerce - namespaces: - - default - runtimeFieldMap: {} - sourceFilters: [] - timeFieldName: order_date - title: kibana_sample_data_ecommerce - typeMeta: {} - version: WzUsMV0= - Data_views_get_data_views_response: - summary: The get all data views API returns a list of data views. - value: - data_view: - - id: ff959d40-b880-11e8-a6d9-e546fe2bba5f - name: Kibana Sample Data eCommerce - namespaces: - - default - title: kibana_sample_data_ecommerce - typeMeta: {} - - id: d3d7af60-4c81-11e8-b3d7-01146121b73d - name: Kibana Sample Data Flights - namespaces: - - default - title: kibana_sample_data_flights - - id: 90943e30-9a47-11e8-b64d-95841ca0b247 - name: Kibana Sample Data Logs - namespaces: - - default - title: kibana_sample_data_logs - Data_views_get_default_data_view_response: - summary: The get default data view API returns the default data view identifier. - value: - data_view_id: ff959d40-b880-11e8-a6d9-e546fe2bba5f - Data_views_get_runtime_field_response: - summary: >- - The get runtime field API returns a JSON object that contains - information about the runtime field (`hour_of_day`) and the data view - (`d3d7af60-4c81-11e8-b3d7-01146121b73d`). - value: - data_view: - allowNoIndex: false - fieldAttrs: {} - fieldFormats: - AvgTicketPrice: - id: number - params: - pattern: '$0,0.[00]' - hour_of_day: - id: number - params: - pattern: '00' - fields: - _id: - aggregatable: false - count: 0 - esTypes: - - _id - format: - id: string - isMapped: true - name: _id - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - _index: - aggregatable: true - count: 0 - esTypes: - - _index - format: - id: string - isMapped: true - name: _index - readFromDocValues: false - scripted: false - searchable: true - shortDotsEnable: false - type: string - _score: - aggregatable: false - count: 0 - format: - id: number - isMapped: true - name: _score - readFromDocValues: false - scripted: false - searchable: false - shortDotsEnable: false - type: number - _source: - aggregatable: false - count: 0 - esTypes: - - _source - format: - id: _source - isMapped: true - name: _source - readFromDocValues: false - scripted: false - searchable: false - shortDotsEnable: false - type: _source - AvgTicketPrice: - aggregatable: true - count: 0 - esTypes: - - float - format: - id: number - params: - pattern: '$0,0.[00]' - isMapped: true - name: AvgTicketPrice - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - Cancelled: - aggregatable: true - count: 0 - esTypes: - - boolean - format: - id: boolean - isMapped: true - name: Cancelled - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: boolean - Carrier: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: Carrier - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - dayOfWeek: - aggregatable: true - count: 0 - esTypes: - - integer - format: - id: number - isMapped: true - name: dayOfWeek - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - Dest: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: Dest - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - DestAirportID: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: DestAirportID - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - DestCityName: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: DestCityName - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - DestCountry: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: DestCountry - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - DestLocation: - aggregatable: true - count: 0 - esTypes: - - geo_point - format: - id: geo_point - params: - transform: wkt - isMapped: true - name: DestLocation - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: geo_point - DestRegion: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: DestRegion - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - DestWeather: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: DestWeather - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - DistanceKilometers: - aggregatable: true - count: 0 - esTypes: - - float - format: - id: number - isMapped: true - name: DistanceKilometers - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - DistanceMiles: - aggregatable: true - count: 0 - esTypes: - - float - format: - id: number - isMapped: true - name: DistanceMiles - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - FlightDelay: - aggregatable: true - count: 0 - esTypes: - - boolean - format: - id: boolean - isMapped: true - name: FlightDelay - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: boolean - FlightDelayMin: - aggregatable: true - count: 0 - esTypes: - - integer - format: - id: number - isMapped: true - name: FlightDelayMin - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - FlightDelayType: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: FlightDelayType - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - FlightNum: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: FlightNum - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - FlightTimeHour: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: FlightTimeHour - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - FlightTimeMin: - aggregatable: true - count: 0 - esTypes: - - float - format: - id: number - isMapped: true - name: FlightTimeMin - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: number - hour_of_day: - aggregatable: true - count: 0 - esTypes: - - long - format: - id: number - params: - pattern: '00' - name: hour_of_day - readFromDocValues: false - runtimeField: - script: - source: 'emit(doc[''timestamp''].value.getHour());' - type: long - scripted: false - searchable: true - shortDotsEnable: false - type: number - Origin: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: Origin - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - OriginAirportID: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: OriginAirportID - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - OriginCityName: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: OriginCityName - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - OriginCountry: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: OriginCountry - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - OriginLocation: - aggregatable: true - count: 0 - esTypes: - - geo_point - format: - id: geo_point - params: - transform: wkt - isMapped: true - name: OriginLocation - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: geo_point - OriginRegion: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: OriginRegion - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - OriginWeather: - aggregatable: true - count: 0 - esTypes: - - keyword - format: - id: string - isMapped: true - name: OriginWeather - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: string - timestamp: - aggregatable: true - count: 0 - esTypes: - - date - format: - id: date - isMapped: true - name: timestamp - readFromDocValues: true - scripted: false - searchable: true - shortDotsEnable: false - type: date - id: d3d7af60-4c81-11e8-b3d7-01146121b73d - name: Kibana Sample Data Flights - runtimeFieldMap: - hour_of_day: - script: - source: 'emit(doc[''timestamp''].value.getHour());' - type: long - sourceFilters: [] - timeFieldName: timestamp - title: kibana_sample_data_flights - version: WzM2LDJd - fields: - - aggregatable: true - count: 0 - esTypes: - - long - name: hour_of_day - readFromDocValues: false - runtimeField: - script: - source: 'emit(doc[''timestamp''].value.getHour());' - type: long - scripted: false - searchable: true - shortDotsEnable: false - type: number - Data_views_preview_swap_data_view_request: - summary: Preview swapping references from data view ID "abcd-efg" to "xyz-123". - value: - fromId: abcd-efg - toId: xyz-123 - Data_views_set_default_data_view_request: - summary: Set the default data view identifier. - value: - data_view_id: ff959d40-b880-11e8-a6d9-e546fe2bba5f - force: true - Data_views_swap_data_view_request: - summary: >- - Swap references from data view ID "abcd-efg" to "xyz-123" and remove the - data view that is no longer referenced. - value: - delete: true - fromId: abcd-efg - toId: xyz-123 - Data_views_update_data_view_request: - summary: Update some properties for a data view. - value: - data_view: - allowNoIndex: false - name: Kibana Sample Data eCommerce - timeFieldName: order_date - title: kibana_sample_data_ecommerce - refresh_fields: true - Data_views_update_field_metadata_request: - summary: Update metadata for multiple fields. - value: - fields: - field1: - count: 123 - customLabel: Field 1 label - field2: - customDescription: Field 2 description - customLabel: Field 2 label - Data_views_update_runtime_field_request: - summary: Update an existing runtime field on a data view. - value: - runtimeField: - script: - source: 'emit(doc["bar"].value)' - Machine_learning_APIs_mlSyncExample: - summary: Two anomaly detection jobs required synchronization in this example. - value: - datafeedsAdded: {} - datafeedsRemoved: {} - savedObjectsCreated: - anomaly-detector: - myjob1: - success: true - myjob2: - success: true - savedObjectsDeleted: {} - Saved_objects_export_objects_request: - summary: Export a specific saved object. - value: - excludeExportDetails: true - includeReferencesDeep: false - objects: - - id: de71f4f0-1902-11e9-919b-ffe5949a18d2 - type: map - Saved_objects_export_objects_response: - summary: >- - The export objects API response contains a JSON record for each exported - object. - value: - attributes: - description: '' - layerListJSON: >- - [{"id":"0hmz5","alpha":1,"sourceDescriptor":{"type":"EMS_TMS","isAutoSelect":true,"lightModeDefault":"road_map_desaturated"},"visible":true,"style":{},"type":"EMS_VECTOR_TILE","minZoom":0,"maxZoom":24},{"id":"edh66","label":"Total - Requests by - Destination","minZoom":0,"maxZoom":24,"alpha":0.5,"sourceDescriptor":{"type":"EMS_FILE","id":"world_countries","tooltipProperties":["name","iso2"]},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"DYNAMIC","options":{"field":{"name":"__kbnjoin__count__673ff994-fc75-4c67-909b-69fcb0e1060e","origin":"join"},"color":"Greys","fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"lineColor":{"type":"STATIC","options":{"color":"#FFFFFF"}},"lineWidth":{"type":"STATIC","options":{"size":1}},"iconSize":{"type":"STATIC","options":{"size":10}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR","joins":[{"leftField":"iso2","right":{"type":"ES_TERM_SOURCE","id":"673ff994-fc75-4c67-909b-69fcb0e1060e","indexPatternTitle":"kibana_sample_data_logs","term":"geo.dest","indexPatternRefName":"layer_1_join_0_index_pattern","metrics":[{"type":"count","label":"web - logs - count"}],"applyGlobalQuery":true}}]},{"id":"gaxya","label":"Actual - Requests","minZoom":9,"maxZoom":24,"alpha":1,"sourceDescriptor":{"id":"b7486535-171b-4d3b-bb2e-33c1a0a2854c","type":"ES_SEARCH","geoField":"geo.coordinates","limit":2048,"filterByMapBounds":true,"tooltipProperties":["clientip","timestamp","host","request","response","machine.os","agent","bytes"],"indexPatternRefName":"layer_2_source_index_pattern","applyGlobalQuery":true,"scalingType":"LIMIT"},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"STATIC","options":{"color":"#2200ff"}},"lineColor":{"type":"STATIC","options":{"color":"#FFFFFF"}},"lineWidth":{"type":"STATIC","options":{"size":2}},"iconSize":{"type":"DYNAMIC","options":{"field":{"name":"bytes","origin":"source"},"minSize":1,"maxSize":23,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR"},{"id":"tfi3f","label":"Total - Requests and - Bytes","minZoom":0,"maxZoom":9,"alpha":1,"sourceDescriptor":{"type":"ES_GEO_GRID","resolution":"COARSE","id":"8aaa65b5-a4e9-448b-9560-c98cb1c5ac5b","geoField":"geo.coordinates","requestType":"point","metrics":[{"type":"count","label":"web - logs - count"},{"type":"sum","field":"bytes"}],"indexPatternRefName":"layer_3_source_index_pattern","applyGlobalQuery":true},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"color":"Blues","fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"lineColor":{"type":"STATIC","options":{"color":"#cccccc"}},"lineWidth":{"type":"STATIC","options":{"size":1}},"iconSize":{"type":"DYNAMIC","options":{"field":{"name":"sum_of_bytes","origin":"source"},"minSize":7,"maxSize":25,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"labelText":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"labelSize":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"minSize":12,"maxSize":24,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR"}] - mapStateJSON: >- - {"zoom":3.64,"center":{"lon":-88.92107,"lat":42.16337},"timeFilters":{"from":"now-7d","to":"now"},"refreshConfig":{"isPaused":true,"interval":0},"query":{"language":"kuery","query":""},"settings":{"autoFitToDataBounds":false}} - title: '[Logs] Total Requests and Bytes' - uiStateJSON: '{"isDarkMode":false}' - coreMigrationVersion: 8.8.0 - created_at: '2023-08-23T20:03:32.204Z' - id: de71f4f0-1902-11e9-919b-ffe5949a18d2 - managed: false - references: - - id: 90943e30-9a47-11e8-b64d-95841ca0b247 - name: layer_1_join_0_index_pattern - type: index-pattern - - id: 90943e30-9a47-11e8-b64d-95841ca0b247 - name: layer_2_source_index_pattern - type: index-pattern - - id: 90943e30-9a47-11e8-b64d-95841ca0b247 - name: layer_3_source_index_pattern - type: index-pattern - type: map - typeMigrationVersion: 8.4.0 - updated_at: '2023-08-23T20:03:32.204Z' - version: WzEzLDFd - Saved_objects_import_objects_request: - value: - file: file.ndjson - Saved_objects_import_objects_response: - summary: >- - The import objects API response indicates a successful import and the - objects are created. Since these objects are created as new copies, each - entry in the successResults array includes a destinationId attribute. - value: - success: true - successCount: 1 - successResults: - - destinationId: 82d2760c-468f-49cf-83aa-b9a35b6a8943 - id: 90943e30-9a47-11e8-b64d-95841ca0b247 - managed: false - meta: - icon: indexPatternApp - title: Kibana Sample Data Logs - type: index-pattern - Saved_objects_key_rotation_response: - summary: Encryption key rotation using default parameters. - value: - failed: 0 - successful: 300 - total: 1000 - Saved_objects_resolve_missing_reference_request: - value: - file: file.ndjson - retries: - - id: my-pattern - overwrite: true - type: index-pattern - - destinationId: another-vis - id: my-vis - overwrite: true - type: visualization - - destinationId: yet-another-canvas - id: my-canvas - overwrite: true - type: canvas - - id: my-dashboard - type: dashboard - Saved_objects_resolve_missing_reference_response: - summary: Resolve missing reference errors. - value: - success: true - successCount: 3 - successResults: - - id: my-vis - meta: - icon: visualizeApp - title: Look at my visualization - type: visualization - - id: my-search - meta: - icon: searchApp - title: Look at my search - type: search - - id: my-dashboard - meta: - icon: dashboardApp - title: Look at my dashboard - type: dashboard - parameters: - Connectors_action_id: - description: An identifier for the action. - in: path - name: actionId - required: true - schema: - example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad - type: string - Connectors_connector_id: - description: An identifier for the connector. - in: path - name: connectorId - required: true - schema: - example: df770e30-8b8b-11ed-a780-3b746c987a81 - type: string - Connectors_kbn_xsrf: - description: Cross-site request forgery protection - in: header - name: kbn-xsrf - required: true - schema: - type: string - Data_views_field_name: - description: The name of the runtime field. - in: path - name: fieldName - required: true - schema: - example: hour_of_day - type: string - Data_views_kbn_xsrf: - description: Cross-site request forgery protection - in: header - name: kbn-xsrf - required: true - schema: - type: string - Data_views_view_id: - description: An identifier for the data view. - in: path - name: viewId - required: true - schema: - example: ff959d40-b880-11e8-a6d9-e546fe2bba5f - type: string - Machine_learning_APIs_simulateParam: - description: >- - When true, simulates the synchronization by returning only the list of - actions that would be performed. - example: 'true' - in: query - name: simulate - required: false - schema: - type: boolean - Saved_objects_kbn_xsrf: - description: Cross-site request forgery protection - in: header - name: kbn-xsrf - required: true - schema: - type: string - Saved_objects_saved_object_id: - description: An identifier for the saved object. - in: path - name: id - required: true - schema: - type: string - Saved_objects_saved_object_type: - description: >- - Valid options include `visualization`, `dashboard`, `search`, - `index-pattern`, `config`. - in: path - name: type - required: true - schema: - type: string - SLOs_kbn_xsrf: - description: Cross-site request forgery protection - in: header - name: kbn-xsrf - required: true - schema: - type: string - SLOs_slo_id: - description: An identifier for the slo. - in: path - name: sloId - required: true - schema: - example: 9c235211-6834-11ea-a78c-6feb38a34414 - type: string - SLOs_space_id: - description: >- - An identifier for the space. If `/s/` and the identifier are omitted - from the path, the default space is used. - in: path - name: spaceId - required: true - schema: - example: default - type: string - responses: - Connectors_200_actions: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - $ref: '#/components/schemas/Connectors_action_response_properties' - description: Indicates a successful call. - Connectors_401: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - properties: - error: - enum: - - Unauthorized - example: Unauthorized - type: string - message: - type: string - statusCode: - enum: - - 401 - example: 401 - type: integer - title: Unauthorized response - type: object - description: Authorization information is missing or invalid. - Connectors_404: - content: - application/json; Elastic-Api-Version=2023-10-31: - schema: - properties: - error: - enum: - - Not Found - example: Not Found - type: string - message: - example: >- - Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not - found - type: string - statusCode: - enum: - - 404 - example: 404 - type: integer - title: Not found response - type: object - description: Object is not found. - schemas: - Connectors_action_response_properties: - description: The properties vary depending on the action type. - properties: - actionTypeId: - type: string - config: - type: object - id: - type: string - isDeprecated: - description: Indicates whether the action type is deprecated. - type: boolean - isMissingSecrets: - description: Indicates whether secrets are missing for the action. - type: boolean - isPreconfigured: - description: Indicates whether it is a preconfigured action. - type: boolean - name: - type: string - title: Action response properties - type: object - Connectors_config_properties_bedrock: - description: Defines properties for connectors when type is `.bedrock`. - properties: - apiUrl: - description: The Amazon Bedrock request URL. - type: string - defaultModel: - default: 'anthropic.claude-3-5-sonnet-20240620-v1:0' - description: > - The generative artificial intelligence model for Amazon Bedrock to - use. Current support is for the Anthropic Claude models. - type: string - required: - - apiUrl - title: Connector request properties for an Amazon Bedrock connector - type: object - Connectors_config_properties_cases_webhook: - description: Defines properties for connectors when type is `.cases-webhook`. - type: object - properties: - createCommentJson: - description: > - A JSON payload sent to the create comment URL to create a case - comment. You can use variables to add Kibana Cases data to the - payload. The required variable is `case.comment`. Due to Mustache - template variables (the text enclosed in triple braces, for example, - `{{{case.title}}}`), the JSON is not validated when you create the - connector. The JSON is validated once the Mustache variables have - been placed when the REST method runs. Manually ensure that the JSON - is valid, disregarding the Mustache variables, so the later - validation will pass. - example: '{"body": {{{case.comment}}}}' - type: string - createCommentMethod: - default: put - description: > - The REST API HTTP request method to create a case comment in the - third-party system. Valid values are `patch`, `post`, and `put`. - enum: - - patch - - post - - put - type: string - createCommentUrl: - description: > - The REST API URL to create a case comment by ID in the third-party - system. You can use a variable to add the external system ID to the - URL. If you are using the `xpack.actions.allowedHosts setting`, add - the hostname to the allowed hosts. - example: 'https://example.com/issue/{{{external.system.id}}}/comment' - type: string - createIncidentJson: - description: > - A JSON payload sent to the create case URL to create a case. You can - use variables to add case data to the payload. Required variables - are `case.title` and `case.description`. Due to Mustache template - variables (which is the text enclosed in triple braces, for example, - `{{{case.title}}}`), the JSON is not validated when you create the - connector. The JSON is validated after the Mustache variables have - been placed when REST method runs. Manually ensure that the JSON is - valid to avoid future validation errors; disregard Mustache - variables during your review. - example: >- - {"fields": {"summary": {{{case.title}}},"description": - {{{case.description}}},"labels": {{{case.tags}}}}} - type: string - createIncidentMethod: - default: post - description: > - The REST API HTTP request method to create a case in the third-party - system. Valid values are `patch`, `post`, and `put`. - enum: - - patch - - post - - put - type: string - createIncidentResponseKey: - description: >- - The JSON key in the create external case response that contains the - case ID. - type: string - createIncidentUrl: - description: > - The REST API URL to create a case in the third-party system. If you - are using the `xpack.actions.allowedHosts` setting, add the hostname - to the allowed hosts. - type: string - getIncidentResponseExternalTitleKey: - description: >- - The JSON key in get external case response that contains the case - title. - type: string - getIncidentUrl: - description: > - The REST API URL to get the case by ID from the third-party system. - If you are using the `xpack.actions.allowedHosts` setting, add the - hostname to the allowed hosts. You can use a variable to add the - external system ID to the URL. Due to Mustache template variables - (the text enclosed in triple braces, for example, - `{{{case.title}}}`), the JSON is not validated when you create the - connector. The JSON is validated after the Mustache variables have - been placed when REST method runs. Manually ensure that the JSON is - valid, disregarding the Mustache variables, so the later validation - will pass. - example: 'https://example.com/issue/{{{external.system.id}}}' - type: string - hasAuth: - default: true - description: >- - If true, a username and password for login type authentication must - be provided. - type: boolean - headers: - description: > - A set of key-value pairs sent as headers with the request URLs for - the create case, update case, get case, and create comment methods. - type: string - updateIncidentJson: - description: > - The JSON payload sent to the update case URL to update the case. You - can use variables to add Kibana Cases data to the payload. Required - variables are `case.title` and `case.description`. Due to Mustache - template variables (which is the text enclosed in triple braces, for - example, `{{{case.title}}}`), the JSON is not validated when you - create the connector. The JSON is validated after the Mustache - variables have been placed when REST method runs. Manually ensure - that the JSON is valid to avoid future validation errors; disregard - Mustache variables during your review. - example: >- - {"fields": {"summary": {{{case.title}}},"description": - {{{case.description}}},"labels": {{{case.tags}}}}} - type: string - updateIncidentMethod: - default: put - description: > - The REST API HTTP request method to update the case in the - third-party system. Valid values are `patch`, `post`, and `put`. - enum: - - patch - - post - - put - type: string - updateIncidentUrl: - description: > - The REST API URL to update the case by ID in the third-party system. - You can use a variable to add the external system ID to the URL. If - you are using the `xpack.actions.allowedHosts` setting, add the - hostname to the allowed hosts. - example: 'https://example.com/issue/{{{external.system.ID}}}' - type: string - viewIncidentUrl: - description: > - The URL to view the case in the external system. You can use - variables to add the external system ID or external system title to - the URL. - example: >- - https://testing-jira.atlassian.net/browse/{{{external.system.title}}} - type: string - required: - - createIncidentJson - - createIncidentResponseKey - - createIncidentUrl - - getIncidentResponseExternalTitleKey - - getIncidentUrl - - updateIncidentJson - - updateIncidentUrl - - viewIncidentUrl - title: Connector request properties for Webhook - Case Management connector - Connectors_config_properties_d3security: - description: Defines properties for connectors when type is `.d3security`. - properties: - url: - description: > - The D3 Security API request URL. If you are using the - `xpack.actions.allowedHosts` setting, add the hostname to the - allowed hosts. - type: string - required: - - url - title: Connector request properties for a D3 Security connector - type: object - Connectors_config_properties_email: - description: Defines properties for connectors when type is `.email`. - type: object - properties: - clientId: - description: > - The client identifier, which is a part of OAuth 2.0 client - credentials authentication, in GUID format. If `service` is - `exchange_server`, this property is required. - nullable: true - type: string - from: - description: > - The from address for all emails sent by the connector. It must be - specified in `user@host-name` format. - type: string - hasAuth: - default: true - description: > - Specifies whether a user and password are required inside the - secrets configuration. - type: boolean - host: - description: > - The host name of the service provider. If the `service` is - `elastic_cloud` (for Elastic Cloud notifications) or one of - Nodemailer's well-known email service providers, this property is - ignored. If `service` is `other`, this property must be defined. - type: string - oauthTokenUrl: - nullable: true - type: string - port: - description: > - The port to connect to on the service provider. If the `service` is - `elastic_cloud` (for Elastic Cloud notifications) or one of - Nodemailer's well-known email service providers, this property is - ignored. If `service` is `other`, this property must be defined. - type: integer - secure: - description: > - Specifies whether the connection to the service provider will use - TLS. If the `service` is `elastic_cloud` (for Elastic Cloud - notifications) or one of Nodemailer's well-known email service - providers, this property is ignored. - type: boolean - service: - description: | - The name of the email service. - enum: - - elastic_cloud - - exchange_server - - gmail - - other - - outlook365 - - ses - type: string - tenantId: - description: > - The tenant identifier, which is part of OAuth 2.0 client credentials - authentication, in GUID format. If `service` is `exchange_server`, - this property is required. - nullable: true - type: string - required: - - from - title: Connector request properties for an email connector - Connectors_config_properties_gemini: - description: Defines properties for connectors when type is `.gemini`. - properties: - apiUrl: - description: The Google Gemini request URL. - type: string - defaultModel: - default: gemini-1.5-pro-001 - description: >- - The generative artificial intelligence model for Google Gemini to - use. - type: string - gcpProjectID: - description: The Google ProjectID that has Vertex AI endpoint enabled. - type: string - gcpRegion: - description: The GCP region where the Vertex AI endpoint enabled. - type: string - required: - - apiUrl - - gcpRegion - - gcpProjectID - title: Connector request properties for an Google Gemini connector - type: object - Connectors_config_properties_genai: - description: Defines properties for connectors when type is `.gen-ai`. - discriminator: - mapping: - Azure OpenAI: '#/components/schemas/Connectors_config_properties_genai_azure' - OpenAI: '#/components/schemas/Connectors_config_properties_genai_openai' - propertyName: apiProvider - oneOf: - - $ref: '#/components/schemas/Connectors_config_properties_genai_azure' - - $ref: '#/components/schemas/Connectors_config_properties_genai_openai' - title: Connector request properties for an OpenAI connector - Connectors_config_properties_genai_azure: - description: > - Defines properties for connectors when type is `.gen-ai` and the API - provider is `Azure OpenAI'. - properties: - apiProvider: - description: The OpenAI API provider. - enum: - - Azure OpenAI - type: string - apiUrl: - description: The OpenAI API endpoint. - type: string - required: - - apiProvider - - apiUrl - title: >- - Connector request properties for an OpenAI connector that uses Azure - OpenAI - type: object - Connectors_config_properties_genai_openai: - description: > - Defines properties for connectors when type is `.gen-ai` and the API - provider is `OpenAI'. - properties: - apiProvider: - description: The OpenAI API provider. - enum: - - OpenAI - type: string - apiUrl: - description: The OpenAI API endpoint. - type: string - defaultModel: - description: The default model to use for requests. - type: string - required: - - apiProvider - - apiUrl - title: Connector request properties for an OpenAI connector - type: object - Connectors_config_properties_index: - description: Defines properties for connectors when type is `.index`. - type: object - properties: - executionTimeField: - default: null - description: A field that indicates when the document was indexed. - nullable: true - type: string - index: - description: The Elasticsearch index to be written to. - type: string - refresh: - default: false - description: > - The refresh policy for the write request, which affects when changes - are made visible to search. Refer to the refresh setting for - Elasticsearch document APIs. - type: boolean - required: - - index - title: Connector request properties for an index connector - Connectors_config_properties_jira: - description: Defines properties for connectors when type is `.jira`. - type: object - properties: - apiUrl: - description: The Jira instance URL. - type: string - projectKey: - description: The Jira project key. - type: string - required: - - apiUrl - - projectKey - title: Connector request properties for a Jira connector - Connectors_config_properties_opsgenie: - description: Defines properties for connectors when type is `.opsgenie`. - type: object - properties: - apiUrl: - description: > - The Opsgenie URL. For example, `https://api.opsgenie.com` or - `https://api.eu.opsgenie.com`. If you are using the - `xpack.actions.allowedHosts` setting, add the hostname to the - allowed hosts. - type: string - required: - - apiUrl - title: Connector request properties for an Opsgenie connector - Connectors_config_properties_pagerduty: - description: Defines properties for connectors when type is `.pagerduty`. - properties: - apiUrl: - description: The PagerDuty event URL. - example: 'https://events.pagerduty.com/v2/enqueue' - nullable: true - type: string - title: Connector request properties for a PagerDuty connector - type: object - Connectors_config_properties_resilient: - description: Defines properties for connectors when type is `.resilient`. - type: object - properties: - apiUrl: - description: The IBM Resilient instance URL. - type: string - orgId: - description: The IBM Resilient organization ID. - type: string - required: - - apiUrl - - orgId - title: Connector request properties for a IBM Resilient connector - Connectors_config_properties_sentinelone: - description: Defines properties for connectors when type is `.sentinelone`. - type: object - properties: - url: - description: > - The SentinelOne tenant URL. If you are using the - `xpack.actions.allowedHosts` setting, add the hostname to the - allowed hosts. - type: string - required: - - url - title: Connector request properties for a SentinelOne connector - Connectors_config_properties_servicenow: - description: Defines properties for connectors when type is `.servicenow`. - type: object - properties: - apiUrl: - description: The ServiceNow instance URL. - type: string - clientId: - description: > - The client ID assigned to your OAuth application. This property is - required when `isOAuth` is `true`. - type: string - isOAuth: - default: false - description: > - The type of authentication to use. The default value is false, which - means basic authentication is used instead of open authorization - (OAuth). - type: boolean - jwtKeyId: - description: > - The key identifier assigned to the JWT verifier map of your OAuth - application. This property is required when `isOAuth` is `true`. - type: string - userIdentifierValue: - description: > - The identifier to use for OAuth authentication. This identifier - should be the user field you selected when you created an OAuth JWT - API endpoint for external clients in your ServiceNow instance. For - example, if the selected user field is `Email`, the user identifier - should be the user's email address. This property is required when - `isOAuth` is `true`. - type: string - usesTableApi: - default: true - description: > - Determines whether the connector uses the Table API or the Import - Set API. This property is supported only for ServiceNow ITSM and - ServiceNow SecOps connectors. NOTE: If this property is set to - `false`, the Elastic application should be installed in ServiceNow. - type: boolean - required: - - apiUrl - title: Connector request properties for a ServiceNow ITSM connector - Connectors_config_properties_servicenow_itom: - description: Defines properties for connectors when type is `.servicenow`. - type: object - properties: - apiUrl: - description: The ServiceNow instance URL. - type: string - clientId: - description: > - The client ID assigned to your OAuth application. This property is - required when `isOAuth` is `true`. - type: string - isOAuth: - default: false - description: > - The type of authentication to use. The default value is false, which - means basic authentication is used instead of open authorization - (OAuth). - type: boolean - jwtKeyId: - description: > - The key identifier assigned to the JWT verifier map of your OAuth - application. This property is required when `isOAuth` is `true`. - type: string - userIdentifierValue: - description: > - The identifier to use for OAuth authentication. This identifier - should be the user field you selected when you created an OAuth JWT - API endpoint for external clients in your ServiceNow instance. For - example, if the selected user field is `Email`, the user identifier - should be the user's email address. This property is required when - `isOAuth` is `true`. - type: string - required: - - apiUrl - title: Connector request properties for a ServiceNow ITSM connector - Connectors_config_properties_slack_api: - description: Defines properties for connectors when type is `.slack_api`. - properties: - allowedChannels: - description: A list of valid Slack channels. - items: - maxItems: 25 - type: object - properties: - id: - description: The Slack channel ID. - example: C123ABC456 - minLength: 1 - type: string - name: - description: The Slack channel name. - minLength: 1 - type: string - required: - - id - - name - type: array - title: Connector request properties for a Slack connector - type: object - Connectors_config_properties_swimlane: - description: Defines properties for connectors when type is `.swimlane`. - type: object - properties: - apiUrl: - description: The Swimlane instance URL. - type: string - appId: - description: The Swimlane application ID. - type: string - connectorType: - description: >- - The type of connector. Valid values are `all`, `alerts`, and - `cases`. - enum: - - all - - alerts - - cases - type: string - mappings: - description: The field mapping. - properties: - alertIdConfig: - description: Mapping for the alert ID. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Alert identifier mapping - type: object - caseIdConfig: - description: Mapping for the case ID. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Case identifier mapping - type: object - caseNameConfig: - description: Mapping for the case name. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Case name mapping - type: object - commentsConfig: - description: Mapping for the case comments. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Case comment mapping - type: object - descriptionConfig: - description: Mapping for the case description. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Case description mapping - type: object - ruleNameConfig: - description: Mapping for the name of the alert's rule. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Rule name mapping - type: object - severityConfig: - description: Mapping for the severity. - properties: - fieldType: - description: The type of field in Swimlane. - type: string - id: - description: The identifier for the field in Swimlane. - type: string - key: - description: The key for the field in Swimlane. - type: string - name: - description: The name of the field in Swimlane. - type: string - required: - - fieldType - - id - - key - - name - title: Severity mapping - type: object - title: Connector mappings properties for a Swimlane connector - type: object - required: - - apiUrl - - appId - - connectorType - title: Connector request properties for a Swimlane connector - Connectors_config_properties_tines: - description: Defines properties for connectors when type is `.tines`. - properties: - url: - description: > - The Tines tenant URL. If you are using the - `xpack.actions.allowedHosts` setting, make sure this hostname is - added to the allowed hosts. - type: string - required: - - url - title: Connector request properties for a Tines connector - type: object - Connectors_config_properties_torq: - description: Defines properties for connectors when type is `.torq`. - properties: - webhookIntegrationUrl: - description: The endpoint URL of the Elastic Security integration in Torq. - type: string - required: - - webhookIntegrationUrl - title: Connector request properties for a Torq connector - type: object - Connectors_config_properties_webhook: - description: Defines properties for connectors when type is `.webhook`. - properties: - authType: - description: | - The type of authentication to use: basic, SSL, or none. - enum: - - webhook-authentication-basic - - webhook-authentication-ssl - nullable: true - type: string - ca: - description: > - A base64 encoded version of the certificate authority file that the - connector can trust to sign and validate certificates. This option - is available for all authentication types. - type: string - certType: - description: > - If the `authType` is `webhook-authentication-ssl`, specifies whether - the certificate authentication data is in a CRT and key file format - or a PFX file format. - enum: - - ssl-crt-key - - ssl-pfx - type: string - hasAuth: - description: > - If `true`, a user name and password must be provided for login type - authentication. - type: boolean - headers: - description: A set of key-value pairs sent as headers with the request. - nullable: true - type: object - method: - default: post - description: | - The HTTP request method, either `post` or `put`. - enum: - - post - - put - type: string - url: - description: > - The request URL. If you are using the `xpack.actions.allowedHosts` - setting, add the hostname to the allowed hosts. - type: string - verificationMode: - default: full - description: > - Controls the verification of certificates. Use `full` to validate - that the certificate has an issue date within the `not_before` and - `not_after` dates, chains to a trusted certificate authority (CA), - and has a hostname or IP address that matches the names within the - certificate. Use `certificate` to validate the certificate and - verify that it is signed by a trusted authority; this option does - not check the certificate hostname. Use `none` to skip certificate - validation. - enum: - - certificate - - full - - none - type: string - title: Connector request properties for a Webhook connector - type: object - Connectors_config_properties_xmatters: - description: Defines properties for connectors when type is `.xmatters`. - properties: - configUrl: - description: > - The request URL for the Elastic Alerts trigger in xMatters. It is - applicable only when `usesBasic` is `true`. - nullable: true - type: string - usesBasic: - default: true - description: >- - Specifies whether the connector uses HTTP basic authentication - (`true`) or URL authentication (`false`). - type: boolean - title: Connector request properties for an xMatters connector - type: object - Connectors_connector_response_properties: - description: The properties vary depending on the connector type. - discriminator: - mapping: - .bedrock: >- - #/components/schemas/Connectors_connector_response_properties_bedrock - .cases-webhook: >- - #/components/schemas/Connectors_connector_response_properties_cases_webhook - .d3security: >- - #/components/schemas/Connectors_connector_response_properties_d3security - .email: '#/components/schemas/Connectors_connector_response_properties_email' - .gemini: '#/components/schemas/Connectors_connector_response_properties_gemini' - .gen-ai: '#/components/schemas/Connectors_connector_response_properties_genai' - .index: '#/components/schemas/Connectors_connector_response_properties_index' - .jira: '#/components/schemas/Connectors_connector_response_properties_jira' - .opsgenie: >- - #/components/schemas/Connectors_connector_response_properties_opsgenie - .pagerduty: >- - #/components/schemas/Connectors_connector_response_properties_pagerduty - .resilient: >- - #/components/schemas/Connectors_connector_response_properties_resilient - .sentinelone: >- - #/components/schemas/Connectors_connector_response_properties_sentinelone - .server-log: >- - #/components/schemas/Connectors_connector_response_properties_serverlog - .servicenow: >- - #/components/schemas/Connectors_connector_response_properties_servicenow - .servicenow-itom: >- - #/components/schemas/Connectors_connector_response_properties_servicenow_itom - .servicenow-sir: >- - #/components/schemas/Connectors_connector_response_properties_servicenow_sir - .slack: >- - #/components/schemas/Connectors_connector_response_properties_slack_webhook - .slack_api: >- - #/components/schemas/Connectors_connector_response_properties_slack_api - .swimlane: >- - #/components/schemas/Connectors_connector_response_properties_swimlane - .teams: '#/components/schemas/Connectors_connector_response_properties_teams' - .tines: '#/components/schemas/Connectors_connector_response_properties_tines' - .torq: '#/components/schemas/Connectors_connector_response_properties_torq' - .webhook: >- - #/components/schemas/Connectors_connector_response_properties_webhook - .xmatters: >- - #/components/schemas/Connectors_connector_response_properties_xmatters - propertyName: connector_type_id - oneOf: - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_bedrock - - $ref: '#/components/schemas/Connectors_connector_response_properties_gemini' - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_cases_webhook - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_d3security - - $ref: '#/components/schemas/Connectors_connector_response_properties_email' - - $ref: '#/components/schemas/Connectors_connector_response_properties_genai' - - $ref: '#/components/schemas/Connectors_connector_response_properties_index' - - $ref: '#/components/schemas/Connectors_connector_response_properties_jira' - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_opsgenie - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_pagerduty - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_resilient - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_sentinelone - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_serverlog - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_servicenow - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_servicenow_itom - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_servicenow_sir - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_slack_api - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_slack_webhook - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_swimlane - - $ref: '#/components/schemas/Connectors_connector_response_properties_teams' - - $ref: '#/components/schemas/Connectors_connector_response_properties_tines' - - $ref: '#/components/schemas/Connectors_connector_response_properties_torq' - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_webhook - - $ref: >- - #/components/schemas/Connectors_connector_response_properties_xmatters - title: Connector response properties - Connectors_connector_response_properties_bedrock: - title: Connector response properties for an Amazon Bedrock connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_bedrock' - connector_type_id: - description: The type of connector. - enum: - - .bedrock - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - required: - - config - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_cases_webhook: - title: Connector request properties for a Webhook - Case Management connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_cases_webhook' - connector_type_id: - description: The type of connector. - enum: - - .cases-webhook - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_d3security: - title: Connector response properties for a D3 Security connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_d3security' - connector_type_id: - description: The type of connector. - enum: - - .d3security - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_email: - title: Connector response properties for an email connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_email' - connector_type_id: - description: The type of connector. - enum: - - .email - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_gemini: - title: Connector response properties for a Google Gemini connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_gemini' - connector_type_id: - description: The type of connector. - enum: - - .gemini - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_genai: - title: Connector response properties for an OpenAI connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_genai' - connector_type_id: - description: The type of connector. - enum: - - .gen-ai - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_index: - title: Connector response properties for an index connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_index' - connector_type_id: - description: The type of connector. - enum: - - .index - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_jira: - title: Connector response properties for a Jira connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_jira' - connector_type_id: - description: The type of connector. - enum: - - .jira - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_opsgenie: - title: Connector response properties for an Opsgenie connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_opsgenie' - connector_type_id: - description: The type of connector. - enum: - - .opsgenie - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_pagerduty: - title: Connector response properties for a PagerDuty connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_pagerduty' - connector_type_id: - description: The type of connector. - enum: - - .pagerduty - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_resilient: - title: Connector response properties for a IBM Resilient connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_resilient' - connector_type_id: - description: The type of connector. - enum: - - .resilient - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_sentinelone: - title: Connector response properties for a SentinelOne connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_sentinelone' - connector_type_id: - description: The type of connector. - enum: - - .sentinelone - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_serverlog: - title: Connector response properties for a server log connector - type: object - properties: - config: - nullable: true - type: object - connector_type_id: - description: The type of connector. - enum: - - .server-log - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_servicenow: - title: Connector response properties for a ServiceNow ITSM connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow' - connector_type_id: - description: The type of connector. - enum: - - .servicenow - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_servicenow_itom: - title: Connector response properties for a ServiceNow ITOM connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow_itom' - connector_type_id: - description: The type of connector. - enum: - - .servicenow-itom - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_servicenow_sir: - title: Connector response properties for a ServiceNow SecOps connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow' - connector_type_id: - description: The type of connector. - enum: - - .servicenow-sir - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_slack_api: - title: Connector response properties for a Slack connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_slack_api' - connector_type_id: - description: The type of connector. - enum: - - .slack_api - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_slack_webhook: - title: Connector response properties for a Slack connector - type: object - properties: - connector_type_id: - description: The type of connector. - enum: - - .slack - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_swimlane: - title: Connector response properties for a Swimlane connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_swimlane' - connector_type_id: - description: The type of connector. - enum: - - .swimlane - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_teams: - title: Connector response properties for a Microsoft Teams connector - type: object - properties: - config: - type: object - connector_type_id: - description: The type of connector. - enum: - - .teams - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_tines: - title: Connector response properties for a Tines connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_tines' - connector_type_id: - description: The type of connector. - enum: - - .tines - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_torq: - title: Connector response properties for a Torq connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_torq' - connector_type_id: - description: The type of connector. - enum: - - .torq - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_webhook: - title: Connector response properties for a Webhook connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_webhook' - connector_type_id: - description: The type of connector. - enum: - - .webhook - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_response_properties_xmatters: - title: Connector response properties for an xMatters connector - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_xmatters' - connector_type_id: - description: The type of connector. - enum: - - .xmatters - type: string - id: - description: The identifier for the connector. - type: string - is_deprecated: - $ref: '#/components/schemas/Connectors_is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/Connectors_is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/Connectors_is_preconfigured' - is_system_action: - $ref: '#/components/schemas/Connectors_is_system_action' - name: - description: The display name for the connector. - type: string - referenced_by_count: - $ref: '#/components/schemas/Connectors_referenced_by_count' - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - Connectors_connector_types: - description: >- - The type of connector. For example, `.email`, `.index`, `.jira`, - `.opsgenie`, or `.server-log`. - enum: - - .bedrock - - .gemini - - .cases-webhook - - .d3security - - .email - - .gen-ai - - .index - - .jira - - .opsgenie - - .pagerduty - - .resilient - - .sentinelone - - .servicenow - - .servicenow-itom - - .servicenow-sir - - .server-log - - .slack - - .slack_api - - .swimlane - - .teams - - .tines - - .torq - - .webhook - - .xmatters - example: .server-log - title: Connector types - type: string - Connectors_create_connector_request: - description: The properties vary depending on the connector type. - discriminator: - mapping: - .bedrock: '#/components/schemas/Connectors_create_connector_request_bedrock' - .cases-webhook: >- - #/components/schemas/Connectors_create_connector_request_cases_webhook - .d3security: '#/components/schemas/Connectors_create_connector_request_d3security' - .email: '#/components/schemas/Connectors_create_connector_request_email' - .gemini: '#/components/schemas/Connectors_create_connector_request_gemini' - .gen-ai: '#/components/schemas/Connectors_create_connector_request_genai' - .index: '#/components/schemas/Connectors_create_connector_request_index' - .jira: '#/components/schemas/Connectors_create_connector_request_jira' - .opsgenie: '#/components/schemas/Connectors_create_connector_request_opsgenie' - .pagerduty: '#/components/schemas/Connectors_create_connector_request_pagerduty' - .resilient: '#/components/schemas/Connectors_create_connector_request_resilient' - .sentinelone: '#/components/schemas/Connectors_create_connector_request_sentinelone' - .server-log: '#/components/schemas/Connectors_create_connector_request_serverlog' - .servicenow: '#/components/schemas/Connectors_create_connector_request_servicenow' - .servicenow-itom: >- - #/components/schemas/Connectors_create_connector_request_servicenow_itom - .servicenow-sir: >- - #/components/schemas/Connectors_create_connector_request_servicenow_sir - .slack: >- - #/components/schemas/Connectors_create_connector_request_slack_webhook - .slack_api: '#/components/schemas/Connectors_create_connector_request_slack_api' - .swimlane: '#/components/schemas/Connectors_create_connector_request_swimlane' - .teams: '#/components/schemas/Connectors_create_connector_request_teams' - .tines: '#/components/schemas/Connectors_create_connector_request_tines' - .torq: '#/components/schemas/Connectors_create_connector_request_torq' - .webhook: '#/components/schemas/Connectors_create_connector_request_webhook' - .xmatters: '#/components/schemas/Connectors_create_connector_request_xmatters' - propertyName: connector_type_id - oneOf: - - $ref: '#/components/schemas/Connectors_create_connector_request_bedrock' - - $ref: '#/components/schemas/Connectors_create_connector_request_gemini' - - $ref: >- - #/components/schemas/Connectors_create_connector_request_cases_webhook - - $ref: '#/components/schemas/Connectors_create_connector_request_d3security' - - $ref: '#/components/schemas/Connectors_create_connector_request_email' - - $ref: '#/components/schemas/Connectors_create_connector_request_genai' - - $ref: '#/components/schemas/Connectors_create_connector_request_index' - - $ref: '#/components/schemas/Connectors_create_connector_request_jira' - - $ref: '#/components/schemas/Connectors_create_connector_request_opsgenie' - - $ref: '#/components/schemas/Connectors_create_connector_request_pagerduty' - - $ref: '#/components/schemas/Connectors_create_connector_request_resilient' - - $ref: '#/components/schemas/Connectors_create_connector_request_sentinelone' - - $ref: '#/components/schemas/Connectors_create_connector_request_serverlog' - - $ref: '#/components/schemas/Connectors_create_connector_request_servicenow' - - $ref: >- - #/components/schemas/Connectors_create_connector_request_servicenow_itom - - $ref: >- - #/components/schemas/Connectors_create_connector_request_servicenow_sir - - $ref: '#/components/schemas/Connectors_create_connector_request_slack_api' - - $ref: >- - #/components/schemas/Connectors_create_connector_request_slack_webhook - - $ref: '#/components/schemas/Connectors_create_connector_request_swimlane' - - $ref: '#/components/schemas/Connectors_create_connector_request_teams' - - $ref: '#/components/schemas/Connectors_create_connector_request_tines' - - $ref: '#/components/schemas/Connectors_create_connector_request_torq' - - $ref: '#/components/schemas/Connectors_create_connector_request_webhook' - - $ref: '#/components/schemas/Connectors_create_connector_request_xmatters' - title: Create connector request body properties - Connectors_create_connector_request_bedrock: - description: >- - The Amazon Bedrock connector uses axios to send a POST request to Amazon - Bedrock. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_bedrock' - connector_type_id: - description: The type of connector. - enum: - - .bedrock - example: .bedrock - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_bedrock' - required: - - config - - connector_type_id - - name - - secrets - title: Create Amazon Bedrock connector request - type: object - Connectors_create_connector_request_cases_webhook: - description: > - The Webhook - Case Management connector uses axios to send POST, PUT, - and GET requests to a case management RESTful API web service. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_cases_webhook' - connector_type_id: - description: The type of connector. - enum: - - .cases-webhook - example: .cases-webhook - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_cases_webhook' - required: - - config - - connector_type_id - - name - title: Create Webhook - Case Managment connector request - type: object - Connectors_create_connector_request_d3security: - description: > - The connector uses axios to send a POST request to a D3 Security - endpoint. - properties: + - Fleet uninstall tokens +components: + examples: + Cases_add_comment_request: + summary: Adds a comment to a case. + value: + comment: A new comment. + owner: cases + type: user + 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: + assignees: [] + category: null + closed_at: null + closed_by: null + comments: + - comment: A new comment. + created_at: '2022-10-02T00:49:47.716Z' + created_by: + email: null + full_name: null + username: elastic + id: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + owner: cases + type: user + version: WzIwNDMxLDFd + connector: + fields: null + id: none + name: none + type: .none + created_at: '2022-03-24T00:37:03.906Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: Field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: true + description: A case description. + duration: null + external_service: null + id: 293f1bc0-74f6-11ea-b83a-553aecdb28b6 + owner: cases + settings: + syncAlerts: false + severity: low + status: open + tags: + - tag 1 + title: Case title 1 + totalAlerts: 0 + totalComment: 1 + updated_at: '2022-06-03T00:49:47.716Z' + updated_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + version: WzIzMzgsMV0= + Cases_create_case_request: + summary: Create a security case that uses a Jira connector. + value: + connector: + fields: + issueType: '10006' + parent: null + priority: High + id: 131d4448-abe0-4789-939d-8ef60680b498 + name: My connector + type: .jira + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My field value + description: A case description. + owner: cases + settings: + syncAlerts: true + tags: + - tag-1 + title: Case title 1 + Cases_create_case_response: + summary: >- + The create case API returns a JSON object that contains details about + the case. + value: + assignees: [] + closed_at: null + closed_by: null + comments: [] + connector: + fields: + issueType: '10006' + parent: null + priority: High + id: 131d4448-abe0-4789-939d-8ef60680b498 + name: My connector + type: .jira + created_at: '2022-10-13T15:33:50.604Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null + description: A case description. + duration: null + external_service: null + id: 66b9aa00-94fa-11ea-9f74-e7e108796192 + owner: cases + settings: + syncAlerts: true + severity: low + status: open + tags: + - tag 1 + title: Case title 1 + totalAlerts: 0 + totalComment: 0 + updated_at: null + updated_by: null + version: WzUzMiwxXQ== + Cases_find_case_activity_response: + summary: Retrieves all activity for a case + value: + page: 1 + perPage: 20 + total: 3 + userActions: + - action: create + comment_id: null + created_at: '2023-10-20T01:17:22.150Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + id: b4cd0770-07c9-11ed-a5fd-47154cb8767e + owner: cases + payload: + assignees: [] + category: null + connector: + fields: null + id: none + name: none + type: .none + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null + description: A case description. + owner: cases + settings: + syncAlerts: false + severity: low + status: open + tags: + - tag 1 + title: Case title 1 + type: create_case + version: WzM1ODg4LDFd + - action: create + comment_id: 578608d0-03b1-11ed-920c-974bfa104448 + created_at: '2023-10-14T20:12:53.354Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + id: 57af14a0-03b1-11ed-920c-974bfa104448 + owner: cases + payload: + comment: A new comment + owner: cases + type: user + type: comment + version: WzM1ODg4LDFa + - action: add + comment_id: null + created_at: '2023-10-20T01:10:28.238Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + id: 573c6980-6123-11ed-aa41-81a0a61fe447 + owner: cases + payload: + assignees: + uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + type: assignees + version: WzM1ODg4LDFb + Cases_find_case_response: + summary: >- + Retrieve the first five cases with the `tag-1` tag, in ascending order + by last update time. + value: + cases: + - assignees: [] + category: null + closed_at: null + closed_by: null + comments: [] + connector: + fields: null + id: none + name: none + type: .none + created_at: '2023-10-12T00:16:36.371Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null + description: Case description + duration: null + external_service: null + id: abed3a70-71bd-11ea-a0b2-c51ea50a58e2 + owner: cases + settings: + syncAlerts: true + severity: low + status: open + tags: + - tag-1 + title: Case title + totalAlerts: 0 + totalComment: 1 + updated_at: '2023-10-12T00:27:58.162Z' + updated_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + version: WzExMCwxXQ== + count_closed_cases: 0 + count_in_progress_cases: 0 + count_open_cases: 1 + page: 1 + per_page: 5 + total: 1 + Cases_find_connector_response: + summary: Retrieve information about the connectors and their settings. + value: + - actionTypeId: .jira + config: + apiUrl: 'https://elastic.atlassian.net/' + projectKey: ES + id: 61787f53-4eee-4741-8df6-8fe84fa616f7 + isDeprecated: false + isMissingSecrets: false + isPreconfigured: false + name: my-Jira + referencedByCount: 0 + Cases_get_case_alerts_response: + summary: Retrieves all alerts attached to a case + value: + - attached_at: '2022-07-25T20:09:40.963Z' + id: f6a7d0c3-d52d-432c-b2e6-447cd7fce04d + index: .alerts-observability.logs.alerts-default + Cases_get_case_configuration_response: + summary: Get the case configuration. + value: + - closure_type: close-by-user + connector: + fields: null + id: none + name: none + type: .none + created_at: '2024-07-01T17:07:17.767Z' + created_by: + email: null + full_name: null + username: elastic + customFields: + - defaultValue: Custom text field value. + key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + type: text + required: false + error: null + id: 856ee650-6c82-11ee-a20a-6164169afa58 + mappings: [] + owner: cases + templates: + - caseFields: + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + category: Default-category + connector: + fields: null + id: none + name: none + type: .none + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: Default text field value. + description: A default description for cases. + settings: + syncAlerts: false + tags: + - Default case tag + title: Default case title + description: A description of the template. + key: 505932fe-ee3a-4960-a661-c781b5acdb05 + name: template-1 + tags: + - Template tag 1 + updated_at: null + updated_by: null + version: WzEyLDNd + Cases_get_case_observability_response: + summary: >- + Retrieves information about an Observability case including its alerts + and comments. + value: + assignees: + - uid: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 + category: null + closed_at: null + closed_by: null + comments: + - alertId: + - a6e12ac4-7bce-457b-84f6-d7ce8deb8446 + created_at: '2023-11-06T19:29:38.424Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + id: 59d438d0-79a9-4864-8d4b-e63adacebf6e + index: + - .internal.alerts-observability.logs.alerts-default-000001 + owner: observability + pushed_at: null + pushed_by: null + rule: + id: 03e4eb87-62ca-4e5d-9570-3d7625e9669d + name: Observability rule + type: alert + updated_at: null + updated_by: null + version: WzY3LDJd + - comment: The first comment. + created_at: '2023-11-06T19:29:57.812Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + id: d99342d3-3aa3-4b80-90ec-a702607604f5 + owner: observability + pushed_at: null + pushed_by: null + type: user + updated_at: null + updated_by: null + version: WzcyLDJd + connector: + fields: null + id: none + name: none + type: .none + created_at: '2023-11-06T19:29:04.086Z' + created_by: + email: null + full_name: null + username: elastic + customFields: [] + description: An Observability case description. + duration: null + external_service: null + id: c3ff7550-def1-4e90-b6bc-c9969a4a09b1 + owner: observability + settings: + syncAlerts: false + severity: low + status: in-progress + tags: + - observability + - tag 1 + title: Observability case title 1 + totalAlerts: 1 + totalComment: 1 + updated_at: '2023-11-06T19:47:55.662Z' + updated_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + version: WzI0NywyXQ== + Cases_get_case_response: + summary: Retrieves information about a case including its comments. + value: + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + category: null + closed_at: null + closed_by: null + comments: + - comment: A new comment + created_at: '2023-10-13T15:40:32.335Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + id: 2134c1d0-02c2-11ed-85f2-4f7c222ca2fa + owner: cases + pushed_at: null + pushed_by: null + type: user + updated_at: null + updated_by: null + version: WzM3LDFd + connector: + fields: null + id: none + name: none + type: .none + created_at: '2023-10-13T15:33:50.604Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null + description: A case description + duration: null + external_service: null + id: 31cdada0-02c1-11ed-85f2-4f7c222ca2fa + owner: cases + settings: + syncAlerts: true + severity: low + status: open + tags: + - tag 1 + title: Case title 1 + totalAlerts: 0 + totalComment: 1 + updated_at: '2023-10-13T15:40:32.335Z' + updated_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + version: WzM2LDFd + Cases_get_comment_response: + summary: A single user comment retrieved from a case + value: + comment: A new comment + created_at: '2023-10-07T19:32:13.104Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + id: 8048b460-fe2b-11ec-b15d-779a7c8bbcc3 + owner: cases + pushed_at: null + pushed_by: null + type: user + updated_at: null + updated_by: null + version: WzIzLDFd + Cases_get_reporters_response: + summary: A list of two users that opened cases + value: + - email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + - email: jdoe@example.com + full_name: Jane Doe + profile_uid: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 + username: jdoe + Cases_get_tags_response: + summary: A list of tags that are used in cases + value: + - observability + - security + - tag 1 + - tag 2 + Cases_push_case_response: + summary: >- + The push case API returns a JSON object with details about the case and + the external service. + value: + closed_at: null + closed_by: null + comments: [] + connector: + fields: + issueType: '10006' + parent: null + priority: Low + id: 09f8c0b0-0eda-11ed-bd18-65557fe66949 + name: My connector + type: .jira + created_at: '2022-07-29T00:59:39.444Z' + created_by: + email: null + full_name: null + username: elastic + description: A case description. + duration: null + external_service: + connector_id: 09f8c0b0-0eda-11ed-bd18-65557fe66949 + connector_name: My connector + external_id: '71926' + external_title: ES-554 + external_url: 'https://cases.jira.com' + pushed_at: '2022-07-29T01:20:58.436Z' + pushed_by: + email: null + full_name: null + username: elastic + id: b917f300-0ed9-11ed-bd18-65557fe66949 + owner: cases + settings: + syncAlerts: true + severity: low + status: open + tags: + - tag 1 + title: Case title 1 + totalAlerts: 0 + totalComment: 0 + updated_at: '2022-07-29T01:20:58.436Z' + updated_by: + email: null + full_name: null + username: elastic + version: WzE3NjgsM10= + Cases_set_case_configuration_request: + summary: >- + Set the closure type, custom fields, and default connector for Stack + Management cases. + value: + closure_type: close-by-user + connector: + fields: null + id: 5e656730-e1ca-11ec-be9b-9b1838238ee6 + name: my-jira-connector + type: .jira + customFields: + - defaultValue: My custom field default value. + key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + type: text + required: false + owner: cases + templates: + - caseFields: + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + category: Default-category + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: A text field value for the template. + description: A default description for cases. + tags: + - Default case tag + title: Default case title + description: A description of the template. + key: 505932fe-ee3a-4960-a661-c781b5acdb05 + name: template-1 + tags: + - Template tag 1 + Cases_set_case_configuration_response: + summary: This is an example response for case settings. + value: + closure_type: close-by-user + connector: + fields: null + id: 5e656730-e1ca-11ec-be9b-9b1838238ee6 + name: my-jira-connector + type: .jira + created_at: '2024-07-01T17:07:17.767Z' + created_by: + email: 'null,' + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + customFields: + - defaultValue: My custom field default value. + key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + type: text + required: false + error: null + id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + mappings: + - action_type: overwrite + source: title + target: summary + - action_type: overwrite + source: description + target: description + - action_type: append + source: comments + target: comments + - action_type: overwrite + source: tags + target: labels + owner: cases + templates: + - caseFields: + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + category: Default-category + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: A text field value for the template. + description: A default description for cases. + tags: + - Default case tag + title: Default case title + description: A description of the template. + key: 505932fe-ee3a-4960-a661-c781b5acdb05 + name: template-1 + tags: + - Template tag 1 + updated_at: null + updated_by: null + version: WzIwNzMsMV0= + Cases_update_case_configuration_request: + summary: Update the case settings. + value: + closure_type: close-by-user + connector: + fields: null + id: 5e656730-e1ca-11ec-be9b-9b1838238ee6 + name: my-jira-connector + type: .jira + customFields: + - defaultValue: A new default value. + key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + type: text + required: true + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + label: my-toggle + type: toggle + required: false + version: WzExOSw0XQ== + Cases_update_case_configuration_response: + summary: This is an example response when the case configuration was updated. + value: + closure_type: close-by-user + connector: + fields: null + id: 5e656730-e1ca-11ec-be9b-9b1838238ee6 + name: my-jira-connector + type: .jira + created_at: '2024-07-01T17:07:17.767Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + customFields: + - defaultValue: A new default value. + key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + type: text + required: true + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + label: my-toggle + type: toggle + required: false + error: null + id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + mappings: + - action_type: overwrite + source: title + target: summary + - action_type: overwrite + source: description + target: description + - action_type: overwrite + source: tags + target: labels + - action_type: append + source: comments + target: comments + owner: cases + templates: [] + updated_at: '2024-07-19T00:52:42.401Z' + updated_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + version: WzI2LDNd + Cases_update_case_request: + summary: 'Update the case description, tags, and connector.' + value: + cases: + - connector: + fields: + issueType: '10006' + parent: null + priority: null + id: 131d4448-abe0-4789-939d-8ef60680b498 + name: My connector + type: .jira + customFields: + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: false + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My new field value + description: A case description. + id: a18b38a0-71b0-11ea-a0b2-c51ea50a58e2 + settings: + syncAlerts: true + tags: + - tag-1 + version: WzIzLDFd + Cases_update_case_response: + summary: >- + This is an example response when the case description, tags, and + connector were updated. + value: + - assignees: [] + category: null + closed_at: null + closed_by: null + comments: [] + connector: + fields: + issueType: '10006' + parent: null + priority: null + id: 131d4448-abe0-4789-939d-8ef60680b498 + name: My connector + type: .jira + created_at: '2023-10-13T09:16:17.416Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My new field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: false + description: A case description. + duration: null + external_service: + connector_id: 05da469f-1fde-4058-99a3-91e4807e2de8 + connector_name: Jira + external_id: '10003' + external_title: IS-4 + external_url: 'https://hms.atlassian.net/browse/IS-4' + pushed_at: '2023-10-13T09:20:40.672Z' + pushed_by: + email: null + full_name: null + username: elastic + id: 66b9aa00-94fa-11ea-9f74-e7e108796192 + owner: cases + settings: + syncAlerts: true + severity: low + status: open + tags: + - tag-1 + title: Case title 1 + totalAlerts: 0 + totalComment: 0 + updated_at: '2023-10-13T09:48:33.043Z' + updated_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + version: WzU0OCwxXQ== + Cases_update_comment_request: + summary: Updates a comment of a case. + value: + comment: An updated comment. + id: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + owner: cases + type: user + version: Wzk1LDFd + 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: + assignees: [] + category: null + closed_at: null + closed_by: null + comments: + - comment: An updated comment. + created_at: '2023-10-24T00:37:10.832Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + id: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + owner: cases + pushed_at: null + pushed_by: null + type: user + updated_at: '2023-10-24T01:27:06.210Z' + updated_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + version: WzIwNjM3LDFd + connector: + fields: null + id: none + name: none + type: .none + created_at: '2023-10-24T00:37:03.906Z' + created_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My new field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: false + description: A case description. + duration: null + external_service: null + id: 293f1bc0-74f6-11ea-b83a-553aecdb28b6 + owner: cases + settings: + syncAlerts: false + severity: low + status: open + tags: + - tag 1 + title: Case title 1 + totalAlerts: 0 + totalComment: 1 + updated_at: '2023-10-24T01:27:06.210Z' + updated_by: + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + username: elastic + version: WzIwNjM2LDFd + Connectors_create_email_connector_request: + summary: Create an email connector. + value: config: - $ref: '#/components/schemas/Connectors_config_properties_d3security' - connector_type_id: - description: The type of connector. - enum: - - .d3security - example: .d3security - type: string - name: - description: The display name for the connector. - example: my-connector - type: string + from: tester@example.com + hasAuth: true + host: 'https://example.com' + port: 1025 + secure: false + service: other + connector_type_id: .email + name: email-connector-1 secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_d3security' - required: - - config - - connector_type_id - - name - - secrets - title: Create D3 Security connector request - type: object - Connectors_create_connector_request_email: - description: > - The email connector uses the SMTP protocol to send mail messages, using - an integration of Nodemailer. An exception is Microsoft Exchange, which - uses HTTP protocol for sending emails, Send mail. Email message text is - sent as both plain text and html text. - properties: + password: password + user: username + Connectors_create_email_connector_response: + summary: A new email connector. + value: config: - $ref: '#/components/schemas/Connectors_config_properties_email' - connector_type_id: - description: The type of connector. - enum: - - .email - example: .email - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_email' - required: - - config - - connector_type_id - - name - - secrets - title: Create email connector request - type: object - Connectors_create_connector_request_gemini: - description: >- - The Google Gemini connector uses axios to send a POST request to Google - Gemini. - properties: + clientId: null + from: tester@example.com + hasAuth: true + host: 'https://example.com' + oauthTokenUrl: null + port: 1025 + secure: false + service: other + tenantId: null + connector_type_id: .email + id: 90a82c60-478f-11ee-a343-f98a117c727f + is_deprecated: false + is_missing_secrets: false + is_preconfigured: false + is_system_action: false + name: email-connector-1 + Connectors_create_index_connector_request: + summary: Create an index connector. + value: config: - $ref: '#/components/schemas/Connectors_config_properties_gemini' - connector_type_id: - description: The type of connector. - enum: - - .gemini - example: .gemini - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_gemini' - required: - - config - - connector_type_id - - name - - secrets - title: Create Google Gemini connector request - type: object - Connectors_create_connector_request_genai: - description: > - The OpenAI connector uses axios to send a POST request to either OpenAI - or Azure OpenAPI. - properties: + index: test-index + connector_type_id: .index + name: my-connector + Connectors_create_index_connector_response: + summary: A new index connector. + value: config: - $ref: '#/components/schemas/Connectors_config_properties_genai' - connector_type_id: - description: The type of connector. - enum: - - .gen-ai - example: .gen-ai - type: string - name: - description: The display name for the connector. - example: my-connector - type: string + executionTimeField: null + index: test-index + refresh: false + connector_type_id: .index + id: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + is_deprecated: false + is_missing_secrets: false + is_preconfigured: false + is_system_action: false + name: my-connector + Connectors_create_webhook_connector_request: + summary: Create a webhook connector with SSL authentication. + value: + config: + authType: webhook-authentication-ssl + certType: ssl-crt-key + method: post + url: 'https://example.com' + connector_type_id: .webhook + name: my-webhook-connector secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_genai' - required: - - config - - connector_type_id - - name - - secrets - title: Create OpenAI connector request - type: object - Connectors_create_connector_request_index: - description: The index connector indexes a document into Elasticsearch. - properties: + crt: QmFnIEF0dH... + key: LS0tLS1CRUdJ... + password: my-passphrase + Connectors_create_webhook_connector_response: + summary: A new webhook connector. + value: config: - $ref: '#/components/schemas/Connectors_config_properties_index' - connector_type_id: - description: The type of connector. - enum: - - .index - example: .index - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - required: - - config - - connector_type_id - - name - title: Create index connector request - type: object - Connectors_create_connector_request_jira: - description: The Jira connector uses the REST API v2 to create Jira issues. - properties: + authType: webhook-authentication-ssl + certType: ssl-crt-key + hasAuth: true + headers: null + method: post + url: 'https://example.com' + verificationMode: full + connector_type_id: .webhook + id: 900eb010-3b9d-11ee-a642-8ffbb94e38bd + is_deprecated: false + is_missing_secrets: false + is_preconfigured: false + is_system_action: false + name: my-webhook-connector + Connectors_create_xmatters_connector_request: + summary: Create an xMatters connector with URL authentication. + value: config: - $ref: '#/components/schemas/Connectors_config_properties_jira' - connector_type_id: - description: The type of connector. - enum: - - .jira - example: .jira - type: string - name: - description: The display name for the connector. - example: my-connector - type: string + usesBasic: false + connector_type_id: .xmatters + name: my-xmatters-connector secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_jira' - required: - - config - - connector_type_id - - name - - secrets - title: Create Jira connector request - type: object - Connectors_create_connector_request_opsgenie: - description: The Opsgenie connector uses the Opsgenie alert API. - properties: + secretsUrl: 'https://example.com?apiKey=xxxxx' + Connectors_create_xmatters_connector_response: + summary: A new xMatters connector. + value: + config: + configUrl: null + usesBasic: false + connector_type_id: .xmatters + id: 4d2d8da0-4d1f-11ee-9367-577408be4681 + is_deprecated: false + is_missing_secrets: false + is_preconfigured: false + is_system_action: false + name: my-xmatters-connector + Connectors_get_connector_response: + summary: Get connector details. + value: + config: {} + connector_type_id: .server-log + id: df770e30-8b8b-11ed-a780-3b746c987a81 + is_deprecated: false + is_missing_secrets: false + is_preconfigured: false + is_system_action: false + name: my_server_log_connector + Connectors_get_connector_types_generativeai_response: + summary: A list of connector types for the `generativeAI` feature. + value: + - enabled: true + enabled_in_config: true + enabled_in_license: true + id: .gen-ai + is_system_action_type: false + minimum_license_required: enterprise + name: OpenAI + supported_feature_ids: + - generativeAIForSecurity + - generativeAIForObservability + - generativeAIForSearchPlayground + - enabled: true + enabled_in_config: true + enabled_in_license: true + id: .bedrock + is_system_action_type: false + minimum_license_required: enterprise + name: AWS Bedrock + supported_feature_ids: + - generativeAIForSecurity + - generativeAIForObservability + - generativeAIForSearchPlayground + - enabled: true + enabled_in_config: true + enabled_in_license: true + id: .gemini + is_system_action_type: false + minimum_license_required: enterprise + name: Google Gemini + supported_feature_ids: + - generativeAIForSecurity + Connectors_get_connectors_response: + summary: A list of connectors + value: + - connector_type_id: .email + id: preconfigured-email-connector + is_deprecated: false + is_preconfigured: true + is_system_action: false + name: my-preconfigured-email-notification + referenced_by_count: 0 + - config: + executionTimeField: null + index: test-index + refresh: false + connector_type_id: .index + id: e07d0c80-8b8b-11ed-a780-3b746c987a81 + is_deprecated: false + is_missing_secrets: false + is_preconfigured: false + is_system_action: false + name: my-index-connector + referenced_by_count: 2 + Connectors_run_cases_webhook_connector_request: + summary: Run a Webhook - Case Management connector to create a case. + value: + params: + subAction: pushToService + subActionParams: + comments: + - comment: A comment about the incident. + commentId: 1 + incident: + description: Description of the incident. + id: caseID + severity: low + status: open + tags: + - tag1 + - tag2 + title: Case title + Connectors_run_cases_webhook_connector_response: + summary: >- + Response from a pushToService action for a Webhook - Case Management + connector. + value: + connector_id: 1824b5b8-c005-4dcc-adac-57f92db46459 + data: + comments: + - commentId: 1 + pushedDate: '2023-12-05T19:43:36.360Z' + id: 100665 + pushedDate: '2023-12-05T19:43:36.360Z' + title: TEST-29034 + url: 'https://example.com/browse/TEST-29034' + status: ok + Connectors_run_email_connector_request: + summary: Send an email message from an email connector. + value: + params: + bcc: + - user1@example.com + cc: + - user2@example.com + - user3@example.com + message: Test email message. + subject: Test message subject + to: + - user4@example.com + Connectors_run_email_connector_response: + summary: Response for sending a message from an email connector. + value: + connector_id: 7fc7b9a0-ecc9-11ec-8736-e7d63118c907 + data: + accepted: + - user1@example.com + - user2@example.com + - user3@example.com + - user4@example.com + envelope: + from: tester@example.com + to: + - user1@example.com + - user2@example.com + - user3@example.com + - user4@example.com + envelopeTime: 8 + messageId: <08a92d29-642a-0706-750c-de5996bd5cf3@example.com> + messageSize: 729 + messageTime: 3 + rejected: [] + response: 250 Message queued as QzEXKcGJ + status: ok + Connectors_run_index_connector_request: + summary: Run an index connector. + value: + params: + documents: + - id: my_doc_id + message: 'hello, world' + name: my_doc_name + Connectors_run_index_connector_response: + summary: Response from running an index connector. + value: + connector_id: fd38c600-96a5-11ed-bb79-353b74189cba + data: + errors: false + items: + - create: + _id: 4JtvwYUBrcyxt2NnfW3y + _index: my-index + _primary_term: 1 + _seq_no: 0 + _shards: + failed: 0 + successful: 1 + total: 2 + _version: 1 + result: created + status: 201 + took: 135 + status: ok + Connectors_run_jira_connector_request: + summary: Run a Jira connector to retrieve the list of issue types. + value: + params: + subAction: issueTypes + Connectors_run_jira_connector_response: + summary: Response from retrieving the list of issue types for a Jira connector. + value: + connector_id: b3aad810-edbe-11ec-82d1-11348ecbf4a6 + data: + - id: 10024 + name: Improvement + - id: 10006 + name: Task + - id: 10007 + name: Sub-task + - id: 10025 + name: New Feature + - id: 10023 + name: Bug + - id: 10000 + name: Epic + status: ok + Connectors_run_pagerduty_connector_request: + summary: Run a PagerDuty connector to trigger an alert. + value: + params: + customDetails: + my_data_1: test data + eventAction: trigger + links: + - href: 'http://example.com/pagerduty' + text: An example link + summary: A brief event summary + Connectors_run_pagerduty_connector_response: + summary: Response from running a PagerDuty connector. + value: + connector_id: 45de9f70-954f-4608-b12a-db7cf808e49d + data: + dedup_key: 5115e138b26b484a81eaea779faa6016 + message: Event processed + status: success + status: ok + Connectors_run_server_log_connector_request: + summary: Run a server log connector. + value: + params: + level: warn + message: Test warning message. + Connectors_run_server_log_connector_response: + summary: Response from running a server log connector. + value: + connector_id: 7fc7b9a0-ecc9-11ec-8736-e7d63118c907 + status: ok + Connectors_run_servicenow_itom_connector_request: + summary: Run a ServiceNow ITOM connector to retrieve the list of choices. + value: + params: + subAction: getChoices + subActionParams: + fields: + - severity + - urgency + Connectors_run_servicenow_itom_connector_response: + summary: >- + Response from retrieving the list of choices for a ServiceNow ITOM + connector. + value: + connector_id: 9d9be270-2fd2-11ed-b0e0-87533c532698 + data: + - dependent_value: '' + element: severity + label: Critical + value: 1 + - dependent_value: '' + element: severity + label: Major + value: 2 + - dependent_value: '' + element: severity + label: Minor + value: 3 + - dependent_value: '' + element: severity + label: Warning + value: 4 + - dependent_value: '' + element: severity + label: OK + value: 5 + - dependent_value: '' + element: severity + label: Clear + value: 0 + - dependent_value: '' + element: urgency + label: 1 - High + value: 1 + - dependent_value: '' + element: urgency + label: 2 - Medium + value: 2 + - dependent_value: '' + element: urgency + label: 3 - Low + value: 3 + status: ok + Connectors_run_slack_api_connector_request: + summary: >- + Run a Slack connector that uses the web API method to post a message on + a channel. + value: + params: + subAction: postMessage + subActionParams: + channelIds: + - C123ABC456 + text: A test message. + Connectors_run_slack_api_connector_response: + summary: Response from posting a message with a Slack connector. + value: + connector_id: .slack_api + data: + channel: C123ABC456 + message: + app_id: A01BC2D34EF + blocks: + - block_id: /NXe + elements: + - elements: + - text: A test message. + type: text + type: rich_text_section + type: rich_text + bot_id: B12BCDEFGHI + bot_profile: + app_id: A01BC2D34EF + deleted: false + icons: + image_36: 'https://a.slack-edge.com/80588/img/plugins/app/bot_36.png' + id: B12BCDEFGHI + name: test + team_id: T01ABCDE2F + updated: 1672169705 + team: T01ABCDE2F + text: A test message + ts: '1234567890.123456' + type: message + user: U12A345BC6D + ok: true + ts: '1234567890.123456' + status: ok + Connectors_run_swimlane_connector_request: + summary: Run a Swimlane connector to create an incident. + value: + params: + subAction: pushToService + subActionParams: + comments: + - comment: A comment about the incident. + commentId: 1 + incident: + caseId: '1000' + caseName: Case name + description: Description of the incident. + Connectors_run_swimlane_connector_response: + summary: Response from creating a Swimlane incident. + value: + connector_id: a4746470-2f94-11ed-b0e0-87533c532698 + data: + comments: + - commentId: 1 + pushedDate: '2022-09-08T16:52:27.865Z' + id: aKPmBHWzmdRQtx6Mx + pushedDate: '2022-09-08T16:52:27.866Z' + title: TEST-457 + url: >- + https://elastic.swimlane.url.us/record/aNcL2xniGHGpa2AHb/aKPmBHWzmdRQtx6Mx + status: ok + Connectors_update_index_connector_request: + summary: Update an index connector. + value: config: - $ref: '#/components/schemas/Connectors_config_properties_opsgenie' - connector_type_id: - description: The type of connector. - enum: - - .opsgenie - example: .opsgenie - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_opsgenie' - required: - - config - - connector_type_id - - name - - secrets - title: Create Opsgenie connector request - type: object - Connectors_create_connector_request_pagerduty: + index: updated-index + name: updated-connector + Data_views_create_data_view_request: + summary: Create a data view with runtime fields. + value: + data_view: + name: My Logstash data view + runtimeFieldMap: + runtime_shape_name: + script: + source: 'emit(doc[''shape_name''].value)' + type: keyword + title: logstash-* + Data_views_create_runtime_field_request: + summary: Create a runtime field. + value: + name: runtimeFoo + runtimeField: + script: + source: 'emit(doc["foo"].value)' + type: long + Data_views_get_data_view_response: + summary: >- + The get data view API returns a JSON object that contains information + about the data view. + value: + data_view: + allowNoIndex: false + fieldAttrs: + products.manufacturer: + count: 1 + products.price: + count: 1 + products.product_name: + count: 1 + total_quantity: + count: 1 + fieldFormats: + products.base_price: + id: number + params: + pattern: '$0,0.00' + products.base_unit_price: + id: number + params: + pattern: '$0,0.00' + products.min_price: + id: number + params: + pattern: '$0,0.00' + products.price: + id: number + params: + pattern: '$0,0.00' + products.taxful_price: + id: number + params: + pattern: '$0,0.00' + products.taxless_price: + id: number + params: + pattern: '$0,0.00' + taxful_total_price: + id: number + params: + pattern: '$0,0.[00]' + taxless_total_price: + id: number + params: + pattern: '$0,0.00' + fields: + _id: + aggregatable: false + count: 0 + esTypes: + - _id + format: + id: string + isMapped: true + name: _id + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + _index: + aggregatable: true + count: 0 + esTypes: + - _index + format: + id: string + isMapped: true + name: _index + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + _score: + aggregatable: false + count: 0 + format: + id: number + isMapped: true + name: _score + readFromDocValues: false + scripted: false + searchable: false + shortDotsEnable: false + type: number + _source: + aggregatable: false + count: 0 + esTypes: + - _source + format: + id: _source + isMapped: true + name: _source + readFromDocValues: false + scripted: false + searchable: false + shortDotsEnable: false + type: _source + category: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: category + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + category.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: category.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: category + type: string + currency: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: currency + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + customer_birth_date: + aggregatable: true + count: 0 + esTypes: + - date + format: + id: date + isMapped: true + name: customer_birth_date + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: date + customer_first_name: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: customer_first_name + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + customer_first_name.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: customer_first_name.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: customer_first_name + type: string + customer_full_name: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: customer_full_name + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + customer_full_name.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: customer_full_name.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: customer_full_name + type: string + customer_gender: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: customer_gender + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + customer_id: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: customer_id + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + customer_last_name: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: customer_last_name + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + customer_last_name.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: customer_last_name.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: customer_last_name + type: string + customer_phone: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: customer_phone + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + day_of_week: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: day_of_week + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + day_of_week_i: + aggregatable: true + count: 0 + esTypes: + - integer + format: + id: number + isMapped: true + name: day_of_week_i + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + email: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: email + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + event.dataset: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: event.dataset + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + geoip.city_name: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: geoip.city_name + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + geoip.continent_name: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: geoip.continent_name + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + geoip.country_iso_code: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: geoip.country_iso_code + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + geoip.location: + aggregatable: true + count: 0 + esTypes: + - geo_point + format: + id: geo_point + params: + transform: wkt + isMapped: true + name: geoip.location + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: geo_point + geoip.region_name: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: geoip.region_name + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + manufacturer: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: manufacturer + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + manufacturer.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: manufacturer.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: manufacturer + type: string + order_date: + aggregatable: true + count: 0 + esTypes: + - date + format: + id: date + isMapped: true + name: order_date + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: date + order_id: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: order_id + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + products._id: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: products._id + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + products._id.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: products._id.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: products._id + type: string + products.base_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: products.base_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.base_unit_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: products.base_unit_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.category: + aggregatable: false + count: 0 + esTypes: + - text + format: + id: string + isMapped: true + name: products.category + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + products.category.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: products.category.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: products.category + type: string + products.created_on: + aggregatable: true + count: 0 + esTypes: + - date + format: + id: date + isMapped: true + name: products.created_on + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: date + products.discount_amount: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + isMapped: true + name: products.discount_amount + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.discount_percentage: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + isMapped: true + name: products.discount_percentage + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.manufacturer: + aggregatable: false + count: 1 + esTypes: + - text + format: + id: string + isMapped: true + name: products.manufacturer + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + products.manufacturer.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: products.manufacturer.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: products.manufacturer + type: string + products.min_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: products.min_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.price: + aggregatable: true + count: 1 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: products.price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.product_id: + aggregatable: true + count: 0 + esTypes: + - long + format: + id: number + isMapped: true + name: products.product_id + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.product_name: + aggregatable: false + count: 1 + esTypes: + - text + format: + id: string + isMapped: true + name: products.product_name + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + products.product_name.keyword: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: products.product_name.keyword + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + subType: + multi: + parent: products.product_name + type: string + products.quantity: + aggregatable: true + count: 0 + esTypes: + - integer + format: + id: number + isMapped: true + name: products.quantity + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.sku: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: products.sku + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + products.tax_amount: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + isMapped: true + name: products.tax_amount + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.taxful_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: products.taxful_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.taxless_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: products.taxless_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + products.unit_discount_amount: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + isMapped: true + name: products.unit_discount_amount + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + sku: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: sku + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + taxful_total_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.[00]' + isMapped: true + name: taxful_total_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + taxless_total_price: + aggregatable: true + count: 0 + esTypes: + - half_float + format: + id: number + params: + pattern: '$0,0.00' + isMapped: true + name: taxless_total_price + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + total_quantity: + aggregatable: true + count: 1 + esTypes: + - integer + format: + id: number + isMapped: true + name: total_quantity + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + total_unique_products: + aggregatable: true + count: 0 + esTypes: + - integer + format: + id: number + isMapped: true + name: total_unique_products + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + type: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: type + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + user: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: user + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + id: ff959d40-b880-11e8-a6d9-e546fe2bba5f + name: Kibana Sample Data eCommerce + namespaces: + - default + runtimeFieldMap: {} + sourceFilters: [] + timeFieldName: order_date + title: kibana_sample_data_ecommerce + typeMeta: {} + version: WzUsMV0= + Data_views_get_data_views_response: + summary: The get all data views API returns a list of data views. + value: + data_view: + - id: ff959d40-b880-11e8-a6d9-e546fe2bba5f + name: Kibana Sample Data eCommerce + namespaces: + - default + title: kibana_sample_data_ecommerce + typeMeta: {} + - id: d3d7af60-4c81-11e8-b3d7-01146121b73d + name: Kibana Sample Data Flights + namespaces: + - default + title: kibana_sample_data_flights + - id: 90943e30-9a47-11e8-b64d-95841ca0b247 + name: Kibana Sample Data Logs + namespaces: + - default + title: kibana_sample_data_logs + Data_views_get_default_data_view_response: + summary: The get default data view API returns the default data view identifier. + value: + data_view_id: ff959d40-b880-11e8-a6d9-e546fe2bba5f + Data_views_get_runtime_field_response: + summary: >- + The get runtime field API returns a JSON object that contains + information about the runtime field (`hour_of_day`) and the data view + (`d3d7af60-4c81-11e8-b3d7-01146121b73d`). + value: + data_view: + allowNoIndex: false + fieldAttrs: {} + fieldFormats: + AvgTicketPrice: + id: number + params: + pattern: '$0,0.[00]' + hour_of_day: + id: number + params: + pattern: '00' + fields: + _id: + aggregatable: false + count: 0 + esTypes: + - _id + format: + id: string + isMapped: true + name: _id + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + _index: + aggregatable: true + count: 0 + esTypes: + - _index + format: + id: string + isMapped: true + name: _index + readFromDocValues: false + scripted: false + searchable: true + shortDotsEnable: false + type: string + _score: + aggregatable: false + count: 0 + format: + id: number + isMapped: true + name: _score + readFromDocValues: false + scripted: false + searchable: false + shortDotsEnable: false + type: number + _source: + aggregatable: false + count: 0 + esTypes: + - _source + format: + id: _source + isMapped: true + name: _source + readFromDocValues: false + scripted: false + searchable: false + shortDotsEnable: false + type: _source + AvgTicketPrice: + aggregatable: true + count: 0 + esTypes: + - float + format: + id: number + params: + pattern: '$0,0.[00]' + isMapped: true + name: AvgTicketPrice + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + Cancelled: + aggregatable: true + count: 0 + esTypes: + - boolean + format: + id: boolean + isMapped: true + name: Cancelled + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: boolean + Carrier: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: Carrier + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + dayOfWeek: + aggregatable: true + count: 0 + esTypes: + - integer + format: + id: number + isMapped: true + name: dayOfWeek + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + Dest: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: Dest + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + DestAirportID: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: DestAirportID + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + DestCityName: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: DestCityName + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + DestCountry: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: DestCountry + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + DestLocation: + aggregatable: true + count: 0 + esTypes: + - geo_point + format: + id: geo_point + params: + transform: wkt + isMapped: true + name: DestLocation + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: geo_point + DestRegion: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: DestRegion + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + DestWeather: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: DestWeather + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + DistanceKilometers: + aggregatable: true + count: 0 + esTypes: + - float + format: + id: number + isMapped: true + name: DistanceKilometers + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + DistanceMiles: + aggregatable: true + count: 0 + esTypes: + - float + format: + id: number + isMapped: true + name: DistanceMiles + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + FlightDelay: + aggregatable: true + count: 0 + esTypes: + - boolean + format: + id: boolean + isMapped: true + name: FlightDelay + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: boolean + FlightDelayMin: + aggregatable: true + count: 0 + esTypes: + - integer + format: + id: number + isMapped: true + name: FlightDelayMin + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + FlightDelayType: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: FlightDelayType + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + FlightNum: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: FlightNum + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + FlightTimeHour: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: FlightTimeHour + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + FlightTimeMin: + aggregatable: true + count: 0 + esTypes: + - float + format: + id: number + isMapped: true + name: FlightTimeMin + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: number + hour_of_day: + aggregatable: true + count: 0 + esTypes: + - long + format: + id: number + params: + pattern: '00' + name: hour_of_day + readFromDocValues: false + runtimeField: + script: + source: 'emit(doc[''timestamp''].value.getHour());' + type: long + scripted: false + searchable: true + shortDotsEnable: false + type: number + Origin: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: Origin + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + OriginAirportID: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: OriginAirportID + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + OriginCityName: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: OriginCityName + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + OriginCountry: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: OriginCountry + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + OriginLocation: + aggregatable: true + count: 0 + esTypes: + - geo_point + format: + id: geo_point + params: + transform: wkt + isMapped: true + name: OriginLocation + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: geo_point + OriginRegion: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: OriginRegion + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + OriginWeather: + aggregatable: true + count: 0 + esTypes: + - keyword + format: + id: string + isMapped: true + name: OriginWeather + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: string + timestamp: + aggregatable: true + count: 0 + esTypes: + - date + format: + id: date + isMapped: true + name: timestamp + readFromDocValues: true + scripted: false + searchable: true + shortDotsEnable: false + type: date + id: d3d7af60-4c81-11e8-b3d7-01146121b73d + name: Kibana Sample Data Flights + runtimeFieldMap: + hour_of_day: + script: + source: 'emit(doc[''timestamp''].value.getHour());' + type: long + sourceFilters: [] + timeFieldName: timestamp + title: kibana_sample_data_flights + version: WzM2LDJd + fields: + - aggregatable: true + count: 0 + esTypes: + - long + name: hour_of_day + readFromDocValues: false + runtimeField: + script: + source: 'emit(doc[''timestamp''].value.getHour());' + type: long + scripted: false + searchable: true + shortDotsEnable: false + type: number + Data_views_preview_swap_data_view_request: + summary: Preview swapping references from data view ID "abcd-efg" to "xyz-123". + value: + fromId: abcd-efg + toId: xyz-123 + Data_views_set_default_data_view_request: + summary: Set the default data view identifier. + value: + data_view_id: ff959d40-b880-11e8-a6d9-e546fe2bba5f + force: true + Data_views_swap_data_view_request: + summary: >- + Swap references from data view ID "abcd-efg" to "xyz-123" and remove the + data view that is no longer referenced. + value: + delete: true + fromId: abcd-efg + toId: xyz-123 + Data_views_update_data_view_request: + summary: Update some properties for a data view. + value: + data_view: + allowNoIndex: false + name: Kibana Sample Data eCommerce + timeFieldName: order_date + title: kibana_sample_data_ecommerce + refresh_fields: true + Data_views_update_field_metadata_request: + summary: Update metadata for multiple fields. + value: + fields: + field1: + count: 123 + customLabel: Field 1 label + field2: + customDescription: Field 2 description + customLabel: Field 2 label + Data_views_update_runtime_field_request: + summary: Update an existing runtime field on a data view. + value: + runtimeField: + script: + source: 'emit(doc["bar"].value)' + Machine_learning_APIs_mlSyncExample: + summary: Two anomaly detection jobs required synchronization in this example. + value: + datafeedsAdded: {} + datafeedsRemoved: {} + savedObjectsCreated: + anomaly-detector: + myjob1: + success: true + myjob2: + success: true + savedObjectsDeleted: {} + Saved_objects_export_objects_request: + summary: Export a specific saved object. + value: + excludeExportDetails: true + includeReferencesDeep: false + objects: + - id: de71f4f0-1902-11e9-919b-ffe5949a18d2 + type: map + Saved_objects_export_objects_response: + summary: >- + The export objects API response contains a JSON record for each exported + object. + value: + attributes: + description: '' + layerListJSON: >- + [{"id":"0hmz5","alpha":1,"sourceDescriptor":{"type":"EMS_TMS","isAutoSelect":true,"lightModeDefault":"road_map_desaturated"},"visible":true,"style":{},"type":"EMS_VECTOR_TILE","minZoom":0,"maxZoom":24},{"id":"edh66","label":"Total + Requests by + Destination","minZoom":0,"maxZoom":24,"alpha":0.5,"sourceDescriptor":{"type":"EMS_FILE","id":"world_countries","tooltipProperties":["name","iso2"]},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"DYNAMIC","options":{"field":{"name":"__kbnjoin__count__673ff994-fc75-4c67-909b-69fcb0e1060e","origin":"join"},"color":"Greys","fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"lineColor":{"type":"STATIC","options":{"color":"#FFFFFF"}},"lineWidth":{"type":"STATIC","options":{"size":1}},"iconSize":{"type":"STATIC","options":{"size":10}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR","joins":[{"leftField":"iso2","right":{"type":"ES_TERM_SOURCE","id":"673ff994-fc75-4c67-909b-69fcb0e1060e","indexPatternTitle":"kibana_sample_data_logs","term":"geo.dest","indexPatternRefName":"layer_1_join_0_index_pattern","metrics":[{"type":"count","label":"web + logs + count"}],"applyGlobalQuery":true}}]},{"id":"gaxya","label":"Actual + Requests","minZoom":9,"maxZoom":24,"alpha":1,"sourceDescriptor":{"id":"b7486535-171b-4d3b-bb2e-33c1a0a2854c","type":"ES_SEARCH","geoField":"geo.coordinates","limit":2048,"filterByMapBounds":true,"tooltipProperties":["clientip","timestamp","host","request","response","machine.os","agent","bytes"],"indexPatternRefName":"layer_2_source_index_pattern","applyGlobalQuery":true,"scalingType":"LIMIT"},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"STATIC","options":{"color":"#2200ff"}},"lineColor":{"type":"STATIC","options":{"color":"#FFFFFF"}},"lineWidth":{"type":"STATIC","options":{"size":2}},"iconSize":{"type":"DYNAMIC","options":{"field":{"name":"bytes","origin":"source"},"minSize":1,"maxSize":23,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR"},{"id":"tfi3f","label":"Total + Requests and + Bytes","minZoom":0,"maxZoom":9,"alpha":1,"sourceDescriptor":{"type":"ES_GEO_GRID","resolution":"COARSE","id":"8aaa65b5-a4e9-448b-9560-c98cb1c5ac5b","geoField":"geo.coordinates","requestType":"point","metrics":[{"type":"count","label":"web + logs + count"},{"type":"sum","field":"bytes"}],"indexPatternRefName":"layer_3_source_index_pattern","applyGlobalQuery":true},"visible":true,"style":{"type":"VECTOR","properties":{"fillColor":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"color":"Blues","fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"lineColor":{"type":"STATIC","options":{"color":"#cccccc"}},"lineWidth":{"type":"STATIC","options":{"size":1}},"iconSize":{"type":"DYNAMIC","options":{"field":{"name":"sum_of_bytes","origin":"source"},"minSize":7,"maxSize":25,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"labelText":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"labelSize":{"type":"DYNAMIC","options":{"field":{"name":"doc_count","origin":"source"},"minSize":12,"maxSize":24,"fieldMetaOptions":{"isEnabled":false,"sigma":3}}},"symbolizeAs":{"options":{"value":"circle"}},"icon":{"type":"STATIC","options":{"value":"marker"}}}},"type":"GEOJSON_VECTOR"}] + mapStateJSON: >- + {"zoom":3.64,"center":{"lon":-88.92107,"lat":42.16337},"timeFilters":{"from":"now-7d","to":"now"},"refreshConfig":{"isPaused":true,"interval":0},"query":{"language":"kuery","query":""},"settings":{"autoFitToDataBounds":false}} + title: '[Logs] Total Requests and Bytes' + uiStateJSON: '{"isDarkMode":false}' + coreMigrationVersion: 8.8.0 + created_at: '2023-08-23T20:03:32.204Z' + id: de71f4f0-1902-11e9-919b-ffe5949a18d2 + managed: false + references: + - id: 90943e30-9a47-11e8-b64d-95841ca0b247 + name: layer_1_join_0_index_pattern + type: index-pattern + - id: 90943e30-9a47-11e8-b64d-95841ca0b247 + name: layer_2_source_index_pattern + type: index-pattern + - id: 90943e30-9a47-11e8-b64d-95841ca0b247 + name: layer_3_source_index_pattern + type: index-pattern + type: map + typeMigrationVersion: 8.4.0 + updated_at: '2023-08-23T20:03:32.204Z' + version: WzEzLDFd + Saved_objects_import_objects_request: + value: + file: file.ndjson + Saved_objects_import_objects_response: + summary: >- + The import objects API response indicates a successful import and the + objects are created. Since these objects are created as new copies, each + entry in the successResults array includes a destinationId attribute. + value: + success: true + successCount: 1 + successResults: + - destinationId: 82d2760c-468f-49cf-83aa-b9a35b6a8943 + id: 90943e30-9a47-11e8-b64d-95841ca0b247 + managed: false + meta: + icon: indexPatternApp + title: Kibana Sample Data Logs + type: index-pattern + Saved_objects_key_rotation_response: + summary: Encryption key rotation using default parameters. + value: + failed: 0 + successful: 300 + total: 1000 + Saved_objects_resolve_missing_reference_request: + value: + file: file.ndjson + retries: + - id: my-pattern + overwrite: true + type: index-pattern + - destinationId: another-vis + id: my-vis + overwrite: true + type: visualization + - destinationId: yet-another-canvas + id: my-canvas + overwrite: true + type: canvas + - id: my-dashboard + type: dashboard + Saved_objects_resolve_missing_reference_response: + summary: Resolve missing reference errors. + value: + success: true + successCount: 3 + successResults: + - id: my-vis + meta: + icon: visualizeApp + title: Look at my visualization + type: visualization + - id: my-search + meta: + icon: searchApp + title: Look at my search + type: search + - id: my-dashboard + meta: + icon: dashboardApp + title: Look at my dashboard + type: dashboard + parameters: + Cases_alert_id: + description: An identifier for the alert. + in: path + name: alertId + required: true + schema: + example: 09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540 + type: string + Cases_assignees: description: > - The PagerDuty connector uses the v2 Events API to trigger, acknowledge, - and resolve PagerDuty alerts. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_pagerduty' - connector_type_id: - description: The type of connector. - enum: - - .pagerduty - example: .pagerduty - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_pagerduty' - required: - - config - - connector_type_id - - name - - secrets - title: Create PagerDuty connector request - type: object - Connectors_create_connector_request_resilient: + 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. + in: query + name: assignees + schema: + oneOf: + - type: string + - items: + type: string + maxItems: 100 + type: array + Cases_case_id: description: >- - The IBM Resilient connector uses the RESILIENT REST v2 to create IBM - Resilient incidents. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_resilient' - connector_type_id: - description: The type of connector. - enum: - - .resilient - example: .resilient - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_resilient' - required: - - config - - connector_type_id - - name - - secrets - title: Create IBM Resilient connector request - type: object - Connectors_create_connector_request_sentinelone: - description: > - The SentinelOne connector communicates with SentinelOne Management - Console via REST API. 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. - title: Create SentinelOne connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_sentinelone' - connector_type_id: - description: The type of connector. - enum: - - .sentinelone - example: .sentinelone - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_sentinelone' - required: - - config - - connector_type_id - - name - - secrets - x-technical-preview: true - Connectors_create_connector_request_serverlog: - description: This connector writes an entry to the Kibana server log. - properties: - connector_type_id: - description: The type of connector. - enum: - - .server-log - example: .server-log - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - required: - - connector_type_id - - name - title: Create server log connector request - type: object - Connectors_create_connector_request_servicenow: - description: > - The ServiceNow ITSM connector uses the import set API to create - ServiceNow incidents. You can use the connector for rule actions and - cases. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow' - connector_type_id: - description: The type of connector. - enum: - - .servicenow - example: .servicenow - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' - required: - - config - - connector_type_id - - name - - secrets - title: Create ServiceNow ITSM connector request - type: object - Connectors_create_connector_request_servicenow_itom: - description: > - The ServiceNow ITOM connector uses the event API to create ServiceNow - events. You can use the connector for rule actions. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow_itom' - connector_type_id: - description: The type of connector. - enum: - - .servicenow-itom - example: .servicenow-itom - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' - required: - - config - - connector_type_id - - name - - secrets - title: Create ServiceNow ITOM connector request - type: object - Connectors_create_connector_request_servicenow_sir: + The identifier for the case. To retrieve case IDs, use the find cases + API. All non-ASCII characters must be URL encoded. + in: path + name: caseId + required: true + schema: + example: 9c235210-6834-11ea-a78c-6ffb38a34414 + type: string + Cases_category: + description: Filters the returned cases by category. + in: query + name: category + schema: + oneOf: + - example: my-category + type: string + - items: + type: string + maxItems: 100 + type: array + Cases_comment_id: description: > - The ServiceNow SecOps connector uses the import set API to create - ServiceNow security incidents. You can use the connector for rule - actions and cases. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow' - connector_type_id: - description: The type of connector. - enum: - - .servicenow-sir - example: .servicenow-sir - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' - required: - - config - - connector_type_id - - name - - secrets - title: Create ServiceNow SecOps connector request - type: object - Connectors_create_connector_request_slack_api: - description: The Slack connector uses an API method to send Slack messages. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_slack_api' - connector_type_id: - description: The type of connector. - enum: - - .slack_api - example: .slack_api - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_slack_api' - required: - - connector_type_id - - name - - secrets - title: Create Slack connector request - type: object - Connectors_create_connector_request_slack_webhook: - description: The Slack connector uses Slack Incoming Webhooks. - properties: - connector_type_id: - description: The type of connector. - enum: - - .slack - example: .slack - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_slack_webhook' - required: - - connector_type_id - - name - - secrets - title: Create Slack connector request - type: object - Connectors_create_connector_request_swimlane: + The identifier for the comment. To retrieve comment IDs, use the get + case or find cases APIs. + in: path + name: commentId + required: true + schema: + example: 71ec1870-725b-11ea-a0b2-c51ea50a58e2 + type: string + Cases_configuration_id: + description: An identifier for the configuration. + in: path + name: configurationId + required: true + schema: + example: 3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9 + type: string + Cases_connector_id: description: >- - The Swimlane connector uses the Swimlane REST API to create Swimlane - records. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_swimlane' - connector_type_id: - description: The type of connector. - enum: - - .swimlane - example: .swimlane - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_swimlane' - required: - - config - - connector_type_id - - name - - secrets - title: Create Swimlane connector request - type: object - Connectors_create_connector_request_teams: - description: The Microsoft Teams connector uses Incoming Webhooks. - properties: - connector_type_id: - description: The type of connector. - enum: - - .teams - example: .teams - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_teams' - required: - - connector_type_id - - name - - secrets - title: Create Microsoft Teams connector request - type: object - Connectors_create_connector_request_tines: + An identifier for the connector. To retrieve connector IDs, use the find + connectors API. + in: path + name: connectorId + required: true + schema: + example: abed3a70-71bd-11ea-a0b2-c51ea50a58e2 + type: string + Cases_defaultSearchOperator: + description: he default operator to use for the simple_query_string. + example: OR + in: query + name: defaultSearchOperator + schema: + default: OR + type: string + Cases_from: description: > - The Tines connector uses Tines Webhook actions to send events via POST - request. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_tines' - connector_type_id: - description: The type of connector. - enum: - - .tines - example: .tines - type: string - name: - description: The display name for the connector. - example: my-connector - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_tines' - required: - - config - - connector_type_id - - name - - secrets - title: Create Tines connector request - type: object - Connectors_create_connector_request_torq: + Returns only cases that were created after a specific date. The date + must be specified as a KQL data range or date match expression. + in: query + name: from + schema: + example: now-1d + type: string + Cases_ids: description: > - The Torq connector uses a Torq webhook to trigger workflows with Kibana - actions. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_torq' - connector_type_id: - description: The type of connector. - enum: - - .torq - example: .torq - type: string - name: - description: The display name for the connector. - example: my-connector + The cases that you want to removed. All non-ASCII characters must be URL + encoded. + example: d4e7abb0-b462-11ec-9a8d-698504725a43 + in: query + name: ids + required: true + schema: + items: + maxItems: 100 + minItems: 1 type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_torq' - required: - - config - - connector_type_id - - name - - secrets - title: Create Torq connector request - type: object - Connectors_create_connector_request_webhook: + type: array + Cases_includeComments: + deprecated: true + 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. + in: query + name: includeComments + schema: + default: true + type: boolean + Cases_kbn_xsrf: + description: Cross-site request forgery protection + in: header + name: kbn-xsrf + required: true + schema: + type: string + Cases_owner: description: > - The Webhook connector uses axios to send a POST or PUT request to a web - service. - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_webhook' - connector_type_id: - description: The type of connector. + 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. + example: cases + in: query + name: owner + schema: + oneOf: + - $ref: '#/components/schemas/Cases_owners' + - items: + $ref: '#/components/schemas/Cases_owners' + type: array + Cases_page_index: + description: The page number to return. + in: query + name: page + required: false + schema: + default: 1 + type: integer + Cases_page_size: + description: The number of items to return. Limited to 100 items. + in: query + name: perPage + required: false + schema: + default: 20 + maximum: 100 + type: integer + Cases_reporters: + description: Filters the returned cases by the user name of the reporter. + example: elastic + in: query + name: reporters + schema: + oneOf: + - type: string + - items: + type: string + maxItems: 100 + type: array + Cases_search: + description: >- + An Elasticsearch simple_query_string query that filters the objects in + the response. + in: query + name: search + schema: + type: string + Cases_searchFields: + description: The fields to perform the simple_query_string parsed query against. + in: query + name: searchFields + schema: + oneOf: + - $ref: '#/components/schemas/Cases_searchFieldsType' + - items: + $ref: '#/components/schemas/Cases_searchFieldsType' + type: array + Cases_severity: + description: The severity of the case. + in: query + name: severity + schema: + enum: + - critical + - high + - low + - medium + type: string + Cases_sort_order: + description: Determines the sort order. + in: query + name: sortOrder + required: false + schema: + default: desc + enum: + - asc + - desc + type: string + Cases_sortField: + description: Determines which field is used to sort the results. + example: updatedAt + in: query + name: sortField + schema: + default: createdAt + enum: + - createdAt + - updatedAt + - closedAt + - title + - category + - status + - severity + type: string + Cases_status: + description: Filters the returned cases by state. + example: open + in: query + name: status + schema: + enum: + - closed + - in-progress + - open + type: string + Cases_tags: + description: Filters the returned cases by tags. + example: tag-1 + in: query + name: tags + schema: + oneOf: + - type: string + - items: + type: string + maxItems: 100 + type: array + Cases_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. + example: now+1d + in: query + name: to + schema: + type: string + Cases_user_action_types: + description: Determines the types of user actions to return. + example: create_case + in: query + name: types + schema: + items: enum: - - .webhook - example: .webhook - type: string - name: - description: The display name for the connector. - example: my-connector + - action + - alert + - assignees + - attachment + - comment + - connector + - create_case + - description + - pushed + - settings + - severity + - status + - tags + - title + - user type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_webhook' - required: - - config - - connector_type_id - - name - - secrets - title: Create Webhook connector request - type: object - Connectors_create_connector_request_xmatters: - description: > - The xMatters connector uses the xMatters Workflow for Elastic to send - actionable alerts to on-call xMatters resources. + type: array + Connectors_action_id: + description: An identifier for the action. + in: path + name: actionId + required: true + schema: + example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + type: string + Connectors_connector_id: + description: An identifier for the connector. + in: path + name: connectorId + required: true + schema: + example: df770e30-8b8b-11ed-a780-3b746c987a81 + type: string + Connectors_kbn_xsrf: + description: Cross-site request forgery protection + in: header + name: kbn-xsrf + required: true + schema: + type: string + Data_views_field_name: + description: The name of the runtime field. + in: path + name: fieldName + required: true + schema: + example: hour_of_day + type: string + Data_views_kbn_xsrf: + description: Cross-site request forgery protection + in: header + name: kbn-xsrf + required: true + schema: + type: string + Data_views_view_id: + description: An identifier for the data view. + in: path + name: viewId + required: true + schema: + example: ff959d40-b880-11e8-a6d9-e546fe2bba5f + type: string + Fleet_format: + description: Simplified or legacy format for package inputs + in: query + name: format + required: false + schema: + enum: + - simplified + - legacy + type: string + Fleet_kbn_xsrf: + description: Kibana's anti Cross-Site Request Forgery token. Can be any string value. + in: header + name: kbn-xsrf + required: true + schema: + type: string + Fleet_kuery: + in: query + name: kuery + required: false + schema: + type: string + Fleet_page_index: + in: query + name: page + required: false + schema: + default: 1 + type: integer + Fleet_page_size: + description: The number of items to return + in: query + name: perPage + required: false + schema: + default: 20 + type: integer + Fleet_show_inactive: + in: query + name: showInactive + required: false + schema: + type: boolean + Fleet_show_upgradeable: + in: query + name: showUpgradeable + required: false + schema: + type: boolean + Fleet_sort_field: + in: query + name: sortField + required: false + schema: + deprecated: true + type: string + Fleet_sort_order: + in: query + name: sortOrder + required: false + schema: + enum: + - asc + - desc + type: string + Fleet_with_metrics: + description: 'Return agent metrics, false by default' + in: query + name: withMetrics + required: false + schema: + type: boolean + Machine_learning_APIs_simulateParam: + description: >- + When true, simulates the synchronization by returning only the list of + actions that would be performed. + example: 'true' + in: query + name: simulate + required: false + schema: + type: boolean + Saved_objects_kbn_xsrf: + description: Cross-site request forgery protection + in: header + name: kbn-xsrf + required: true + schema: + type: string + Saved_objects_saved_object_id: + description: An identifier for the saved object. + in: path + name: id + required: true + schema: + type: string + Saved_objects_saved_object_type: + description: >- + Valid options include `visualization`, `dashboard`, `search`, + `index-pattern`, `config`. + in: path + name: type + required: true + schema: + type: string + SLOs_kbn_xsrf: + description: Cross-site request forgery protection + in: header + name: kbn-xsrf + required: true + schema: + type: string + SLOs_slo_id: + description: An identifier for the slo. + in: path + name: sloId + required: true + schema: + example: 9c235211-6834-11ea-a78c-6feb38a34414 + type: string + SLOs_space_id: + description: >- + An identifier for the space. If `/s/` and the identifier are omitted + from the path, the default space is used. + in: path + name: spaceId + required: true + schema: + example: default + type: string + responses: + Connectors_200_actions: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + $ref: '#/components/schemas/Connectors_action_response_properties' + description: Indicates a successful call. + Connectors_401: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + properties: + error: + enum: + - Unauthorized + example: Unauthorized + type: string + message: + type: string + statusCode: + enum: + - 401 + example: 401 + type: integer + title: Unauthorized response + type: object + description: Authorization information is missing or invalid. + Connectors_404: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + properties: + error: + enum: + - Not Found + example: Not Found + type: string + message: + example: >- + Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not + found + type: string + statusCode: + enum: + - 404 + example: 404 + type: integer + title: Not found response + type: object + description: Object is not found. + Fleet_error: + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + type: object + properties: + error: + type: string + message: + type: string + statusCode: + type: number + description: Generic Error + schemas: + Cases_4xx_response: properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_xmatters' - connector_type_id: - description: The type of connector. - enum: - - .xmatters - example: .xmatters + error: + example: Unauthorized type: string - name: - description: The display name for the connector. - example: my-connector + message: type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_xmatters' - required: - - config - - connector_type_id - - name - - secrets - title: Create xMatters connector request + statusCode: + example: 401 + type: integer + title: Unsuccessful cases API response type: object - Connectors_features: - description: | - The feature that uses the connector. + Cases_action_types: + description: The type of action. enum: - - alerting - - cases - - generativeAIForSecurity - - generativeAIForObservability - - generativeAIForSearchPlayground - - siem - - uptime + - assignees + - create_case + - comment + - connector + - delete_case + - description + - pushed + - tags + - title + - status + - settings + - severity + example: create_case type: string - Connectors_is_deprecated: - description: Indicates whether the connector type is deprecated. - example: false - type: boolean - Connectors_is_missing_secrets: + Cases_actions: + enum: + - add + - create + - delete + - push_to_service + - update + example: create + type: string + Cases_add_alert_comment_request_properties: + 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. + enum: + - alert + example: alert + type: string + required: + - alertId + - index + - owner + - rule + - type + title: Add case comment request properties for alerts + Cases_add_case_comment_request: description: >- - Indicates whether secrets are missing for the connector. Secrets - configuration properties vary depending on the connector type. - example: false - type: boolean - Connectors_is_preconfigured: - description: > - Indicates whether it is a preconfigured connector. If true, the `config` - and `is_missing_secrets` properties are omitted from the response. - example: false - type: boolean - Connectors_is_system_action: - description: Indicates whether the connector is used for system actions. - example: false - type: boolean - Connectors_referenced_by_count: - description: > - Indicates the number of saved objects that reference the connector. If - `is_preconfigured` is true, this value is not calculated. This property - is returned only by the get all connectors API. - example: 2 - type: integer - Connectors_run_connector_params_acknowledge_resolve_pagerduty: - description: Test an action that acknowledges or resolves a PagerDuty alert. + The add comment to case API request body varies depending on whether you + are adding an alert or a comment. + discriminator: + mapping: + alert: '#/components/schemas/Cases_add_alert_comment_request_properties' + user: '#/components/schemas/Cases_add_user_comment_request_properties' + propertyName: type + oneOf: + - $ref: '#/components/schemas/Cases_add_alert_comment_request_properties' + - $ref: '#/components/schemas/Cases_add_user_comment_request_properties' + title: Add case comment request + Cases_add_user_comment_request_properties: + description: Defines properties for case comment requests when type is user. properties: - dedupKey: - description: The deduplication key for the PagerDuty alert. - maxLength: 255 + comment: + description: The new comment. It is required only when `type` is `user`. + example: A new comment. + maxLength: 30000 type: string - eventAction: - description: The type of event. + owner: + $ref: '#/components/schemas/Cases_owners' + type: + description: The type of comment. enum: - - acknowledge - - resolve + - user + example: user type: string required: - - dedupKey - - eventAction - title: PagerDuty connector parameters + - comment + - owner + - type + title: Add case comment request properties for user comments type: object - Connectors_run_connector_params_documents: - description: Test an action that indexes a document into Elasticsearch. - properties: - documents: - description: The documents in JSON format for index connectors. - items: - additionalProperties: true - type: object - type: array - required: - - documents - title: Index connector parameters + Cases_alert_comment_response_properties: + title: Add case comment response properties for alerts type: object - Connectors_run_connector_params_message_email: - anyOf: - - required: - - bcc - - message - - subject - - required: - - cc - - message - - subject - - required: - - to - - message - - subject - description: > - Test an action that sends an email message. There must be at least one - recipient in `to`, `cc`, or `bcc`. properties: - bcc: - description: > - A list of "blind carbon copy" email addresses. Addresses can be - specified in `user@host-name` format or in name `` - format + alertId: items: + example: a6e12ac4-7bce-457b-84f6-d7ce8deb8446 type: string type: array - cc: - description: > - A list of "carbon copy" email addresses. Addresses can be specified - in `user@host-name` format or in name `` format + created_at: + example: '2023-11-06T19:29:38.424Z' + format: date-time + type: string + created_by: + type: object + properties: + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + required: + - email + - full_name + - username + id: + example: 73362370-ab1a-11ec-985f-97e55adae8b9 + type: string + index: items: + example: .internal.alerts-security.alerts-default-000001 type: string type: array - message: - description: The email message text. Markdown format is supported. + owner: + $ref: '#/components/schemas/Cases_owners' + pushed_at: + example: null + format: date-time + nullable: true type: string - subject: - description: The subject line of the email. + pushed_by: + nullable: true + type: object + properties: + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + required: + - email + - full_name + - username + rule: + type: object + properties: + id: + description: The rule identifier. + example: 94d80550-aaf4-11ec-985f-97e55adae8b9 + type: string + name: + description: The rule name. + example: security_rule + type: string + type: + enum: + - alert + example: alert type: string - to: - description: > - A list of email addresses. Addresses can be specified in - `user@host-name` format or in name `` format. - items: + updated_at: + format: date-time + nullable: true + type: string + updated_by: + nullable: true + type: object + properties: + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + required: + - email + - full_name + - username + version: + example: WzMwNDgsMV0= + type: string + required: + - type + Cases_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. + example: 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42 + oneOf: + - type: string + - items: type: string + maxItems: 1000 type: array - title: Email connector parameters + title: Alert identifiers + x-technical-preview: true + Cases_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 + - items: + type: string + maxItems: 1000 + type: array + title: Alert indices + x-technical-preview: true + Cases_alert_response_properties: type: object - Connectors_run_connector_params_message_serverlog: - description: Test an action that writes an entry to the Kibana server log. properties: - level: - default: info - description: The log level of the message for server log connectors. - enum: - - debug - - error - - fatal - - info - - trace - - warn + attached_at: + format: date-time type: string - message: - description: The message for server log connectors. + id: + description: The alert identifier. type: string - required: - - message - title: Server log connector parameters - type: object - Connectors_run_connector_params_message_slack: - description: > - Test an action that sends a message to Slack. It is applicable only when - the connector type is `.slack`. + index: + description: The alert index. + type: string + Cases_assignees: + description: An array containing users that are assigned to the case. + items: + type: object + properties: + uid: + 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 + type: string + required: + - uid + maxItems: 10 + nullable: true + type: array + Cases_case_category: + description: A word or phrase that categorizes the case. + maxLength: 50 + type: string + Cases_case_description: + description: The description for the case. + maxLength: 30000 + type: string + Cases_case_response_closed_by_properties: + nullable: true properties: - message: - description: >- - The Slack message text, which cannot contain Markdown, images, or - other advanced formatting. + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true type: string required: - - message - title: Slack connector parameters + - email + - full_name + - username + title: Case response properties for closed_by + type: object + Cases_case_response_created_by_properties: + title: Case response properties for created_by type: object - Connectors_run_connector_params_trigger_pagerduty: - description: Test an action that triggers a PagerDuty alert. properties: - class: - description: The class or type of the event. - example: cpu load + email: + example: null + nullable: true type: string - component: - description: >- - The component of the source machine that is responsible for the - event. - example: eth0 + full_name: + example: null + nullable: true type: string - customDetails: - description: Additional details to add to the event. - type: object - dedupKey: - description: > - All actions sharing this key will be associated with the same - PagerDuty alert. This value is used to correlate trigger and - resolution. - maxLength: 255 + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 type: string - eventAction: - description: The type of event. - enum: - - trigger + username: + example: elastic + nullable: true type: string - group: - description: The logical grouping of components of a service. - example: app-stack + required: + - email + - full_name + - username + Cases_case_response_properties: + title: Case response properties + type: object + properties: + assignees: + $ref: '#/components/schemas/Cases_assignees' + category: + description: The case category. + nullable: true type: string - links: - description: A list of links to add to the event. + closed_at: + format: date-time + nullable: true + type: string + closed_by: + $ref: '#/components/schemas/Cases_case_response_closed_by_properties' + comments: + description: An array of comment objects for the case. + items: + discriminator: + mapping: + alert: '#/components/schemas/Cases_alert_comment_response_properties' + user: '#/components/schemas/Cases_user_comment_response_properties' + propertyName: type + oneOf: + - $ref: '#/components/schemas/Cases_alert_comment_response_properties' + - $ref: '#/components/schemas/Cases_user_comment_response_properties' + maxItems: 10000 + title: Case response properties for comments + type: array + connector: + discriminator: + mapping: + .cases-webhook: '#/components/schemas/Cases_connector_properties_cases_webhook' + .jira: '#/components/schemas/Cases_connector_properties_jira' + .none: '#/components/schemas/Cases_connector_properties_none' + .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' + propertyName: type + 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' + title: Case response properties for connectors + created_at: + example: '2022-05-13T09:16:17.416Z' + format: date-time + type: string + created_by: + $ref: '#/components/schemas/Cases_case_response_created_by_properties' + customFields: + description: Custom field values for the case. items: type: object properties: - href: - description: The URL for the link. + key: + description: > + The unique identifier for the custom field. The key value must + exist in the case configuration settings. type: string - text: - description: A plain text description of the purpose of the link. + type: + description: > + The custom field type. It must match the type specified in the + case configuration settings. + enum: + - text + - toggle type: string + 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: + - maxLength: 160 + minLength: 1 + nullable: true + type: string + - type: boolean type: array - severity: - default: info - description: The severity of the event on the affected system. - enum: - - critical - - error - - info - - warning + description: + example: A case description. type: string - source: + duration: description: > - The affected system, such as a hostname or fully qualified domain - name. Defaults to the Kibana saved object id of the action. + 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. + example: 120 + nullable: true + type: integer + external_service: + $ref: '#/components/schemas/Cases_external_service' + id: + example: 66b9aa00-94fa-11ea-9f74-e7e108796192 type: string - summary: - description: A summery of the event. - maxLength: 1024 + 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: + example: + - tag-1 + items: + type: string + type: array + title: + example: Case title 1 type: string - timestamp: - description: >- - An ISO-8601 timestamp that indicates when the event was detected or - generated. + totalAlerts: + example: 0 + type: integer + totalComment: + example: 0 + type: integer + updated_at: format: date-time + nullable: true + type: string + updated_by: + $ref: '#/components/schemas/Cases_case_response_updated_by_properties' + version: + example: WzUzMiwxXQ== type: string required: - - eventAction - title: PagerDuty connector parameters - type: object - Connectors_run_connector_request: - description: The properties vary depending on the connector type. - properties: - params: - oneOf: - - $ref: >- - #/components/schemas/Connectors_run_connector_params_acknowledge_resolve_pagerduty - - $ref: '#/components/schemas/Connectors_run_connector_params_documents' - - $ref: >- - #/components/schemas/Connectors_run_connector_params_message_email - - $ref: >- - #/components/schemas/Connectors_run_connector_params_message_serverlog - - $ref: >- - #/components/schemas/Connectors_run_connector_params_message_slack - - $ref: >- - #/components/schemas/Connectors_run_connector_params_trigger_pagerduty - - description: Test an action that involves a subaction. - discriminator: - mapping: - addEvent: >- - #/components/schemas/Connectors_run_connector_subaction_addevent - closeAlert: >- - #/components/schemas/Connectors_run_connector_subaction_closealert - closeIncident: >- - #/components/schemas/Connectors_run_connector_subaction_closeincident - createAlert: >- - #/components/schemas/Connectors_run_connector_subaction_createalert - fieldsByIssueType: >- - #/components/schemas/Connectors_run_connector_subaction_fieldsbyissuetype - getChoices: >- - #/components/schemas/Connectors_run_connector_subaction_getchoices - getFields: >- - #/components/schemas/Connectors_run_connector_subaction_getfields - getIncident: >- - #/components/schemas/Connectors_run_connector_subaction_getincident - issue: >- - #/components/schemas/Connectors_run_connector_subaction_issue - issues: >- - #/components/schemas/Connectors_run_connector_subaction_issues - issueTypes: >- - #/components/schemas/Connectors_run_connector_subaction_issuetypes - pushToService: >- - #/components/schemas/Connectors_run_connector_subaction_pushtoservice - propertyName: subAction - oneOf: - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_addevent - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_closealert - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_closeincident - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_createalert - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_fieldsbyissuetype - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_getchoices - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_getfields - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_getincident - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_issue - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_issues - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_issuetypes - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_postmessage - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_pushtoservice - - $ref: >- - #/components/schemas/Connectors_run_connector_subaction_validchannelid - title: Subaction parameters - required: - - params - title: Run connector request body properties - type: object - Connectors_run_connector_subaction_addevent: - description: The `addEvent` subaction for ServiceNow ITOM connectors. - title: The addEvent subaction - type: object + - 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 + Cases_case_response_pushed_by_properties: + nullable: true properties: - subAction: - description: The action to test. - enum: - - addEvent + email: + example: null + nullable: true type: string - subActionParams: - description: The set of configuration properties for the action. - type: object - properties: - additional_info: - description: Additional information about the event. - type: string - description: - description: The details about the event. - type: string - event_class: - description: A specific instance of the source. - type: string - message_key: - description: >- - All actions sharing this key are associated with the same - ServiceNow alert. The default value is `:`. - type: string - metric_name: - description: The name of the metric. - type: string - node: - description: The host that the event was triggered for. - type: string - resource: - description: The name of the resource. - type: string - severity: - description: The severity of the event. - type: string - source: - description: The name of the event source type. - type: string - time_of_event: - description: The time of the event. - type: string - type: - description: The type of event. - type: string - required: - - subAction - Connectors_run_connector_subaction_closealert: - description: The `closeAlert` subaction for Opsgenie connectors. - title: The closeAlert subaction + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + required: + - email + - full_name + - username + title: Case response properties for pushed_by type: object + Cases_case_response_updated_by_properties: + nullable: true properties: - subAction: - description: The action to test. - enum: - - closeAlert + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true type: string - subActionParams: - type: object - properties: - alias: - description: >- - The unique identifier used for alert deduplication in Opsgenie. - The alias must match the value used when creating the alert. - type: string - note: - description: Additional information for the alert. - type: string - source: - description: The display name for the source of the alert. - type: string - user: - description: The display name for the owner. - type: string - required: - - alias required: - - subAction - - subActionParams - Connectors_run_connector_subaction_closeincident: - description: The `closeIncident` subaction for ServiceNow ITSM connectors. - title: The closeIncident subaction + - email + - full_name + - username + title: Case response properties for updated_by + type: object + Cases_case_severity: + default: low + description: The severity of the case. + enum: + - critical + - high + - low + - medium + type: string + Cases_case_status: + description: The status of the case. + enum: + - closed + - in-progress + - open + type: string + Cases_case_tags: + description: > + The words and phrases that help categorize cases. It can be an empty + array. + items: + maxLength: 256 + type: string + maxItems: 200 + type: array + Cases_case_title: + description: A title for the case. + maxLength: 160 + type: string + Cases_closure_types: + 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 + type: string + Cases_connector_properties_cases_webhook: + description: Defines properties for connectors when type is `.cases-webhook`. type: object properties: - subAction: - description: The action to test. + fields: + example: null + nullable: true + type: string + 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. enum: - - closeIncident + - .cases-webhook + example: .cases-webhook type: string - subActionParams: - type: object - properties: - incident: - anyOf: - - required: - - correlation_id - - required: - - externalId - type: object - properties: - correlation_id: - default: '{{rule.id}}:{{alert.id}}' - description: > - An identifier that is assigned to the incident when it is - created by the connector. NOTE: If you use the default value - and the rule generates multiple alerts that use the same - alert IDs, the latest open incident for this correlation ID - is closed unless you specify the external ID. - maxLength: 100 - nullable: true - type: string - externalId: - description: >- - The unique identifier (`incidentId`) for the incident in - ServiceNow. - nullable: true - type: string - required: - - incident required: - - subAction - - subActionParams - Connectors_run_connector_subaction_createalert: - description: The `createAlert` subaction for Opsgenie connectors. - title: The createAlert subaction + - fields + - id + - name + - type + title: Create or upate case request properties for Cases Webhook connector + Cases_connector_properties_jira: + description: Defines properties for connectors when type is `.jira`. type: object properties: - subAction: - description: The action to test. - enum: - - createAlert - type: string - subActionParams: + fields: + description: >- + An object containing the connector fields. If you want to omit any + individual field, specify null as its value. type: object properties: - actions: - description: The custom actions available to the alert. - items: - type: string - type: array - alias: - description: The unique identifier used for alert deduplication in Opsgenie. - type: string - description: - description: >- - A description that provides detailed information about the - alert. - type: string - details: - additionalProperties: true - description: The custom properties of the alert. - example: - key1: value1 - key2: value2 - type: object - entity: - description: >- - The domain of the alert. For example, the application or server - name. - type: string - message: - description: The alert message. + issueType: + description: The type of issue. + nullable: true type: string - note: - description: Additional information for the alert. + parent: + description: 'The key of the parent issue, when the issue type is sub-task.' + nullable: true type: string priority: - description: The priority level for the alert. - enum: - - P1 - - P2 - - P3 - - P4 - - P5 - type: string - responders: - description: > - The entities to receive notifications about the alert. If `type` - is `user`, either `id` or `username` is required. If `type` is - `team`, either `id` or `name` is required. - items: - type: object - properties: - id: - description: The identifier for the entity. - type: string - name: - description: The name of the entity. - type: string - type: - description: 'The type of responders, in this case `escalation`.' - enum: - - escalation - - schedule - - team - - user - type: string - username: - description: A valid email address for the user. - type: string - type: array - source: - description: The display name for the source of the alert. - type: string - tags: - description: The tags for the alert. - items: - type: string - type: array - user: - description: The display name for the owner. + description: The priority of the issue. + nullable: true type: string - visibleTo: - description: >- - The teams and users that the alert will be visible to without - sending a notification. Only one of `id`, `name`, or `username` - is required. - items: - type: object - properties: - id: - description: The identifier for the entity. - type: string - name: - description: The name of the entity. - type: string - type: - description: Valid values are `team` and `user`. - enum: - - team - - user - type: string - username: - description: >- - The user name. This property is required only when the - `type` is `user`. - type: string - required: - - type - type: array required: - - message - required: - - subAction - - subActionParams - Connectors_run_connector_subaction_fieldsbyissuetype: - description: The `fieldsByIssueType` subaction for Jira connectors. - title: The fieldsByIssueType subaction - type: object - properties: - subAction: - description: The action to test. - enum: - - fieldsByIssueType + - issueType + - parent + - priority + 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. + enum: + - .jira + example: .jira type: string - subActionParams: - type: object - properties: - id: - description: The Jira issue type identifier. - example: 10024 - type: string - required: - - id required: - - subAction - - subActionParams - Connectors_run_connector_subaction_getchoices: - description: >- - The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM, and - ServiceNow SecOps connectors. - title: The getChoices subaction + - fields + - id + - name + - type + title: Create or update case request properties for a Jira connector + Cases_connector_properties_none: + description: Defines properties for connectors when type is `.none`. type: object properties: - subAction: - description: The action to test. + 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. + example: null + nullable: true + type: string + 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`. + example: none + type: string + 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`. + example: none + type: string + 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`. enum: - - getChoices + - .none + example: .none type: string - subActionParams: - description: The set of configuration properties for the action. + required: + - fields + - id + - name + - type + title: Create or update case request properties for no connector + Cases_connector_properties_resilient: + 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. + nullable: true type: object properties: - fields: - description: An array of fields. + issueTypes: + description: The type of incident. items: type: string type: array + severityCode: + description: The severity code of the incident. + type: string required: - - fields - required: - - subAction - - subActionParams - Connectors_run_connector_subaction_getfields: - description: >- - The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow - SecOps connectors. - title: The getFields subaction - type: object - properties: - subAction: - description: The action to test. + - issueTypes + - severityCode + id: + description: The identifier for the connector. + type: string + name: + description: The name of the connector. + type: string + type: + description: The type of connector. enum: - - getFields + - .resilient + example: .resilient type: string required: - - subAction - Connectors_run_connector_subaction_getincident: - description: >- - The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow - SecOps connectors. + - fields + - id + - name + - type + title: Create case request properties for a IBM Resilient connector + Cases_connector_properties_servicenow: + description: Defines properties for connectors when type is `.servicenow`. + type: object properties: - subAction: - description: The action to test. - enum: - - getIncident - type: string - subActionParams: + fields: + description: >- + An object containing the connector fields. If you want to omit any + individual field, specify null as its value. type: object properties: - externalId: - description: >- - The Jira, ServiceNow ITSM, or ServiceNow SecOps issue - identifier. - example: 71778 + category: + description: The category of the incident. + nullable: true + type: string + impact: + description: The effect an incident had on business. + nullable: true + type: string + severity: + description: The severity of the incident. + nullable: true + type: string + subcategory: + description: The subcategory of the incident. + nullable: true + type: string + urgency: + description: The extent to which the incident resolution can be delayed. + nullable: true type: string required: - - externalId + - category + - impact + - severity + - subcategory + - urgency + 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. + enum: + - .servicenow + example: .servicenow + type: string required: - - subAction - - subActionParams - title: The getIncident subaction - type: object - Connectors_run_connector_subaction_issue: - description: The `issue` subaction for Jira connectors. - title: The issue subaction + - fields + - id + - name + - type + title: Create case request properties for a ServiceNow ITSM connector + Cases_connector_properties_servicenow_sir: + description: Defines properties for connectors when type is `.servicenow-sir`. type: object properties: - subAction: - description: The action to test. - enum: - - issue - type: string - subActionParams: + fields: + description: >- + An object containing the connector fields. If you want to omit any + individual field, specify null as its value. type: object properties: - id: - description: The Jira issue identifier. - example: 71778 + category: + description: The category of the incident. + nullable: true + type: string + destIp: + description: >- + Indicates whether cases will send a comma-separated list of + destination IPs. + nullable: true + type: boolean + malwareHash: + description: >- + Indicates whether cases will send a comma-separated list of + malware hashes. + nullable: true + type: boolean + malwareUrl: + description: >- + Indicates whether cases will send a comma-separated list of + malware URLs. + nullable: true + type: boolean + priority: + description: The priority of the issue. + nullable: true + type: string + sourceIp: + description: >- + Indicates whether cases will send a comma-separated list of + source IPs. + nullable: true + type: boolean + subcategory: + description: The subcategory of the incident. + nullable: true type: string required: - - id + - category + - destIp + - malwareHash + - malwareUrl + - priority + - sourceIp + - subcategory + 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. + enum: + - .servicenow-sir + example: .servicenow-sir + type: string required: - - subAction - Connectors_run_connector_subaction_issues: - description: The `issues` subaction for Jira connectors. - title: The issues subaction + - fields + - id + - name + - type + title: Create case request properties for a ServiceNow SecOps connector + Cases_connector_properties_swimlane: + description: Defines properties for connectors when type is `.swimlane`. type: object properties: - subAction: - description: The action to test. - enum: - - issues - type: string - subActionParams: + fields: + description: >- + An object containing the connector fields. If you want to omit any + individual field, specify null as its value. type: object properties: - title: - description: The title of the Jira issue. + caseId: + description: The case identifier for Swimlane connectors. + nullable: true type: string required: - - title + - caseId + 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. + enum: + - .swimlane + example: .swimlane + type: string required: - - subAction - - subActionParams - Connectors_run_connector_subaction_issuetypes: - description: The `issueTypes` subaction for Jira connectors. - title: The issueTypes subaction + - fields + - id + - name + - type + title: Create case request properties for a Swimlane connector + Cases_connector_types: + description: The type of connector. + enum: + - .cases-webhook + - .jira + - .none + - .resilient + - .servicenow + - .servicenow-sir + - .swimlane + example: .none + type: string + Cases_create_case_request: + description: >- + The create case API request body varies depending on the type of + connector. + 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: + description: > + Custom field values for a case. Any optional custom fields that are + not specified in the request are set to null. + 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. + enum: + - text + - toggle + type: string + 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: + - maxLength: 160 + minLength: 1 + nullable: true + type: string + - type: boolean + required: + - key + - type + - value + maxItems: 10 + minItems: 0 + type: array + 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' + title: + $ref: '#/components/schemas/Cases_case_title' + required: + - connector + - description + - owner + - settings + - tags + - title + title: Create case request + type: object + Cases_external_service: + nullable: true type: object properties: - subAction: - description: The action to test. - enum: - - issueTypes + connector_id: + type: string + connector_name: + type: string + external_id: + type: string + external_title: + type: string + external_url: + type: string + pushed_at: + format: date-time type: string - required: - - subAction - Connectors_run_connector_subaction_postmessage: + pushed_by: + nullable: true + type: object + properties: + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + Cases_owners: description: > - Test an action that sends a message to Slack. It is applicable only when - the connector type is `.slack_api`. + The application that owns the cases: Stack Management, Observability, or + Elastic Security. + enum: + - cases + - observability + - securitySolution + example: cases + type: string + Cases_payload_alert_comment: + type: object properties: - subAction: - description: The action to test. - enum: - - postMessage - type: string - subActionParams: - description: The set of configuration properties for the action. + comment: type: object properties: - channelIds: - description: > - The Slack channel identifier, which must be one of the - `allowedChannels` in the connector configuration. - items: - type: string - maxItems: 1 - type: array - channels: - deprecated: true - description: | - The name of a channel that your Slack app has access to. - items: - type: string - maxItems: 1 - type: array - text: - description: > - The Slack message text. If it is a Slack webhook connector, the - text cannot contain Markdown, images, or other advanced - formatting. If it is a Slack web API connector, it can contain - either plain text or block kit messages. - minLength: 1 + alertId: + oneOf: + - example: 1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d + type: string + - items: + type: string + type: array + index: + oneOf: + - example: .alerts-observability.logs.alerts-default + type: string + - items: + type: string + type: array + owner: + $ref: '#/components/schemas/Cases_owners' + rule: + type: object + properties: + id: + description: The rule identifier. + example: 94d80550-aaf4-11ec-985f-97e55adae8b9 + type: string + name: + description: The rule name. + example: security_rule + type: string + type: + enum: + - alert type: string - required: - - subAction - - subActionParams - title: The postMessage subaction + Cases_payload_assignees: type: object - Connectors_run_connector_subaction_pushtoservice: - description: >- - The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow - SecOps, Swimlane, and Webhook - Case Management connectors. - title: The pushToService subaction + properties: + assignees: + $ref: '#/components/schemas/Cases_assignees' + Cases_payload_connector: type: object properties: - subAction: - description: The action to test. - enum: - - pushToService - type: string - subActionParams: - description: The set of configuration properties for the action. + connector: type: object properties: - comments: - description: >- - Additional information that is sent to Jira, ServiceNow ITSM, - ServiceNow SecOps, or Swimlane. - items: - type: object - properties: - comment: - description: >- - A comment related to the incident. For example, describe - how to troubleshoot the issue. - type: string - commentId: - description: A unique identifier for the comment. - type: integer - type: array - incident: + fields: description: >- - Information necessary to create or update a Jira, ServiceNow - ITSM, ServiveNow SecOps, or Swimlane incident. + 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. + example: null + nullable: true type: object properties: - alertId: - description: The alert identifier for Swimlane connectors. - type: string caseId: - description: >- - The case identifier for the incident for Swimlane - connectors. - type: string - caseName: - description: The case name for the incident for Swimlane connectors. + 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 - correlation_display: + destIp: description: >- - A descriptive label of the alert for correlation purposes - for ServiceNow ITSM and ServiceNow SecOps connectors. + Indicates whether cases will send a comma-separated list of + destination IPs for ServiceNow SecOps connectors. + nullable: true + type: boolean + impact: + description: >- + The effect an incident had on business for ServiceNow ITSM + connectors. type: string - correlation_id: - description: > - The correlation identifier for the security incident for - ServiceNow ITSM and ServiveNow SecOps connectors. Connectors - using the same correlation ID are associated with the same - ServiceNow incident. This value determines whether a new - ServiceNow incident is created or an existing one is - updated. Modifying this value is optional; if not modified, - the rule ID and alert ID are combined as `{{ruleID}}:{{alert - ID}}` to form the correlation ID value in ServiceNow. The - maximum character length for this value is 100 characters. - NOTE: Using the default configuration of `{{ruleID}}:{{alert - ID}}` ensures that ServiceNow creates a separate incident - record for every generated alert that uses a unique alert - ID. If the rule generates multiple alerts that use the same - alert IDs, ServiceNow creates and continually updates a - single incident record for the alert. + issueType: + description: The type of issue for Jira connectors. type: string - description: + issueTypes: + description: The type of incident for IBM Resilient connectors. + items: + type: string + type: array + malwareHash: description: >- - The description of the incident for Jira, ServiceNow ITSM, - ServiceNow SecOps, Swimlane, and Webhook - Case Management + Indicates whether cases will send a comma-separated list of + malware hashes for ServiceNow SecOps connectors. + nullable: true + type: boolean + malwareUrl: + description: >- + Indicates whether cases will send a comma-separated list of + malware URLs for ServiceNow SecOps connectors. + nullable: true + type: boolean + 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 - dest_ip: - description: > - A list of destination IP addresses related to the security - incident for ServiceNow SecOps connectors. The IPs are added - as observables to the security incident. - oneOf: - - type: string - - items: - type: string - type: array - externalId: - description: > - The Jira, ServiceNow ITSM, or ServiceNow SecOps issue - identifier. If present, the incident is updated. Otherwise, - a new incident is created. + severity: + description: The severity of the incident for ServiceNow ITSM connectors. type: string - id: + severityCode: description: >- - The external case identifier for Webhook - Case Management + 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. + nullable: true + type: boolean + 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 + id: + description: >- + The identifier for the connector. To create a case without a + connector, use `none`. + example: none + type: string + name: + description: >- + The name of the connector. To create a case without a connector, + use `none`. + example: none + type: string + 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. + example: null + 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. + nullable: true + type: boolean impact: - description: The impact of the incident for ServiceNow ITSM connectors. + description: >- + The effect an incident had on business for ServiceNow ITSM + connectors. type: string issueType: - description: >- - The type of incident for Jira connectors. For example, - 10006. To obtain the list of valid values, set `subAction` - to `issueTypes`. - type: integer - labels: - description: > - The labels for the incident for Jira connectors. NOTE: - Labels cannot contain spaces. + description: The type of issue for Jira connectors. + type: string + issueTypes: + description: The type of incident for IBM Resilient connectors. items: type: string type: array - malware_hash: + malwareHash: description: >- - A list of malware hashes related to the security incident - for ServiceNow SecOps connectors. The hashes are added as - observables to the security incident. - oneOf: - - type: string - - items: - type: string - type: array - malware_url: + Indicates whether cases will send a comma-separated list of + malware hashes for ServiceNow SecOps connectors. + nullable: true + type: boolean + malwareUrl: description: >- - A list of malware URLs related to the security incident for - ServiceNow SecOps connectors. The URLs are added as - observables to the security incident. - oneOf: - - type: string - - items: - type: string - type: array - type: string - otherFields: - additionalProperties: true - description: > - Custom field identifiers and their values for Jira - connectors. - maxProperties: 20 - type: object + Indicates whether cases will send a comma-separated list of + malware URLs for ServiceNow SecOps connectors. + nullable: true + type: boolean parent: description: >- - The ID or key of the parent issue for Jira connectors. - Applies only to `Sub-task` types of issues. + The key of the parent issue, when the issue type is sub-task + for Jira connectors. type: string priority: description: >- - The priority of the incident in Jira and ServiceNow SecOps + The priority of the issue for Jira and ServiceNow SecOps connectors. type: string - ruleName: - description: The rule name for Swimlane connectors. - type: string severity: - description: >- - The severity of the incident for ServiceNow ITSM and - Swimlane connectors. - type: string - short_description: - description: > - A short description of the incident for ServiceNow ITSM and - ServiceNow SecOps connectors. It is used for searching the - contents of the knowledge base. + description: The severity of the incident for ServiceNow ITSM connectors. type: string - source_ip: - description: >- - A list of source IP addresses related to the security - incident for ServiceNow SecOps connectors. The IPs are added - as observables to the security incident. - oneOf: - - type: string - - items: - type: string - type: array - status: + severityCode: description: >- - The status of the incident for Webhook - Case Management + 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. + nullable: true + type: boolean subcategory: description: >- - The subcategory of the incident for ServiceNow ITSM and - ServiceNow SecOps connectors. - type: string - summary: - description: A summary of the incident for Jira connectors. - type: string - tags: - description: A list of tags for Webhook - Case Management connectors. - items: - type: string - type: array - title: - description: > - A title for the incident for Jira and Webhook - Case - Management connectors. It is used for searching the contents - of the knowledge base. + The subcategory of the incident for ServiceNow ITSM + connectors. type: string urgency: - description: The urgency of the incident for ServiceNow ITSM connectors. + description: >- + The extent to which the incident resolution can be delayed + for ServiceNow ITSM connectors. type: string + id: + description: >- + The identifier for the connector. To create a case without a + connector, use `none`. + example: none + type: string + name: + description: >- + The name of the connector. To create a case without a connector, + use `none`. + example: none + type: string + 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: + items: + example: + - tag-1 + type: string + type: array + title: + type: string + Cases_payload_delete: + description: >- + If the `action` is `delete` and the `type` is `delete_case`, the payload + is nullable. + nullable: true + type: object + 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: + example: + - tag-1 + items: + type: string + type: array + 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: + enum: + - user + type: string + Cases_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. + title: Alerting rule + type: object + properties: + id: + description: The rule identifier. + example: 94d80550-aaf4-11ec-985f-97e55adae8b9 + type: string + name: + description: The rule name. + example: security_rule + type: string + x-technical-preview: true + Cases_searchFieldsType: + description: The fields to perform the `simple_query_string` parsed query against. + enum: + - description + - title + type: string + Cases_set_case_configuration_request: + description: >- + External connection details, such as the closure type and default + connector for cases. + 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. + example: none + type: string + 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. + example: none + type: string + type: + $ref: '#/components/schemas/Cases_connector_types' + required: + - fields + - id + - name + - type + customFields: + description: Custom fields case configuration. + items: + type: object + properties: + defaultValue: + 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. + oneOf: + - type: string + - type: 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. + maxLength: 36 + minLength: 1 + type: string + label: + description: The custom field label that is displayed in the case. + maxLength: 50 + minLength: 1 + type: string + type: + description: The type of the custom field. + enum: + - text + - toggle + type: string + 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 + required: + - key + - label + - required + - type + maxItems: 10 + minItems: 0 + type: array + owner: + $ref: '#/components/schemas/Cases_owners' + templates: + $ref: '#/components/schemas/Cases_templates' required: - - subAction - - subActionParams - Connectors_run_connector_subaction_validchannelid: + - closure_type + - connector + - owner + title: Set case configuration request + type: object + Cases_settings: + description: An object that contains the case settings. + type: object + properties: + syncAlerts: + description: Turns alert syncing on or off. + example: true + type: boolean + required: + - syncAlerts + Cases_template_tags: description: > - Retrieves information about a valid Slack channel identifier. It is - applicable only when the connector type is `.slack_api`. + The words and phrases that help categorize templates. It can be an empty + array. + items: + maxLength: 256 + type: string + maxItems: 200 + type: array + Cases_templates: + 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. + example: none + type: string + 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. + example: none + type: string + type: + $ref: '#/components/schemas/Cases_connector_types' + customFields: + description: Custom field values in the template. + items: + type: object + properties: + key: + description: The unique key for the custom field. + type: string + type: + description: The type of the custom field. + enum: + - text + - toggle + type: string + value: + 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. + oneOf: + - type: string + - type: boolean + type: array + x-technical-preview: true + 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: + description: A description for the template. + type: string + key: + 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. + type: string + name: + description: The name of the template. + type: string + tags: + $ref: '#/components/schemas/Cases_template_tags' + type: array + x-technical-preview: true + Cases_update_alert_comment_request_properties: + description: Defines properties for case comment requests when type is alert. + type: object properties: - subAction: - description: The action to test. + alertId: + $ref: '#/components/schemas/Cases_alert_identifiers' + id: + description: > + The identifier for the comment. To retrieve comment IDs, use the get + comments API. + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + type: string + 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. enum: - - validChannelId + - alert + example: alert + type: string + version: + description: > + The current comment version. To retrieve version values, use the get + comments API. + example: Wzk1LDFd + type: string + required: + - alertId + - id + - index + - owner + - rule + - type + - version + title: Update case comment request properties for alerts + Cases_update_case_comment_request: + description: >- + The update case comment API request body varies depending on whether you + are updating an alert or a comment. + discriminator: + mapping: + alert: '#/components/schemas/Cases_update_alert_comment_request_properties' + user: '#/components/schemas/Cases_update_user_comment_request_properties' + propertyName: type + oneOf: + - $ref: '#/components/schemas/Cases_update_alert_comment_request_properties' + - $ref: '#/components/schemas/Cases_update_user_comment_request_properties' + title: Update case comment request + Cases_update_case_configuration_request: + description: > + You can update settings such as the closure type, custom fields, + templates, and the default connector for cases. + 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. + example: none + type: string + 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. + example: none + type: string + type: + $ref: '#/components/schemas/Cases_connector_types' + required: + - fields + - id + - name + - type + customFields: + description: Custom fields case configuration. + items: + type: object + properties: + defaultValue: + 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. + oneOf: + - type: string + - type: 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. + maxLength: 36 + minLength: 1 + type: string + label: + description: The custom field label that is displayed in the case. + maxLength: 50 + minLength: 1 + type: string + type: + description: The type of the custom field. + enum: + - text + - toggle + type: string + 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 + required: + - key + - label + - required + - type + type: array + templates: + $ref: '#/components/schemas/Cases_templates' + version: + description: > + The version of the connector. To retrieve the version value, use the + get configuration API. + example: WzIwMiwxXQ== type: string - subActionParams: - type: object - properties: - channelId: - description: The Slack channel identifier. - example: C123ABC456 - type: string - required: - - channelId required: - - subAction - - subActionParams - title: The validChannelId subaction + - version + title: Update case configuration request type: object - Connectors_secrets_properties_bedrock: - description: Defines secrets for connectors when type is `.bedrock`. + Cases_update_case_request: + description: >- + The update case API request body varies depending on the type of + connector. properties: - accessKey: - description: The AWS access key for authentication. - type: string - secret: - description: The AWS secret for authentication. - type: string + cases: + description: An array containing one or more case objects. + items: + type: object + 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: + description: > + Custom field values for a case. Any optional custom fields + that are not specified in the request are set to null. + 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. + enum: + - text + - toggle + type: string + 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: + - maxLength: 160 + minLength: 1 + nullable: true + type: string + - type: boolean + required: + - key + - type + - value + maxItems: 10 + minItems: 0 + type: array + description: + $ref: '#/components/schemas/Cases_case_description' + id: + description: The identifier for the case. + maxLength: 30000 + type: string + 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 + required: + - id + - version + maxItems: 100 + minItems: 1 + type: array required: - - accessKey - - secret - title: Connector secrets properties for an Amazon Bedrock connector - type: object - Connectors_secrets_properties_cases_webhook: - title: Connector secrets properties for Webhook - Case Management connector - type: object - properties: - password: - description: >- - The password for HTTP basic authentication. If `hasAuth` is set to - `true`, this property is required. - type: string - user: - description: >- - The username for HTTP basic authentication. If `hasAuth` is set to - `true`, this property is required. - type: string - Connectors_secrets_properties_d3security: - description: Defines secrets for connectors when type is `.d3security`. + - cases + title: Update case request type: object + Cases_update_user_comment_request_properties: + description: Defines properties for case comment requests when type is user. properties: - token: - description: The D3 Security token. + comment: + description: The new comment. It is required only when `type` is `user`. + example: A new comment. + maxLength: 30000 type: string - required: - - token - title: Connector secrets properties for a D3 Security connector - Connectors_secrets_properties_email: - description: Defines secrets for connectors when type is `.email`. - properties: - clientSecret: + id: description: > - The Microsoft Exchange Client secret for OAuth 2.0 client - credentials authentication. It must be URL-encoded. If `service` is - `exchange_server`, this property is required. + The identifier for the comment. To retrieve comment IDs, use the get + comments API. + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 type: string - password: - description: > - The password for HTTP basic authentication. If `hasAuth` is set to - `true`, this property is required. + owner: + $ref: '#/components/schemas/Cases_owners' + type: + description: The type of comment. + enum: + - user + example: user type: string - user: + version: description: > - The username for HTTP basic authentication. If `hasAuth` is set to - `true`, this property is required. - type: string - title: Connector secrets properties for an email connector - type: object - Connectors_secrets_properties_gemini: - description: Defines secrets for connectors when type is `.gemini`. - properties: - credentialsJSON: - description: >- - The service account credentials JSON file. The service account - should have Vertex AI user IAM role assigned to it. + The current comment version. To retrieve version values, use the get + comments API. + example: Wzk1LDFd type: string required: - - credentialsJSON - title: Connector secrets properties for a Google Gemini connector - type: object - Connectors_secrets_properties_genai: - description: Defines secrets for connectors when type is `.gen-ai`. - properties: - apiKey: - description: The OpenAI API key. - type: string - title: Connector secrets properties for an OpenAI connector + - comment + - id + - owner + - type + - version + title: Update case comment request properties for user comments type: object - Connectors_secrets_properties_jira: - description: Defines secrets for connectors when type is `.jira`. + Cases_user_actions_find_response_properties: type: object properties: - apiToken: - description: The Jira API authentication token for HTTP basic authentication. + action: + $ref: '#/components/schemas/Cases_actions' + comment_id: + example: 578608d0-03b1-11ed-920c-974bfa104448 + nullable: true type: string - email: - description: The account email for HTTP Basic authentication. + created_at: + example: '2022-05-13T09:16:17.416Z' + format: date-time type: string - required: - - apiToken - - email - title: Connector secrets properties for a Jira connector - Connectors_secrets_properties_opsgenie: - description: Defines secrets for connectors when type is `.opsgenie`. - type: object - properties: - apiKey: - description: The Opsgenie API authentication key for HTTP Basic authentication. + created_by: + type: object + properties: + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + required: + - email + - full_name + - username + id: + example: 22fd3e30-03b1-11ed-920c-974bfa104448 type: string - required: - - apiKey - title: Connector secrets properties for an Opsgenie connector - Connectors_secrets_properties_pagerduty: - description: Defines secrets for connectors when type is `.pagerduty`. - properties: - routingKey: - description: > - A 32 character PagerDuty Integration Key for an integration on a - service. + 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: + description: The type of action. + enum: + - assignees + - create_case + - comment + - connector + - description + - pushed + - tags + - title + - status + - settings + - severity + example: create_case + type: string + version: + example: WzM1ODg4LDFd type: string required: - - routingKey - title: Connector secrets properties for a PagerDuty connector - type: object - Connectors_secrets_properties_resilient: - description: Defines secrets for connectors when type is `.resilient`. + - action + - comment_id + - created_at + - created_by + - id + - owner + - payload + - type + - version + Cases_user_actions_response_properties: type: object properties: - apiKeyId: - description: The authentication key ID for HTTP Basic authentication. + action: + $ref: '#/components/schemas/Cases_actions' + action_id: + example: 22fd3e30-03b1-11ed-920c-974bfa104448 type: string - apiKeySecret: - description: The authentication key secret for HTTP Basic authentication. + case_id: + example: 22df07d0-03b1-11ed-920c-974bfa104448 type: string - required: - - apiKeyId - - apiKeySecret - title: Connector secrets properties for IBM Resilient connector - Connectors_secrets_properties_sentinelone: - description: Defines secrets for connectors when type is `.sentinelone`. - properties: - token: - description: The A SentinelOne API token. + comment_id: + example: 578608d0-03b1-11ed-920c-974bfa104448 + nullable: true type: string + created_at: + example: '2022-05-13T09:16:17.416Z' + format: date-time + type: string + created_by: + type: object + properties: + email: + example: null + nullable: true + type: string + full_name: + example: null + nullable: true + type: string + profile_uid: + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + type: string + username: + example: elastic + nullable: true + type: string + 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' required: - - token - title: Connector secrets properties for a SentinelOne connector + - action + - action_id + - case_id + - comment_id + - created_at + - created_by + - owner + - payload + - type + Cases_user_comment_response_properties: + title: Case response properties for user comments type: object - Connectors_secrets_properties_servicenow: - description: >- - Defines secrets for connectors when type is `.servicenow`, - `.servicenow-sir`, or `.servicenow-itom`. properties: - clientSecret: - description: >- - The client secret assigned to your OAuth application. This property - is required when `isOAuth` is `true`. + comment: + example: A new comment. type: string - password: - description: >- - The password for HTTP basic authentication. This property is - required when `isOAuth` is `false`. + created_at: + example: '2022-05-13T09:16:17.416Z' + format: date-time type: string - privateKey: - description: >- - The RSA private key that you created for use in ServiceNow. This - property is required when `isOAuth` is `true`. + created_by: + $ref: '#/components/schemas/Cases_case_response_created_by_properties' + id: + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 type: string - privateKeyPassword: - description: >- - The password for the RSA private key. This property is required when - `isOAuth` is `true` and you set a password on your private key. + owner: + $ref: '#/components/schemas/Cases_owners' + pushed_at: + example: null + format: date-time + nullable: true type: string - username: - description: >- - The username for HTTP basic authentication. This property is - required when `isOAuth` is `false`. + pushed_by: + $ref: '#/components/schemas/Cases_case_response_pushed_by_properties' + type: + enum: + - user + example: user + type: string + updated_at: + example: null + format: date-time + nullable: true type: string - title: >- - Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and - ServiceNow SecOps connectors - type: object - Connectors_secrets_properties_slack_api: - description: Defines secrets for connectors when type is `.slack`. - type: object - properties: - token: - description: Slack bot user OAuth token. + updated_by: + $ref: '#/components/schemas/Cases_case_response_updated_by_properties' + version: + example: WzIwNDMxLDFd type: string required: - - token - title: Connector secrets properties for a Web API Slack connector - Connectors_secrets_properties_slack_webhook: - description: Defines secrets for connectors when type is `.slack`. - type: object + - type + Connectors_action_response_properties: + description: The properties vary depending on the action type. properties: - webhookUrl: - description: Slack webhook url. + actionTypeId: type: string - required: - - webhookUrl - title: Connector secrets properties for a Webhook Slack connector - Connectors_secrets_properties_swimlane: - description: Defines secrets for connectors when type is `.swimlane`. - properties: - apiToken: - description: Swimlane API authentication token. + config: + type: object + id: type: string - title: Connector secrets properties for a Swimlane connector + isDeprecated: + description: Indicates whether the action type is deprecated. + type: boolean + isMissingSecrets: + description: Indicates whether secrets are missing for the action. + type: boolean + isPreconfigured: + description: Indicates whether it is a preconfigured action. + type: boolean + name: + type: string + title: Action response properties type: object - Connectors_secrets_properties_teams: - description: Defines secrets for connectors when type is `.teams`. + Connectors_config_properties_bedrock: + description: Defines properties for connectors when type is `.bedrock`. properties: - webhookUrl: + apiUrl: + description: The Amazon Bedrock request URL. + type: string + defaultModel: + default: 'anthropic.claude-3-5-sonnet-20240620-v1:0' description: > - The URL of the incoming webhook. If you are using the - `xpack.actions.allowedHosts` setting, add the hostname to the - allowed hosts. + The generative artificial intelligence model for Amazon Bedrock to + use. Current support is for the Anthropic Claude models. type: string required: - - webhookUrl - title: Connector secrets properties for a Microsoft Teams connector + - apiUrl + title: Connector request properties for an Amazon Bedrock connector + type: object + Connectors_config_properties_cases_webhook: + description: Defines properties for connectors when type is `.cases-webhook`. type: object - Connectors_secrets_properties_tines: - description: Defines secrets for connectors when type is `.tines`. properties: - email: - description: The email used to sign in to Tines. + createCommentJson: + description: > + A JSON payload sent to the create comment URL to create a case + comment. You can use variables to add Kibana Cases data to the + payload. The required variable is `case.comment`. Due to Mustache + template variables (the text enclosed in triple braces, for example, + `{{{case.title}}}`), the JSON is not validated when you create the + connector. The JSON is validated once the Mustache variables have + been placed when the REST method runs. Manually ensure that the JSON + is valid, disregarding the Mustache variables, so the later + validation will pass. + example: '{"body": {{{case.comment}}}}' type: string - token: - description: The Tines API token. + createCommentMethod: + default: put + description: > + The REST API HTTP request method to create a case comment in the + third-party system. Valid values are `patch`, `post`, and `put`. + enum: + - patch + - post + - put type: string - required: - - email - - token - title: Connector secrets properties for a Tines connector - type: object - Connectors_secrets_properties_torq: - description: Defines secrets for connectors when type is `.torq`. - properties: - token: - description: The secret of the webhook authentication header. + createCommentUrl: + description: > + The REST API URL to create a case comment by ID in the third-party + system. You can use a variable to add the external system ID to the + URL. If you are using the `xpack.actions.allowedHosts setting`, add + the hostname to the allowed hosts. + example: 'https://example.com/issue/{{{external.system.id}}}/comment' type: string - required: - - token - title: Connector secrets properties for a Torq connector - type: object - Connectors_secrets_properties_webhook: - description: Defines secrets for connectors when type is `.webhook`. - properties: - crt: + createIncidentJson: + description: > + A JSON payload sent to the create case URL to create a case. You can + use variables to add case data to the payload. Required variables + are `case.title` and `case.description`. Due to Mustache template + variables (which is the text enclosed in triple braces, for example, + `{{{case.title}}}`), the JSON is not validated when you create the + connector. The JSON is validated after the Mustache variables have + been placed when REST method runs. Manually ensure that the JSON is + valid to avoid future validation errors; disregard Mustache + variables during your review. + example: >- + {"fields": {"summary": {{{case.title}}},"description": + {{{case.description}}},"labels": {{{case.tags}}}}} + type: string + createIncidentMethod: + default: post + description: > + The REST API HTTP request method to create a case in the third-party + system. Valid values are `patch`, `post`, and `put`. + enum: + - patch + - post + - put + type: string + createIncidentResponseKey: description: >- - If `authType` is `webhook-authentication-ssl` and `certType` is - `ssl-crt-key`, it is a base64 encoded version of the CRT or CERT - file. + The JSON key in the create external case response that contains the + case ID. type: string - key: + createIncidentUrl: + description: > + The REST API URL to create a case in the third-party system. If you + are using the `xpack.actions.allowedHosts` setting, add the hostname + to the allowed hosts. + type: string + getIncidentResponseExternalTitleKey: description: >- - If `authType` is `webhook-authentication-ssl` and `certType` is - `ssl-crt-key`, it is a base64 encoded version of the KEY file. + The JSON key in get external case response that contains the case + title. type: string - password: + getIncidentUrl: description: > - The password for HTTP basic authentication or the passphrase for the - SSL certificate files. If `hasAuth` is set to `true` and `authType` - is `webhook-authentication-basic`, this property is required. + The REST API URL to get the case by ID from the third-party system. + If you are using the `xpack.actions.allowedHosts` setting, add the + hostname to the allowed hosts. You can use a variable to add the + external system ID to the URL. Due to Mustache template variables + (the text enclosed in triple braces, for example, + `{{{case.title}}}`), the JSON is not validated when you create the + connector. The JSON is validated after the Mustache variables have + been placed when REST method runs. Manually ensure that the JSON is + valid, disregarding the Mustache variables, so the later validation + will pass. + example: 'https://example.com/issue/{{{external.system.id}}}' type: string - pfx: + hasAuth: + default: true description: >- - If `authType` is `webhook-authentication-ssl` and `certType` is - `ssl-pfx`, it is a base64 encoded version of the PFX or P12 file. + If true, a username and password for login type authentication must + be provided. + type: boolean + headers: + description: > + A set of key-value pairs sent as headers with the request URLs for + the create case, update case, get case, and create comment methods. type: string - user: + updateIncidentJson: description: > - The username for HTTP basic authentication. If `hasAuth` is set to - `true` and `authType` is `webhook-authentication-basic`, this - property is required. + The JSON payload sent to the update case URL to update the case. You + can use variables to add Kibana Cases data to the payload. Required + variables are `case.title` and `case.description`. Due to Mustache + template variables (which is the text enclosed in triple braces, for + example, `{{{case.title}}}`), the JSON is not validated when you + create the connector. The JSON is validated after the Mustache + variables have been placed when REST method runs. Manually ensure + that the JSON is valid to avoid future validation errors; disregard + Mustache variables during your review. + example: >- + {"fields": {"summary": {{{case.title}}},"description": + {{{case.description}}},"labels": {{{case.tags}}}}} type: string - title: Connector secrets properties for a Webhook connector + updateIncidentMethod: + default: put + description: > + The REST API HTTP request method to update the case in the + third-party system. Valid values are `patch`, `post`, and `put`. + enum: + - patch + - post + - put + type: string + updateIncidentUrl: + description: > + The REST API URL to update the case by ID in the third-party system. + You can use a variable to add the external system ID to the URL. If + you are using the `xpack.actions.allowedHosts` setting, add the + hostname to the allowed hosts. + example: 'https://example.com/issue/{{{external.system.ID}}}' + type: string + viewIncidentUrl: + description: > + The URL to view the case in the external system. You can use + variables to add the external system ID or external system title to + the URL. + example: >- + https://testing-jira.atlassian.net/browse/{{{external.system.title}}} + type: string + required: + - createIncidentJson + - createIncidentResponseKey + - createIncidentUrl + - getIncidentResponseExternalTitleKey + - getIncidentUrl + - updateIncidentJson + - updateIncidentUrl + - viewIncidentUrl + title: Connector request properties for Webhook - Case Management connector + Connectors_config_properties_d3security: + description: Defines properties for connectors when type is `.d3security`. + properties: + url: + description: > + The D3 Security API request URL. If you are using the + `xpack.actions.allowedHosts` setting, add the hostname to the + allowed hosts. + type: string + required: + - url + title: Connector request properties for a D3 Security connector + type: object + Connectors_config_properties_email: + description: Defines properties for connectors when type is `.email`. type: object - Connectors_secrets_properties_xmatters: - description: Defines secrets for connectors when type is `.xmatters`. properties: - password: + clientId: description: > - A user name for HTTP basic authentication. It is applicable only - when `usesBasic` is `true`. + The client identifier, which is a part of OAuth 2.0 client + credentials authentication, in GUID format. If `service` is + `exchange_server`, this property is required. + nullable: true type: string - secretsUrl: + from: description: > - The request URL for the Elastic Alerts trigger in xMatters with the - API key included in the URL. It is applicable only when `usesBasic` - is `false`. + The from address for all emails sent by the connector. It must be + specified in `user@host-name` format. type: string - user: + hasAuth: + default: true description: > - A password for HTTP basic authentication. It is applicable only when - `usesBasic` is `true`. + Specifies whether a user and password are required inside the + secrets configuration. + type: boolean + host: + description: > + The host name of the service provider. If the `service` is + `elastic_cloud` (for Elastic Cloud notifications) or one of + Nodemailer's well-known email service providers, this property is + ignored. If `service` is `other`, this property must be defined. type: string - title: Connector secrets properties for an xMatters connector - type: object - Connectors_update_connector_request: - description: The properties vary depending on the connector type. - oneOf: - - $ref: '#/components/schemas/Connectors_update_connector_request_bedrock' - - $ref: '#/components/schemas/Connectors_update_connector_request_gemini' - - $ref: >- - #/components/schemas/Connectors_update_connector_request_cases_webhook - - $ref: '#/components/schemas/Connectors_update_connector_request_d3security' - - $ref: '#/components/schemas/Connectors_update_connector_request_email' - - $ref: '#/components/schemas/Connectors_create_connector_request_genai' - - $ref: '#/components/schemas/Connectors_update_connector_request_index' - - $ref: '#/components/schemas/Connectors_update_connector_request_jira' - - $ref: '#/components/schemas/Connectors_update_connector_request_opsgenie' - - $ref: '#/components/schemas/Connectors_update_connector_request_pagerduty' - - $ref: '#/components/schemas/Connectors_update_connector_request_resilient' - - $ref: '#/components/schemas/Connectors_update_connector_request_sentinelone' - - $ref: '#/components/schemas/Connectors_update_connector_request_serverlog' - - $ref: '#/components/schemas/Connectors_update_connector_request_servicenow' - - $ref: >- - #/components/schemas/Connectors_update_connector_request_servicenow_itom - - $ref: '#/components/schemas/Connectors_update_connector_request_slack_api' - - $ref: >- - #/components/schemas/Connectors_update_connector_request_slack_webhook - - $ref: '#/components/schemas/Connectors_update_connector_request_swimlane' - - $ref: '#/components/schemas/Connectors_update_connector_request_teams' - - $ref: '#/components/schemas/Connectors_update_connector_request_tines' - - $ref: '#/components/schemas/Connectors_update_connector_request_torq' - - $ref: '#/components/schemas/Connectors_update_connector_request_webhook' - - $ref: '#/components/schemas/Connectors_update_connector_request_xmatters' - title: Update connector request body properties - Connectors_update_connector_request_bedrock: - title: Update Amazon Bedrock connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_bedrock' - name: - description: The display name for the connector. + oauthTokenUrl: + nullable: true type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_bedrock' - required: - - config - - name - Connectors_update_connector_request_cases_webhook: - title: Update Webhook - Case Managment connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_cases_webhook' - name: - description: The display name for the connector. - example: my-connector + port: + description: > + The port to connect to on the service provider. If the `service` is + `elastic_cloud` (for Elastic Cloud notifications) or one of + Nodemailer's well-known email service providers, this property is + ignored. If `service` is `other`, this property must be defined. + type: integer + secure: + description: > + Specifies whether the connection to the service provider will use + TLS. If the `service` is `elastic_cloud` (for Elastic Cloud + notifications) or one of Nodemailer's well-known email service + providers, this property is ignored. + type: boolean + service: + description: | + The name of the email service. + enum: + - elastic_cloud + - exchange_server + - gmail + - other + - outlook365 + - ses type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_cases_webhook' - required: - - config - - name - Connectors_update_connector_request_d3security: - title: Update D3 Security connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_d3security' - name: - description: The display name for the connector. + tenantId: + description: > + The tenant identifier, which is part of OAuth 2.0 client credentials + authentication, in GUID format. If `service` is `exchange_server`, + this property is required. + nullable: true type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_d3security' required: - - config - - name - - secrets - Connectors_update_connector_request_email: - title: Update email connector request - type: object + - from + title: Connector request properties for an email connector + Connectors_config_properties_gemini: + description: Defines properties for connectors when type is `.gemini`. properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_email' - name: - description: The display name for the connector. + apiUrl: + description: The Google Gemini request URL. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_email' - required: - - config - - name - Connectors_update_connector_request_gemini: - title: Update Google Gemini connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_gemini' - name: - description: The display name for the connector. + defaultModel: + default: gemini-1.5-pro-001 + description: >- + The generative artificial intelligence model for Google Gemini to + use. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_gemini' - required: - - config - - name - Connectors_update_connector_request_index: - title: Update index connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_index' - name: - description: The display name for the connector. + gcpProjectID: + description: The Google ProjectID that has Vertex AI endpoint enabled. type: string - required: - - config - - name - Connectors_update_connector_request_jira: - title: Update Jira connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_jira' - name: - description: The display name for the connector. + gcpRegion: + description: The GCP region where the Vertex AI endpoint enabled. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_jira' required: - - config - - name - - secrets - Connectors_update_connector_request_opsgenie: - title: Update Opsgenie connector request + - apiUrl + - gcpRegion + - gcpProjectID + title: Connector request properties for an Google Gemini connector type: object + Connectors_config_properties_genai: + description: Defines properties for connectors when type is `.gen-ai`. + discriminator: + mapping: + Azure OpenAI: '#/components/schemas/Connectors_config_properties_genai_azure' + OpenAI: '#/components/schemas/Connectors_config_properties_genai_openai' + propertyName: apiProvider + oneOf: + - $ref: '#/components/schemas/Connectors_config_properties_genai_azure' + - $ref: '#/components/schemas/Connectors_config_properties_genai_openai' + title: Connector request properties for an OpenAI connector + Connectors_config_properties_genai_azure: + description: > + Defines properties for connectors when type is `.gen-ai` and the API + provider is `Azure OpenAI'. properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_opsgenie' - name: - description: The display name for the connector. + apiProvider: + description: The OpenAI API provider. + enum: + - Azure OpenAI type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_opsgenie' - required: - - config - - name - - secrets - Connectors_update_connector_request_pagerduty: - title: Update PagerDuty connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_pagerduty' - name: - description: The display name for the connector. + apiUrl: + description: The OpenAI API endpoint. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_pagerduty' required: - - config - - name - - secrets - Connectors_update_connector_request_resilient: - title: Update IBM Resilient connector request + - apiProvider + - apiUrl + title: >- + Connector request properties for an OpenAI connector that uses Azure + OpenAI type: object + Connectors_config_properties_genai_openai: + description: > + Defines properties for connectors when type is `.gen-ai` and the API + provider is `OpenAI'. properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_resilient' - name: - description: The display name for the connector. + apiProvider: + description: The OpenAI API provider. + enum: + - OpenAI + type: string + apiUrl: + description: The OpenAI API endpoint. + type: string + defaultModel: + description: The default model to use for requests. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_resilient' required: - - config - - name - - secrets - Connectors_update_connector_request_sentinelone: - title: Update SentinelOne connector request + - apiProvider + - apiUrl + title: Connector request properties for an OpenAI connector + type: object + Connectors_config_properties_index: + description: Defines properties for connectors when type is `.index`. type: object properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_sentinelone' - name: - description: The display name for the connector. + executionTimeField: + default: null + description: A field that indicates when the document was indexed. + nullable: true type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_sentinelone' + index: + description: The Elasticsearch index to be written to. + type: string + refresh: + default: false + description: > + The refresh policy for the write request, which affects when changes + are made visible to search. Refer to the refresh setting for + Elasticsearch document APIs. + type: boolean required: - - config - - name - - secrets - Connectors_update_connector_request_serverlog: - title: Update server log connector request + - index + title: Connector request properties for an index connector + Connectors_config_properties_jira: + description: Defines properties for connectors when type is `.jira`. type: object properties: - name: - description: The display name for the connector. + apiUrl: + description: The Jira instance URL. + type: string + projectKey: + description: The Jira project key. type: string required: - - name - Connectors_update_connector_request_servicenow: - title: Update ServiceNow ITSM connector or ServiceNow SecOps request + - apiUrl + - projectKey + title: Connector request properties for a Jira connector + Connectors_config_properties_opsgenie: + description: Defines properties for connectors when type is `.opsgenie`. type: object properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow' - name: - description: The display name for the connector. + apiUrl: + description: > + The Opsgenie URL. For example, `https://api.opsgenie.com` or + `https://api.eu.opsgenie.com`. If you are using the + `xpack.actions.allowedHosts` setting, add the hostname to the + allowed hosts. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' required: - - config - - name - - secrets - Connectors_update_connector_request_servicenow_itom: - title: Create ServiceNow ITOM connector request + - apiUrl + title: Connector request properties for an Opsgenie connector + Connectors_config_properties_pagerduty: + description: Defines properties for connectors when type is `.pagerduty`. + properties: + apiUrl: + description: The PagerDuty event URL. + example: 'https://events.pagerduty.com/v2/enqueue' + nullable: true + type: string + title: Connector request properties for a PagerDuty connector + type: object + Connectors_config_properties_resilient: + description: Defines properties for connectors when type is `.resilient`. type: object properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_servicenow_itom' - name: - description: The display name for the connector. + apiUrl: + description: The IBM Resilient instance URL. + type: string + orgId: + description: The IBM Resilient organization ID. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' required: - - config - - name - - secrets - Connectors_update_connector_request_slack_api: - title: Update Slack connector request + - apiUrl + - orgId + title: Connector request properties for a IBM Resilient connector + Connectors_config_properties_sentinelone: + description: Defines properties for connectors when type is `.sentinelone`. type: object properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_slack_api' - name: - description: The display name for the connector. + url: + description: > + The SentinelOne tenant URL. If you are using the + `xpack.actions.allowedHosts` setting, add the hostname to the + allowed hosts. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_slack_api' required: - - name - - secrets - Connectors_update_connector_request_slack_webhook: - title: Update Slack connector request + - url + title: Connector request properties for a SentinelOne connector + Connectors_config_properties_servicenow: + description: Defines properties for connectors when type is `.servicenow`. type: object properties: - name: - description: The display name for the connector. + apiUrl: + description: The ServiceNow instance URL. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_slack_webhook' + clientId: + description: > + The client ID assigned to your OAuth application. This property is + required when `isOAuth` is `true`. + type: string + isOAuth: + default: false + description: > + The type of authentication to use. The default value is false, which + means basic authentication is used instead of open authorization + (OAuth). + type: boolean + jwtKeyId: + description: > + The key identifier assigned to the JWT verifier map of your OAuth + application. This property is required when `isOAuth` is `true`. + type: string + userIdentifierValue: + description: > + The identifier to use for OAuth authentication. This identifier + should be the user field you selected when you created an OAuth JWT + API endpoint for external clients in your ServiceNow instance. For + example, if the selected user field is `Email`, the user identifier + should be the user's email address. This property is required when + `isOAuth` is `true`. + type: string + usesTableApi: + default: true + description: > + Determines whether the connector uses the Table API or the Import + Set API. This property is supported only for ServiceNow ITSM and + ServiceNow SecOps connectors. NOTE: If this property is set to + `false`, the Elastic application should be installed in ServiceNow. + type: boolean required: - - name - - secrets - Connectors_update_connector_request_swimlane: - title: Update Swimlane connector request + - apiUrl + title: Connector request properties for a ServiceNow ITSM connector + Connectors_config_properties_servicenow_itom: + description: Defines properties for connectors when type is `.servicenow`. type: object properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_swimlane' - name: - description: The display name for the connector. - example: my-connector + apiUrl: + description: The ServiceNow instance URL. + type: string + clientId: + description: > + The client ID assigned to your OAuth application. This property is + required when `isOAuth` is `true`. + type: string + isOAuth: + default: false + description: > + The type of authentication to use. The default value is false, which + means basic authentication is used instead of open authorization + (OAuth). + type: boolean + jwtKeyId: + description: > + The key identifier assigned to the JWT verifier map of your OAuth + application. This property is required when `isOAuth` is `true`. + type: string + userIdentifierValue: + description: > + The identifier to use for OAuth authentication. This identifier + should be the user field you selected when you created an OAuth JWT + API endpoint for external clients in your ServiceNow instance. For + example, if the selected user field is `Email`, the user identifier + should be the user's email address. This property is required when + `isOAuth` is `true`. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_swimlane' required: - - config - - name - - secrets - Connectors_update_connector_request_teams: - title: Update Microsoft Teams connector request + - apiUrl + title: Connector request properties for a ServiceNow ITSM connector + Connectors_config_properties_slack_api: + description: Defines properties for connectors when type is `.slack_api`. + properties: + allowedChannels: + description: A list of valid Slack channels. + items: + maxItems: 25 + type: object + properties: + id: + description: The Slack channel ID. + example: C123ABC456 + minLength: 1 + type: string + name: + description: The Slack channel name. + minLength: 1 + type: string + required: + - id + - name + type: array + title: Connector request properties for a Slack connector type: object - properties: - name: - description: The display name for the connector. - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_teams' - required: - - name - - secrets - Connectors_update_connector_request_tines: - title: Update Tines connector request + Connectors_config_properties_swimlane: + description: Defines properties for connectors when type is `.swimlane`. type: object properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_tines' - name: - description: The display name for the connector. + apiUrl: + description: The Swimlane instance URL. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_tines' - required: - - config - - name - - secrets - Connectors_update_connector_request_torq: - title: Update Torq connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_torq' - name: - description: The display name for the connector. + appId: + description: The Swimlane application ID. type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_torq' - required: - - config - - name - - secrets - Connectors_update_connector_request_webhook: - title: Update Webhook connector request - type: object - properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_webhook' - name: - description: The display name for the connector. + connectorType: + description: >- + The type of connector. Valid values are `all`, `alerts`, and + `cases`. + enum: + - all + - alerts + - cases type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_webhook' + mappings: + description: The field mapping. + properties: + alertIdConfig: + description: Mapping for the alert ID. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Alert identifier mapping + type: object + caseIdConfig: + description: Mapping for the case ID. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Case identifier mapping + type: object + caseNameConfig: + description: Mapping for the case name. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Case name mapping + type: object + commentsConfig: + description: Mapping for the case comments. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Case comment mapping + type: object + descriptionConfig: + description: Mapping for the case description. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Case description mapping + type: object + ruleNameConfig: + description: Mapping for the name of the alert's rule. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Rule name mapping + type: object + severityConfig: + description: Mapping for the severity. + properties: + fieldType: + description: The type of field in Swimlane. + type: string + id: + description: The identifier for the field in Swimlane. + type: string + key: + description: The key for the field in Swimlane. + type: string + name: + description: The name of the field in Swimlane. + type: string + required: + - fieldType + - id + - key + - name + title: Severity mapping + type: object + title: Connector mappings properties for a Swimlane connector + type: object required: - - config - - name - - secrets - Connectors_update_connector_request_xmatters: - title: Update xMatters connector request - type: object + - apiUrl + - appId + - connectorType + title: Connector request properties for a Swimlane connector + Connectors_config_properties_tines: + description: Defines properties for connectors when type is `.tines`. properties: - config: - $ref: '#/components/schemas/Connectors_config_properties_xmatters' - name: - description: The display name for the connector. - type: string - secrets: - $ref: '#/components/schemas/Connectors_secrets_properties_xmatters' - required: - - config - - name - - secrets - Data_views_400_response: - title: Bad request + url: + description: > + The Tines tenant URL. If you are using the + `xpack.actions.allowedHosts` setting, make sure this hostname is + added to the allowed hosts. + type: string + required: + - url + title: Connector request properties for a Tines connector type: object + Connectors_config_properties_torq: + description: Defines properties for connectors when type is `.torq`. properties: - error: - example: Bad Request - type: string - message: + webhookIntegrationUrl: + description: The endpoint URL of the Elastic Security integration in Torq. type: string - statusCode: - example: 400 - type: number required: - - statusCode - - error - - message - Data_views_404_response: + - webhookIntegrationUrl + title: Connector request properties for a Torq connector type: object + Connectors_config_properties_webhook: + description: Defines properties for connectors when type is `.webhook`. properties: - error: + authType: + description: | + The type of authentication to use: basic, SSL, or none. enum: - - Not Found - example: Not Found + - webhook-authentication-basic + - webhook-authentication-ssl + nullable: true type: string - message: - example: >- - Saved object [index-pattern/caaad6d0-920c-11ed-b36a-874bd1548a00] - not found + ca: + description: > + A base64 encoded version of the certificate authority file that the + connector can trust to sign and validate certificates. This option + is available for all authentication types. type: string - statusCode: + certType: + description: > + If the `authType` is `webhook-authentication-ssl`, specifies whether + the certificate authentication data is in a CRT and key file format + or a PFX file format. enum: - - 404 - example: 404 - type: integer - Data_views_allownoindex: - description: Allows the data view saved object to exist before the data is available. - type: boolean - Data_views_create_data_view_request_object: - title: Create data view request + - ssl-crt-key + - ssl-pfx + type: string + hasAuth: + description: > + If `true`, a user name and password must be provided for login type + authentication. + type: boolean + headers: + description: A set of key-value pairs sent as headers with the request. + nullable: true + type: object + method: + default: post + description: | + The HTTP request method, either `post` or `put`. + enum: + - post + - put + type: string + url: + description: > + The request URL. If you are using the `xpack.actions.allowedHosts` + setting, add the hostname to the allowed hosts. + type: string + verificationMode: + default: full + description: > + Controls the verification of certificates. Use `full` to validate + that the certificate has an issue date within the `not_before` and + `not_after` dates, chains to a trusted certificate authority (CA), + and has a hostname or IP address that matches the names within the + certificate. Use `certificate` to validate the certificate and + verify that it is signed by a trusted authority; this option does + not check the certificate hostname. Use `none` to skip certificate + validation. + enum: + - certificate + - full + - none + type: string + title: Connector request properties for a Webhook connector type: object + Connectors_config_properties_xmatters: + description: Defines properties for connectors when type is `.xmatters`. properties: - data_view: - description: The data view object. - type: object - properties: - allowNoIndex: - $ref: '#/components/schemas/Data_views_allownoindex' - fieldAttrs: - additionalProperties: - $ref: '#/components/schemas/Data_views_fieldattrs' - type: object - fieldFormats: - $ref: '#/components/schemas/Data_views_fieldformats' - fields: - type: object - id: - type: string - name: - description: The data view name. - type: string - namespaces: - $ref: '#/components/schemas/Data_views_namespaces' - runtimeFieldMap: - additionalProperties: - $ref: '#/components/schemas/Data_views_runtimefieldmap' - type: object - sourceFilters: - $ref: '#/components/schemas/Data_views_sourcefilters' - timeFieldName: - $ref: '#/components/schemas/Data_views_timefieldname' - title: - $ref: '#/components/schemas/Data_views_title' - type: - $ref: '#/components/schemas/Data_views_type' - typeMeta: - $ref: '#/components/schemas/Data_views_typemeta' - version: - type: string - required: - - title - override: - default: false + configUrl: + description: > + The request URL for the Elastic Alerts trigger in xMatters. It is + applicable only when `usesBasic` is `true`. + nullable: true + type: string + usesBasic: + default: true description: >- - Override an existing data view if a data view with the provided - title already exists. + Specifies whether the connector uses HTTP basic authentication + (`true`) or URL authentication (`false`). type: boolean - required: - - data_view - Data_views_data_view_response_object: - title: Data view response properties + title: Connector request properties for an xMatters connector type: object - properties: - data_view: - type: object - properties: - allowNoIndex: - $ref: '#/components/schemas/Data_views_allownoindex' - fieldAttrs: - additionalProperties: - $ref: '#/components/schemas/Data_views_fieldattrs' - type: object - fieldFormats: - $ref: '#/components/schemas/Data_views_fieldformats' - fields: - type: object - id: - example: ff959d40-b880-11e8-a6d9-e546fe2bba5f - type: string - name: - description: The data view name. - type: string - namespaces: - $ref: '#/components/schemas/Data_views_namespaces' - runtimeFieldMap: - additionalProperties: - $ref: '#/components/schemas/Data_views_runtimefieldmap' - type: object - sourceFilters: - $ref: '#/components/schemas/Data_views_sourcefilters' - timeFieldName: - $ref: '#/components/schemas/Data_views_timefieldname' - title: - $ref: '#/components/schemas/Data_views_title' - typeMeta: - $ref: '#/components/schemas/Data_views_typemeta_response' - version: - example: WzQ2LDJd - type: string - Data_views_fieldattrs: - description: A map of field attributes by field name. + Connectors_connector_response_properties: + description: The properties vary depending on the connector type. + discriminator: + mapping: + .bedrock: >- + #/components/schemas/Connectors_connector_response_properties_bedrock + .cases-webhook: >- + #/components/schemas/Connectors_connector_response_properties_cases_webhook + .d3security: >- + #/components/schemas/Connectors_connector_response_properties_d3security + .email: '#/components/schemas/Connectors_connector_response_properties_email' + .gemini: '#/components/schemas/Connectors_connector_response_properties_gemini' + .gen-ai: '#/components/schemas/Connectors_connector_response_properties_genai' + .index: '#/components/schemas/Connectors_connector_response_properties_index' + .jira: '#/components/schemas/Connectors_connector_response_properties_jira' + .opsgenie: >- + #/components/schemas/Connectors_connector_response_properties_opsgenie + .pagerduty: >- + #/components/schemas/Connectors_connector_response_properties_pagerduty + .resilient: >- + #/components/schemas/Connectors_connector_response_properties_resilient + .sentinelone: >- + #/components/schemas/Connectors_connector_response_properties_sentinelone + .server-log: >- + #/components/schemas/Connectors_connector_response_properties_serverlog + .servicenow: >- + #/components/schemas/Connectors_connector_response_properties_servicenow + .servicenow-itom: >- + #/components/schemas/Connectors_connector_response_properties_servicenow_itom + .servicenow-sir: >- + #/components/schemas/Connectors_connector_response_properties_servicenow_sir + .slack: >- + #/components/schemas/Connectors_connector_response_properties_slack_webhook + .slack_api: >- + #/components/schemas/Connectors_connector_response_properties_slack_api + .swimlane: >- + #/components/schemas/Connectors_connector_response_properties_swimlane + .teams: '#/components/schemas/Connectors_connector_response_properties_teams' + .tines: '#/components/schemas/Connectors_connector_response_properties_tines' + .torq: '#/components/schemas/Connectors_connector_response_properties_torq' + .webhook: >- + #/components/schemas/Connectors_connector_response_properties_webhook + .xmatters: >- + #/components/schemas/Connectors_connector_response_properties_xmatters + propertyName: connector_type_id + oneOf: + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_bedrock + - $ref: '#/components/schemas/Connectors_connector_response_properties_gemini' + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_cases_webhook + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_d3security + - $ref: '#/components/schemas/Connectors_connector_response_properties_email' + - $ref: '#/components/schemas/Connectors_connector_response_properties_genai' + - $ref: '#/components/schemas/Connectors_connector_response_properties_index' + - $ref: '#/components/schemas/Connectors_connector_response_properties_jira' + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_opsgenie + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_pagerduty + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_resilient + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_sentinelone + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_serverlog + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_servicenow + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_servicenow_itom + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_servicenow_sir + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_slack_api + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_slack_webhook + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_swimlane + - $ref: '#/components/schemas/Connectors_connector_response_properties_teams' + - $ref: '#/components/schemas/Connectors_connector_response_properties_tines' + - $ref: '#/components/schemas/Connectors_connector_response_properties_torq' + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_webhook + - $ref: >- + #/components/schemas/Connectors_connector_response_properties_xmatters + title: Connector response properties + Connectors_connector_response_properties_bedrock: + title: Connector response properties for an Amazon Bedrock connector type: object properties: - count: - description: Popularity count for the field. - type: integer - customDescription: - description: Custom description for the field. - maxLength: 300 + config: + $ref: '#/components/schemas/Connectors_config_properties_bedrock' + connector_type_id: + description: The type of connector. + enum: + - .bedrock type: string - customLabel: - description: Custom label for the field. + id: + description: The identifier for the connector. type: string - Data_views_fieldformats: - description: A map of field formats by field name. - type: object - Data_views_namespaces: - description: >- - An array of space identifiers for sharing the data view between multiple - spaces. - items: - default: default - type: string - type: array - Data_views_runtimefieldmap: - description: A map of runtime field definitions by field name. - type: object - properties: - script: - type: object - properties: - source: - description: Script for the runtime field. - type: string - type: - description: Mapping type of the runtime field. + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string required: - - script - - type - Data_views_sourcefilters: - description: The array of field names you want to filter out in Discover. - items: - type: object - properties: - value: - type: string - required: - - value - type: array - Data_views_swap_data_view_request_object: - title: Data view reference swap request + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_cases_webhook: + title: Connector request properties for a Webhook - Case Management connector type: object properties: - delete: - description: Deletes referenced saved object if all references are removed. - type: boolean - forId: - description: Limit the affected saved objects to one or more by identifier. - oneOf: - - type: string - - items: - type: string - type: array - forType: - description: Limit the affected saved objects by type. - type: string - fromId: - description: The saved object reference to change. + config: + $ref: '#/components/schemas/Connectors_config_properties_cases_webhook' + connector_type_id: + description: The type of connector. + enum: + - .cases-webhook type: string - fromType: - description: > - Specify the type of the saved object reference to alter. The default - value is `index-pattern` for data views. + id: + description: The identifier for the connector. type: string - toId: - description: New saved object reference value to replace the old value. + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - fromId - - toId - Data_views_timefieldname: - description: 'The timestamp field name, which you use for time-based data views.' - type: string - Data_views_title: - description: >- - Comma-separated list of data streams, indices, and aliases that you want - to search. Supports wildcards (`*`). - type: string - Data_views_type: - description: 'When set to `rollup`, identifies the rollup data views.' - type: string - Data_views_typemeta: - description: >- - When you use rollup indices, contains the field list for the rollup data - view API endpoints. - type: object - properties: - aggs: - description: A map of rollup restrictions by aggregation type and field name. - type: object - params: - description: Properties for retrieving rollup fields. - type: object - required: - - aggs - - params - Data_views_typemeta_response: - description: >- - When you use rollup indices, contains the field list for the rollup data - view API endpoints. - nullable: true - type: object - properties: - aggs: - description: A map of rollup restrictions by aggregation type and field name. - type: object - params: - description: Properties for retrieving rollup fields. - type: object - Data_views_update_data_view_request_object: - title: Update data view request + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_d3security: + title: Connector response properties for a D3 Security connector type: object properties: - data_view: - description: > - The data view properties you want to update. Only the specified - properties are updated in the data view. Unspecified fields stay as - they are persisted. - type: object - properties: - allowNoIndex: - $ref: '#/components/schemas/Data_views_allownoindex' - fieldFormats: - $ref: '#/components/schemas/Data_views_fieldformats' - fields: - type: object - name: - type: string - runtimeFieldMap: - additionalProperties: - $ref: '#/components/schemas/Data_views_runtimefieldmap' - type: object - sourceFilters: - $ref: '#/components/schemas/Data_views_sourcefilters' - timeFieldName: - $ref: '#/components/schemas/Data_views_timefieldname' - title: - $ref: '#/components/schemas/Data_views_title' - type: - $ref: '#/components/schemas/Data_views_type' - typeMeta: - $ref: '#/components/schemas/Data_views_typemeta' - refresh_fields: - default: false - description: Reloads the data view fields after the data view is updated. - type: boolean + config: + $ref: '#/components/schemas/Connectors_config_properties_d3security' + connector_type_id: + description: The type of connector. + enum: + - .d3security + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - data_view - Kibana_HTTP_APIs_core_status_redactedResponse: - additionalProperties: false - description: A minimal representation of Kibana's operational status. + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_email: + title: Connector response properties for an email connector type: object properties: - status: - additionalProperties: false - type: object - properties: - overall: - additionalProperties: false - type: object - properties: - level: - description: Service status levels as human and machine readable values. - enum: - - available - - degraded - - unavailable - - critical - type: string - required: - - level - required: - - overall + config: + $ref: '#/components/schemas/Connectors_config_properties_email' + connector_type_id: + description: The type of connector. + enum: + - .email + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - status - Kibana_HTTP_APIs_core_status_response: - additionalProperties: false - description: >- - Kibana's operational status as well as a detailed breakdown of plugin - statuses indication of various loads (like event loop utilization and - network traffic) at time of request. + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_gemini: + title: Connector response properties for a Google Gemini connector type: object properties: - metrics: - additionalProperties: false - description: Metric groups collected by Kibana. - type: object - properties: - collection_interval_in_millis: - description: The interval at which metrics should be collected. - type: number - elasticsearch_client: - additionalProperties: false - description: Current network metrics of Kibana's Elasticsearch client. - type: object - properties: - totalActiveSockets: - description: Count of network sockets currently in use. - type: number - totalIdleSockets: - description: Count of network sockets currently idle. - type: number - totalQueuedRequests: - description: Count of requests not yet assigned to sockets. - type: number - required: - - totalActiveSockets - - totalIdleSockets - - totalQueuedRequests - last_updated: - description: The time metrics were collected. - type: string - required: - - elasticsearch_client - - last_updated - - collection_interval_in_millis - name: - description: Kibana instance name. + config: + $ref: '#/components/schemas/Connectors_config_properties_gemini' + connector_type_id: + description: The type of connector. + enum: + - .gemini type: string - status: - additionalProperties: false - type: object - properties: - core: - additionalProperties: false - description: Statuses of core Kibana services. - type: object - properties: - elasticsearch: - additionalProperties: false - type: object - properties: - detail: - description: Human readable detail of the service status. - type: string - documentationUrl: - description: A URL to further documentation regarding this service. - type: string - level: - description: >- - Service status levels as human and machine readable - values. - enum: - - available - - degraded - - unavailable - - critical - type: string - meta: - additionalProperties: {} - description: >- - An unstructured set of extra metadata about this - service. - type: object - summary: - description: A human readable summary of the service status. - type: string - required: - - level - - summary - - meta - savedObjects: - additionalProperties: false - type: object - properties: - detail: - description: Human readable detail of the service status. - type: string - documentationUrl: - description: A URL to further documentation regarding this service. - type: string - level: - description: >- - Service status levels as human and machine readable - values. - enum: - - available - - degraded - - unavailable - - critical - type: string - meta: - additionalProperties: {} - description: >- - An unstructured set of extra metadata about this - service. - type: object - summary: - description: A human readable summary of the service status. - type: string - required: - - level - - summary - - meta - required: - - elasticsearch - - savedObjects - overall: - additionalProperties: false - type: object - properties: - detail: - description: Human readable detail of the service status. - type: string - documentationUrl: - description: A URL to further documentation regarding this service. - type: string - level: - description: Service status levels as human and machine readable values. - enum: - - available - - degraded - - unavailable - - critical - type: string - meta: - additionalProperties: {} - description: An unstructured set of extra metadata about this service. - type: object - summary: - description: A human readable summary of the service status. - type: string - required: - - level - - summary - - meta - plugins: - additionalProperties: - additionalProperties: false - type: object - properties: - detail: - description: Human readable detail of the service status. - type: string - documentationUrl: - description: A URL to further documentation regarding this service. - type: string - level: - description: >- - Service status levels as human and machine readable - values. - enum: - - available - - degraded - - unavailable - - critical - type: string - meta: - additionalProperties: {} - description: An unstructured set of extra metadata about this service. - type: object - summary: - description: A human readable summary of the service status. - type: string - required: - - level - - summary - - meta - description: A dynamic mapping of plugin ID to plugin status. - type: object - required: - - overall - - core - - plugins - uuid: - description: >- - Unique, generated Kibana instance UUID. This UUID should persist - even if the Kibana process restarts. + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string - version: - additionalProperties: false - type: object - properties: - build_date: - description: The date and time of this build. - type: string - build_flavor: - description: >- - The build flavour determines configuration and behavior of - Kibana. On premise users will almost always run the - "traditional" flavour, while other flavours are reserved for - Elastic-specific use cases. - enum: - - serverless - - traditional - type: string - build_hash: - description: >- - A unique hash value representing the git commit of this Kibana - build. - type: string - build_number: - description: >- - A monotonically increasing number, each subsequent build will - have a higher number. - type: number - build_snapshot: - description: Whether this build is a snapshot build. - type: boolean - number: - description: A semantic version number. - type: string - required: - - number - - build_hash - - build_number - - build_snapshot - - build_flavor - - build_date + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured - name - - uuid - - version - - status - - metrics - Machine_learning_APIs_mlSync200Response: + Connectors_connector_response_properties_genai: + title: Connector response properties for an OpenAI connector + type: object properties: - datafeedsAdded: - additionalProperties: - $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseDatafeeds' - description: >- - If a saved object for an anomaly detection job is missing a datafeed - identifier, it is added when you run the sync machine learning saved - objects API. - type: object - datafeedsRemoved: - additionalProperties: - $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseDatafeeds' - description: >- - If a saved object for an anomaly detection job references a datafeed - that no longer exists, it is deleted when you run the sync machine - learning saved objects API. - type: object - savedObjectsCreated: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseSavedObjectsCreated - savedObjectsDeleted: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseSavedObjectsDeleted - title: Successful sync API response + config: + $ref: '#/components/schemas/Connectors_config_properties_genai' + connector_type_id: + description: The type of connector. + enum: + - .gen-ai + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_index: + title: Connector response properties for an index connector type: object - Machine_learning_APIs_mlSync4xxResponse: properties: - error: - example: Unauthorized + config: + $ref: '#/components/schemas/Connectors_config_properties_index' + connector_type_id: + description: The type of connector. + enum: + - .index type: string - message: + id: + description: The identifier for the connector. type: string - statusCode: - example: 401 - type: integer - title: Unsuccessful sync API response + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_jira: + title: Connector response properties for a Jira connector type: object - Machine_learning_APIs_mlSyncResponseAnomalyDetectors: - description: >- - The sync machine learning saved objects API response contains this - object when there are anomaly detection jobs affected by the - synchronization. There is an object for each relevant job, which - contains the synchronization status. properties: - success: - $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' - title: Sync API response for anomaly detection jobs + config: + $ref: '#/components/schemas/Connectors_config_properties_jira' + connector_type_id: + description: The type of connector. + enum: + - .jira + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_opsgenie: + title: Connector response properties for an Opsgenie connector type: object - Machine_learning_APIs_mlSyncResponseDatafeeds: - description: >- - The sync machine learning saved objects API response contains this - object when there are datafeeds affected by the synchronization. There - is an object for each relevant datafeed, which contains the - synchronization status. properties: - success: - $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' - title: Sync API response for datafeeds + config: + $ref: '#/components/schemas/Connectors_config_properties_opsgenie' + connector_type_id: + description: The type of connector. + enum: + - .opsgenie + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_pagerduty: + title: Connector response properties for a PagerDuty connector + type: object + properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_pagerduty' + connector_type_id: + description: The type of connector. + enum: + - .pagerduty + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_resilient: + title: Connector response properties for a IBM Resilient connector type: object - Machine_learning_APIs_mlSyncResponseDataFrameAnalytics: - description: >- - The sync machine learning saved objects API response contains this - object when there are data frame analytics jobs affected by the - synchronization. There is an object for each relevant job, which - contains the synchronization status. properties: - success: - $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' - title: Sync API response for data frame analytics jobs + config: + $ref: '#/components/schemas/Connectors_config_properties_resilient' + connector_type_id: + description: The type of connector. + enum: + - .resilient + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_sentinelone: + title: Connector response properties for a SentinelOne connector type: object - Machine_learning_APIs_mlSyncResponseSavedObjectsCreated: - description: >- - If saved objects are missing for machine learning jobs or trained - models, they are created when you run the sync machine learning saved - objects API. properties: - anomaly-detector: - additionalProperties: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseAnomalyDetectors - description: >- - If saved objects are missing for anomaly detection jobs, they are - created. - type: object - data-frame-analytics: - additionalProperties: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseDataFrameAnalytics - description: >- - If saved objects are missing for data frame analytics jobs, they are - created. - type: object - trained-model: - additionalProperties: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseTrainedModels - description: 'If saved objects are missing for trained models, they are created.' - type: object - title: Sync API response for created saved objects + config: + $ref: '#/components/schemas/Connectors_config_properties_sentinelone' + connector_type_id: + description: The type of connector. + enum: + - .sentinelone + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_serverlog: + title: Connector response properties for a server log connector type: object - Machine_learning_APIs_mlSyncResponseSavedObjectsDeleted: - description: >- - If saved objects exist for machine learning jobs or trained models that - no longer exist, they are deleted when you run the sync machine learning - saved objects API. properties: - anomaly-detector: - additionalProperties: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseAnomalyDetectors - description: >- - If there are saved objects exist for nonexistent anomaly detection - jobs, they are deleted. - type: object - data-frame-analytics: - additionalProperties: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseDataFrameAnalytics - description: >- - If there are saved objects exist for nonexistent data frame - analytics jobs, they are deleted. - type: object - trained-model: - additionalProperties: - $ref: >- - #/components/schemas/Machine_learning_APIs_mlSyncResponseTrainedModels - description: >- - If there are saved objects exist for nonexistent trained models, - they are deleted. + config: + nullable: true type: object - title: Sync API response for deleted saved objects - type: object - Machine_learning_APIs_mlSyncResponseSuccess: - description: The success or failure of the synchronization. - type: boolean - Machine_learning_APIs_mlSyncResponseTrainedModels: - description: >- - The sync machine learning saved objects API response contains this - object when there are trained models affected by the synchronization. - There is an object for each relevant trained model, which contains the - synchronization status. - properties: - success: - $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' - title: Sync API response for trained models - type: object - Saved_objects_400_response: - title: Bad request + connector_type_id: + description: The type of connector. + enum: + - .server-log + type: string + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_servicenow: + title: Connector response properties for a ServiceNow ITSM connector type: object properties: - error: + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow' + connector_type_id: + description: The type of connector. enum: - - Bad Request + - .servicenow type: string - message: + id: + description: The identifier for the connector. type: string - statusCode: - enum: - - 400 - type: integer + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - error - - message - - statusCode - Saved_objects_attributes: - description: > - The data that you want to create. WARNING: When you create saved - objects, attributes are not validated, which allows you to pass - arbitrary and ill-formed data into the API that can break Kibana. Make - sure any data that you send to the API is properly formed. - type: object - Saved_objects_initial_namespaces: - description: > - Identifiers for the spaces in which this object is created. If this is - provided, the object is created only in the explicitly defined spaces. - If this is not provided, the object is created in the current space - (default behavior). For shareable object types (registered with - `namespaceType: 'multiple'`), this option can be used to specify one or - more spaces, including the "All spaces" identifier ('*'). For isolated - object types (registered with `namespaceType: 'single'` or - `namespaceType: 'multiple-isolated'`), this option can only be used to - specify a single space, and the "All spaces" identifier ('*') is not - allowed. For global object types (`registered with `namespaceType: - agnostic`), this option cannot be used. - type: array - Saved_objects_references: - description: > - Objects with `name`, `id`, and `type` properties that describe the other - saved objects that this object references. Use `name` in attributes to - refer to the other saved object, but never the `id`, which can update - automatically during migrations or import and export. - type: array - Security_AI_Assistant_API_AnonymizationFieldCreateProps: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_servicenow_itom: + title: Connector response properties for a ServiceNow ITOM connector type: object properties: - allowed: - type: boolean - anonymized: - type: boolean - field: + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow_itom' + connector_type_id: + description: The type of connector. + enum: + - .servicenow-itom type: string - required: - - field - Security_AI_Assistant_API_AnonymizationFieldDetailsInError: - type: object - properties: id: + description: The identifier for the connector. type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - Security_AI_Assistant_API_AnonymizationFieldResponse: + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_servicenow_sir: + title: Connector response properties for a ServiceNow SecOps connector type: object properties: - allowed: - type: boolean - anonymized: - type: boolean - createdAt: - type: string - createdBy: - type: string - field: + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow' + connector_type_id: + description: The type of connector. + enum: + - .servicenow-sir type: string id: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - namespace: - description: Kibana space - type: string - timestamp: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - updatedAt: + description: The identifier for the connector. type: string - updatedBy: + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - - field - Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipReason: - enum: - - ANONYMIZATION_FIELD_NOT_MODIFIED - type: string - Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipResult: + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_slack_api: + title: Connector response properties for a Slack connector type: object properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_slack_api' + connector_type_id: + description: The type of connector. + enum: + - .slack_api + type: string id: + description: The identifier for the connector. type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' name: + description: The display name for the connector. type: string - skip_reason: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipReason + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - - skip_reason - Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResponse: + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_slack_webhook: + title: Connector response properties for a Slack connector type: object properties: - anonymization_fields_count: - type: integer - attributes: - type: object - properties: - errors: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_NormalizedAnonymizationFieldError - type: array - results: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResults - summary: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_BulkCrudActionSummary - required: - - results - - summary - message: + connector_type_id: + description: The type of connector. + enum: + - .slack type: string - status_code: - type: integer - success: - type: boolean - required: - - attributes - Security_AI_Assistant_API_AnonymizationFieldsBulkCrudActionResults: - type: object - properties: - created: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldResponse - type: array - deleted: - items: - type: string - type: array - skipped: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldsBulkActionSkipResult - type: array - updated: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldResponse - type: array - required: - - updated - - created - - deleted - - skipped - Security_AI_Assistant_API_AnonymizationFieldUpdateProps: - type: object - properties: - allowed: - type: boolean - anonymized: - type: boolean id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - Security_AI_Assistant_API_ApiConfig: + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_swimlane: + title: Connector response properties for a Swimlane connector type: object properties: - actionTypeId: - description: action type id - type: string - connectorId: - description: connector id + config: + $ref: '#/components/schemas/Connectors_config_properties_swimlane' + connector_type_id: + description: The type of connector. + enum: + - .swimlane type: string - defaultSystemPromptId: - description: defaultSystemPromptId + id: + description: The identifier for the connector. type: string - model: - description: model + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string - provider: - $ref: '#/components/schemas/Security_AI_Assistant_API_Provider' - description: Provider - required: - - connectorId - - actionTypeId - Security_AI_Assistant_API_BulkCrudActionSummary: - type: object - properties: - failed: - type: integer - skipped: - type: integer - succeeded: - type: integer - total: - type: integer + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - failed - - skipped - - succeeded - - total - Security_AI_Assistant_API_ChatCompleteProps: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_teams: + title: Connector response properties for a Microsoft Teams connector type: object properties: - connectorId: - type: string - conversationId: - type: string - isStream: - type: boolean - langSmithApiKey: - type: string - langSmithProject: - type: string - messages: - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_ChatMessage' - type: array - model: + config: + type: object + connector_type_id: + description: The type of connector. + enum: + - .teams type: string - persist: - type: boolean - promptId: + id: + description: The identifier for the connector. type: string - responseLanguage: + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - messages - - persist - - connectorId - Security_AI_Assistant_API_ChatMessage: - description: AI assistant message. + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_tines: + title: Connector response properties for a Tines connector type: object properties: - content: - description: Message content. + config: + $ref: '#/components/schemas/Connectors_config_properties_tines' + connector_type_id: + description: The type of connector. + enum: + - .tines type: string - data: - $ref: '#/components/schemas/Security_AI_Assistant_API_MessageData' - description: ECS object to attach to the context of the message. - fields_to_anonymize: - items: - type: string - type: array - role: - $ref: '#/components/schemas/Security_AI_Assistant_API_ChatMessageRole' - description: Message role. + id: + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. + type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - role - Security_AI_Assistant_API_ChatMessageRole: - description: Message role. - enum: - - system - - user - - assistant - type: string - Security_AI_Assistant_API_ConversationCategory: - description: The conversation category. - enum: - - assistant - - insights - type: string - Security_AI_Assistant_API_ConversationConfidence: - description: The conversation confidence. - enum: - - low - - medium - - high - type: string - Security_AI_Assistant_API_ConversationCreateProps: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_torq: + title: Connector response properties for a Torq connector type: object properties: - apiConfig: - $ref: '#/components/schemas/Security_AI_Assistant_API_ApiConfig' - description: LLM API configuration. - category: - $ref: '#/components/schemas/Security_AI_Assistant_API_ConversationCategory' - description: The conversation category. - excludeFromLastConversationStorage: - description: excludeFromLastConversationStorage. - type: boolean + config: + $ref: '#/components/schemas/Connectors_config_properties_torq' + connector_type_id: + description: The type of connector. + enum: + - .torq + type: string id: - description: The conversation id. + description: The identifier for the connector. type: string - isDefault: - description: Is default conversation. - type: boolean - messages: - description: The conversation messages. - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_Message' - type: array - replacements: - $ref: '#/components/schemas/Security_AI_Assistant_API_Replacements' - title: - description: The conversation title. + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: - - title - Security_AI_Assistant_API_ConversationResponse: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_webhook: + title: Connector response properties for a Webhook connector type: object properties: - apiConfig: - $ref: '#/components/schemas/Security_AI_Assistant_API_ApiConfig' - description: LLM API configuration. - category: - $ref: '#/components/schemas/Security_AI_Assistant_API_ConversationCategory' - description: The conversation category. - createdAt: - description: The last time conversation was updated. + config: + $ref: '#/components/schemas/Connectors_config_properties_webhook' + connector_type_id: + description: The type of connector. + enum: + - .webhook type: string - excludeFromLastConversationStorage: - description: excludeFromLastConversationStorage. - type: boolean id: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - isDefault: - description: Is default conversation. - type: boolean - messages: - description: The conversation messages. - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_Message' - type: array - namespace: - description: Kibana space - type: string - replacements: - $ref: '#/components/schemas/Security_AI_Assistant_API_Replacements' - summary: - $ref: '#/components/schemas/Security_AI_Assistant_API_ConversationSummary' - timestamp: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - title: - description: The conversation title. + description: The identifier for the connector. type: string - updatedAt: - description: The last time conversation was updated. + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string - users: - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_User' - type: array + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - - title - - createdAt - - users - - namespace - - category - Security_AI_Assistant_API_ConversationSummary: + - is_deprecated + - is_preconfigured + - name + Connectors_connector_response_properties_xmatters: + title: Connector response properties for an xMatters connector type: object properties: - confidence: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_ConversationConfidence - description: >- - How confident you are about this being a correct and useful - learning. - content: - description: Summary text of the conversation over time. + config: + $ref: '#/components/schemas/Connectors_config_properties_xmatters' + connector_type_id: + description: The type of connector. + enum: + - .xmatters type: string - public: - description: Define if summary is marked as publicly available. - type: boolean - timestamp: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - description: The timestamp summary was updated. - Security_AI_Assistant_API_ConversationUpdateProps: - type: object - properties: - apiConfig: - $ref: '#/components/schemas/Security_AI_Assistant_API_ApiConfig' - description: LLM API configuration. - category: - $ref: '#/components/schemas/Security_AI_Assistant_API_ConversationCategory' - description: The conversation category. - excludeFromLastConversationStorage: - description: excludeFromLastConversationStorage. - type: boolean id: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - messages: - description: The conversation messages. - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_Message' - type: array - replacements: - $ref: '#/components/schemas/Security_AI_Assistant_API_Replacements' - summary: - $ref: '#/components/schemas/Security_AI_Assistant_API_ConversationSummary' - title: - description: The conversation title. + description: The identifier for the connector. + type: string + is_deprecated: + $ref: '#/components/schemas/Connectors_is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/Connectors_is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/Connectors_is_preconfigured' + is_system_action: + $ref: '#/components/schemas/Connectors_is_system_action' + name: + description: The display name for the connector. type: string + referenced_by_count: + $ref: '#/components/schemas/Connectors_referenced_by_count' required: + - connector_type_id - id - Security_AI_Assistant_API_FindAnonymizationFieldsSortField: - enum: - - created_at - - anonymized - - allowed - - field - - updated_at - type: string - Security_AI_Assistant_API_FindConversationsSortField: - enum: - - created_at - - is_default - - title - - updated_at - type: string - Security_AI_Assistant_API_FindPromptsSortField: - enum: - - created_at - - is_default + - is_deprecated + - is_preconfigured - name - - updated_at + Connectors_connector_types: + description: >- + The type of connector. For example, `.email`, `.index`, `.jira`, + `.opsgenie`, or `.server-log`. + enum: + - .bedrock + - .gemini + - .cases-webhook + - .d3security + - .email + - .gen-ai + - .index + - .jira + - .opsgenie + - .pagerduty + - .resilient + - .sentinelone + - .servicenow + - .servicenow-itom + - .servicenow-sir + - .server-log + - .slack + - .slack_api + - .swimlane + - .teams + - .tines + - .torq + - .webhook + - .xmatters + example: .server-log + title: Connector types type: string - Security_AI_Assistant_API_Message: - description: AI assistant conversation message. - type: object + Connectors_create_connector_request: + description: The properties vary depending on the connector type. + discriminator: + mapping: + .bedrock: '#/components/schemas/Connectors_create_connector_request_bedrock' + .cases-webhook: >- + #/components/schemas/Connectors_create_connector_request_cases_webhook + .d3security: '#/components/schemas/Connectors_create_connector_request_d3security' + .email: '#/components/schemas/Connectors_create_connector_request_email' + .gemini: '#/components/schemas/Connectors_create_connector_request_gemini' + .gen-ai: '#/components/schemas/Connectors_create_connector_request_genai' + .index: '#/components/schemas/Connectors_create_connector_request_index' + .jira: '#/components/schemas/Connectors_create_connector_request_jira' + .opsgenie: '#/components/schemas/Connectors_create_connector_request_opsgenie' + .pagerduty: '#/components/schemas/Connectors_create_connector_request_pagerduty' + .resilient: '#/components/schemas/Connectors_create_connector_request_resilient' + .sentinelone: '#/components/schemas/Connectors_create_connector_request_sentinelone' + .server-log: '#/components/schemas/Connectors_create_connector_request_serverlog' + .servicenow: '#/components/schemas/Connectors_create_connector_request_servicenow' + .servicenow-itom: >- + #/components/schemas/Connectors_create_connector_request_servicenow_itom + .servicenow-sir: >- + #/components/schemas/Connectors_create_connector_request_servicenow_sir + .slack: >- + #/components/schemas/Connectors_create_connector_request_slack_webhook + .slack_api: '#/components/schemas/Connectors_create_connector_request_slack_api' + .swimlane: '#/components/schemas/Connectors_create_connector_request_swimlane' + .teams: '#/components/schemas/Connectors_create_connector_request_teams' + .tines: '#/components/schemas/Connectors_create_connector_request_tines' + .torq: '#/components/schemas/Connectors_create_connector_request_torq' + .webhook: '#/components/schemas/Connectors_create_connector_request_webhook' + .xmatters: '#/components/schemas/Connectors_create_connector_request_xmatters' + propertyName: connector_type_id + oneOf: + - $ref: '#/components/schemas/Connectors_create_connector_request_bedrock' + - $ref: '#/components/schemas/Connectors_create_connector_request_gemini' + - $ref: >- + #/components/schemas/Connectors_create_connector_request_cases_webhook + - $ref: '#/components/schemas/Connectors_create_connector_request_d3security' + - $ref: '#/components/schemas/Connectors_create_connector_request_email' + - $ref: '#/components/schemas/Connectors_create_connector_request_genai' + - $ref: '#/components/schemas/Connectors_create_connector_request_index' + - $ref: '#/components/schemas/Connectors_create_connector_request_jira' + - $ref: '#/components/schemas/Connectors_create_connector_request_opsgenie' + - $ref: '#/components/schemas/Connectors_create_connector_request_pagerduty' + - $ref: '#/components/schemas/Connectors_create_connector_request_resilient' + - $ref: '#/components/schemas/Connectors_create_connector_request_sentinelone' + - $ref: '#/components/schemas/Connectors_create_connector_request_serverlog' + - $ref: '#/components/schemas/Connectors_create_connector_request_servicenow' + - $ref: >- + #/components/schemas/Connectors_create_connector_request_servicenow_itom + - $ref: >- + #/components/schemas/Connectors_create_connector_request_servicenow_sir + - $ref: '#/components/schemas/Connectors_create_connector_request_slack_api' + - $ref: >- + #/components/schemas/Connectors_create_connector_request_slack_webhook + - $ref: '#/components/schemas/Connectors_create_connector_request_swimlane' + - $ref: '#/components/schemas/Connectors_create_connector_request_teams' + - $ref: '#/components/schemas/Connectors_create_connector_request_tines' + - $ref: '#/components/schemas/Connectors_create_connector_request_torq' + - $ref: '#/components/schemas/Connectors_create_connector_request_webhook' + - $ref: '#/components/schemas/Connectors_create_connector_request_xmatters' + title: Create connector request body properties + Connectors_create_connector_request_bedrock: + description: >- + The Amazon Bedrock connector uses axios to send a POST request to Amazon + Bedrock. properties: - content: - description: Message content. + config: + $ref: '#/components/schemas/Connectors_config_properties_bedrock' + connector_type_id: + description: The type of connector. + enum: + - .bedrock + example: .bedrock type: string - isError: - description: Is error message. - type: boolean - reader: - $ref: '#/components/schemas/Security_AI_Assistant_API_Reader' - description: Message content. - role: - $ref: '#/components/schemas/Security_AI_Assistant_API_MessageRole' - description: Message role. - timestamp: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - description: The timestamp message was sent or received. - traceData: - $ref: '#/components/schemas/Security_AI_Assistant_API_TraceData' - description: trace Data + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_bedrock' required: - - timestamp - - content - - role - Security_AI_Assistant_API_MessageData: - additionalProperties: true - type: object - Security_AI_Assistant_API_MessageRole: - description: Message role. - enum: - - system - - user - - assistant - type: string - Security_AI_Assistant_API_NonEmptyString: - description: A string that is not empty and does not contain only whitespace - minLength: 1 - pattern: ^(?! *$).+$ - type: string - Security_AI_Assistant_API_NormalizedAnonymizationFieldError: + - config + - connector_type_id + - name + - secrets + title: Create Amazon Bedrock connector request type: object + Connectors_create_connector_request_cases_webhook: + description: > + The Webhook - Case Management connector uses axios to send POST, PUT, + and GET requests to a case management RESTful API web service. properties: - anonymization_fields: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_AnonymizationFieldDetailsInError - type: array - err_code: + config: + $ref: '#/components/schemas/Connectors_config_properties_cases_webhook' + connector_type_id: + description: The type of connector. + enum: + - .cases-webhook + example: .cases-webhook type: string - message: + name: + description: The display name for the connector. + example: my-connector type: string - status_code: - type: integer + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_cases_webhook' required: - - message - - status_code - - anonymization_fields - Security_AI_Assistant_API_NormalizedPromptError: + - config + - connector_type_id + - name + title: Create Webhook - Case Managment connector request type: object + Connectors_create_connector_request_d3security: + description: > + The connector uses axios to send a POST request to a D3 Security + endpoint. properties: - err_code: + config: + $ref: '#/components/schemas/Connectors_config_properties_d3security' + connector_type_id: + description: The type of connector. + enum: + - .d3security + example: .d3security type: string - message: + name: + description: The display name for the connector. + example: my-connector type: string - prompts: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptDetailsInError - type: array - status_code: - type: integer + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_d3security' required: - - message - - status_code - - prompts - Security_AI_Assistant_API_PromptCreateProps: + - config + - connector_type_id + - name + - secrets + title: Create D3 Security connector request type: object + Connectors_create_connector_request_email: + description: > + The email connector uses the SMTP protocol to send mail messages, using + an integration of Nodemailer. An exception is Microsoft Exchange, which + uses HTTP protocol for sending emails, Send mail. Email message text is + sent as both plain text and html text. properties: - categories: - items: - type: string - type: array - color: - type: string - consumer: - type: string - content: + config: + $ref: '#/components/schemas/Connectors_config_properties_email' + connector_type_id: + description: The type of connector. + enum: + - .email + example: .email type: string - isDefault: - type: boolean - isNewConversationDefault: - type: boolean name: + description: The display name for the connector. + example: my-connector type: string - promptType: - $ref: '#/components/schemas/Security_AI_Assistant_API_PromptType' + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_email' required: + - config + - connector_type_id - name - - content - - promptType - Security_AI_Assistant_API_PromptDetailsInError: + - secrets + title: Create email connector request type: object + Connectors_create_connector_request_gemini: + description: >- + The Google Gemini connector uses axios to send a POST request to Google + Gemini. properties: - id: + config: + $ref: '#/components/schemas/Connectors_config_properties_gemini' + connector_type_id: + description: The type of connector. + enum: + - .gemini + example: .gemini type: string name: + description: The display name for the connector. + example: my-connector type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_gemini' required: - - id - Security_AI_Assistant_API_PromptResponse: + - config + - connector_type_id + - name + - secrets + title: Create Google Gemini connector request type: object + Connectors_create_connector_request_genai: + description: > + The OpenAI connector uses axios to send a POST request to either OpenAI + or Azure OpenAPI. properties: - categories: - items: - type: string - type: array - color: - type: string - consumer: - type: string - content: - type: string - createdAt: - type: string - createdBy: + config: + $ref: '#/components/schemas/Connectors_config_properties_genai' + connector_type_id: + description: The type of connector. + enum: + - .gen-ai + example: .gen-ai type: string - id: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - isDefault: - type: boolean - isNewConversationDefault: - type: boolean name: + description: The display name for the connector. + example: my-connector type: string - namespace: - description: Kibana space - type: string - promptType: - $ref: '#/components/schemas/Security_AI_Assistant_API_PromptType' - timestamp: - $ref: '#/components/schemas/Security_AI_Assistant_API_NonEmptyString' - updatedAt: + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_genai' + required: + - config + - connector_type_id + - name + - secrets + title: Create OpenAI connector request + type: object + Connectors_create_connector_request_index: + description: The index connector indexes a document into Elasticsearch. + properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_index' + connector_type_id: + description: The type of connector. + enum: + - .index + example: .index type: string - updatedBy: + name: + description: The display name for the connector. + example: my-connector type: string - users: - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_User' - type: array required: - - id + - config + - connector_type_id - name - - promptType - - content - Security_AI_Assistant_API_PromptsBulkActionSkipReason: - enum: - - PROMPT_FIELD_NOT_MODIFIED - type: string - Security_AI_Assistant_API_PromptsBulkActionSkipResult: + title: Create index connector request type: object + Connectors_create_connector_request_jira: + description: The Jira connector uses the REST API v2 to create Jira issues. properties: - id: + config: + $ref: '#/components/schemas/Connectors_config_properties_jira' + connector_type_id: + description: The type of connector. + enum: + - .jira + example: .jira type: string name: + description: The display name for the connector. + example: my-connector type: string - skip_reason: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptsBulkActionSkipReason + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_jira' required: - - id - - skip_reason - Security_AI_Assistant_API_PromptsBulkCrudActionResponse: + - config + - connector_type_id + - name + - secrets + title: Create Jira connector request type: object + Connectors_create_connector_request_opsgenie: + description: The Opsgenie connector uses the Opsgenie alert API. properties: - attributes: - type: object - properties: - errors: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_NormalizedPromptError - type: array - results: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptsBulkCrudActionResults - summary: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_BulkCrudActionSummary - required: - - results - - summary - message: + config: + $ref: '#/components/schemas/Connectors_config_properties_opsgenie' + connector_type_id: + description: The type of connector. + enum: + - .opsgenie + example: .opsgenie type: string - prompts_count: - type: integer - status_code: - type: integer - success: - type: boolean + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_opsgenie' required: - - attributes - Security_AI_Assistant_API_PromptsBulkCrudActionResults: + - config + - connector_type_id + - name + - secrets + title: Create Opsgenie connector request type: object + Connectors_create_connector_request_pagerduty: + description: > + The PagerDuty connector uses the v2 Events API to trigger, acknowledge, + and resolve PagerDuty alerts. properties: - created: - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_PromptResponse' - type: array - deleted: - items: - type: string - type: array - skipped: - items: - $ref: >- - #/components/schemas/Security_AI_Assistant_API_PromptsBulkActionSkipResult - type: array - updated: - items: - $ref: '#/components/schemas/Security_AI_Assistant_API_PromptResponse' - type: array + config: + $ref: '#/components/schemas/Connectors_config_properties_pagerduty' + connector_type_id: + description: The type of connector. + enum: + - .pagerduty + example: .pagerduty + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_pagerduty' required: - - updated - - created - - deleted - - skipped - Security_AI_Assistant_API_PromptType: - description: Prompt type - enum: - - system - - quick - type: string - Security_AI_Assistant_API_PromptUpdateProps: + - config + - connector_type_id + - name + - secrets + title: Create PagerDuty connector request type: object + Connectors_create_connector_request_resilient: + description: >- + The IBM Resilient connector uses the RESILIENT REST v2 to create IBM + Resilient incidents. properties: - categories: - items: - type: string - type: array - color: - type: string - consumer: - type: string - content: + config: + $ref: '#/components/schemas/Connectors_config_properties_resilient' + connector_type_id: + description: The type of connector. + enum: + - .resilient + example: .resilient type: string - id: + name: + description: The display name for the connector. + example: my-connector type: string - isDefault: - type: boolean - isNewConversationDefault: - type: boolean + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_resilient' required: - - id - Security_AI_Assistant_API_Provider: - description: Provider - enum: - - OpenAI - - Azure OpenAI - type: string - Security_AI_Assistant_API_Reader: - additionalProperties: true - type: object - Security_AI_Assistant_API_Replacements: - additionalProperties: - type: string - description: Replacements object used to anonymize/deanomymize messsages + - config + - connector_type_id + - name + - secrets + title: Create IBM Resilient connector request type: object - Security_AI_Assistant_API_SortOrder: - enum: - - asc - - desc - type: string - Security_AI_Assistant_API_TraceData: - description: trace Data + Connectors_create_connector_request_sentinelone: + description: > + The SentinelOne connector communicates with SentinelOne Management + Console via REST API. 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. + title: Create SentinelOne connector request type: object properties: - traceId: - description: 'Could be any string, not necessarily a UUID' + config: + $ref: '#/components/schemas/Connectors_config_properties_sentinelone' + connector_type_id: + description: The type of connector. + enum: + - .sentinelone + example: .sentinelone type: string - transactionId: - description: 'Could be any string, not necessarily a UUID' + name: + description: The display name for the connector. + example: my-connector type: string - Security_AI_Assistant_API_User: - description: 'Could be any string, not necessarily a UUID' - type: object + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_sentinelone' + required: + - config + - connector_type_id + - name + - secrets + x-technical-preview: true + Connectors_create_connector_request_serverlog: + description: This connector writes an entry to the Kibana server log. properties: - id: - description: User id + connector_type_id: + description: The type of connector. + enum: + - .server-log + example: .server-log type: string name: - description: User name + description: The display name for the connector. + example: my-connector type: string - Security_Solution_Detections_API_AlertAssignees: - type: object - properties: - add: - description: A list of users ids to assign. - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - type: array - remove: - description: A list of users ids to unassign. - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - type: array required: - - add - - remove - Security_Solution_Detections_API_AlertIds: - description: A list of alerts ids. - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - minItems: 1 - type: array - Security_Solution_Detections_API_AlertsIndex: - deprecated: true - description: (deprecated) Has no effect. - type: string - Security_Solution_Detections_API_AlertsIndexMigrationError: + - connector_type_id + - name + title: Create server log connector request type: object + Connectors_create_connector_request_servicenow: + description: > + The ServiceNow ITSM connector uses the import set API to create + ServiceNow incidents. You can use the connector for rule actions and + cases. properties: - error: - type: object - properties: - message: - type: string - status_code: - type: string - required: - - message - - status_code - index: + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow' + connector_type_id: + description: The type of connector. + enum: + - .servicenow + example: .servicenow type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' required: - - index - - error - Security_Solution_Detections_API_AlertsIndexMigrationSuccess: + - config + - connector_type_id + - name + - secrets + title: Create ServiceNow ITSM connector request type: object + Connectors_create_connector_request_servicenow_itom: + description: > + The ServiceNow ITOM connector uses the event API to create ServiceNow + events. You can use the connector for rule actions. properties: - index: - type: string - migration_id: + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow_itom' + connector_type_id: + description: The type of connector. + enum: + - .servicenow-itom + example: .servicenow-itom type: string - migration_index: + name: + description: The display name for the connector. + example: my-connector type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' required: - - index - - migration_id - - migration_index - Security_Solution_Detections_API_AlertsIndexNamespace: - description: Has no effect. - type: string - Security_Solution_Detections_API_AlertsReindexOptions: - type: object - properties: - requests_per_second: - minimum: 1 - type: integer - size: - minimum: 1 - type: integer - slices: - minimum: 1 - type: integer - Security_Solution_Detections_API_AlertsSort: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsSortCombinations - - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsSortCombinations - type: array - Security_Solution_Detections_API_AlertsSortCombinations: - anyOf: - - type: string - - additionalProperties: true - type: object - Security_Solution_Detections_API_AlertStatus: - enum: - - open - - closed - - acknowledged - - in-progress - type: string - Security_Solution_Detections_API_AlertSuppression: + - config + - connector_type_id + - name + - secrets + title: Create ServiceNow ITOM connector request type: object + Connectors_create_connector_request_servicenow_sir: + description: > + The ServiceNow SecOps connector uses the import set API to create + ServiceNow security incidents. You can use the connector for rule + actions and cases. properties: - duration: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppressionDuration - group_by: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppressionGroupBy - missing_fields_strategy: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppressionMissingFieldsStrategy + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow' + connector_type_id: + description: The type of connector. + enum: + - .servicenow-sir + example: .servicenow-sir + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' required: - - group_by - Security_Solution_Detections_API_AlertSuppressionDuration: + - config + - connector_type_id + - name + - secrets + title: Create ServiceNow SecOps connector request type: object + Connectors_create_connector_request_slack_api: + description: The Slack connector uses an API method to send Slack messages. properties: - unit: + config: + $ref: '#/components/schemas/Connectors_config_properties_slack_api' + connector_type_id: + description: The type of connector. enum: - - s - - m - - h + - .slack_api + example: .slack_api type: string - value: - minimum: 1 - type: integer + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_slack_api' required: - - value - - unit - Security_Solution_Detections_API_AlertSuppressionGroupBy: - items: - type: string - maxItems: 3 - minItems: 1 - type: array - Security_Solution_Detections_API_AlertSuppressionMissingFieldsStrategy: - description: >- - Describes how alerts will be generated for documents with missing - suppress by fields: - - doNotSuppress - per each document a separate alert will be created - - suppress - only alert will be created per suppress by bucket - enum: - - doNotSuppress - - suppress - type: string - Security_Solution_Detections_API_AlertTag: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - Security_Solution_Detections_API_AlertTags: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_AlertTag' - type: array - Security_Solution_Detections_API_AlertVersion: + - connector_type_id + - name + - secrets + title: Create Slack connector request type: object + Connectors_create_connector_request_slack_webhook: + description: The Slack connector uses Slack Incoming Webhooks. properties: - count: - type: integer - version: - type: integer - required: - - version - - count - Security_Solution_Detections_API_AnomalyThreshold: - description: Anomaly threshold - minimum: 0 - type: integer - Security_Solution_Detections_API_BuildingBlockType: - description: >- - Determines if the rule acts as a building block. By default, - building-block alerts are not displayed in the UI. These rules are used - as a foundation for other rules that do generate alerts. Its value must - be default. - type: string - Security_Solution_Detections_API_BulkActionEditPayload: - anyOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayloadTags - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayloadIndexPatterns - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayloadInvestigationFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayloadTimeline - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayloadRuleActions - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayloadSchedule - Security_Solution_Detections_API_BulkActionEditPayloadIndexPatterns: + connector_type_id: + description: The type of connector. + enum: + - .slack + example: .slack + type: string + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_slack_webhook' + required: + - connector_type_id + - name + - secrets + title: Create Slack connector request type: object + Connectors_create_connector_request_swimlane: + description: >- + The Swimlane connector uses the Swimlane REST API to create Swimlane + records. properties: - overwrite_data_views: - type: boolean - type: + config: + $ref: '#/components/schemas/Connectors_config_properties_swimlane' + connector_type_id: + description: The type of connector. enum: - - add_index_patterns - - delete_index_patterns - - set_index_patterns + - .swimlane + example: .swimlane type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_swimlane' required: - - type - - value - Security_Solution_Detections_API_BulkActionEditPayloadInvestigationFields: + - config + - connector_type_id + - name + - secrets + title: Create Swimlane connector request type: object + Connectors_create_connector_request_teams: + description: The Microsoft Teams connector uses Incoming Webhooks. properties: - type: + connector_type_id: + description: The type of connector. enum: - - add_investigation_fields - - delete_investigation_fields - - set_investigation_fields + - .teams + example: .teams type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_teams' required: - - type - - value - Security_Solution_Detections_API_BulkActionEditPayloadRuleActions: + - connector_type_id + - name + - secrets + title: Create Microsoft Teams connector request type: object + Connectors_create_connector_request_tines: + description: > + The Tines connector uses Tines Webhook actions to send events via POST + request. properties: - type: + config: + $ref: '#/components/schemas/Connectors_config_properties_tines' + connector_type_id: + description: The type of connector. enum: - - add_rule_actions - - set_rule_actions + - .tines + example: .tines type: string - value: - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NormalizedRuleAction - type: array - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThrottleForBulkActions - required: - - actions + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_tines' required: - - type - - value - Security_Solution_Detections_API_BulkActionEditPayloadSchedule: + - config + - connector_type_id + - name + - secrets + title: Create Tines connector request type: object + Connectors_create_connector_request_torq: + description: > + The Torq connector uses a Torq webhook to trigger workflows with Kibana + actions. properties: - type: + config: + $ref: '#/components/schemas/Connectors_config_properties_torq' + connector_type_id: + description: The type of connector. enum: - - set_schedule + - .torq + example: .torq type: string - value: - type: object - properties: - interval: - description: >- - Interval in which the rule runs. For example, `"1h"` means the - rule runs every hour. - example: 1h - pattern: '^[1-9]\d*[smh]$' - type: string - lookback: - description: Lookback time for the rule - example: 1h - pattern: '^[1-9]\d*[smh]$' - type: string - required: - - interval - - lookback + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_torq' required: - - type - - value - Security_Solution_Detections_API_BulkActionEditPayloadTags: + - config + - connector_type_id + - name + - secrets + title: Create Torq connector request type: object + Connectors_create_connector_request_webhook: + description: > + The Webhook connector uses axios to send a POST or PUT request to a web + service. properties: - type: + config: + $ref: '#/components/schemas/Connectors_config_properties_webhook' + connector_type_id: + description: The type of connector. enum: - - add_tags - - delete_tags - - set_tags + - .webhook + example: .webhook type: string - value: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleTagArray' + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_webhook' required: - - type - - value - Security_Solution_Detections_API_BulkActionEditPayloadTimeline: + - config + - connector_type_id + - name + - secrets + title: Create Webhook connector request type: object + Connectors_create_connector_request_xmatters: + description: > + The xMatters connector uses the xMatters Workflow for Elastic to send + actionable alerts to on-call xMatters resources. properties: - type: + config: + $ref: '#/components/schemas/Connectors_config_properties_xmatters' + connector_type_id: + description: The type of connector. enum: - - set_timeline + - .xmatters + example: .xmatters type: string - value: - type: object - properties: - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - required: - - timeline_id - - timeline_title + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_xmatters' required: - - type - - value - Security_Solution_Detections_API_BulkActionsDryRunErrCode: + - config + - connector_type_id + - name + - secrets + title: Create xMatters connector request + type: object + Connectors_features: + description: | + The feature that uses the connector. enum: - - IMMUTABLE - - MACHINE_LEARNING_AUTH - - MACHINE_LEARNING_INDEX_PATTERN - - ESQL_INDEX_PATTERN - - MANUAL_RULE_RUN_FEATURE - - MANUAL_RULE_RUN_DISABLED_RULE + - alerting + - cases + - generativeAIForSecurity + - generativeAIForObservability + - generativeAIForSearchPlayground + - siem + - uptime type: string - Security_Solution_Detections_API_BulkActionSkipResult: - type: object + Connectors_is_deprecated: + description: Indicates whether the connector type is deprecated. + example: false + type: boolean + Connectors_is_missing_secrets: + description: >- + Indicates whether secrets are missing for the connector. Secrets + configuration properties vary depending on the connector type. + example: false + type: boolean + Connectors_is_preconfigured: + description: > + Indicates whether it is a preconfigured connector. If true, the `config` + and `is_missing_secrets` properties are omitted from the response. + example: false + type: boolean + Connectors_is_system_action: + description: Indicates whether the connector is used for system actions. + example: false + type: boolean + Connectors_referenced_by_count: + description: > + Indicates the number of saved objects that reference the connector. If + `is_preconfigured` is true, this value is not calculated. This property + is returned only by the get all connectors API. + example: 2 + type: integer + Connectors_run_connector_params_acknowledge_resolve_pagerduty: + description: Test an action that acknowledges or resolves a PagerDuty alert. properties: - id: + dedupKey: + description: The deduplication key for the PagerDuty alert. + maxLength: 255 type: string - name: + eventAction: + description: The type of event. + enum: + - acknowledge + - resolve type: string - skip_reason: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkEditSkipReason required: - - id - - skip_reason - Security_Solution_Detections_API_BulkCrudRulesResponse: - items: - oneOf: - - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleResponse' - - $ref: '#/components/schemas/Security_Solution_Detections_API_ErrorSchema' - type: array - Security_Solution_Detections_API_BulkDeleteRules: + - dedupKey + - eventAction + title: PagerDuty connector parameters + type: object + Connectors_run_connector_params_documents: + description: Test an action that indexes a document into Elasticsearch. + properties: + documents: + description: The documents in JSON format for index connectors. + items: + additionalProperties: true + type: object + type: array + required: + - documents + title: Index connector parameters type: object + Connectors_run_connector_params_message_email: + anyOf: + - required: + - bcc + - message + - subject + - required: + - cc + - message + - subject + - required: + - to + - message + - subject + description: > + Test an action that sends an email message. There must be at least one + recipient in `to`, `cc`, or `bcc`. properties: - action: - enum: - - delete - type: string - ids: - description: Array of rule IDs + bcc: + description: > + A list of "blind carbon copy" email addresses. Addresses can be + specified in `user@host-name` format or in name `` + format items: type: string - minItems: 1 type: array - query: - description: Query to filter rules - type: string - required: - - action - Security_Solution_Detections_API_BulkDisableRules: - type: object - properties: - action: - enum: - - disable - type: string - ids: - description: Array of rule IDs + cc: + description: > + A list of "carbon copy" email addresses. Addresses can be specified + in `user@host-name` format or in name `` format items: type: string - minItems: 1 type: array - query: - description: Query to filter rules + message: + description: The email message text. Markdown format is supported. type: string - required: - - action - Security_Solution_Detections_API_BulkDuplicateRules: - type: object - properties: - action: - enum: - - duplicate + subject: + description: The subject line of the email. type: string - duplicate: - type: object - properties: - include_exceptions: - description: Whether to copy exceptions from the original rule - type: boolean - include_expired_exceptions: - description: Whether to copy expired exceptions from the original rule - type: boolean - required: - - include_exceptions - - include_expired_exceptions - ids: - description: Array of rule IDs + to: + description: > + A list of email addresses. Addresses can be specified in + `user@host-name` format or in name `` format. items: type: string - minItems: 1 type: array - query: - description: Query to filter rules - type: string - required: - - action - Security_Solution_Detections_API_BulkEditActionResponse: + title: Email connector parameters type: object + Connectors_run_connector_params_message_serverlog: + description: Test an action that writes an entry to the Kibana server log. properties: - attributes: - type: object - properties: - errors: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NormalizedRuleError - type: array - results: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkEditActionResults - summary: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkEditActionSummary - required: - - results - - summary + level: + default: info + description: The log level of the message for server log connectors. + enum: + - debug + - error + - fatal + - info + - trace + - warn + type: string message: + description: The message for server log connectors. type: string - rules_count: - type: integer - status_code: - type: integer - success: - type: boolean - required: - - attributes - Security_Solution_Detections_API_BulkEditActionResults: - type: object - properties: - created: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleResponse' - type: array - deleted: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleResponse' - type: array - skipped: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionSkipResult - type: array - updated: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleResponse' - type: array required: - - updated - - created - - deleted - - skipped - Security_Solution_Detections_API_BulkEditActionSummary: + - message + title: Server log connector parameters type: object + Connectors_run_connector_params_message_slack: + description: > + Test an action that sends a message to Slack. It is applicable only when + the connector type is `.slack`. properties: - failed: - type: integer - skipped: - type: integer - succeeded: - type: integer - total: - type: integer + message: + description: >- + The Slack message text, which cannot contain Markdown, images, or + other advanced formatting. + type: string required: - - failed - - skipped - - succeeded - - total - Security_Solution_Detections_API_BulkEditRules: + - message + title: Slack connector parameters type: object + Connectors_run_connector_params_trigger_pagerduty: + description: Test an action that triggers a PagerDuty alert. properties: - action: + class: + description: The class or type of the event. + example: cpu load + type: string + component: + description: >- + The component of the source machine that is responsible for the + event. + example: eth0 + type: string + customDetails: + description: Additional details to add to the event. + type: object + dedupKey: + description: > + All actions sharing this key will be associated with the same + PagerDuty alert. This value is used to correlate trigger and + resolution. + maxLength: 255 + type: string + eventAction: + description: The type of event. enum: - - edit + - trigger type: string - edit: - description: Array of objects containing the edit operations - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionEditPayload - minItems: 1 - type: array - ids: - description: Array of rule IDs + group: + description: The logical grouping of components of a service. + example: app-stack + type: string + links: + description: A list of links to add to the event. items: - type: string - minItems: 1 + type: object + properties: + href: + description: The URL for the link. + type: string + text: + description: A plain text description of the purpose of the link. + type: string type: array - query: - description: Query to filter rules + severity: + default: info + description: The severity of the event on the affected system. + enum: + - critical + - error + - info + - warning + type: string + source: + description: > + The affected system, such as a hostname or fully qualified domain + name. Defaults to the Kibana saved object id of the action. + type: string + summary: + description: A summery of the event. + maxLength: 1024 + type: string + timestamp: + description: >- + An ISO-8601 timestamp that indicates when the event was detected or + generated. + format: date-time type: string required: - - action - - edit - Security_Solution_Detections_API_BulkEditSkipReason: - enum: - - RULE_NOT_MODIFIED - type: string - Security_Solution_Detections_API_BulkEnableRules: + - eventAction + title: PagerDuty connector parameters type: object + Connectors_run_connector_request: + description: The properties vary depending on the connector type. properties: - action: - enum: - - enable - type: string - ids: - description: Array of rule IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter rules - type: string + params: + oneOf: + - $ref: >- + #/components/schemas/Connectors_run_connector_params_acknowledge_resolve_pagerduty + - $ref: '#/components/schemas/Connectors_run_connector_params_documents' + - $ref: >- + #/components/schemas/Connectors_run_connector_params_message_email + - $ref: >- + #/components/schemas/Connectors_run_connector_params_message_serverlog + - $ref: >- + #/components/schemas/Connectors_run_connector_params_message_slack + - $ref: >- + #/components/schemas/Connectors_run_connector_params_trigger_pagerduty + - description: Test an action that involves a subaction. + discriminator: + mapping: + addEvent: >- + #/components/schemas/Connectors_run_connector_subaction_addevent + closeAlert: >- + #/components/schemas/Connectors_run_connector_subaction_closealert + closeIncident: >- + #/components/schemas/Connectors_run_connector_subaction_closeincident + createAlert: >- + #/components/schemas/Connectors_run_connector_subaction_createalert + fieldsByIssueType: >- + #/components/schemas/Connectors_run_connector_subaction_fieldsbyissuetype + getChoices: >- + #/components/schemas/Connectors_run_connector_subaction_getchoices + getFields: >- + #/components/schemas/Connectors_run_connector_subaction_getfields + getIncident: >- + #/components/schemas/Connectors_run_connector_subaction_getincident + issue: >- + #/components/schemas/Connectors_run_connector_subaction_issue + issues: >- + #/components/schemas/Connectors_run_connector_subaction_issues + issueTypes: >- + #/components/schemas/Connectors_run_connector_subaction_issuetypes + pushToService: >- + #/components/schemas/Connectors_run_connector_subaction_pushtoservice + propertyName: subAction + oneOf: + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_addevent + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_closealert + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_closeincident + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_createalert + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_fieldsbyissuetype + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_getchoices + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_getfields + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_getincident + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_issue + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_issues + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_issuetypes + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_postmessage + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_pushtoservice + - $ref: >- + #/components/schemas/Connectors_run_connector_subaction_validchannelid + title: Subaction parameters required: - - action - Security_Solution_Detections_API_BulkExportActionResponse: - type: string - Security_Solution_Detections_API_BulkExportRules: + - params + title: Run connector request body properties type: object - properties: - action: - enum: - - export - type: string - ids: - description: Array of rule IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter rules - type: string - required: - - action - Security_Solution_Detections_API_BulkManualRuleRun: + Connectors_run_connector_subaction_addevent: + description: The `addEvent` subaction for ServiceNow ITOM connectors. + title: The addEvent subaction type: object properties: - action: + subAction: + description: The action to test. enum: - - run - type: string - ids: - description: Array of rule IDs - items: - type: string - minItems: 1 - type: array - query: - description: Query to filter rules + - addEvent type: string - run: + subActionParams: + description: The set of configuration properties for the action. type: object properties: - end_date: - description: End date of the manual rule run + additional_info: + description: Additional information about the event. type: string - start_date: - description: Start date of the manual rule run + description: + description: The details about the event. + type: string + event_class: + description: A specific instance of the source. + type: string + message_key: + description: >- + All actions sharing this key are associated with the same + ServiceNow alert. The default value is `:`. + type: string + metric_name: + description: The name of the metric. + type: string + node: + description: The host that the event was triggered for. + type: string + resource: + description: The name of the resource. + type: string + severity: + description: The severity of the event. + type: string + source: + description: The name of the event source type. + type: string + time_of_event: + description: The time of the event. + type: string + type: + description: The type of event. type: string - required: - - start_date - required: - - action - - run - Security_Solution_Detections_API_ConcurrentSearches: - minimum: 1 - type: integer - Security_Solution_Detections_API_DataViewId: - type: string - Security_Solution_Detections_API_DefaultParams: - type: object - properties: - command: - enum: - - isolate - type: string - comment: - type: string - required: - - command - Security_Solution_Detections_API_EcsMapping: - additionalProperties: - type: object - properties: - field: - type: string - value: - oneOf: - - type: string - - items: - type: string - type: array - type: object - Security_Solution_Detections_API_EndpointResponseAction: - type: object - properties: - action_type_id: - enum: - - .endpoint - type: string - params: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_DefaultParams - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ProcessesParams required: - - action_type_id - - params - Security_Solution_Detections_API_EqlOptionalFields: - type: object - properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - data_view_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_DataViewId' - event_category_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EventCategoryOverride - filters: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFilterArray - index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray - tiebreaker_field: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TiebreakerField - timestamp_field: - $ref: '#/components/schemas/Security_Solution_Detections_API_TimestampField' - Security_Solution_Detections_API_EqlQueryLanguage: - enum: - - eql - type: string - Security_Solution_Detections_API_EqlRequiredFields: + - subAction + Connectors_run_connector_subaction_closealert: + description: The `closeAlert` subaction for Opsgenie connectors. + title: The closeAlert subaction type: object properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlQueryLanguage - description: Query language to use - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - description: EQL query to execute - type: - description: Rule type + subAction: + description: The action to test. enum: - - eql + - closeAlert type: string - required: - - type - - query - - language - Security_Solution_Detections_API_EqlRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRuleResponseFields - Security_Solution_Detections_API_EqlRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlOptionalFields - Security_Solution_Detections_API_EqlRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRuleCreateFields - Security_Solution_Detections_API_EqlRulePatchFields: - allOf: - - type: object + subActionParams: + type: object properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlQueryLanguage - description: Query language to use - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - description: EQL query to execute - type: - description: Rule type - enum: - - eql + alias: + description: >- + The unique identifier used for alert deduplication in Opsgenie. + The alias must match the value used when creating the alert. type: string - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlOptionalFields - Security_Solution_Detections_API_EqlRulePatchProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRulePatchFields - Security_Solution_Detections_API_EqlRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlOptionalFields - Security_Solution_Detections_API_EqlRuleUpdateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRuleCreateFields - Security_Solution_Detections_API_ErrorSchema: - additionalProperties: false + description: Additional information for the alert. + type: string + source: + description: The display name for the source of the alert. + type: string + user: + description: The display name for the owner. + type: string + required: + - alias + required: + - subAction + - subActionParams + Connectors_run_connector_subaction_closeincident: + description: The `closeIncident` subaction for ServiceNow ITSM connectors. + title: The closeIncident subaction type: object properties: - error: + subAction: + description: The action to test. + enum: + - closeIncident + type: string + subActionParams: type: object properties: - message: - type: string - status_code: - minimum: 400 - type: integer + incident: + anyOf: + - required: + - correlation_id + - required: + - externalId + type: object + properties: + correlation_id: + default: '{{rule.id}}:{{alert.id}}' + description: > + An identifier that is assigned to the incident when it is + created by the connector. NOTE: If you use the default value + and the rule generates multiple alerts that use the same + alert IDs, the latest open incident for this correlation ID + is closed unless you specify the external ID. + maxLength: 100 + nullable: true + type: string + externalId: + description: >- + The unique identifier (`incidentId`) for the incident in + ServiceNow. + nullable: true + type: string required: - - status_code - - message - id: - type: string - item_id: - minLength: 1 - type: string - list_id: - minLength: 1 - type: string - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId + - incident required: - - error - Security_Solution_Detections_API_EsqlQueryLanguage: - enum: - - esql - type: string - Security_Solution_Detections_API_EsqlRule: - allOf: - - type: object + - subAction + - subActionParams + Connectors_run_connector_subaction_createalert: + description: The `createAlert` subaction for Opsgenie connectors. + title: The createAlert subaction + type: object + properties: + subAction: + description: The action to test. + enum: + - createAlert + type: string + subActionParams: + type: object properties: actions: + description: The custom actions available to the alert. items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction + type: string type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType + alias: + description: The unique identifier used for alert deduplication in Opsgenie. + type: string description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace + description: >- + A description that provides detailed information about the + alert. + type: string + details: + additionalProperties: true + description: The custom properties of the alert. + example: + key1: value1 + key2: value2 + type: object + entity: + description: >- + The domain of the alert. For example, the application or server + name. + type: string + message: + description: The alert message. + type: string note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: + description: Additional information for the alert. + type: string + priority: + description: The priority level for the alert. + enum: + - P1 + - P2 + - P3 + - P4 + - P5 + type: string + responders: + description: > + The entities to receive notifications about the alert. If `type` + is `user`, either `id` or `username` is required. If `type` is + `team`, either `id` or `name` is required. items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput + type: object + properties: + id: + description: The identifier for the entity. + type: string + name: + description: The name of the entity. + type: string + type: + description: 'The type of responders, in this case `escalation`.' + enum: + - escalation + - schedule + - team + - user + type: string + username: + description: A valid email address for the user. + type: string type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping + source: + description: The display name for the source of the alert. + type: string tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleResponseFields - Security_Solution_Detections_API_EsqlRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleRequiredFields - Security_Solution_Detections_API_EsqlRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: + description: The tags for the alert. items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList + type: string type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: + user: + description: The display name for the owner. + type: string + visibleTo: + description: >- + The teams and users that the alert will be visible to without + sending a notification. Only one of `id`, `name`, or `username` + is required. items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput + type: object + properties: + id: + description: The identifier for the entity. + type: string + name: + description: The name of the entity. + type: string + type: + description: Valid values are `team` and `user`. + enum: + - team + - user + type: string + username: + description: >- + The user name. This property is required only when the + `type` is `user`. + type: string + required: + - type type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleCreateFields - Security_Solution_Detections_API_EsqlRuleOptionalFields: + - message + required: + - subAction + - subActionParams + Connectors_run_connector_subaction_fieldsbyissuetype: + description: The `fieldsByIssueType` subaction for Jira connectors. + title: The fieldsByIssueType subaction type: object properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - Security_Solution_Detections_API_EsqlRulePatchProps: - allOf: - - type: object + subAction: + description: The action to test. + enum: + - fieldsByIssueType + type: string + subActionParams: + type: object properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlQueryLanguage - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - description: ESQL query to execute - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - type: - description: Rule type - enum: - - esql + description: The Jira issue type identifier. + example: 10024 type: string - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleOptionalFields - Security_Solution_Detections_API_EsqlRuleRequiredFields: + required: + - id + required: + - subAction + - subActionParams + Connectors_run_connector_subaction_getchoices: + description: >- + The `getChoices` subaction for ServiceNow ITOM, ServiceNow ITSM, and + ServiceNow SecOps connectors. + title: The getChoices subaction type: object properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlQueryLanguage - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - description: ESQL query to execute - type: - description: Rule type + subAction: + description: The action to test. enum: - - esql + - getChoices type: string - required: - - type - - language - - query - Security_Solution_Detections_API_EsqlRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleRequiredFields - Security_Solution_Detections_API_EsqlRuleUpdateProps: - allOf: - - type: object + subActionParams: + description: The set of configuration properties for the action. + type: object properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: + fields: + description: An array of fields. items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput + type: string type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleCreateFields - Security_Solution_Detections_API_EventCategoryOverride: - type: string - Security_Solution_Detections_API_ExceptionListType: - description: The exception type - enum: - - detection - - rule_default - - endpoint - - endpoint_trusted_apps - - endpoint_events - - endpoint_host_isolation_exceptions - - endpoint_blocklists - type: string - Security_Solution_Detections_API_ExternalRuleSource: + - fields + required: + - subAction + - subActionParams + Connectors_run_connector_subaction_getfields: description: >- - Type of rule source for externally sourced rules, i.e. rules that have - an external source, such as the Elastic Prebuilt rules repo. + The `getFields` subaction for Jira, ServiceNow ITSM, and ServiceNow + SecOps connectors. + title: The getFields subaction type: object properties: - is_customized: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsExternalRuleCustomized - type: + subAction: + description: The action to test. enum: - - external + - getFields type: string required: - - type - - is_customized - Security_Solution_Detections_API_FindRulesSortField: - enum: - - created_at - - createdAt - - enabled - - execution_summary.last_execution.date - - execution_summary.last_execution.metrics.execution_gap_duration_s - - execution_summary.last_execution.metrics.total_indexing_duration_ms - - execution_summary.last_execution.metrics.total_search_duration_ms - - execution_summary.last_execution.status - - name - - risk_score - - riskScore - - severity - - updated_at - - updatedAt - type: string - Security_Solution_Detections_API_HistoryWindowStart: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - Security_Solution_Detections_API_IndexMigrationStatus: - type: object - properties: - index: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - is_outdated: - type: boolean - migrations: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MigrationStatus - type: array - signal_versions: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_AlertVersion' - type: array - version: - type: integer - required: - - index - - version - - signal_versions - - migrations - - is_outdated - Security_Solution_Detections_API_IndexPatternArray: - items: - type: string - type: array - Security_Solution_Detections_API_InternalRuleSource: + - subAction + Connectors_run_connector_subaction_getincident: description: >- - Type of rule source for internally sourced rules, i.e. created within - the Kibana apps. - type: object + The `getIncident` subaction for Jira, ServiceNow ITSM, and ServiceNow + SecOps connectors. properties: - type: + subAction: + description: The action to test. enum: - - internal + - getIncident type: string + subActionParams: + type: object + properties: + externalId: + description: >- + The Jira, ServiceNow ITSM, or ServiceNow SecOps issue + identifier. + example: 71778 + type: string + required: + - externalId required: - - type - Security_Solution_Detections_API_InvestigationFields: - description: > - Schema for fields relating to investigation fields. These are user - defined fields we use to highlight - - in various features in the UI such as alert details flyout and - exceptions auto-population from alert. - - Added in PR #163235 - - Right now we only have a single field but anticipate adding more related - fields to store various - - configuration states such as `override` - where a user might say if they - want only these fields to - - display, or if they want these fields + the fields we select. When - expanding this field, it may look - - something like: - - ```typescript - - const investigationFields = z.object({ - field_names: NonEmptyArray(NonEmptyString), - override: z.boolean().optional(), - }); - - ``` + - subAction + - subActionParams + title: The getIncident subaction + type: object + Connectors_run_connector_subaction_issue: + description: The `issue` subaction for Jira connectors. + title: The issue subaction type: object properties: - field_names: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - minItems: 1 - type: array - required: - - field_names - Security_Solution_Detections_API_InvestigationGuide: - description: Notes to help investigate alerts produced by the rule. - type: string - Security_Solution_Detections_API_IsExternalRuleCustomized: - description: >- - Determines whether an external/prebuilt rule has been customized by the - user (i.e. any of its fields have been modified and diverged from the - base value). - type: boolean - Security_Solution_Detections_API_IsRuleEnabled: - description: Determines whether the rule is enabled. - type: boolean - Security_Solution_Detections_API_IsRuleImmutable: - deprecated: true - description: >- - This field determines whether the rule is a prebuilt Elastic rule. It - will be replaced with the `rule_source` field. - type: boolean - Security_Solution_Detections_API_ItemsPerSearch: - minimum: 1 - type: integer - Security_Solution_Detections_API_KqlQueryLanguage: - enum: - - kuery - - lucene - type: string - Security_Solution_Detections_API_MachineLearningJobId: - description: Machine learning job ID - oneOf: - - type: string - - items: - type: string - minItems: 1 - type: array - Security_Solution_Detections_API_MachineLearningRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleResponseFields - Security_Solution_Detections_API_MachineLearningRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleOptionalFields - Security_Solution_Detections_API_MachineLearningRuleCreateProps: - allOf: - - type: object + subAction: + description: The action to test. + enum: + - issue + type: string + subActionParams: + type: object properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion + id: + description: The Jira issue identifier. + example: 71778 + type: string required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleCreateFields - Security_Solution_Detections_API_MachineLearningRuleOptionalFields: + - id + required: + - subAction + Connectors_run_connector_subaction_issues: + description: The `issues` subaction for Jira connectors. + title: The issues subaction type: object properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - Security_Solution_Detections_API_MachineLearningRulePatchFields: - allOf: - - type: object - properties: - anomaly_threshold: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AnomalyThreshold - machine_learning_job_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningJobId - type: - description: Rule type - enum: - - machine_learning - type: string - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleOptionalFields - Security_Solution_Detections_API_MachineLearningRulePatchProps: - allOf: - - type: object + subAction: + description: The action to test. + enum: + - issues + type: string + subActionParams: + type: object properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRulePatchFields - Security_Solution_Detections_API_MachineLearningRuleRequiredFields: + title: + description: The title of the Jira issue. + type: string + required: + - title + required: + - subAction + - subActionParams + Connectors_run_connector_subaction_issuetypes: + description: The `issueTypes` subaction for Jira connectors. + title: The issueTypes subaction type: object properties: - anomaly_threshold: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AnomalyThreshold - machine_learning_job_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningJobId - type: - description: Rule type + subAction: + description: The action to test. enum: - - machine_learning + - issueTypes type: string required: - - type - - machine_learning_job_id - - anomaly_threshold - Security_Solution_Detections_API_MachineLearningRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleOptionalFields - Security_Solution_Detections_API_MachineLearningRuleUpdateProps: - allOf: - - type: object + - subAction + Connectors_run_connector_subaction_postmessage: + description: > + Test an action that sends a message to Slack. It is applicable only when + the connector type is `.slack_api`. + properties: + subAction: + description: The action to test. + enum: + - postMessage + type: string + subActionParams: + description: The set of configuration properties for the action. + type: object properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: + channelIds: + description: > + The Slack channel identifier, which must be one of the + `allowedChannels` in the connector configuration. items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList + type: string + maxItems: 1 type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: + channels: + deprecated: true + description: | + The name of a channel that your Slack app has access to. items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput + type: string + maxItems: 1 type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleCreateFields - Security_Solution_Detections_API_MaxSignals: - minimum: 1 - type: integer - Security_Solution_Detections_API_MigrationCleanupResult: + text: + description: > + The Slack message text. If it is a Slack webhook connector, the + text cannot contain Markdown, images, or other advanced + formatting. If it is a Slack web API connector, it can contain + either plain text or block kit messages. + minLength: 1 + type: string + required: + - subAction + - subActionParams + title: The postMessage subaction + type: object + Connectors_run_connector_subaction_pushtoservice: + description: >- + The `pushToService` subaction for Jira, ServiceNow ITSM, ServiceNow + SecOps, Swimlane, and Webhook - Case Management connectors. + title: The pushToService subaction type: object properties: - destinationIndex: + subAction: + description: The action to test. + enum: + - pushToService type: string - error: + subActionParams: + description: The set of configuration properties for the action. type: object properties: - message: - type: string - status_code: - type: integer - required: - - message - - status_code - id: - type: string - sourceIndex: - type: string - status: - enum: - - success - - failure - - pending - type: string - updated: - format: date-time - type: string - version: - type: string + comments: + description: >- + Additional information that is sent to Jira, ServiceNow ITSM, + ServiceNow SecOps, or Swimlane. + items: + type: object + properties: + comment: + description: >- + A comment related to the incident. For example, describe + how to troubleshoot the issue. + type: string + commentId: + description: A unique identifier for the comment. + type: integer + type: array + incident: + description: >- + Information necessary to create or update a Jira, ServiceNow + ITSM, ServiveNow SecOps, or Swimlane incident. + type: object + properties: + alertId: + description: The alert identifier for Swimlane connectors. + type: string + caseId: + description: >- + The case identifier for the incident for Swimlane + connectors. + type: string + caseName: + description: The case name for the incident for Swimlane connectors. + type: string + category: + description: >- + The category of the incident for ServiceNow ITSM and + ServiceNow SecOps connectors. + type: string + correlation_display: + description: >- + A descriptive label of the alert for correlation purposes + for ServiceNow ITSM and ServiceNow SecOps connectors. + type: string + correlation_id: + description: > + The correlation identifier for the security incident for + ServiceNow ITSM and ServiveNow SecOps connectors. Connectors + using the same correlation ID are associated with the same + ServiceNow incident. This value determines whether a new + ServiceNow incident is created or an existing one is + updated. Modifying this value is optional; if not modified, + the rule ID and alert ID are combined as `{{ruleID}}:{{alert + ID}}` to form the correlation ID value in ServiceNow. The + maximum character length for this value is 100 characters. + NOTE: Using the default configuration of `{{ruleID}}:{{alert + ID}}` ensures that ServiceNow creates a separate incident + record for every generated alert that uses a unique alert + ID. If the rule generates multiple alerts that use the same + alert IDs, ServiceNow creates and continually updates a + single incident record for the alert. + type: string + description: + description: >- + The description of the incident for Jira, ServiceNow ITSM, + ServiceNow SecOps, Swimlane, and Webhook - Case Management + connectors. + type: string + dest_ip: + description: > + A list of destination IP addresses related to the security + incident for ServiceNow SecOps connectors. The IPs are added + as observables to the security incident. + oneOf: + - type: string + - items: + type: string + type: array + externalId: + description: > + The Jira, ServiceNow ITSM, or ServiceNow SecOps issue + identifier. If present, the incident is updated. Otherwise, + a new incident is created. + type: string + id: + description: >- + The external case identifier for Webhook - Case Management + connectors. + type: string + impact: + description: The impact of the incident for ServiceNow ITSM connectors. + type: string + issueType: + description: >- + The type of incident for Jira connectors. For example, + 10006. To obtain the list of valid values, set `subAction` + to `issueTypes`. + type: integer + labels: + description: > + The labels for the incident for Jira connectors. NOTE: + Labels cannot contain spaces. + items: + type: string + type: array + malware_hash: + description: >- + A list of malware hashes related to the security incident + for ServiceNow SecOps connectors. The hashes are added as + observables to the security incident. + oneOf: + - type: string + - items: + type: string + type: array + malware_url: + description: >- + A list of malware URLs related to the security incident for + ServiceNow SecOps connectors. The URLs are added as + observables to the security incident. + oneOf: + - type: string + - items: + type: string + type: array + type: string + otherFields: + additionalProperties: true + description: > + Custom field identifiers and their values for Jira + connectors. + maxProperties: 20 + type: object + parent: + description: >- + The ID or key of the parent issue for Jira connectors. + Applies only to `Sub-task` types of issues. + type: string + priority: + description: >- + The priority of the incident in Jira and ServiceNow SecOps + connectors. + type: string + ruleName: + description: The rule name for Swimlane connectors. + type: string + severity: + description: >- + The severity of the incident for ServiceNow ITSM and + Swimlane connectors. + type: string + short_description: + description: > + A short description of the incident for ServiceNow ITSM and + ServiceNow SecOps connectors. It is used for searching the + contents of the knowledge base. + type: string + source_ip: + description: >- + A list of source IP addresses related to the security + incident for ServiceNow SecOps connectors. The IPs are added + as observables to the security incident. + oneOf: + - type: string + - items: + type: string + type: array + status: + description: >- + The status of the incident for Webhook - Case Management + connectors. + type: string + subcategory: + description: >- + The subcategory of the incident for ServiceNow ITSM and + ServiceNow SecOps connectors. + type: string + summary: + description: A summary of the incident for Jira connectors. + type: string + tags: + description: A list of tags for Webhook - Case Management connectors. + items: + type: string + type: array + title: + description: > + A title for the incident for Jira and Webhook - Case + Management connectors. It is used for searching the contents + of the knowledge base. + type: string + urgency: + description: The urgency of the incident for ServiceNow ITSM connectors. + type: string required: - - id - - destinationIndex - - status - - sourceIndex - - version - - updated - Security_Solution_Detections_API_MigrationFinalizationResult: - type: object + - subAction + - subActionParams + Connectors_run_connector_subaction_validchannelid: + description: > + Retrieves information about a valid Slack channel identifier. It is + applicable only when the connector type is `.slack_api`. properties: - completed: - type: boolean - destinationIndex: + subAction: + description: The action to test. + enum: + - validChannelId type: string - error: + subActionParams: type: object properties: - message: + channelId: + description: The Slack channel identifier. + example: C123ABC456 type: string - status_code: - type: integer required: - - message - - status_code - id: - type: string - sourceIndex: - type: string - status: - enum: - - success - - failure - - pending - type: string - updated: - format: date-time - type: string - version: - type: string + - channelId required: - - id - - completed - - destinationIndex - - status - - sourceIndex - - version - - updated - Security_Solution_Detections_API_MigrationStatus: + - subAction + - subActionParams + title: The validChannelId subaction type: object + Connectors_secrets_properties_bedrock: + description: Defines secrets for connectors when type is `.bedrock`. properties: - id: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - status: - enum: - - success - - failure - - pending + accessKey: + description: The AWS access key for authentication. type: string - updated: - format: date-time + secret: + description: The AWS secret for authentication. type: string - version: - type: integer required: - - id - - status - - version - - updated - Security_Solution_Detections_API_NewTermsFields: - items: - type: string - maxItems: 3 - minItems: 1 - type: array - Security_Solution_Detections_API_NewTermsRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleResponseFields - Security_Solution_Detections_API_NewTermsRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleDefaultableFields - Security_Solution_Detections_API_NewTermsRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleCreateFields - Security_Solution_Detections_API_NewTermsRuleDefaultableFields: - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - Security_Solution_Detections_API_NewTermsRuleOptionalFields: + - accessKey + - secret + title: Connector secrets properties for an Amazon Bedrock connector type: object - properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - data_view_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_DataViewId' - filters: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFilterArray - index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray - Security_Solution_Detections_API_NewTermsRulePatchFields: - allOf: - - type: object - properties: - history_window_start: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_HistoryWindowStart - new_terms_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsFields - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - type: - description: Rule type - enum: - - new_terms - type: string - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleDefaultableFields - Security_Solution_Detections_API_NewTermsRulePatchProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRulePatchFields - Security_Solution_Detections_API_NewTermsRuleRequiredFields: + Connectors_secrets_properties_cases_webhook: + title: Connector secrets properties for Webhook - Case Management connector type: object properties: - history_window_start: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_HistoryWindowStart - new_terms_fields: - $ref: '#/components/schemas/Security_Solution_Detections_API_NewTermsFields' - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - type: - description: Rule type - enum: - - new_terms + password: + description: >- + The password for HTTP basic authentication. If `hasAuth` is set to + `true`, this property is required. type: string - required: - - type - - query - - new_terms_fields - - history_window_start - Security_Solution_Detections_API_NewTermsRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleOptionalFields - - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - required: - - language - Security_Solution_Detections_API_NewTermsRuleUpdateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleCreateFields - Security_Solution_Detections_API_NonEmptyString: - description: A string that is not empty and does not contain only whitespace - minLength: 1 - pattern: ^(?! *$).+$ - type: string - Security_Solution_Detections_API_NormalizedRuleAction: - additionalProperties: false + user: + description: >- + The username for HTTP basic authentication. If `hasAuth` is set to + `true`, this property is required. + type: string + Connectors_secrets_properties_d3security: + description: Defines secrets for connectors when type is `.d3security`. type: object properties: - alerts_filter: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionAlertsFilter - frequency: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionFrequency - group: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionGroup - id: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleActionId' - params: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionParams + token: + description: The D3 Security token. + type: string required: - - id - - params - Security_Solution_Detections_API_NormalizedRuleError: + - token + title: Connector secrets properties for a D3 Security connector + Connectors_secrets_properties_email: + description: Defines secrets for connectors when type is `.email`. + properties: + clientSecret: + description: > + The Microsoft Exchange Client secret for OAuth 2.0 client + credentials authentication. It must be URL-encoded. If `service` is + `exchange_server`, this property is required. + type: string + password: + description: > + The password for HTTP basic authentication. If `hasAuth` is set to + `true`, this property is required. + type: string + user: + description: > + The username for HTTP basic authentication. If `hasAuth` is set to + `true`, this property is required. + type: string + title: Connector secrets properties for an email connector type: object + Connectors_secrets_properties_gemini: + description: Defines secrets for connectors when type is `.gemini`. properties: - err_code: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BulkActionsDryRunErrCode - message: + credentialsJSON: + description: >- + The service account credentials JSON file. The service account + should have Vertex AI user IAM role assigned to it. type: string - rules: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDetailsInError - type: array - status_code: - type: integer required: - - message - - status_code - - rules - Security_Solution_Detections_API_OsqueryParams: + - credentialsJSON + title: Connector secrets properties for a Google Gemini connector type: object + Connectors_secrets_properties_genai: + description: Defines secrets for connectors when type is `.gen-ai`. properties: - ecs_mapping: - $ref: '#/components/schemas/Security_Solution_Detections_API_EcsMapping' - pack_id: + apiKey: + description: The OpenAI API key. type: string - queries: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_OsqueryQuery' - type: array - query: + title: Connector secrets properties for an OpenAI connector + type: object + Connectors_secrets_properties_jira: + description: Defines secrets for connectors when type is `.jira`. + type: object + properties: + apiToken: + description: The Jira API authentication token for HTTP basic authentication. type: string - saved_query_id: + email: + description: The account email for HTTP Basic authentication. type: string - timeout: - type: number - Security_Solution_Detections_API_OsqueryQuery: + required: + - apiToken + - email + title: Connector secrets properties for a Jira connector + Connectors_secrets_properties_opsgenie: + description: Defines secrets for connectors when type is `.opsgenie`. type: object properties: - ecs_mapping: - $ref: '#/components/schemas/Security_Solution_Detections_API_EcsMapping' - id: - description: Query ID + apiKey: + description: The Opsgenie API authentication key for HTTP Basic authentication. type: string - platform: + required: + - apiKey + title: Connector secrets properties for an Opsgenie connector + Connectors_secrets_properties_pagerduty: + description: Defines secrets for connectors when type is `.pagerduty`. + properties: + routingKey: + description: > + A 32 character PagerDuty Integration Key for an integration on a + service. type: string - query: - description: Query to run + required: + - routingKey + title: Connector secrets properties for a PagerDuty connector + type: object + Connectors_secrets_properties_resilient: + description: Defines secrets for connectors when type is `.resilient`. + type: object + properties: + apiKeyId: + description: The authentication key ID for HTTP Basic authentication. type: string - removed: - type: boolean - snapshot: - type: boolean - version: - description: Query version + apiKeySecret: + description: The authentication key secret for HTTP Basic authentication. type: string required: - - id - - query - Security_Solution_Detections_API_OsqueryResponseAction: - type: object + - apiKeyId + - apiKeySecret + title: Connector secrets properties for IBM Resilient connector + Connectors_secrets_properties_sentinelone: + description: Defines secrets for connectors when type is `.sentinelone`. properties: - action_type_id: - enum: - - .osquery + token: + description: The A SentinelOne API token. type: string - params: - $ref: '#/components/schemas/Security_Solution_Detections_API_OsqueryParams' required: - - action_type_id - - params - Security_Solution_Detections_API_PlatformErrorResponse: + - token + title: Connector secrets properties for a SentinelOne connector type: object + Connectors_secrets_properties_servicenow: + description: >- + Defines secrets for connectors when type is `.servicenow`, + `.servicenow-sir`, or `.servicenow-itom`. properties: - error: + clientSecret: + description: >- + The client secret assigned to your OAuth application. This property + is required when `isOAuth` is `true`. type: string - message: + password: + description: >- + The password for HTTP basic authentication. This property is + required when `isOAuth` is `false`. type: string - statusCode: - type: integer - required: - - statusCode - - error - - message - Security_Solution_Detections_API_ProcessesParams: + privateKey: + description: >- + The RSA private key that you created for use in ServiceNow. This + property is required when `isOAuth` is `true`. + type: string + privateKeyPassword: + description: >- + The password for the RSA private key. This property is required when + `isOAuth` is `true` and you set a password on your private key. + type: string + username: + description: >- + The username for HTTP basic authentication. This property is + required when `isOAuth` is `false`. + type: string + title: >- + Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and + ServiceNow SecOps connectors + type: object + Connectors_secrets_properties_slack_api: + description: Defines secrets for connectors when type is `.slack`. type: object properties: - command: - enum: - - kill-process - - suspend-process + token: + description: Slack bot user OAuth token. type: string - comment: + required: + - token + title: Connector secrets properties for a Web API Slack connector + Connectors_secrets_properties_slack_webhook: + description: Defines secrets for connectors when type is `.slack`. + type: object + properties: + webhookUrl: + description: Slack webhook url. type: string - config: - type: object - properties: - field: - description: Field to use instead of process.pid - type: string - overwrite: - default: true - description: Whether to overwrite field with process.pid - type: boolean - required: - - field required: - - command - - config - Security_Solution_Detections_API_QueryRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleResponseFields - Security_Solution_Detections_API_QueryRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleDefaultableFields - Security_Solution_Detections_API_QueryRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleCreateFields - Security_Solution_Detections_API_QueryRuleDefaultableFields: + - webhookUrl + title: Connector secrets properties for a Webhook Slack connector + Connectors_secrets_properties_swimlane: + description: Defines secrets for connectors when type is `.swimlane`. + properties: + apiToken: + description: Swimlane API authentication token. + type: string + title: Connector secrets properties for a Swimlane connector type: object + Connectors_secrets_properties_teams: + description: Defines secrets for connectors when type is `.teams`. properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - Security_Solution_Detections_API_QueryRuleOptionalFields: + webhookUrl: + description: > + The URL of the incoming webhook. If you are using the + `xpack.actions.allowedHosts` setting, add the hostname to the + allowed hosts. + type: string + required: + - webhookUrl + title: Connector secrets properties for a Microsoft Teams connector type: object + Connectors_secrets_properties_tines: + description: Defines secrets for connectors when type is `.tines`. properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - data_view_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_DataViewId' - filters: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFilterArray - index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray - response_actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ResponseAction - type: array - saved_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_SavedQueryId' - Security_Solution_Detections_API_QueryRulePatchFields: - allOf: - - type: object - properties: - type: - description: Rule type - enum: - - query - type: string - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleDefaultableFields - Security_Solution_Detections_API_QueryRulePatchProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRulePatchFields - Security_Solution_Detections_API_QueryRuleRequiredFields: + email: + description: The email used to sign in to Tines. + type: string + token: + description: The Tines API token. + type: string + required: + - email + - token + title: Connector secrets properties for a Tines connector type: object + Connectors_secrets_properties_torq: + description: Defines secrets for connectors when type is `.torq`. properties: - type: - description: Rule type - enum: - - query + token: + description: The secret of the webhook authentication header. type: string required: - - type - Security_Solution_Detections_API_QueryRuleResponseFields: - allOf: + - token + title: Connector secrets properties for a Torq connector + type: object + Connectors_secrets_properties_webhook: + description: Defines secrets for connectors when type is `.webhook`. + properties: + crt: + description: >- + If `authType` is `webhook-authentication-ssl` and `certType` is + `ssl-crt-key`, it is a base64 encoded version of the CRT or CERT + file. + type: string + key: + description: >- + If `authType` is `webhook-authentication-ssl` and `certType` is + `ssl-crt-key`, it is a base64 encoded version of the KEY file. + type: string + password: + description: > + The password for HTTP basic authentication or the passphrase for the + SSL certificate files. If `hasAuth` is set to `true` and `authType` + is `webhook-authentication-basic`, this property is required. + type: string + pfx: + description: >- + If `authType` is `webhook-authentication-ssl` and `certType` is + `ssl-pfx`, it is a base64 encoded version of the PFX or P12 file. + type: string + user: + description: > + The username for HTTP basic authentication. If `hasAuth` is set to + `true` and `authType` is `webhook-authentication-basic`, this + property is required. + type: string + title: Connector secrets properties for a Webhook connector + type: object + Connectors_secrets_properties_xmatters: + description: Defines secrets for connectors when type is `.xmatters`. + properties: + password: + description: > + A user name for HTTP basic authentication. It is applicable only + when `usesBasic` is `true`. + type: string + secretsUrl: + description: > + The request URL for the Elastic Alerts trigger in xMatters with the + API key included in the URL. It is applicable only when `usesBasic` + is `false`. + type: string + user: + description: > + A password for HTTP basic authentication. It is applicable only when + `usesBasic` is `true`. + type: string + title: Connector secrets properties for an xMatters connector + type: object + Connectors_update_connector_request: + description: The properties vary depending on the connector type. + oneOf: + - $ref: '#/components/schemas/Connectors_update_connector_request_bedrock' + - $ref: '#/components/schemas/Connectors_update_connector_request_gemini' - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleRequiredFields + #/components/schemas/Connectors_update_connector_request_cases_webhook + - $ref: '#/components/schemas/Connectors_update_connector_request_d3security' + - $ref: '#/components/schemas/Connectors_update_connector_request_email' + - $ref: '#/components/schemas/Connectors_create_connector_request_genai' + - $ref: '#/components/schemas/Connectors_update_connector_request_index' + - $ref: '#/components/schemas/Connectors_update_connector_request_jira' + - $ref: '#/components/schemas/Connectors_update_connector_request_opsgenie' + - $ref: '#/components/schemas/Connectors_update_connector_request_pagerduty' + - $ref: '#/components/schemas/Connectors_update_connector_request_resilient' + - $ref: '#/components/schemas/Connectors_update_connector_request_sentinelone' + - $ref: '#/components/schemas/Connectors_update_connector_request_serverlog' + - $ref: '#/components/schemas/Connectors_update_connector_request_servicenow' - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleOptionalFields - - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - required: - - query - - language - Security_Solution_Detections_API_QueryRuleUpdateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity + #/components/schemas/Connectors_update_connector_request_servicenow_itom + - $ref: '#/components/schemas/Connectors_update_connector_request_slack_api' - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleCreateFields - Security_Solution_Detections_API_RelatedIntegration: - description: > - Related integration is a potential dependency of a rule. It's assumed - that if the user installs - - one of the related integrations of a rule, the rule might start to work - properly because it will - - have source events (generated by this integration) potentially matching - the rule's query. - - - NOTE: Proper work is not guaranteed, because a related integration, if - installed, can be - - configured differently or generate data that is not necessarily relevant - for this rule. - - - Related integration is a combination of a Fleet package and (optionally) - one of the - - package's "integrations" that this package contains. It is represented - by 3 properties: - - - - `package`: name of the package (required, unique id) - - - `version`: version of the package (required, semver-compatible) - - - `integration`: name of the integration of this package (optional, id - within the package) - - - There are Fleet packages like `windows` that contain only one - integration; in this case, - - `integration` should be unspecified. There are also packages like `aws` - and `azure` that contain - - several integrations; in this case, `integration` should be specified. - - - @example - - const x: RelatedIntegration = { - package: 'windows', - version: '1.5.x', - }; - - - @example - - const x: RelatedIntegration = { - package: 'azure', - version: '~1.1.6', - integration: 'activitylogs', - }; + #/components/schemas/Connectors_update_connector_request_slack_webhook + - $ref: '#/components/schemas/Connectors_update_connector_request_swimlane' + - $ref: '#/components/schemas/Connectors_update_connector_request_teams' + - $ref: '#/components/schemas/Connectors_update_connector_request_tines' + - $ref: '#/components/schemas/Connectors_update_connector_request_torq' + - $ref: '#/components/schemas/Connectors_update_connector_request_webhook' + - $ref: '#/components/schemas/Connectors_update_connector_request_xmatters' + title: Update connector request body properties + Connectors_update_connector_request_bedrock: + title: Update Amazon Bedrock connector request type: object properties: - integration: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - package: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - version: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' + config: + $ref: '#/components/schemas/Connectors_config_properties_bedrock' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_bedrock' required: - - package - - version - Security_Solution_Detections_API_RelatedIntegrationArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegration - type: array - Security_Solution_Detections_API_RequiredField: - description: > - Describes an Elasticsearch field that is needed for the rule to - function. - - - Almost all types of Security rules check source event documents for a - match to some kind of - - query or filter. If a document has certain field with certain values, - then it's a match and - - the rule will generate an alert. - - - Required field is an event field that must be present in the source - indices of a given rule. - - - @example - - const standardEcsField: RequiredField = { - name: 'event.action', - type: 'keyword', - ecs: true, - }; - - - @example - - const nonEcsField: RequiredField = { - name: 'winlog.event_data.AttributeLDAPDisplayName', - type: 'keyword', - ecs: false, - }; + - config + - name + Connectors_update_connector_request_cases_webhook: + title: Update Webhook - Case Managment connector request + type: object + properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_cases_webhook' + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_cases_webhook' + required: + - config + - name + Connectors_update_connector_request_d3security: + title: Update D3 Security connector request type: object properties: - ecs: - description: Whether the field is an ECS field - type: boolean + config: + $ref: '#/components/schemas/Connectors_config_properties_d3security' name: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - description: Name of an Elasticsearch field - type: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - description: Type of the Elasticsearch field + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_d3security' required: + - config - name - - type - - ecs - Security_Solution_Detections_API_RequiredFieldArray: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_RequiredField' - type: array - Security_Solution_Detections_API_RequiredFieldInput: - description: >- - Input parameters to create a RequiredField. Does not include the `ecs` - field, because `ecs` is calculated on the backend based on the field - name and type. + - secrets + Connectors_update_connector_request_email: + title: Update email connector request type: object properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_email' name: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - description: Name of an Elasticsearch field - type: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - description: Type of an Elasticsearch field + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_email' required: + - config - name - - type - Security_Solution_Detections_API_ResponseAction: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_OsqueryResponseAction - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EndpointResponseAction - Security_Solution_Detections_API_ResponseFields: + Connectors_update_connector_request_gemini: + title: Update Google Gemini connector request type: object properties: - created_at: - format: date-time - type: string - created_by: - type: string - execution_summary: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExecutionSummary - id: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleObjectId' - immutable: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleImmutable - required_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldArray - revision: - minimum: 0 - type: integer - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_source: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleSource' - updated_at: - format: date-time - type: string - updated_by: + config: + $ref: '#/components/schemas/Connectors_config_properties_gemini' + name: + description: The display name for the connector. type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_gemini' required: - - id - - rule_id - - immutable - - updated_at - - updated_by - - created_at - - created_by - - revision - - related_integrations - - required_fields - Security_Solution_Detections_API_RiskScore: - description: Risk score (0 to 100) - maximum: 100 - minimum: 0 - type: integer - Security_Solution_Detections_API_RiskScoreMapping: - description: >- - Overrides generated alerts' risk_score with a value from the source - event - items: - type: object - properties: - field: - type: string - operator: - enum: - - equals - type: string - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - value: - type: string - required: - - field - - operator - - value - type: array - Security_Solution_Detections_API_RuleAction: + - config + - name + Connectors_update_connector_request_index: + title: Update index connector request type: object properties: - action_type_id: - description: The action type used for sending notifications. + config: + $ref: '#/components/schemas/Connectors_config_properties_index' + name: + description: The display name for the connector. type: string - alerts_filter: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionAlertsFilter - frequency: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionFrequency - group: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionGroup - id: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleActionId' - params: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionParams - uuid: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' required: - - action_type_id - - id - - params - Security_Solution_Detections_API_RuleActionAlertsFilter: - additionalProperties: true - type: object - Security_Solution_Detections_API_RuleActionFrequency: - description: >- - The action frequency defines when the action runs (for example, only on - rule execution or at specific time intervals). + - config + - name + Connectors_update_connector_request_jira: + title: Update Jira connector request type: object properties: - notifyWhen: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionNotifyWhen - summary: - description: >- - Action summary indicates whether we will send a summary notification - about all the generate alerts or notification per individual alert - type: boolean - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - nullable: true + config: + $ref: '#/components/schemas/Connectors_config_properties_jira' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_jira' required: - - summary - - notifyWhen - - throttle - Security_Solution_Detections_API_RuleActionGroup: - description: >- - Optionally groups actions by use cases. Use `default` for alert - notifications. - type: string - Security_Solution_Detections_API_RuleActionId: - description: The connector ID. - type: string - Security_Solution_Detections_API_RuleActionNotifyWhen: - description: >- - The condition for throttling the notification: `onActionGroupChange`, - `onActiveAlert`, or `onThrottleInterval` - enum: - - onActiveAlert - - onThrottleInterval - - onActionGroupChange - type: string - Security_Solution_Detections_API_RuleActionParams: - additionalProperties: true - description: >- - Object containing the allowed connector fields, which varies according - to the connector type. + - config + - name + - secrets + Connectors_update_connector_request_opsgenie: + title: Update Opsgenie connector request type: object - Security_Solution_Detections_API_RuleActionThrottle: - description: Defines how often rule actions are taken. - oneOf: - - enum: - - no_actions - - rule - type: string - - description: 'Time interval in seconds, minutes, hours, or days.' - example: 1h - pattern: '^[1-9]\d*[smhd]$' + properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_opsgenie' + name: + description: The display name for the connector. type: string - Security_Solution_Detections_API_RuleAuthorArray: - items: - type: string - type: array - Security_Solution_Detections_API_RuleCreateProps: - anyOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleCreateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleCreateProps - discriminator: - propertyName: type - Security_Solution_Detections_API_RuleDescription: - minLength: 1 - type: string - Security_Solution_Detections_API_RuleDetailsInError: + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_opsgenie' + required: + - config + - name + - secrets + Connectors_update_connector_request_pagerduty: + title: Update PagerDuty connector request type: object properties: - id: - type: string + config: + $ref: '#/components/schemas/Connectors_config_properties_pagerduty' name: + description: The display name for the connector. type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_pagerduty' required: - - id - Security_Solution_Detections_API_RuleExceptionList: + - config + - name + - secrets + Connectors_update_connector_request_resilient: + title: Update IBM Resilient connector request type: object properties: - id: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - description: ID of the exception container - list_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - description: List ID of the exception container - namespace_type: - description: Determines the exceptions validity in rule's Kibana space - enum: - - agnostic - - single + config: + $ref: '#/components/schemas/Connectors_config_properties_resilient' + name: + description: The display name for the connector. type: string - type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ExceptionListType + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_resilient' required: - - id - - list_id - - type - - namespace_type - Security_Solution_Detections_API_RuleExecutionMetrics: + - config + - name + - secrets + Connectors_update_connector_request_sentinelone: + title: Update SentinelOne connector request type: object properties: - execution_gap_duration_s: - description: Duration in seconds of execution gap - minimum: 0 - type: integer - total_enrichment_duration_ms: - description: >- - Total time spent enriching documents during current rule execution - cycle - minimum: 0 - type: integer - total_indexing_duration_ms: - description: >- - Total time spent indexing documents during current rule execution - cycle - minimum: 0 - type: integer - total_search_duration_ms: - description: >- - Total time spent performing ES searches as measured by Kibana; - includes network latency and time spent serializing/deserializing - request/response - minimum: 0 - type: integer - Security_Solution_Detections_API_RuleExecutionStatus: - description: >- - Custom execution status of Security rules that is different from the - status used in the Alerting Framework. We merge our custom status with - the Framework's status to determine the resulting status of a rule. - - - going to run - @deprecated Replaced by the 'running' status but left - for backwards compatibility with rule execution events already written - to Event Log in the prior versions of Kibana. Don't use when writing - rule status changes. - - - running - Rule execution started but not reached any intermediate or - final status. - - - partial failure - Rule can partially fail for various reasons either - in the middle of an execution (in this case we update its status right - away) or in the end of it. So currently this status can be both - intermediate and final at the same time. A typical reason for a partial - failure: not all the indices that the rule searches over actually exist. - - - failed - Rule failed to execute due to unhandled exception or a reason - defined in the business logic of its executor function. - - - succeeded - Rule executed successfully without any issues. Note: this - status is just an indication of a rule's "health". The rule might or - might not generate any alerts despite of it. - enum: - - going to run - - running - - partial failure - - failed - - succeeded - type: string - Security_Solution_Detections_API_RuleExecutionStatusOrder: - type: integer - Security_Solution_Detections_API_RuleExecutionSummary: + config: + $ref: '#/components/schemas/Connectors_config_properties_sentinelone' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_sentinelone' + required: + - config + - name + - secrets + Connectors_update_connector_request_serverlog: + title: Update server log connector request type: object properties: - last_execution: - type: object - properties: - date: - description: Date of the last execution - format: date-time - type: string - message: - type: string - metrics: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExecutionMetrics - status: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExecutionStatus - description: Status of the last execution - status_order: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExecutionStatusOrder - required: - - date - - status - - status_order - - message - - metrics + name: + description: The display name for the connector. + type: string required: - - last_execution - Security_Solution_Detections_API_RuleFalsePositiveArray: - items: - type: string - type: array - Security_Solution_Detections_API_RuleFilterArray: - items: {} - type: array - Security_Solution_Detections_API_RuleInterval: - description: >- - Frequency of rule execution, using a date math range. For example, "1h" - means the rule runs every hour. Defaults to 5m (5 minutes). - type: string - Security_Solution_Detections_API_RuleIntervalFrom: - description: >- - Time from which data is analyzed each time the rule runs, using a date - math range. For example, now-4200s means the rule analyzes data from 70 - minutes before its start time. Defaults to now-6m (analyzes data from 6 - minutes before the start time). - format: date-math - type: string - Security_Solution_Detections_API_RuleIntervalTo: - type: string - Security_Solution_Detections_API_RuleLicense: - description: The rule's license. - type: string - Security_Solution_Detections_API_RuleMetadata: - additionalProperties: true + - name + Connectors_update_connector_request_servicenow: + title: Update ServiceNow ITSM connector or ServiceNow SecOps request type: object - Security_Solution_Detections_API_RuleName: - minLength: 1 - type: string - Security_Solution_Detections_API_RuleNameOverride: - description: Sets the source field for the alert's signal.rule.name value - type: string - Security_Solution_Detections_API_RuleObjectId: - $ref: '#/components/schemas/Security_Solution_Detections_API_UUID' - Security_Solution_Detections_API_RulePatchProps: - anyOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRulePatchProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRulePatchProps - Security_Solution_Detections_API_RulePreviewLogs: + properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' + required: + - config + - name + - secrets + Connectors_update_connector_request_servicenow_itom: + title: Create ServiceNow ITOM connector request type: object properties: - duration: - description: Execution duration in milliseconds - type: integer - errors: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - type: array - startedAt: - $ref: '#/components/schemas/Security_Solution_Detections_API_NonEmptyString' - warnings: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - type: array + config: + $ref: '#/components/schemas/Connectors_config_properties_servicenow_itom' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_servicenow' required: - - errors - - warnings - - duration - Security_Solution_Detections_API_RulePreviewParams: + - config + - name + - secrets + Connectors_update_connector_request_slack_api: + title: Update Slack connector request type: object properties: - invocationCount: - type: integer - timeframeEnd: - format: date-time + config: + $ref: '#/components/schemas/Connectors_config_properties_slack_api' + name: + description: The display name for the connector. type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_slack_api' required: - - invocationCount - - timeframeEnd - Security_Solution_Detections_API_RuleQuery: - type: string - Security_Solution_Detections_API_RuleReferenceArray: - items: - type: string - type: array - Security_Solution_Detections_API_RuleResponse: - anyOf: - - $ref: '#/components/schemas/Security_Solution_Detections_API_EqlRule' - - $ref: '#/components/schemas/Security_Solution_Detections_API_QueryRule' - - $ref: '#/components/schemas/Security_Solution_Detections_API_SavedQueryRule' - - $ref: '#/components/schemas/Security_Solution_Detections_API_ThresholdRule' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRule - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRule - - $ref: '#/components/schemas/Security_Solution_Detections_API_NewTermsRule' - - $ref: '#/components/schemas/Security_Solution_Detections_API_EsqlRule' - discriminator: - propertyName: type - Security_Solution_Detections_API_RuleSignatureId: - description: 'Could be any string, not necessarily a UUID' - type: string - Security_Solution_Detections_API_RuleSource: - description: >- - Discriminated union that determines whether the rule is internally - sourced (created within the Kibana app) or has an external source, such - as the Elastic Prebuilt rules repo. - discriminator: - propertyName: type - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ExternalRuleSource - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InternalRuleSource - Security_Solution_Detections_API_RuleTagArray: - description: >- - String array containing words and phrases to help categorize, filter, - and search rules. Defaults to an empty array. - items: - type: string - type: array - Security_Solution_Detections_API_RuleUpdateProps: - anyOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EqlRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_QueryRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_MachineLearningRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NewTermsRuleUpdateProps - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_EsqlRuleUpdateProps - discriminator: - propertyName: type - Security_Solution_Detections_API_RuleVersion: - description: The rule's version number. - minimum: 1 - type: integer - Security_Solution_Detections_API_SavedObjectResolveAliasPurpose: - enum: - - savedObjectConversion - - savedObjectImport - type: string - Security_Solution_Detections_API_SavedObjectResolveAliasTargetId: - type: string - Security_Solution_Detections_API_SavedObjectResolveOutcome: - enum: - - exactMatch - - aliasMatch - - conflict - type: string - Security_Solution_Detections_API_SavedQueryId: - type: string - Security_Solution_Detections_API_SavedQueryRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleResponseFields - Security_Solution_Detections_API_SavedQueryRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleDefaultableFields - Security_Solution_Detections_API_SavedQueryRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleCreateFields - Security_Solution_Detections_API_SavedQueryRuleDefaultableFields: + - name + - secrets + Connectors_update_connector_request_slack_webhook: + title: Update Slack connector request type: object properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - Security_Solution_Detections_API_SavedQueryRuleOptionalFields: + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_slack_webhook' + required: + - name + - secrets + Connectors_update_connector_request_swimlane: + title: Update Swimlane connector request type: object properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - data_view_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_DataViewId' - filters: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFilterArray - index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - response_actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ResponseAction - type: array - Security_Solution_Detections_API_SavedQueryRulePatchFields: - allOf: - - type: object - properties: - saved_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryId - type: - description: Rule type - enum: - - saved_query - type: string - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleDefaultableFields - Security_Solution_Detections_API_SavedQueryRulePatchProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRulePatchFields - Security_Solution_Detections_API_SavedQueryRuleRequiredFields: + config: + $ref: '#/components/schemas/Connectors_config_properties_swimlane' + name: + description: The display name for the connector. + example: my-connector + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_swimlane' + required: + - config + - name + - secrets + Connectors_update_connector_request_teams: + title: Update Microsoft Teams connector request type: object properties: - saved_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_SavedQueryId' - type: - description: Rule type - enum: - - saved_query + name: + description: The display name for the connector. type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_teams' required: - - type - - saved_id - Security_Solution_Detections_API_SavedQueryRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleOptionalFields - - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - required: - - language - Security_Solution_Detections_API_SavedQueryRuleUpdateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedQueryRuleCreateFields - Security_Solution_Detections_API_SetAlertsStatusByIds: + - name + - secrets + Connectors_update_connector_request_tines: + title: Update Tines connector request + type: object + properties: + config: + $ref: '#/components/schemas/Connectors_config_properties_tines' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_tines' + required: + - config + - name + - secrets + Connectors_update_connector_request_torq: + title: Update Torq connector request type: object properties: - signal_ids: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - minItems: 1 - type: array - status: - $ref: '#/components/schemas/Security_Solution_Detections_API_AlertStatus' + config: + $ref: '#/components/schemas/Connectors_config_properties_torq' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_torq' required: - - signal_ids - - status - Security_Solution_Detections_API_SetAlertsStatusByQuery: + - config + - name + - secrets + Connectors_update_connector_request_webhook: + title: Update Webhook connector request type: object properties: - conflicts: - default: abort - enum: - - abort - - proceed + config: + $ref: '#/components/schemas/Connectors_config_properties_webhook' + name: + description: The display name for the connector. type: string - query: - additionalProperties: true - type: object - status: - $ref: '#/components/schemas/Security_Solution_Detections_API_AlertStatus' + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_webhook' required: - - query - - status - Security_Solution_Detections_API_SetAlertTags: + - config + - name + - secrets + Connectors_update_connector_request_xmatters: + title: Update xMatters connector request type: object properties: - tags_to_add: - $ref: '#/components/schemas/Security_Solution_Detections_API_AlertTags' - tags_to_remove: - $ref: '#/components/schemas/Security_Solution_Detections_API_AlertTags' + config: + $ref: '#/components/schemas/Connectors_config_properties_xmatters' + name: + description: The display name for the connector. + type: string + secrets: + $ref: '#/components/schemas/Connectors_secrets_properties_xmatters' required: - - tags_to_add - - tags_to_remove - Security_Solution_Detections_API_SetupGuide: - type: string - Security_Solution_Detections_API_Severity: - description: Severity of the rule - enum: - - low - - medium - - high - - critical - type: string - Security_Solution_Detections_API_SeverityMapping: - description: Overrides generated alerts' severity with values from the source event - items: - type: object - properties: - field: - type: string - operator: - enum: - - equals - type: string - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - value: - type: string - required: - - field - - operator - - severity - - value - type: array - Security_Solution_Detections_API_SiemErrorResponse: + - config + - name + - secrets + Data_views_400_response: + title: Bad request type: object properties: + error: + example: Bad Request + type: string message: type: string - status_code: - type: integer + statusCode: + example: 400 + type: number required: - - status_code + - statusCode + - error - message - Security_Solution_Detections_API_SkippedAlertsIndexMigration: + Data_views_404_response: type: object properties: - index: + error: + enum: + - Not Found + example: Not Found type: string - required: - - index - Security_Solution_Detections_API_SortOrder: - enum: - - asc - - desc - type: string - Security_Solution_Detections_API_Threat: + message: + example: >- + Saved object [index-pattern/caaad6d0-920c-11ed-b36a-874bd1548a00] + not found + type: string + statusCode: + enum: + - 404 + example: 404 + type: integer + Data_views_allownoindex: + description: Allows the data view saved object to exist before the data is available. + type: boolean + Data_views_create_data_view_request_object: + title: Create data view request type: object properties: - framework: - description: Relevant attack framework - type: string - tactic: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThreatTactic' - technique: - description: Array containing information on the attack techniques (optional) - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatTechnique - type: array - required: - - framework - - tactic - Security_Solution_Detections_API_ThreatArray: - items: - $ref: '#/components/schemas/Security_Solution_Detections_API_Threat' - type: array - Security_Solution_Detections_API_ThreatFilters: - items: - description: >- - Query and filter context array used to filter documents from the - Elasticsearch index containing the threat values - type: array - Security_Solution_Detections_API_ThreatIndex: - items: - type: string - type: array - Security_Solution_Detections_API_ThreatIndicatorPath: - description: >- - Defines the path to the threat indicator in the indicator documents - (optional) - type: string - Security_Solution_Detections_API_ThreatMapping: - items: - type: object - properties: - entries: - items: - type: object - properties: - field: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - type: - enum: - - mapping - type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_NonEmptyString - required: - - field - - type - - value - type: array - required: - - entries - minItems: 1 - type: array - Security_Solution_Detections_API_ThreatMatchRule: - allOf: - - type: object + data_view: + description: The data view object. + type: object properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata + allowNoIndex: + $ref: '#/components/schemas/Data_views_allownoindex' + fieldAttrs: + additionalProperties: + $ref: '#/components/schemas/Data_views_fieldattrs' + type: object + fieldFormats: + $ref: '#/components/schemas/Data_views_fieldformats' + fields: + type: object + id: + type: string name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo + description: The data view name. + type: string + namespaces: + $ref: '#/components/schemas/Data_views_namespaces' + runtimeFieldMap: + additionalProperties: + $ref: '#/components/schemas/Data_views_runtimefieldmap' + type: object + sourceFilters: + $ref: '#/components/schemas/Data_views_sourcefilters' + timeFieldName: + $ref: '#/components/schemas/Data_views_timefieldname' + title: + $ref: '#/components/schemas/Data_views_title' + type: + $ref: '#/components/schemas/Data_views_type' + typeMeta: + $ref: '#/components/schemas/Data_views_typemeta' version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion + type: string required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleResponseFields - Security_Solution_Detections_API_ThreatMatchRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleDefaultableFields - Security_Solution_Detections_API_ThreatMatchRuleCreateProps: - allOf: - - type: object + - title + override: + default: false + description: >- + Override an existing data view if a data view with the provided + title already exists. + type: boolean + required: + - data_view + Data_views_data_view_response_object: + title: Data view response properties + type: object + properties: + data_view: + type: object properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo + allowNoIndex: + $ref: '#/components/schemas/Data_views_allownoindex' + fieldAttrs: + additionalProperties: + $ref: '#/components/schemas/Data_views_fieldattrs' + type: object + fieldFormats: + $ref: '#/components/schemas/Data_views_fieldformats' + fields: + type: object + id: + example: ff959d40-b880-11e8-a6d9-e546fe2bba5f + type: string + name: + description: The data view name. + type: string + namespaces: + $ref: '#/components/schemas/Data_views_namespaces' + runtimeFieldMap: + additionalProperties: + $ref: '#/components/schemas/Data_views_runtimefieldmap' + type: object + sourceFilters: + $ref: '#/components/schemas/Data_views_sourcefilters' + timeFieldName: + $ref: '#/components/schemas/Data_views_timefieldname' + title: + $ref: '#/components/schemas/Data_views_title' + typeMeta: + $ref: '#/components/schemas/Data_views_typemeta_response' version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleCreateFields - Security_Solution_Detections_API_ThreatMatchRuleDefaultableFields: + example: WzQ2LDJd + type: string + Data_views_fieldattrs: + description: A map of field attributes by field name. type: object properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - Security_Solution_Detections_API_ThreatMatchRuleOptionalFields: + count: + description: Popularity count for the field. + type: integer + customDescription: + description: Custom description for the field. + maxLength: 300 + type: string + customLabel: + description: Custom label for the field. + type: string + Data_views_fieldformats: + description: A map of field formats by field name. + type: object + Data_views_namespaces: + description: >- + An array of space identifiers for sharing the data view between multiple + spaces. + items: + default: default + type: string + type: array + Data_views_runtimefieldmap: + description: A map of runtime field definitions by field name. type: object properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppression - concurrent_searches: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ConcurrentSearches - data_view_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_DataViewId' - filters: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFilterArray - index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray - items_per_search: - $ref: '#/components/schemas/Security_Solution_Detections_API_ItemsPerSearch' - saved_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_SavedQueryId' - threat_filters: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThreatFilters' - threat_indicator_path: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatIndicatorPath - threat_language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - Security_Solution_Detections_API_ThreatMatchRulePatchFields: - allOf: - - type: object + script: + type: object properties: - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - threat_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatIndex - threat_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMapping - threat_query: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatQuery - type: - description: Rule type - enum: - - threat_match + source: + description: Script for the runtime field. type: string - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleDefaultableFields - Security_Solution_Detections_API_ThreatMatchRulePatchProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRulePatchFields - Security_Solution_Detections_API_ThreatMatchRuleRequiredFields: - type: object - properties: - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - threat_index: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThreatIndex' - threat_mapping: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThreatMapping' - threat_query: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThreatQuery' type: - description: Rule type - enum: - - threat_match + description: Mapping type of the runtime field. type: string required: + - script - type - - query - - threat_query - - threat_mapping - - threat_index - Security_Solution_Detections_API_ThreatMatchRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleOptionalFields - - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - required: - - language - Security_Solution_Detections_API_ThreatMatchRuleUpdateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatMatchRuleCreateFields - Security_Solution_Detections_API_ThreatQuery: - description: Query to run - type: string - Security_Solution_Detections_API_ThreatSubtechnique: + Data_views_sourcefilters: + description: The array of field names you want to filter out in Discover. + items: + type: object + properties: + value: + type: string + required: + - value + type: array + Data_views_swap_data_view_request_object: + title: Data view reference swap request type: object properties: - id: - description: Subtechnique ID + delete: + description: Deletes referenced saved object if all references are removed. + type: boolean + forId: + description: Limit the affected saved objects to one or more by identifier. + oneOf: + - type: string + - items: + type: string + type: array + forType: + description: Limit the affected saved objects by type. type: string - name: - description: Subtechnique name + fromId: + description: The saved object reference to change. type: string - reference: - description: Subtechnique reference + fromType: + description: > + Specify the type of the saved object reference to alter. The default + value is `index-pattern` for data views. + type: string + toId: + description: New saved object reference value to replace the old value. type: string required: - - id - - name - - reference - Security_Solution_Detections_API_ThreatTactic: + - fromId + - toId + Data_views_timefieldname: + description: 'The timestamp field name, which you use for time-based data views.' + type: string + Data_views_title: + description: >- + Comma-separated list of data streams, indices, and aliases that you want + to search. Supports wildcards (`*`). + type: string + Data_views_type: + description: 'When set to `rollup`, identifies the rollup data views.' + type: string + Data_views_typemeta: + description: >- + When you use rollup indices, contains the field list for the rollup data + view API endpoints. type: object properties: - id: - description: Tactic ID + aggs: + description: A map of rollup restrictions by aggregation type and field name. + type: object + params: + description: Properties for retrieving rollup fields. + type: object + required: + - aggs + - params + Data_views_typemeta_response: + description: >- + When you use rollup indices, contains the field list for the rollup data + view API endpoints. + nullable: true + type: object + properties: + aggs: + description: A map of rollup restrictions by aggregation type and field name. + type: object + params: + description: Properties for retrieving rollup fields. + type: object + Data_views_update_data_view_request_object: + title: Update data view request + type: object + properties: + data_view: + description: > + The data view properties you want to update. Only the specified + properties are updated in the data view. Unspecified fields stay as + they are persisted. + type: object + properties: + allowNoIndex: + $ref: '#/components/schemas/Data_views_allownoindex' + fieldFormats: + $ref: '#/components/schemas/Data_views_fieldformats' + fields: + type: object + name: + type: string + runtimeFieldMap: + additionalProperties: + $ref: '#/components/schemas/Data_views_runtimefieldmap' + type: object + sourceFilters: + $ref: '#/components/schemas/Data_views_sourcefilters' + timeFieldName: + $ref: '#/components/schemas/Data_views_timefieldname' + title: + $ref: '#/components/schemas/Data_views_title' + type: + $ref: '#/components/schemas/Data_views_type' + typeMeta: + $ref: '#/components/schemas/Data_views_typemeta' + refresh_fields: + default: false + description: Reloads the data view fields after the data view is updated. + type: boolean + required: + - data_view + Fleet_agent: + title: Agent + type: object + properties: + access_api_key: type: string - name: - description: Tactic name + access_api_key_id: + type: string + active: + type: boolean + components: + items: + $ref: '#/components/schemas/Fleet_agent_component' + type: array + default_api_key: + type: string + default_api_key_id: type: string - reference: - description: Tactic reference + enrolled_at: type: string - required: - - id - - name - - reference - Security_Solution_Detections_API_ThreatTechnique: - type: object - properties: id: - description: Technique ID type: string - name: - description: Technique name + last_checkin: type: string - reference: - description: Technique reference + local_metadata: + $ref: '#/components/schemas/Fleet_agent_metadata' + metrics: + type: object + properties: + cpu_avg: + description: >- + Average agent CPU usage during the last 5 minutes, number + between 0-1 + type: number + memory_size_byte_avg: + description: Average agent memory consumption during the last 5 minutes + type: number + policy_id: type: string - subtechnique: - description: Array containing more specific information on the attack technique - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatSubtechnique - type: array + policy_revision: + type: number + status: + $ref: '#/components/schemas/Fleet_agent_status' + type: + $ref: '#/components/schemas/Fleet_agent_type' + unenrolled_at: + type: string + unenrollment_started_at: + type: string + user_provided_metadata: + $ref: '#/components/schemas/Fleet_agent_metadata' required: + - type + - active + - enrolled_at - id - - name - - reference - Security_Solution_Detections_API_Threshold: - type: object - properties: - cardinality: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdCardinality - field: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThresholdField' - value: - $ref: '#/components/schemas/Security_Solution_Detections_API_ThresholdValue' - required: - - field - - value - Security_Solution_Detections_API_ThresholdAlertSuppression: - type: object - properties: - duration: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertSuppressionDuration - required: - - duration - Security_Solution_Detections_API_ThresholdCardinality: - items: - type: object - properties: - field: - type: string - value: - minimum: 0 - type: integer - required: - - field - - value - type: array - Security_Solution_Detections_API_ThresholdField: - description: Field to aggregate on + - status + Fleet_agent_action: oneOf: - - type: string - - items: - type: string - type: array - Security_Solution_Detections_API_ThresholdRule: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - version - - tags - - enabled - - risk_score_mapping - - severity_mapping - - interval - - from - - to - - actions - - exceptions_list - - author - - false_positives - - references - - max_signals - - threat - - setup - - related_integrations - - required_fields - - $ref: '#/components/schemas/Security_Solution_Detections_API_ResponseFields' - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleResponseFields - Security_Solution_Detections_API_ThresholdRuleCreateFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleDefaultableFields - Security_Solution_Detections_API_ThresholdRuleCreateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleCreateFields - Security_Solution_Detections_API_ThresholdRuleDefaultableFields: - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - Security_Solution_Detections_API_ThresholdRuleOptionalFields: - type: object - properties: - alert_suppression: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdAlertSuppression - data_view_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_DataViewId' - filters: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFilterArray - index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IndexPatternArray - saved_id: - $ref: '#/components/schemas/Security_Solution_Detections_API_SavedQueryId' - Security_Solution_Detections_API_ThresholdRulePatchFields: - allOf: - - type: object - properties: - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - threshold: - $ref: '#/components/schemas/Security_Solution_Detections_API_Threshold' + - properties: + ack_data: + type: string + data: + type: string type: - description: Rule type enum: - - threshold + - UNENROLL + - UPGRADE + - POLICY_REASSIGN type: string - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleOptionalFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleDefaultableFields - Security_Solution_Detections_API_ThresholdRulePatchProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRulePatchFields - Security_Solution_Detections_API_ThresholdRuleRequiredFields: + - properties: + data: + type: object + properties: + log_level: + enum: + - debug + - info + - warning + - error + nullable: true + type: string + type: + type: string + title: Agent action + Fleet_agent_component: + title: Agent component type: object properties: - query: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleQuery' - threshold: - $ref: '#/components/schemas/Security_Solution_Detections_API_Threshold' + id: + type: string + message: + type: string + status: + $ref: '#/components/schemas/Fleet_agent_component_status' type: - description: Rule type - enum: - - threshold type: string - required: - - type - - query - - threshold - Security_Solution_Detections_API_ThresholdRuleResponseFields: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleRequiredFields - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleOptionalFields - - type: object - properties: - language: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_KqlQueryLanguage - required: - - language - Security_Solution_Detections_API_ThresholdRuleUpdateProps: - allOf: - - type: object - properties: - actions: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAction - type: array - alias_purpose: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasPurpose - alias_target_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveAliasTargetId - author: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleAuthorArray - building_block_type: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_BuildingBlockType - description: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleDescription - enabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_IsRuleEnabled - exceptions_list: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleExceptionList - type: array - false_positives: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleFalsePositiveArray - from: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalFrom - id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleObjectId - interval: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleInterval - investigation_fields: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationFields - license: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleLicense - max_signals: - $ref: '#/components/schemas/Security_Solution_Detections_API_MaxSignals' - meta: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleMetadata - name: - $ref: '#/components/schemas/Security_Solution_Detections_API_RuleName' - namespace: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndexNamespace - note: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_InvestigationGuide - outcome: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SavedObjectResolveOutcome - output_index: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_AlertsIndex - references: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleReferenceArray - related_integrations: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RelatedIntegrationArray - required_fields: - items: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RequiredFieldInput - type: array - risk_score: - $ref: '#/components/schemas/Security_Solution_Detections_API_RiskScore' - risk_score_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RiskScoreMapping - rule_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleSignatureId - rule_name_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleNameOverride - setup: - $ref: '#/components/schemas/Security_Solution_Detections_API_SetupGuide' - severity: - $ref: '#/components/schemas/Security_Solution_Detections_API_Severity' - severity_mapping: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_SeverityMapping - tags: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleTagArray - threat: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThreatArray - throttle: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleActionThrottle - timeline_id: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateId - timeline_title: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimelineTemplateTitle - timestamp_override: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverride - timestamp_override_fallback_disabled: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_TimestampOverrideFallbackDisabled - to: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleIntervalTo - version: - $ref: >- - #/components/schemas/Security_Solution_Detections_API_RuleVersion - required: - - name - - description - - risk_score - - severity - - $ref: >- - #/components/schemas/Security_Solution_Detections_API_ThresholdRuleCreateFields - Security_Solution_Detections_API_ThresholdValue: - description: Threshold value - minimum: 1 - type: integer - Security_Solution_Detections_API_ThrottleForBulkActions: - description: >- - The condition for throttling the notification: 'rule', 'no_actions', or - time duration + units: + items: + $ref: '#/components/schemas/Fleet_agent_component_unit' + type: array + Fleet_agent_component_status: enum: - - rule - - 1h - - 1d - - 7d - type: string - Security_Solution_Detections_API_TiebreakerField: - description: Sets a secondary field for sorting events - type: string - Security_Solution_Detections_API_TimelineTemplateId: - description: Timeline template ID - type: string - Security_Solution_Detections_API_TimelineTemplateTitle: - description: Timeline template title - type: string - Security_Solution_Detections_API_TimestampField: - description: Contains the event timestamp used for sorting a sequence of events - type: string - Security_Solution_Detections_API_TimestampOverride: - description: Sets the time field used to query indices - type: string - Security_Solution_Detections_API_TimestampOverrideFallbackDisabled: - description: Disables the fallback to the event's @timestamp field - type: boolean - Security_Solution_Detections_API_UUID: - description: A universally unique identifier - format: uuid + - starting + - configuring + - healthy + - degraded + - failed + - stopping + - stopped + title: Agent component status type: string - Security_Solution_Detections_API_WarningSchema: + Fleet_agent_component_unit: + title: Agent component unit type: object properties: - actionPath: - type: string - buttonLabel: + id: type: string message: type: string + payload: + type: object + status: + $ref: '#/components/schemas/Fleet_agent_component_status' type: + $ref: '#/components/schemas/Fleet_agent_component_unit_type' + Fleet_agent_component_unit_type: + enum: + - input + - output + title: Agent component unit type + type: string + Fleet_agent_diagnostics: + title: Agent diagnostics + type: object + properties: + actionId: + type: string + createTime: + type: string + filePath: + type: string + id: + type: string + name: type: string + status: + enum: + - READY + - AWAITING_UPLOAD + - DELETED + - IN_PROGRESS required: - - type - - message - - actionPath - Security_Solution_Endpoint_Exceptions_API_EndpointList: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionList - - additionalProperties: false - type: object - Security_Solution_Endpoint_Exceptions_API_EndpointListItem: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItem - Security_Solution_Endpoint_Exceptions_API_ExceptionList: + - id + - name + - createTime + - filePath + - actionId + - status + Fleet_agent_get_by_actions: + items: + items: + type: string + type: array + title: Agents get by action ids + type: array + Fleet_agent_metadata: + title: Agent metadata + type: object + Fleet_agent_policy: + title: Agent Policy type: object properties: - _version: + advanced_settings: + description: >- + Advanced settings stored in the agent policy, e.g. + agent_limits_go_max_procs + nullable: true + type: object + agent_features: + items: + type: object + properties: + enabled: + type: boolean + name: + type: string + required: + - name + - enabled + type: array + agents: + type: number + data_output_id: + nullable: true type: string - created_at: - format: date-time + description: type: string - created_by: + download_source_id: + nullable: true type: string - description: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListDescription + fleet_server_host_id: + nullable: true + type: string + global_data_tags: + items: + additionalProperties: + oneOf: + - type: string + - type: number + description: >- + User defined data tags that are added to all of the inputs. The + values can be strings or numbers. + type: object + type: array id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListId - immutable: + type: string + inactivity_timeout: + type: integer + is_protected: + description: >- + Indicates whether the agent policy has tamper protection enabled. + Default false. type: boolean - list_id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListMeta + keep_monitoring_alive: + description: >- + When set to true, monitoring will be enabled but logs/metrics + collection will be disabled + nullable: true + type: boolean + monitoring_enabled: + items: + enum: + - metrics + - logs + type: string + type: array + monitoring_output_id: + nullable: true + type: string name: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionNamespaceType - os_types: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListOsTypeArray - tags: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListTags - tie_breaker_id: type: string - type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListType - updated_at: - format: date-time + namespace: type: string + overrides: + description: >- + Override settings that are defined in the agent policy. Input + settings cannot be overridden. The override option should be used + only in unusual circumstances and not as a routine procedure. + nullable: true + type: object + package_policies: + description: >- + This field is present only when retrieving a single agent policy, or + when retrieving a list of agent policies with the ?full=true + parameter + items: + $ref: '#/components/schemas/Fleet_package_policy' + type: array + revision: + type: number + supports_agentless: + description: >- + Indicates whether the agent policy supports agentless integrations. + Only allowed in a serverless environment. + type: boolean + unenroll_timeout: + type: integer + unprivileged_agents: + type: number updated_by: type: string - version: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListVersion + updated_on: + format: date-time + type: string required: - id - - list_id - - type + - status - name - - description - - immutable - - namespace_type - - version - - tie_breaker_id - - created_at - - created_by - - updated_at - - updated_by - Security_Solution_Endpoint_Exceptions_API_ExceptionListDescription: - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListHumanId: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - description: 'Human readable string identifier, e.g. `trusted-linux-processes`' - Security_Solution_Endpoint_Exceptions_API_ExceptionListId: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - Security_Solution_Endpoint_Exceptions_API_ExceptionListItem: + - namespace + Fleet_agent_policy_create_request: + title: Create agent policy request type: object properties: - _version: + agent_features: + items: + type: object + properties: + enabled: + type: boolean + name: + type: string + required: + - name + - enabled + type: array + data_output_id: + nullable: true type: string - comments: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemCommentArray - created_at: - format: date-time + description: type: string - created_by: + download_source_id: + nullable: true type: string - description: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryArray - expire_time: - format: date-time + fleet_server_host_id: + nullable: true type: string + force: + description: Force agent policy creation even if packages are not verified. + type: boolean + global_data_tags: + items: + additionalProperties: + oneOf: + - type: string + - type: number + description: >- + User defined data tags that are added to all of the inputs. The + values can be strings or numbers. + type: object + type: array id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemId - item_id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemHumanId - list_id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemMeta - name: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionNamespaceType - os_types: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray - tags: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemTags - tie_breaker_id: type: string - type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemType - updated_at: - format: date-time + inactivity_timeout: + type: integer + is_protected: + type: boolean + monitoring_enabled: + items: + enum: + - metrics + - logs + type: string + type: array + monitoring_output_id: + nullable: true type: string - updated_by: + name: + type: string + namespace: type: string + unenroll_timeout: + type: integer required: - - id - - item_id - - list_id - - type - name - - description - - entries - - namespace_type - - comments - - tie_breaker_id - - created_at - - created_by - - updated_at - - updated_by - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemComment: + - namespace + Fleet_agent_policy_full: + oneOf: + - type: object + properties: + item: + type: string + - type: object + properties: + item: + $ref: '#/components/schemas/Fleet_full_agent_policy' + title: Agent policy full response + type: object + Fleet_agent_policy_update_request: + title: Update agent policy request type: object properties: - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - created_at: - format: date-time + agent_features: + items: + type: object + properties: + enabled: + type: boolean + name: + type: string + required: + - name + - enabled + type: array + data_output_id: + nullable: true type: string - created_by: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - updated_at: - format: date-time + description: type: string - updated_by: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - required: - - id - - comment - - created_at - - created_by - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemCommentArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemComment - type: array - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemDescription: - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntry: - anyOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatch - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatchAny - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryList - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryExists - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryNested - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatchWildcard - discriminator: - propertyName: type - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntry - type: array - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryExists: - type: object - properties: - field: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - operator: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - exists + download_source_id: + nullable: true type: string - required: - - type - - field - - operator - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryList: - type: object - properties: - field: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - list: - type: object - properties: - id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ListId - type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ListType - required: - - id - - type - operator: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - list + fleet_server_host_id: + nullable: true type: string - required: - - type - - field - - list - - operator - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatch: - type: object - properties: - field: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - operator: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - match + force: + description: Force agent policy creation even if packages are not verified. + type: boolean + inactivity_timeout: + type: integer + is_protected: + type: boolean + monitoring_enabled: + items: + enum: + - metrics + - logs + type: string + type: array + monitoring_output_id: + nullable: true type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - required: - - type - - field - - value - - operator - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatchAny: - type: object - properties: - field: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - operator: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - match_any + name: type: string - value: + namespace: + type: string + unenroll_timeout: + type: integer + required: + - name + - namespace + Fleet_agent_status: + enum: + - offline + - error + - online + - inactive + - warning + title: Elastic Agent status + type: string + Fleet_agent_type: + enum: + - PERMANENT + - EPHEMERAL + - TEMPORARY + title: Agent type + type: string + Fleet_bulk_install_packages_response: + title: Bulk install packages response + type: object + properties: + items: items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - minItems: 1 + type: object + properties: + name: + type: string + version: + type: string + type: array + response: + deprecated: true + items: + type: object + properties: + name: + type: string + version: + type: string type: array required: - - type - - field - - value - - operator - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatchWildcard: + - items + Fleet_bulk_upgrade_agents: + title: Bulk upgrade agents type: object properties: - field: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - operator: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - wildcard + agents: + oneOf: + - description: 'KQL query string, leave empty to action all agents' + type: string + - description: list of agent IDs + items: + type: string + type: array + force: + description: 'Force upgrade, skipping validation (should be used with caution)' + type: boolean + rollout_duration_seconds: + description: rolling upgrade window duration in seconds + type: number + skipRateLimitCheck: + description: Skip rate limit check for upgrade + type: boolean + source_uri: + description: alternative upgrade binary download url + type: string + start_time: + description: start time of upgrade in ISO 8601 format + type: string + version: + description: version to upgrade to type: string - value: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString required: - - type - - field - - value - - operator - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryNested: + - agents + - version + Fleet_data_stream: + title: Data stream type: object properties: - entries: + dashboard: items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryNestedEntryItem - minItems: 1 + type: object + properties: + id: + type: string + title: + type: string type: array - field: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString + dataset: + type: string + index: + type: string + last_activity_ms: + type: number + namespace: + type: string + package: + type: string + package_version: + type: string + size_in_bytes: + type: number + size_in_bytes_formatted: + type: string type: - enum: - - nested type: string - required: - - type - - field - - entries - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryNestedEntryItem: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatch - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryMatchAny - - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryExists - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemEntryOperator: - enum: - - excluded - - included - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemHumanId: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemId: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemMeta: - additionalProperties: true - type: object - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemName: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemOsTypeArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListOsType - type: array - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemTags: - items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - type: array - Security_Solution_Endpoint_Exceptions_API_ExceptionListItemType: - enum: - - simple - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListMeta: - additionalProperties: true + Fleet_download_sources: + title: Download Source type: object - Security_Solution_Endpoint_Exceptions_API_ExceptionListName: - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListOsType: - enum: - - linux - - macos - - windows - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListOsTypeArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_ExceptionListOsType - type: array - Security_Solution_Endpoint_Exceptions_API_ExceptionListTags: - items: - type: string - type: array - Security_Solution_Endpoint_Exceptions_API_ExceptionListType: - enum: - - detection - - rule_default - - endpoint - - endpoint_trusted_apps - - endpoint_events - - endpoint_host_isolation_exceptions - - endpoint_blocklists - type: string - Security_Solution_Endpoint_Exceptions_API_ExceptionListVersion: - minimum: 1 - type: integer - Security_Solution_Endpoint_Exceptions_API_ExceptionNamespaceType: - description: > - Determines whether the exception container is available in all Kibana - spaces or just the space - - in which it is created, where: - - - - `single`: Only available in the Kibana space in which it is created. - - - `agnostic`: Available in all Kibana spaces. - enum: - - agnostic - - single - type: string - Security_Solution_Endpoint_Exceptions_API_FindEndpointListItemsFilter: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - Security_Solution_Endpoint_Exceptions_API_ListId: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Exceptions_API_NonEmptyString - Security_Solution_Endpoint_Exceptions_API_ListType: + properties: + host: + type: string + id: + type: string + is_default: + type: boolean + name: + type: string + proxy_id: + description: >- + The ID of the proxy to use for this download source. See the proxies + API for more information. + nullable: true + type: string + required: + - is_default + - name + - host + Fleet_elasticsearch_asset_type: enum: - - binary - - boolean - - byte - - date - - date_nanos - - date_range - - double - - double_range - - float - - float_range - - geo_point - - geo_shape - - half_float - - integer - - integer_range - - ip - - ip_range - - keyword - - long - - long_range - - shape - - short - - text - type: string - Security_Solution_Endpoint_Exceptions_API_NonEmptyString: - description: A string that is not empty and does not contain only whitespace - minLength: 1 - pattern: ^(?! *$).+$ + - component_template + - ingest_pipeline + - index_template + - ilm_policy + - transform + - data_stream_ilm_policy + title: Elasticsearch asset type type: string - Security_Solution_Endpoint_Exceptions_API_PlatformErrorResponse: + Fleet_enrollment_api_key: + title: Enrollment API key type: object properties: - error: + active: + type: boolean + api_key: type: string - message: + api_key_id: + type: string + created_at: + type: string + id: + type: string + name: + type: string + policy_id: type: string - statusCode: - type: integer required: - - statusCode - - error - - message - Security_Solution_Endpoint_Exceptions_API_SiemErrorResponse: + - id + - api_key_id + - api_key + - active + - created_at + Fleet_fleet_server_host: + title: Fleet Server Host type: object properties: - message: + host_urls: + items: + type: string + type: array + id: + type: string + is_default: + type: boolean + is_internal: + type: boolean + is_preconfigured: + type: boolean + name: + type: string + proxy_id: type: string - status_code: - type: integer required: - - status_code - - message - Security_Solution_Endpoint_Management_API_ActionLogRequestQuery: - type: object - properties: - end_date: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndDate - page: - $ref: '#/components/schemas/Security_Solution_Endpoint_Management_API_Page' - page_size: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PageSize - start_date: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_StartDate - Security_Solution_Endpoint_Management_API_ActionStateSuccessResponse: + - fleet_server_hosts + - id + - is_default + - is_preconfigured + - host_urls + Fleet_fleet_settings_enrollment_response: + title: Fleet settings response type: object properties: - body: + download_source: + $ref: '#/components/schemas/Fleet_download_sources' + fleet_server: type: object properties: - data: - type: object - properties: - canEncrypt: - type: boolean + has_active: + type: boolean + host: + $ref: '#/components/schemas/Fleet_fleet_server_host' + host_proxy: + $ref: '#/components/schemas/Fleet_proxies' + policies: + items: + type: object + properties: + download_source_id: + type: string + fleet_server_host_id: + type: string + has_fleet_server: + type: boolean + id: + type: string + is_default_fleet_server: + type: boolean + is_managed: + type: boolean + name: + type: string + required: + - id + - name + - is_managed + type: array required: - - data + - agent_policies + - has_active required: - - body - Security_Solution_Endpoint_Management_API_ActionStatusSuccessResponse: + - fleet_server + Fleet_fleet_settings_response: + title: Fleet settings response type: object properties: - body: - type: object - properties: - data: - type: object - properties: - agent_id: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentId - pending_actions: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionsSchema - required: - - agent_id - - pending_actions - required: - - data + item: + $ref: '#/components/schemas/Fleet_settings' required: - - body - Security_Solution_Endpoint_Management_API_AgentId: - description: Agent ID - type: string - Security_Solution_Endpoint_Management_API_AgentIds: - minLength: 1 - oneOf: - - items: - minLength: 1 - type: string - maxItems: 50 - minItems: 1 - type: array - - minLength: 1 - type: string - Security_Solution_Endpoint_Management_API_AgentTypes: - enum: - - endpoint - - sentinel_one - - crowdstrike - type: string - Security_Solution_Endpoint_Management_API_AlertIds: - description: A list of alerts ids. - items: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_NonEmptyString - minItems: 1 - type: array - Security_Solution_Endpoint_Management_API_CaseIds: - description: Case IDs to be updated (cannot contain empty strings) - items: - minLength: 1 - type: string - minItems: 1 - type: array - Security_Solution_Endpoint_Management_API_Command: - description: The command to be executed (cannot be an empty string) - enum: - - isolate - - unisolate - - kill-process - - suspend-process - - running-processes - - get-file - - execute - - upload - - scan - minLength: 1 - type: string - Security_Solution_Endpoint_Management_API_Commands: - items: - $ref: '#/components/schemas/Security_Solution_Endpoint_Management_API_Command' - type: array - Security_Solution_Endpoint_Management_API_Comment: - description: Optional comment - type: string - Security_Solution_Endpoint_Management_API_EndDate: - description: End date - type: string - Security_Solution_Endpoint_Management_API_EndpointIds: - description: List of endpoint IDs (cannot contain empty strings) - items: - minLength: 1 - type: string - minItems: 1 - type: array - Security_Solution_Endpoint_Management_API_ExecuteRouteRequestBody: - allOf: - - type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids - - type: object - properties: - parameters: - type: object - properties: - command: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Command - timeout: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Timeout - required: - - command - required: - - parameters - Security_Solution_Endpoint_Management_API_GetEndpointActionListRouteQuery: + - item + Fleet_fleet_setup_response: + title: Fleet Setup response type: object properties: - agentIds: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentIds - agentTypes: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - commands: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Commands - endDate: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndDate - page: - $ref: '#/components/schemas/Security_Solution_Endpoint_Management_API_Page' - pageSize: - default: 10 - description: Number of items per page - maximum: 10000 - minimum: 1 - type: integer - startDate: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_StartDate - types: - $ref: '#/components/schemas/Security_Solution_Endpoint_Management_API_Types' - userIds: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_UserIds - withOutputs: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_WithOutputs - Security_Solution_Endpoint_Management_API_GetFileRouteRequestBody: - allOf: - - type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids - - type: object - properties: - parameters: - type: object - properties: - path: - type: string - required: - - path - required: - - parameters - Security_Solution_Endpoint_Management_API_GetProcessesRouteRequestBody: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_NoParametersRequestSchema - Security_Solution_Endpoint_Management_API_IsolateRouteRequestBody: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_NoParametersRequestSchema - Security_Solution_Endpoint_Management_API_KillOrSuspendActionSchema: - allOf: - - type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids - - type: object - properties: - parameters: - oneOf: - - type: object - properties: - pid: - minimum: 1 - type: integer - - type: object - properties: - entity_id: - minLength: 1 - type: string - required: - - parameters - Security_Solution_Endpoint_Management_API_ListRequestQuery: + isInitialized: + type: boolean + nonFatalErrors: + items: + type: object + properties: + message: + type: string + name: + type: string + required: + - name + - message + type: array + required: + - isInitialized + - nonFatalErrors + Fleet_fleet_status_response: + title: Fleet status response type: object properties: - hostStatuses: + isReady: + type: boolean + missing_optional_features: items: enum: - - healthy - - offline - - updating - - inactive - - unenrolled + - encrypted_saved_object_encryption_key_required type: string type: array - kuery: - nullable: true - type: string - page: - default: 0 - description: Page number - minimum: 0 - type: integer - pageSize: - default: 10 - description: Number of items per page - maximum: 10000 - minimum: 1 - type: integer - sortDirection: - enum: - - asc - - desc - nullable: true - type: string - sortField: - enum: - - enrolled_at - - metadata.host.hostname - - host_status - - metadata.Endpoint.policy.applied.name - - metadata.Endpoint.policy.applied.status - - metadata.host.os.name - - metadata.host.ip - - metadata.agent.version - - last_checkin + missing_requirements: + items: + enum: + - tls_required + - api_keys + - fleet_admin_user + - fleet_server + type: string + type: array + package_verification_key_id: type: string required: - - hostStatuses - Security_Solution_Endpoint_Management_API_NonEmptyString: - description: A string that is not empty and does not contain only whitespace - minLength: 1 - pattern: ^(?! *$).+$ - type: string - Security_Solution_Endpoint_Management_API_NoParametersRequestSchema: + - isReady + - missing_requirements + - missing_optional_features + Fleet_full_agent_policy: + title: Full agent policy type: object properties: - body: + agent: + nullable: true + type: string + fleet: + oneOf: + - type: object + properties: + hosts: + items: + type: string + type: array + proxy_headers: {} + proxy_url: + type: string + ssl: + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string + renegotiation: + type: string + verification_mode: + type: string + - type: object + properties: + kibana: + type: object + properties: + hosts: + items: + type: string + type: array + path: + type: string + protocol: + type: string + id: + type: string + inputs: + type: string + output_permissions: + additionalProperties: + type: object + properties: + data: + $ref: >- + #/components/schemas/Fleet_full_agent_policy_output_permissions + output: + type: integer type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids + outputs: + additionalProperties: + $ref: '#/components/schemas/Fleet_full_agent_policy_output' + type: object + revision: + type: number + secret_references: + items: + type: object + properties: + id: + type: string + type: array required: - - body - Security_Solution_Endpoint_Management_API_Page: - default: 1 - description: Page number - minimum: 1 - type: integer - Security_Solution_Endpoint_Management_API_PageSize: - default: 10 - description: Number of items per page - maximum: 100 - minimum: 1 - type: integer - Security_Solution_Endpoint_Management_API_Parameters: - description: Optional parameters object - type: object - Security_Solution_Endpoint_Management_API_PendingActionDataType: - type: integer - Security_Solution_Endpoint_Management_API_PendingActionsSchema: - oneOf: - - type: object - properties: - execute: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - get-file: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - isolate: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - kill-process: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - running-processes: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - scan: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - suspend-process: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - unisolate: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType - upload: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_PendingActionDataType + - id + - outputs + - inputs + Fleet_full_agent_policy_input: + allOf: - additionalProperties: true type: object - Security_Solution_Endpoint_Management_API_ProtectionUpdatesNoteResponse: - type: object - properties: - note: - type: string - Security_Solution_Endpoint_Management_API_ScanRouteRequestBody: - allOf: - - type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids - - type: object properties: - parameters: + data_stream: type: object properties: - path: + namespace: type: string required: - - path + - namespace + id: + type: string + meta: + additionalProperties: true + type: object + properties: + package: + type: object + properties: + name: + type: string + version: + type: string + required: + - name + - version + name: + type: string + revision: + type: number + streams: + $ref: '#/components/schemas/Fleet_full_agent_policy_input_stream' + type: + type: string + use_output: + type: string required: - - parameters - Security_Solution_Endpoint_Management_API_StartDate: - description: Start date - type: string - Security_Solution_Endpoint_Management_API_SuccessResponse: - type: object - properties: {} - Security_Solution_Endpoint_Management_API_Timeout: - description: The maximum timeout value in milliseconds (optional) - minimum: 1 - type: integer - Security_Solution_Endpoint_Management_API_Type: - description: Type of response action - enum: - - automated - - manual - type: string - Security_Solution_Endpoint_Management_API_Types: - description: List of types of response actions - items: - $ref: '#/components/schemas/Security_Solution_Endpoint_Management_API_Type' - maxLength: 2 - minLength: 1 - type: array - Security_Solution_Endpoint_Management_API_UnisolateRouteRequestBody: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_NoParametersRequestSchema - Security_Solution_Endpoint_Management_API_UploadRouteRequestBody: + - id + - name + - revision + - type + - data_stream + - use_output + title: Full agent policy input + Fleet_full_agent_policy_input_stream: allOf: - - type: object - properties: - agent_type: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AgentTypes - alert_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_AlertIds - case_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_CaseIds - comment: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Comment - endpoint_ids: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_EndpointIds - parameters: - $ref: >- - #/components/schemas/Security_Solution_Endpoint_Management_API_Parameters - required: - - endpoint_ids - - type: object + - additionalProperties: true + type: object properties: - file: - format: binary - type: string - parameters: + data_stream: type: object properties: - overwrite: - default: false - type: boolean + dataset: + type: string + type: + type: string + required: + - dataset + - type + id: + type: string required: - - parameters - - file - Security_Solution_Endpoint_Management_API_UserIds: - description: User IDs - oneOf: - - items: - minLength: 1 - type: string - minItems: 1 - type: array - - minLength: 1 + - id + - data_stream + title: Full agent policy input stream + Fleet_full_agent_policy_output: + title: Full agent policy + type: object + properties: + additionalProperties: + type: object + properties: + text: {} + ca_sha256: + nullable: true type: string - Security_Solution_Endpoint_Management_API_WithOutputs: - description: Shows detailed outputs for an action response - oneOf: - - items: - minLength: 1 + hosts: + items: type: string - minItems: 1 type: array - - minLength: 1 + proxy_headers: {} + proxy_url: type: string - Security_Solution_Entity_Analytics_API_AssetCriticalityBulkUploadErrorItem: + type: {} + required: + - type + - hosts + - ca_sha256 + Fleet_full_agent_policy_output_permissions: + additionalProperties: + type: object + properties: + data: + type: object + properties: + cluster: + items: + type: string + type: array + indices: + items: + type: object + properties: + names: + items: + type: string + type: array + privileges: + items: + type: string + type: array + type: array + packagePolicyName: + type: string + title: Full agent policy output permissions + Fleet_get_agent_tags_response: + title: Get Agent Tags response type: object properties: - index: - type: integer - message: - type: string - required: - - message - - index - Security_Solution_Entity_Analytics_API_AssetCriticalityBulkUploadStats: + items: + items: + type: string + type: array + Fleet_get_agents_response: + title: Get Agent response type: object properties: - failed: - type: integer - successful: - type: integer + items: + items: + $ref: '#/components/schemas/Fleet_agent' + type: array + list: + deprecated: true + items: + $ref: '#/components/schemas/Fleet_agent' + type: array + page: + type: number + perPage: + type: number + statusSummary: + type: object + properties: + degraded': + type: number + enrolling: + type: number + error: + type: number + inactive: + type: number + offline: + type: number + online: + type: number + unenrolled: + type: number + unenrolling: + type: number + updating: + type: number total: - type: integer + type: number required: - - successful - - failed + - items - total - Security_Solution_Entity_Analytics_API_AssetCriticalityLevel: - description: The criticality level of the asset. - enum: - - low_impact - - medium_impact - - high_impact - - extreme_impact - type: string - Security_Solution_Entity_Analytics_API_AssetCriticalityRecord: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_CreateAssetCriticalityRecord - - type: object - properties: - '@timestamp': - description: The time the record was created or updated. - example: '2017-07-21T17:32:28Z' - format: date-time - type: string - required: - - '@timestamp' - Security_Solution_Entity_Analytics_API_AssetCriticalityRecordIdParts: - type: object + - page + - perPage + Fleet_get_bulk_assets_response: + deprecated: true properties: - id_field: - $ref: '#/components/schemas/Security_Solution_Entity_Analytics_API_IdField' - description: The field representing the ID. - example: host.name - id_value: - description: The ID value of the asset. - type: string + items: + items: + type: object + properties: + appLink: + type: string + attributes: + type: object + properties: + description: + type: string + title: + type: string + id: + type: string + type: + $ref: '#/components/schemas/Fleet_saved_object_type' + updatedAt: + type: string + type: array required: - - id_value - - id_field - Security_Solution_Entity_Analytics_API_CreateAssetCriticalityRecord: - allOf: - - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityRecordIdParts - - type: object - properties: - criticality_level: - $ref: >- - #/components/schemas/Security_Solution_Entity_Analytics_API_AssetCriticalityLevel - required: - - criticality_level - Security_Solution_Entity_Analytics_API_IdField: - enum: - - host.name - - user.name - type: string - Security_Solution_Exceptions_API_CreateExceptionListItemComment: + - items + title: Bulk get assets response type: object - properties: - comment: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - required: - - comment - Security_Solution_Exceptions_API_CreateExceptionListItemCommentArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_CreateExceptionListItemComment - type: array - Security_Solution_Exceptions_API_CreateRuleExceptionListItemComment: + Fleet_get_categories_response: + title: Get categories response type: object properties: - comment: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' + items: + items: + type: object + properties: + count: + type: number + id: + type: string + title: + type: string + required: + - id + - title + - count + type: array + response: + items: + deprecated: true + type: object + properties: + count: + type: number + id: + type: string + title: + type: string + required: + - id + - title + - count + type: array required: - - comment - Security_Solution_Exceptions_API_CreateRuleExceptionListItemCommentArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_CreateRuleExceptionListItemComment - type: array - Security_Solution_Exceptions_API_CreateRuleExceptionListItemProps: + - items + Fleet_get_packages_response: + title: Get Packages response type: object properties: - comments: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_CreateRuleExceptionListItemCommentArray - default: [] - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryArray - expire_time: - format: date-time - type: string - item_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemMeta - name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - default: single - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemOsTypeArray - default: [] - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemTags - default: [] - type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemType + items: + items: + $ref: '#/components/schemas/Fleet_search_result' + type: array + response: + deprecated: true + items: + $ref: '#/components/schemas/Fleet_search_result' + type: array required: - - type - - name - - description - - entries - Security_Solution_Exceptions_API_ExceptionList: + - items + Fleet_installation_info: + title: Installation info object type: object properties: - _version: - type: string created_at: - format: date-time type: string - created_by: + experimental_data_stream_features: + type: array + properties: + data_stream: + type: string + features: + type: object + properties: + doc_value_only_numeric: + nullable: true + type: boolean + doc_value_only_other: + nullable: true + type: boolean + synthetic_source: + nullable: true + type: boolean + tsdb: + nullable: true + type: boolean + install_format_schema_version: type: string - description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListDescription - id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - immutable: - type: boolean - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListMeta + install_kibana_space_id: + type: string + install_source: + enum: + - registry + - upload + - bundled + type: string + install_status: + enum: + - installed + - installing + - install_failed + type: string + installed_es: + type: object + properties: + deferred: + type: boolean + id: + type: string + type: + $ref: '#/components/schemas/Fleet_elasticsearch_asset_type' + installed_kibana: + type: object + properties: + id: + type: string + type: + $ref: '#/components/schemas/Fleet_kibana_saved_object_type' + latest_executed_state: + description: Latest successfully executed state in package install state machine + type: object + properties: + error: + type: string + name: + enum: + - create_restart_installation + - install_kibana_assets + - install_ilm_policies + - install_ml_model + - install_index_template_pipelines + - remove_legacy_templates + - update_current_write_indices + - install_transforms + - delete_previous_pipelines + - save_archive_entries_from_assets_map + - update_so + type: string + started_at: + type: string + latest_install_failed_attempts: + description: Latest failed install errors + items: + type: object + properties: + created_at: + type: string + error: + type: object + properties: + message: + type: string + name: + type: string + stack: + type: string + target_version: + type: string + type: array name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListOsTypeArray - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListTags - tie_breaker_id: type: string + namespaces: + items: + type: string + type: array type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListType + type: string updated_at: - format: date-time type: string - updated_by: + verification_key_id: + nullable: true + type: string + verification_status: + enum: + - verified + - unverified + - unknown type: string version: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListVersion + type: string required: - - id - - list_id - - type + - installed_kibana + - installed_es - name - - description - - immutable - - namespace_type - version - - tie_breaker_id - - created_at - - created_by - - updated_at - - updated_by - Security_Solution_Exceptions_API_ExceptionListDescription: + - install_status + - install_version + - install_started_at + - install_source + - verification_status + - latest_install_failed_attempts + Fleet_kibana_saved_object_type: + enum: + - dashboard + - visualization + - search + - index-pattern + - map + - lens + - ml-module + - security-rule + - csp_rule_template + title: Kibana saved object asset type type: string - Security_Solution_Exceptions_API_ExceptionListHumanId: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - description: 'Human readable string identifier, e.g. `trusted-linux-processes`' - Security_Solution_Exceptions_API_ExceptionListId: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - Security_Solution_Exceptions_API_ExceptionListItem: - type: object + Fleet_new_package_policy: + description: '' properties: - _version: - type: string - comments: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemCommentArray - created_at: - format: date-time - type: string - created_by: - type: string description: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemDescription - entries: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryArray - expire_time: - format: date-time type: string - id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemId - item_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - meta: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemMeta + enabled: + type: boolean + inputs: + items: + type: object + properties: + config: + type: object + enabled: + type: boolean + processors: + items: + type: string + type: array + streams: + items: {} + type: array + type: + type: string + vars: + type: object + required: + - type + - enabled + type: array name: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemName - namespace_type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionNamespaceType - os_types: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemOsTypeArray - tags: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemTags - tie_breaker_id: type: string - type: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemType - updated_at: - format: date-time + namespace: type: string - updated_by: + output_id: type: string + overrides: + type: object + package: + type: object + properties: + name: + type: string + requires_root: + type: boolean + title: + type: string + version: + type: string + required: + - name + - version + policy_id: + deprecated: true + type: string + policy_ids: + items: + type: string + type: array required: - - id - - item_id - - list_id - - type + - inputs - name - - description - - entries - - namespace_type - - comments - - tie_breaker_id - - created_at - - created_by - - updated_at - - updated_by - Security_Solution_Exceptions_API_ExceptionListItemComment: + title: New package policy type: object - properties: - comment: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - created_at: - format: date-time - type: string - created_by: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - id: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - updated_at: - format: date-time - type: string - updated_by: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - required: - - id - - comment - - created_at - - created_by - Security_Solution_Exceptions_API_ExceptionListItemCommentArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemComment - type: array - Security_Solution_Exceptions_API_ExceptionListItemDescription: - type: string - Security_Solution_Exceptions_API_ExceptionListItemEntry: - anyOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryMatch - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryMatchAny - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryList - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryExists - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryNested - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryMatchWildcard + Fleet_output_create_request: discriminator: + mapping: + elasticsearch: '#/components/schemas/Fleet_output_create_request_elasticsearch' + kafka: '#/components/schemas/Fleet_output_create_request_kafka' + logstash: '#/components/schemas/Fleet_output_create_request_logstash' + remote_elasticsearch: >- + #/components/schemas/Fleet_output_create_request_remote_elasticsearch propertyName: type - Security_Solution_Exceptions_API_ExceptionListItemEntryArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntry - type: array - Security_Solution_Exceptions_API_ExceptionListItemEntryExists: + oneOf: + - $ref: '#/components/schemas/Fleet_output_create_request_elasticsearch' + - $ref: '#/components/schemas/Fleet_output_create_request_kafka' + - $ref: '#/components/schemas/Fleet_output_create_request_logstash' + - $ref: >- + #/components/schemas/Fleet_output_create_request_remote_elasticsearch + title: Output + Fleet_output_create_request_elasticsearch: + title: elasticsearch type: object properties: - field: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - operator: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryOperator - type: + ca_sha256: + type: string + ca_trusted_fingerprint: + type: string + config: + type: object + config_yaml: + type: string + hosts: + items: + type: string + type: array + id: + type: string + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: + type: boolean + name: + type: string + preset: enum: - - exists + - balanced + - custom + - throughput + - scale + - latency type: string - required: - - type - - field - - operator - Security_Solution_Exceptions_API_ExceptionListItemEntryList: - type: object - properties: - field: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - list: + proxy_id: + type: string + shipper: type: object properties: - id: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_ListId' - type: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_ListType' - required: - - id - - type - operator: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryOperator + compression_level: + type: number + disk_queue_compression_enabled: + type: boolean + disk_queue_enabled: + type: boolean + disk_queue_encryption_enabled: + type: boolean + disk_queue_max_size: + type: number + disk_queue_path: + type: string + loadbalance: + type: boolean + ssl: + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string type: enum: - - list + - elasticsearch type: string required: - - type - - field - - list - - operator - Security_Solution_Exceptions_API_ExceptionListItemEntryMatch: + - name + Fleet_output_create_request_kafka: + title: kafka type: object properties: - field: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - operator: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - match + auth_type: type: string - value: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - required: - - type - - field - - value - - operator - Security_Solution_Exceptions_API_ExceptionListItemEntryMatchAny: - type: object - properties: - field: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - operator: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryOperator - type: + broker_timeout: + type: number + ca_sha256: + type: string + ca_trusted_fingerprint: + type: string + client_id: + type: string + compression: + type: string + compression_level: + type: number + config: + type: object + config_yaml: + type: string + connection_type: enum: - - match_any + - plaintext + - encryption type: string - value: + headers: items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_NonEmptyString - minItems: 1 + type: object + properties: + key: + type: string + value: + type: string type: array - required: - - type - - field - - value - - operator - Security_Solution_Exceptions_API_ExceptionListItemEntryMatchWildcard: - type: object - properties: - field: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - operator: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryOperator - type: - enum: - - wildcard + hosts: + items: + type: string + type: array + id: type: string - value: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - required: - - type - - field - - value - - operator - Security_Solution_Exceptions_API_ExceptionListItemEntryNested: - type: object - properties: - entries: + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: + type: boolean + key: + type: string + name: + type: string + partition: + type: string + password: + type: string + proxy_id: + type: string + random: + type: object + properties: + group_events: + type: number + required_acks: + type: number + round_robin: + type: object + properties: + group_events: + type: number + sasl: + type: object + properties: + mechanism: + type: string + secrets: + type: object + properties: + password: + type: string + ssl: + type: object + properties: + key: + type: string + shipper: + type: object + properties: + compression_level: + type: number + disk_queue_compression_enabled: + type: boolean + disk_queue_enabled: + type: boolean + disk_queue_encryption_enabled: + type: boolean + disk_queue_max_size: + type: number + disk_queue_path: + type: string + loadbalance: + type: boolean + ssl: + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string + verification_mode: + enum: + - none + - full + - certificate + - strict + type: string + timeout: + type: number + topic: + type: string + topics: + deprecated: true + description: Use topic instead. items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryNestedEntryItem - minItems: 1 + type: object + properties: + topic: + type: string + when: + deprecated: true + description: >- + Deprecated, kafka output do not support conditionnal topics + anymore. + type: object + properties: + condition: + type: string + type: + type: string type: array - field: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' type: enum: - - nested + - kafka + type: string + username: + type: string + version: type: string required: + - name - type - - field - - entries - Security_Solution_Exceptions_API_ExceptionListItemEntryNestedEntryItem: - oneOf: - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryMatch - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryMatchAny - - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemEntryExists - Security_Solution_Exceptions_API_ExceptionListItemEntryOperator: - enum: - - excluded - - included - type: string - Security_Solution_Exceptions_API_ExceptionListItemHumanId: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - Security_Solution_Exceptions_API_ExceptionListItemId: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - Security_Solution_Exceptions_API_ExceptionListItemMeta: - additionalProperties: true - type: object - Security_Solution_Exceptions_API_ExceptionListItemName: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - Security_Solution_Exceptions_API_ExceptionListItemOsTypeArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListOsType - type: array - Security_Solution_Exceptions_API_ExceptionListItemTags: - items: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - type: array - Security_Solution_Exceptions_API_ExceptionListItemType: - enum: - - simple - type: string - Security_Solution_Exceptions_API_ExceptionListMeta: - additionalProperties: true - type: object - Security_Solution_Exceptions_API_ExceptionListName: - type: string - Security_Solution_Exceptions_API_ExceptionListOsType: - enum: - - linux - - macos - - windows - type: string - Security_Solution_Exceptions_API_ExceptionListOsTypeArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListOsType - type: array - Security_Solution_Exceptions_API_ExceptionListsImportBulkError: + - topics + - auth_type + - hosts + Fleet_output_create_request_logstash: + title: logstash type: object properties: - error: + ca_sha256: + type: string + ca_trusted_fingerprint: + type: string + config: type: object - properties: - message: - type: string - status_code: - type: integer - required: - - status_code - - message + config_yaml: + type: string + hosts: + items: + type: string + type: array id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListId - item_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListItemHumanId - list_id: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListHumanId - required: - - error - Security_Solution_Exceptions_API_ExceptionListsImportBulkErrorArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_ExceptionListsImportBulkError - type: array - Security_Solution_Exceptions_API_ExceptionListTags: - items: - type: string - type: array - Security_Solution_Exceptions_API_ExceptionListType: - enum: - - detection - - rule_default - - endpoint - - endpoint_trusted_apps - - endpoint_events - - endpoint_host_isolation_exceptions - - endpoint_blocklists - type: string - Security_Solution_Exceptions_API_ExceptionListVersion: - minimum: 1 - type: integer - Security_Solution_Exceptions_API_ExceptionNamespaceType: - description: > - Determines whether the exception container is available in all Kibana - spaces or just the space - - in which it is created, where: - - - - `single`: Only available in the Kibana space in which it is created. - - - `agnostic`: Available in all Kibana spaces. - enum: - - agnostic - - single - type: string - Security_Solution_Exceptions_API_FindExceptionListItemsFilter: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - Security_Solution_Exceptions_API_FindExceptionListsFilter: - type: string - Security_Solution_Exceptions_API_ListId: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - Security_Solution_Exceptions_API_ListType: - enum: - - binary - - boolean - - byte - - date - - date_nanos - - date_range - - double - - double_range - - float - - float_range - - geo_point - - geo_shape - - half_float - - integer - - integer_range - - ip - - ip_range - - keyword - - long - - long_range - - shape - - short - - text - type: string - Security_Solution_Exceptions_API_NonEmptyString: - description: A string that is not empty and does not contain only whitespace - minLength: 1 - pattern: ^(?! *$).+$ - type: string - Security_Solution_Exceptions_API_PlatformErrorResponse: - type: object - properties: - error: type: string - message: + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: + type: boolean + name: type: string - statusCode: - type: integer - required: - - statusCode - - error - - message - Security_Solution_Exceptions_API_RuleId: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_UUID' - Security_Solution_Exceptions_API_SiemErrorResponse: - type: object - properties: - message: + proxy_id: + type: string + secrets: + type: object + properties: + ssl: + type: object + properties: + key: + type: string + shipper: + type: object + properties: + compression_level: + type: number + disk_queue_compression_enabled: + type: boolean + disk_queue_enabled: + type: boolean + disk_queue_encryption_enabled: + type: boolean + disk_queue_max_size: + type: number + disk_queue_path: + type: string + loadbalance: + type: boolean + ssl: + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string + type: + enum: + - logstash type: string - status_code: - type: integer required: - - status_code - - message - Security_Solution_Exceptions_API_UpdateExceptionListItemComment: + - name + - hosts + - type + Fleet_output_create_request_remote_elasticsearch: + title: remote_elasticsearch type: object properties: - comment: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' + hosts: + items: + type: string + type: array id: - $ref: '#/components/schemas/Security_Solution_Exceptions_API_NonEmptyString' - required: - - comment - Security_Solution_Exceptions_API_UpdateExceptionListItemCommentArray: - items: - $ref: >- - #/components/schemas/Security_Solution_Exceptions_API_UpdateExceptionListItemComment - type: array - Security_Solution_Exceptions_API_UUID: - description: A universally unique identifier - format: uuid - type: string - Security_Solution_Lists_API_FindListItemsCursor: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_FindListItemsFilter: - type: string - Security_Solution_Lists_API_FindListsCursor: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_FindListsFilter: - type: string - Security_Solution_Lists_API_List: - type: object - properties: - _version: type: string - '@timestamp': - format: date-time + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: + type: boolean + name: + type: string + secrets: + type: object + properties: + service_token: + type: string + service_token: + type: string + type: + enum: + - remote_elasticsearch type: string - created_at: - format: date-time + required: + - name + Fleet_output_update_request: + discriminator: + mapping: + elasticsearch: '#/components/schemas/Fleet_output_update_request_elasticsearch' + kafka: '#/components/schemas/Fleet_output_update_request_kafka' + logstash: '#/components/schemas/Fleet_output_update_request_logstash' + propertyName: type + oneOf: + - $ref: '#/components/schemas/Fleet_output_update_request_elasticsearch' + - $ref: '#/components/schemas/Fleet_output_update_request_kafka' + - $ref: '#/components/schemas/Fleet_output_update_request_logstash' + title: Output + Fleet_output_update_request_elasticsearch: + title: elasticsearch + type: object + properties: + ca_sha256: type: string - created_by: + ca_trusted_fingerprint: type: string - description: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListDescription' - deserializer: + config: + type: object + config_yaml: type: string + hosts: + items: + type: string + type: array id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - immutable: + type: string + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: type: boolean - meta: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListMetadata' name: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListName' - serializer: type: string - tie_breaker_id: + preset: + enum: + - balanced + - custom + - throughput + - scale + - latency type: string - type: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListType' - updated_at: - format: date-time + proxy_id: type: string - updated_by: + shipper: + type: object + properties: + compression_level: + type: number + disk_queue_compression_enabled: + type: boolean + disk_queue_enabled: + type: boolean + disk_queue_encryption_enabled: + type: boolean + disk_queue_max_size: + type: number + disk_queue_path: + type: string + loadbalance: + type: boolean + ssl: + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string + type: + enum: + - elasticsearch type: string - version: - minimum: 1 - type: integer required: - - id - - type - name - - description - - immutable - - version - - tie_breaker_id - - created_at - - created_by - - updated_at - - updated_by - Security_Solution_Lists_API_ListDescription: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_ListId: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_ListItem: + - hosts + - type + Fleet_output_update_request_kafka: + title: kafka type: object properties: - _version: + auth_type: type: string - '@timestamp': - format: date-time + broker_timeout: + type: number + ca_sha256: type: string - created_at: - format: date-time + ca_trusted_fingerprint: type: string - created_by: + client_id: + type: string + compression: + type: string + compression_level: + type: number + config: + type: object + config_yaml: type: string - deserializer: + connection_type: + enum: + - plaintext + - encryption type: string + headers: + items: + type: object + properties: + key: + type: string + value: + type: string + type: array + hosts: + items: + type: string + type: array id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItemId' - list_id: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListId' - meta: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItemMetadata' - serializer: type: string - tie_breaker_id: + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: + type: boolean + key: type: string - type: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListType' - updated_at: - format: date-time + name: type: string - updated_by: + partition: type: string - value: - $ref: '#/components/schemas/Security_Solution_Lists_API_ListItemValue' - required: - - id - - type - - list_id - - value - - tie_breaker_id - - created_at - - created_by - - updated_at - - updated_by - Security_Solution_Lists_API_ListItemId: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_ListItemMetadata: - additionalProperties: true - type: object - Security_Solution_Lists_API_ListItemPrivileges: - type: object - properties: - application: - additionalProperties: - type: boolean - type: object - cluster: - additionalProperties: - type: boolean + password: + type: string + proxy_id: + type: string + random: type: object - has_all_requested: - type: boolean - index: - additionalProperties: - additionalProperties: - type: boolean - type: object + properties: + group_events: + type: number + required_acks: + type: number + round_robin: type: object - username: - type: string - required: - - username - - has_all_requested - - cluster - - index - - application - Security_Solution_Lists_API_ListItemValue: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_ListMetadata: - additionalProperties: true - type: object - Security_Solution_Lists_API_ListName: - $ref: '#/components/schemas/Security_Solution_Lists_API_NonEmptyString' - Security_Solution_Lists_API_ListPrivileges: - type: object - properties: - application: - additionalProperties: - type: boolean + properties: + group_events: + type: number + sasl: type: object - cluster: - additionalProperties: - type: boolean + properties: + mechanism: + type: string + shipper: type: object - has_all_requested: - type: boolean - index: - additionalProperties: - additionalProperties: + properties: + compression_level: + type: number + disk_queue_compression_enabled: type: boolean - type: object + disk_queue_enabled: + type: boolean + disk_queue_encryption_enabled: + type: boolean + disk_queue_max_size: + type: number + disk_queue_path: + type: string + loadbalance: + type: boolean + ssl: type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string + verification_mode: + enum: + - none + - full + - certificate + - strict + type: string + timeout: + type: number + topic: + type: string + topics: + deprecated: true + description: Use topic instead. + items: + type: object + properties: + topic: + type: string + when: + deprecated: true + description: >- + Deprecated, kafka output do not support conditionnal topics + anymore. + type: object + properties: + condition: + type: string + type: + type: string + type: array + type: + enum: + - kafka + type: string username: type: string + version: + type: string required: - - username - - has_all_requested - - cluster - - index - - application - Security_Solution_Lists_API_ListType: - enum: - - binary - - boolean - - byte - - date - - date_nanos - - date_range - - double - - double_range - - float - - float_range - - geo_point - - geo_shape - - half_float - - integer - - integer_range - - ip - - ip_range - - keyword - - long - - long_range - - shape - - short - - text - type: string - Security_Solution_Lists_API_NonEmptyString: - description: A string that is not empty and does not contain only whitespace - minLength: 1 - pattern: ^(?! *$).+$ - type: string - Security_Solution_Lists_API_PlatformErrorResponse: + - name + Fleet_output_update_request_logstash: + title: logstash type: object properties: - error: + ca_sha256: type: string - message: + ca_trusted_fingerprint: type: string - statusCode: - type: integer - required: - - statusCode - - error - - message - Security_Solution_Lists_API_SiemErrorResponse: - type: object - properties: - message: + config: + type: object + config_yaml: type: string - status_code: - type: integer - required: - - status_code - - message - Security_Solution_Osquery_API_ArrayQueries: - items: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ArrayQueriesItem' - type: array - Security_Solution_Osquery_API_ArrayQueriesItem: - type: object - properties: - ecs_mapping: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_ECSMappingOrUndefined - id: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Id' - platform: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PlatformOrUndefined - query: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Query' - removed: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_RemovedOrUndefined - snapshot: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SnapshotOrUndefined - version: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_VersionOrUndefined - Security_Solution_Osquery_API_CreateLiveQueryRequestBody: - type: object - properties: - agent_all: - type: boolean - agent_ids: + hosts: items: type: string type: array - agent_platforms: + id: + type: string + is_default: + type: boolean + is_default_monitoring: + type: boolean + is_internal: + type: boolean + name: + type: string + proxy_id: + type: string + shipper: + type: object + properties: + compression_level: + type: number + disk_queue_compression_enabled: + type: boolean + disk_queue_enabled: + type: boolean + disk_queue_encryption_enabled: + type: boolean + disk_queue_max_size: + type: number + disk_queue_path: + type: string + loadbalance: + type: boolean + ssl: + type: object + properties: + certificate: + type: string + certificate_authorities: + items: + type: string + type: array + key: + type: string + type: + enum: + - logstash + type: string + required: + - name + Fleet_package_info: + title: Package information + type: object + properties: + assets: items: type: string type: array - agent_policy_ids: + categories: items: type: string type: array - alert_ids: + conditions: + type: object + properties: + elasticsearch: + type: object + properties: + subscription: + enum: + - basic + - gold + - platinum + - enterprise + type: string + kibana: + type: object + properties: + versions: + type: string + data_streams: items: - type: string + type: object + properties: + ingeset_pipeline: + type: string + name: + type: string + package: + type: string + release: + type: string + title: + type: string + type: + type: string + vars: + items: + type: object + properties: + default: + type: string + name: + type: string + required: + - name + - default + type: array + required: + - title + - name + - release + - ingeset_pipeline + - type + - package type: array - case_ids: + description: + type: string + download: + type: string + elasticsearch: + type: object + properties: + privileges: + type: object + properties: + cluster: + items: + type: string + type: array + format_version: + type: string + icons: items: type: string type: array - ecs_mapping: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_ECSMappingOrUndefined - event_ids: + internal: + type: boolean + name: + type: string + path: + type: string + readme: + type: string + release: + deprecated: true + description: >- + release label is deprecated, derive from the version instead + (packages follow semver) + enum: + - experimental + - beta + - ga + type: string + screenshots: items: - type: string + type: object + properties: + path: + type: string + size: + type: string + src: + type: string + title: + type: string + type: + type: string + required: + - src + - path type: array - metadata: - nullable: true + source: type: object - pack_id: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackIdOrUndefined' - queries: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ArrayQueries' - query: - $ref: '#/components/schemas/Security_Solution_Osquery_API_QueryOrUndefined' - saved_query_id: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SavedQueryIdOrUndefined - Security_Solution_Osquery_API_CreatePacksRequestBody: - type: object - properties: - description: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DescriptionOrUndefined - enabled: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_EnabledOrUndefined - name: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackName' - policy_ids: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PolicyIdsOrUndefined - queries: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ObjectQueries' - shards: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Shards' - Security_Solution_Osquery_API_CreateSavedQueryRequestBody: - type: object - properties: - description: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DescriptionOrUndefined - ecs_mapping: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_ECSMappingOrUndefined - id: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SavedQueryId' - interval: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Interval' - platform: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DescriptionOrUndefined - query: - $ref: '#/components/schemas/Security_Solution_Osquery_API_QueryOrUndefined' - removed: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_RemovedOrUndefined - snapshot: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SnapshotOrUndefined - version: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_VersionOrUndefined - Security_Solution_Osquery_API_DefaultSuccessResponse: - type: object - properties: {} - Security_Solution_Osquery_API_Description: - type: string - Security_Solution_Osquery_API_DescriptionOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Description' - nullable: true - Security_Solution_Osquery_API_ECSMapping: - additionalProperties: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ECSMappingItem' - type: object - Security_Solution_Osquery_API_ECSMappingItem: - type: object - properties: - field: + properties: + license: + enum: + - Apache-2.0 + - Elastic-2.0 + type: string + title: + type: string + type: type: string - value: - oneOf: - - type: string - - items: - type: string - type: array - Security_Solution_Osquery_API_ECSMappingOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ECSMapping' - nullable: true - Security_Solution_Osquery_API_Enabled: - type: boolean - Security_Solution_Osquery_API_EnabledOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Enabled' - nullable: true - Security_Solution_Osquery_API_FindLiveQueryRequestQuery: - type: object - properties: - kuery: - $ref: '#/components/schemas/Security_Solution_Osquery_API_KueryOrUndefined' - page: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PageOrUndefined' - pageSize: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PageSizeOrUndefined - sort: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SortOrUndefined' - sortOrder: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SortOrderOrUndefined - Security_Solution_Osquery_API_FindPacksRequestQuery: - type: object - properties: - page: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PageOrUndefined' - pageSize: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PageSizeOrUndefined - sort: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SortOrUndefined' - sortOrder: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SortOrderOrUndefined - Security_Solution_Osquery_API_FindSavedQueryRequestQuery: - type: object - properties: - page: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PageOrUndefined' - pageSize: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PageSizeOrUndefined - sort: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SortOrUndefined' - sortOrder: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SortOrderOrUndefined - Security_Solution_Osquery_API_GetLiveQueryResultsRequestQuery: - type: object - properties: - kuery: - $ref: '#/components/schemas/Security_Solution_Osquery_API_KueryOrUndefined' - page: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PageOrUndefined' - pageSize: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PageSizeOrUndefined - sort: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SortOrUndefined' - sortOrder: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SortOrderOrUndefined - Security_Solution_Osquery_API_Id: - type: string - Security_Solution_Osquery_API_Interval: - type: string - Security_Solution_Osquery_API_IntervalOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Interval' - nullable: true - Security_Solution_Osquery_API_KueryOrUndefined: - nullable: true - type: string - Security_Solution_Osquery_API_ObjectQueries: - additionalProperties: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ObjectQueriesItem' - type: object - Security_Solution_Osquery_API_ObjectQueriesItem: - type: object - properties: - ecs_mapping: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_ECSMappingOrUndefined - id: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Id' - platform: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PlatformOrUndefined - query: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Query' - removed: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_RemovedOrUndefined - saved_query_id: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SavedQueryIdOrUndefined - snapshot: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SnapshotOrUndefined version: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_VersionOrUndefined - Security_Solution_Osquery_API_PackId: - type: string - Security_Solution_Osquery_API_PackIdOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackId' - nullable: true - Security_Solution_Osquery_API_PackName: - type: string - Security_Solution_Osquery_API_PageOrUndefined: - nullable: true - type: integer - Security_Solution_Osquery_API_PageSizeOrUndefined: - nullable: true - type: integer - Security_Solution_Osquery_API_Platform: - type: string - Security_Solution_Osquery_API_PlatformOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Platform' - nullable: true - Security_Solution_Osquery_API_PolicyIds: - items: - type: string - type: array - Security_Solution_Osquery_API_PolicyIdsOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PolicyIds' - nullable: true - Security_Solution_Osquery_API_Query: - type: string - Security_Solution_Osquery_API_QueryOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Query' - nullable: true - Security_Solution_Osquery_API_Removed: - type: boolean - Security_Solution_Osquery_API_RemovedOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Removed' - nullable: true - Security_Solution_Osquery_API_SavedQueryId: - type: string - Security_Solution_Osquery_API_SavedQueryIdOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SavedQueryId' - nullable: true - Security_Solution_Osquery_API_Shards: - additionalProperties: - type: number - type: object - Security_Solution_Osquery_API_Snapshot: - type: boolean - Security_Solution_Osquery_API_SnapshotOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Snapshot' - nullable: true - Security_Solution_Osquery_API_SortOrderOrUndefined: - oneOf: - - nullable: true type: string - - enum: - - asc - - desc - Security_Solution_Osquery_API_SortOrUndefined: - nullable: true - type: string - Security_Solution_Osquery_API_UpdatePacksRequestBody: - type: object - properties: - description: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DescriptionOrUndefined - enabled: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_EnabledOrUndefined - id: - $ref: '#/components/schemas/Security_Solution_Osquery_API_PackId' - policy_ids: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_PolicyIdsOrUndefined - queries: - $ref: '#/components/schemas/Security_Solution_Osquery_API_ObjectQueries' - shards: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Shards' - Security_Solution_Osquery_API_UpdateSavedQueryRequestBody: + required: + - name + - title + - version + - description + - type + - categories + - conditions + - assets + - format_version + - download + - path + Fleet_package_policy: + allOf: + - type: object + properties: + id: + type: string + inputs: + oneOf: + - items: {} + type: array + - type: object + revision: + type: number + required: + - id + - revision + - $ref: '#/components/schemas/Fleet_new_package_policy' + title: Package policy + Fleet_package_policy_request: + title: Package Policy Request type: object properties: description: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DescriptionOrUndefined - ecs_mapping: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_ECSMappingOrUndefined - id: - $ref: '#/components/schemas/Security_Solution_Osquery_API_SavedQueryId' - interval: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_IntervalOrUndefined - platform: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_DescriptionOrUndefined - query: - $ref: '#/components/schemas/Security_Solution_Osquery_API_QueryOrUndefined' - removed: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_RemovedOrUndefined - snapshot: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_SnapshotOrUndefined - version: - $ref: >- - #/components/schemas/Security_Solution_Osquery_API_VersionOrUndefined - Security_Solution_Osquery_API_Version: - type: string - Security_Solution_Osquery_API_VersionOrUndefined: - $ref: '#/components/schemas/Security_Solution_Osquery_API_Version' - nullable: true - Security_Solution_Timeline_API_BareNote: - type: object - properties: - created: - nullable: true - type: number - createdBy: - nullable: true + description: Package policy description + example: my description type: string - eventId: - nullable: true + force: + description: >- + Force package policy creation even if package is not verified, or if + the agent policy is managed. + type: boolean + id: + description: Package policy unique identifier type: string - note: - nullable: true + inputs: + additionalProperties: + type: object + properties: + enabled: + description: 'enable or disable that input, (default to true)' + type: boolean + streams: + additionalProperties: + type: object + properties: + enabled: + description: 'enable or disable that stream, (default to true)' + type: boolean + vars: + description: >- + Stream level variable (see integration documentation for + more information) + type: object + description: >- + Input streams (see integration documentation to know what + streams are available) + type: object + vars: + description: >- + Input level variable (see integration documentation for more + information) + type: object + description: >- + Package policy inputs (see integration documentation to know what + inputs are available) + example: + nginx-logfile: + enabled: true + streams: + nginx.access: + enabled: true + vars: + ignore_older: 72h + paths: + - /var/log/nginx/access.log* + preserve_original_event: false + tags: + - nginx-access + type: object + name: + description: Package policy name (should be unique) + example: nginx-123 type: string - timelineId: - nullable: true + namespace: + description: >- + The package policy namespace. Leave blank to inherit the agent + policy's namespace. + example: customnamespace type: string - updated: - nullable: true - type: number - updatedBy: + overrides: + description: >- + Override settings that are defined in the package policy. The + override option should be used only in unusual circumstances and not + as a routine procedure. nullable: true + type: object + properties: + inputs: + type: object + package: + type: object + properties: + name: + description: Package name + example: nginx + type: string + version: + description: Package version + example: 1.6.0 + type: string + required: + - name + - version + policy_id: + deprecated: true + description: Agent policy ID where that package policy will be added + example: agent-policy-id type: string + policy_ids: + description: Agent policy IDs where that package policy will be added + example: + - agent-policy-id + items: + type: string + type: array + vars: + description: >- + Package root level variable (see integration documentation for more + information) + type: object required: - - timelineId - Security_Solution_Timeline_API_ColumnHeaderResult: + - name + - package + Fleet_package_usage_stats: + title: Package usage stats type: object properties: - aggregatable: - type: boolean - category: + agent_policy_count: + type: integer + required: + - agent_policy_count + Fleet_proxies: + title: Fleet Proxy + type: object + properties: + certificate: type: string - columnHeaderType: + certificate_authorities: type: string - description: + certificate_key: type: string - example: - oneOf: - - type: string - - type: number id: type: string - indexes: - items: - type: string - type: array name: type: string - placeholder: + proxy_headers: + type: object + url: type: string - searchable: - type: boolean - type: + required: + - name + - url + Fleet_saved_object_type: + oneOf: + - enum: + - dashboard + - visualization + - search + - index_pattern + - map + - lens + - security_rule + - csp_rule_template + - ml_module + - tag + - osquery_pack_asset + - osquery_saved_query type: string - Security_Solution_Timeline_API_DataProviderQueryMatch: + - enum: + - index + - component_template + - ingest_pipeline + - index_template + - ilm_policy + - transform + - data_stream_ilm_policy + - ml_model + type: string + title: Saved Object type + Fleet_search_result: + title: Search result type: object properties: - enabled: - nullable: true - type: boolean - excluded: - nullable: true - type: boolean - id: - nullable: true + description: type: string - kqlQuery: - nullable: true + download: type: string + icons: + type: string + installationInfo: + $ref: '#/components/schemas/Fleet_installation_info' name: - nullable: true type: string - queryMatch: - $ref: '#/components/schemas/Security_Solution_Timeline_API_QueryMatchResult' - Security_Solution_Timeline_API_DataProviderResult: + path: + type: string + savedObject: + deprecated: true + type: object + status: + type: string + title: + type: string + type: + type: string + version: + type: string + required: + - description + - download + - icons + - name + - path + - title + - type + - version + - status + Fleet_settings: + title: Settings type: object properties: - and: + fleet_server_hosts: + deprecated: true items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_DataProviderQueryMatch - nullable: true + type: string type: array - enabled: - nullable: true - type: boolean - excluded: - nullable: true + has_seen_add_data_notice: type: boolean id: - nullable: true type: string - kqlQuery: - nullable: true + prerelease_integrations_enabled: + type: boolean + required: + - fleet_server_hosts + - id + Fleet_upgrade_agent: + title: Upgrade agent + type: object + properties: + force: + description: 'Force upgrade, skipping validation (should be used with caution)' + type: boolean + skipRateLimitCheck: + description: Skip rate limit check for upgrade + type: boolean + source_uri: type: string - name: - nullable: true + version: type: string - queryMatch: - $ref: '#/components/schemas/Security_Solution_Timeline_API_QueryMatchResult' - nullable: true - type: - $ref: '#/components/schemas/Security_Solution_Timeline_API_DataProviderType' - nullable: true - Security_Solution_Timeline_API_DataProviderType: + required: + - version + Fleet_upgrade_agent_diff: + items: + items: + $ref: '#/components/schemas/Fleet_full_agent_policy_input' + type: array + title: Package policy Upgrade dryrun + type: array + Fleet_upgrade_diff: + items: + allOf: + - $ref: '#/components/schemas/Fleet_package_policy' + - allOf: + - $ref: '#/components/schemas/Fleet_new_package_policy' + - type: object + properties: + errors: + items: + type: object + properties: + key: + type: string + message: + type: string + type: array + missingVars: + items: + type: string + type: array + type: object + title: Package policy Upgrade dryrun + type: array + Kibana_HTTP_APIs_core_status_redactedResponse: + additionalProperties: false + description: A minimal representation of Kibana's operational status. + type: object + properties: + status: + additionalProperties: false + type: object + properties: + overall: + additionalProperties: false + type: object + properties: + level: + description: Service status levels as human and machine readable values. + enum: + - available + - degraded + - unavailable + - critical + type: string + required: + - level + required: + - overall + required: + - status + Kibana_HTTP_APIs_core_status_response: + additionalProperties: false description: >- - The type of data provider to create. Valid values are `default` and - `template`. - enum: - - default - - template - type: string - Security_Solution_Timeline_API_DocumentIds: - oneOf: - - items: - type: string - type: array - - type: string - Security_Solution_Timeline_API_FavoriteTimelineResponse: + Kibana's operational status as well as a detailed breakdown of plugin + statuses indication of various loads (like event loop utilization and + network traffic) at time of request. type: object properties: - code: - nullable: true - type: number - favorite: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_FavoriteTimelineResult - type: array - message: - nullable: true - type: string - savedObjectId: + metrics: + additionalProperties: false + description: Metric groups collected by Kibana. + type: object + properties: + collection_interval_in_millis: + description: The interval at which metrics should be collected. + type: number + elasticsearch_client: + additionalProperties: false + description: Current network metrics of Kibana's Elasticsearch client. + type: object + properties: + totalActiveSockets: + description: Count of network sockets currently in use. + type: number + totalIdleSockets: + description: Count of network sockets currently idle. + type: number + totalQueuedRequests: + description: Count of requests not yet assigned to sockets. + type: number + required: + - totalActiveSockets + - totalIdleSockets + - totalQueuedRequests + last_updated: + description: The time metrics were collected. + type: string + required: + - elasticsearch_client + - last_updated + - collection_interval_in_millis + name: + description: Kibana instance name. type: string - templateTimelineId: - nullable: true + status: + additionalProperties: false + type: object + properties: + core: + additionalProperties: false + description: Statuses of core Kibana services. + type: object + properties: + elasticsearch: + additionalProperties: false + type: object + properties: + detail: + description: Human readable detail of the service status. + type: string + documentationUrl: + description: A URL to further documentation regarding this service. + type: string + level: + description: >- + Service status levels as human and machine readable + values. + enum: + - available + - degraded + - unavailable + - critical + type: string + meta: + additionalProperties: {} + description: >- + An unstructured set of extra metadata about this + service. + type: object + summary: + description: A human readable summary of the service status. + type: string + required: + - level + - summary + - meta + savedObjects: + additionalProperties: false + type: object + properties: + detail: + description: Human readable detail of the service status. + type: string + documentationUrl: + description: A URL to further documentation regarding this service. + type: string + level: + description: >- + Service status levels as human and machine readable + values. + enum: + - available + - degraded + - unavailable + - critical + type: string + meta: + additionalProperties: {} + description: >- + An unstructured set of extra metadata about this + service. + type: object + summary: + description: A human readable summary of the service status. + type: string + required: + - level + - summary + - meta + required: + - elasticsearch + - savedObjects + overall: + additionalProperties: false + type: object + properties: + detail: + description: Human readable detail of the service status. + type: string + documentationUrl: + description: A URL to further documentation regarding this service. + type: string + level: + description: Service status levels as human and machine readable values. + enum: + - available + - degraded + - unavailable + - critical + type: string + meta: + additionalProperties: {} + description: An unstructured set of extra metadata about this service. + type: object + summary: + description: A human readable summary of the service status. + type: string + required: + - level + - summary + - meta + plugins: + additionalProperties: + additionalProperties: false + type: object + properties: + detail: + description: Human readable detail of the service status. + type: string + documentationUrl: + description: A URL to further documentation regarding this service. + type: string + level: + description: >- + Service status levels as human and machine readable + values. + enum: + - available + - degraded + - unavailable + - critical + type: string + meta: + additionalProperties: {} + description: An unstructured set of extra metadata about this service. + type: object + summary: + description: A human readable summary of the service status. + type: string + required: + - level + - summary + - meta + description: A dynamic mapping of plugin ID to plugin status. + type: object + required: + - overall + - core + - plugins + uuid: + description: >- + Unique, generated Kibana instance UUID. This UUID should persist + even if the Kibana process restarts. type: string - templateTimelineVersion: - nullable: true - type: number - timelineType: - $ref: '#/components/schemas/Security_Solution_Timeline_API_TimelineType' version: - type: string - required: - - savedObjectId - - version - Security_Solution_Timeline_API_FavoriteTimelineResult: - type: object - properties: - favoriteDate: - nullable: true - type: number - fullName: - nullable: true - type: string - userName: - nullable: true - type: string - Security_Solution_Timeline_API_FilterTimelineResult: - type: object - properties: - exists: - type: boolean - match_all: - type: string - meta: + additionalProperties: false type: object properties: - alias: - type: string - controlledBy: - type: string - disabled: - type: boolean - field: - type: string - formattedValue: + build_date: + description: The date and time of this build. type: string - index: + build_flavor: + description: >- + The build flavour determines configuration and behavior of + Kibana. On premise users will almost always run the + "traditional" flavour, while other flavours are reserved for + Elastic-specific use cases. + enum: + - serverless + - traditional type: string - key: + build_hash: + description: >- + A unique hash value representing the git commit of this Kibana + build. type: string - negate: + build_number: + description: >- + A monotonically increasing number, each subsequent build will + have a higher number. + type: number + build_snapshot: + description: Whether this build is a snapshot build. type: boolean - params: - type: string - type: - type: string - value: + number: + description: A semantic version number. type: string - missing: - type: string - query: - type: string - range: + required: + - number + - build_hash + - build_number + - build_snapshot + - build_flavor + - build_date + required: + - name + - uuid + - version + - status + - metrics + Machine_learning_APIs_mlSync200Response: + properties: + datafeedsAdded: + additionalProperties: + $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseDatafeeds' + description: >- + If a saved object for an anomaly detection job is missing a datafeed + identifier, it is added when you run the sync machine learning saved + objects API. + type: object + datafeedsRemoved: + additionalProperties: + $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseDatafeeds' + description: >- + If a saved object for an anomaly detection job references a datafeed + that no longer exists, it is deleted when you run the sync machine + learning saved objects API. + type: object + savedObjectsCreated: + $ref: >- + #/components/schemas/Machine_learning_APIs_mlSyncResponseSavedObjectsCreated + savedObjectsDeleted: + $ref: >- + #/components/schemas/Machine_learning_APIs_mlSyncResponseSavedObjectsDeleted + title: Successful sync API response + type: object + Machine_learning_APIs_mlSync4xxResponse: + properties: + error: + example: Unauthorized type: string - script: + message: type: string - Security_Solution_Timeline_API_ImportTimelineResult: + statusCode: + example: 401 + type: integer + title: Unsuccessful sync API response type: object + Machine_learning_APIs_mlSyncResponseAnomalyDetectors: + description: >- + The sync machine learning saved objects API response contains this + object when there are anomaly detection jobs affected by the + synchronization. There is an object for each relevant job, which + contains the synchronization status. properties: - errors: - items: - type: object - properties: - error: - type: object - properties: - message: - type: string - status_code: - type: number - id: - type: string - type: array success: - type: boolean - success_count: - type: number - timelines_installed: - type: number - timelines_updated: - type: number - Security_Solution_Timeline_API_ImportTimelines: - allOf: - - $ref: '#/components/schemas/Security_Solution_Timeline_API_SavedTimeline' - - type: object - properties: - eventNotes: - items: - $ref: '#/components/schemas/Security_Solution_Timeline_API_BareNote' - nullable: true - type: array - globalNotes: - items: - $ref: '#/components/schemas/Security_Solution_Timeline_API_BareNote' - nullable: true - type: array - pinnedEventIds: - items: - type: string - nullable: true - type: array - savedObjectId: - nullable: true - type: string - version: - nullable: true - type: string - Security_Solution_Timeline_API_Note: - allOf: - - $ref: '#/components/schemas/Security_Solution_Timeline_API_BareNote' - - type: object - properties: - noteId: - type: string - version: - type: string - Security_Solution_Timeline_API_PinnedEvent: + $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' + title: Sync API response for anomaly detection jobs type: object + Machine_learning_APIs_mlSyncResponseDatafeeds: + description: >- + The sync machine learning saved objects API response contains this + object when there are datafeeds affected by the synchronization. There + is an object for each relevant datafeed, which contains the + synchronization status. properties: - created: - nullable: true - type: number - createdBy: - nullable: true - type: string - eventId: - type: string - pinnedEventId: - type: string - timelineId: - type: string - updated: - nullable: true - type: number - updatedBy: - nullable: true - type: string - version: - type: string - required: - - eventId - - pinnedEventId - - timelineId - - version - Security_Solution_Timeline_API_QueryMatchResult: + success: + $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' + title: Sync API response for datafeeds type: object - properties: - displayField: - nullable: true - type: string - displayValue: - nullable: true - type: string - field: - nullable: true - type: string - operator: - nullable: true - type: string - value: - nullable: true - type: string - Security_Solution_Timeline_API_Readable: + Machine_learning_APIs_mlSyncResponseDataFrameAnalytics: + description: >- + The sync machine learning saved objects API response contains this + object when there are data frame analytics jobs affected by the + synchronization. There is an object for each relevant job, which + contains the synchronization status. + properties: + success: + $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' + title: Sync API response for data frame analytics jobs type: object + Machine_learning_APIs_mlSyncResponseSavedObjectsCreated: + description: >- + If saved objects are missing for machine learning jobs or trained + models, they are created when you run the sync machine learning saved + objects API. properties: - _data: - additionalProperties: true - type: object - _encoding: - type: string - _events: - additionalProperties: true - type: object - _eventsCount: - type: number - _maxListeners: - additionalProperties: true + anomaly-detector: + additionalProperties: + $ref: >- + #/components/schemas/Machine_learning_APIs_mlSyncResponseAnomalyDetectors + description: >- + If saved objects are missing for anomaly detection jobs, they are + created. type: object - _position: - type: number - _read: - additionalProperties: true + data-frame-analytics: + additionalProperties: + $ref: >- + #/components/schemas/Machine_learning_APIs_mlSyncResponseDataFrameAnalytics + description: >- + If saved objects are missing for data frame analytics jobs, they are + created. type: object - _readableState: - additionalProperties: true + trained-model: + additionalProperties: + $ref: >- + #/components/schemas/Machine_learning_APIs_mlSyncResponseTrainedModels + description: 'If saved objects are missing for trained models, they are created.' type: object - readable: - type: boolean - Security_Solution_Timeline_API_RowRendererId: - enum: - - alert - - alerts - - auditd - - auditd_file - - library - - netflow - - plain - - registry - - suricata - - system - - system_dns - - system_endgame_process - - system_file - - system_fim - - system_security_event - - system_socket - - threat_match - - zeek - type: string - Security_Solution_Timeline_API_SavedTimeline: + title: Sync API response for created saved objects type: object + Machine_learning_APIs_mlSyncResponseSavedObjectsDeleted: + description: >- + If saved objects exist for machine learning jobs or trained models that + no longer exist, they are deleted when you run the sync machine learning + saved objects API. properties: - columns: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_ColumnHeaderResult - nullable: true - type: array - created: - nullable: true - type: number - createdBy: - nullable: true - type: string - dataProviders: - items: + anomaly-detector: + additionalProperties: $ref: >- - #/components/schemas/Security_Solution_Timeline_API_DataProviderResult - nullable: true - type: array - dataViewId: - nullable: true - type: string - dateRange: - nullable: true - type: object - properties: - end: - oneOf: - - type: string - - type: number - start: - oneOf: - - type: string - - type: number - description: - nullable: true - type: string - eqlOptions: - nullable: true + #/components/schemas/Machine_learning_APIs_mlSyncResponseAnomalyDetectors + description: >- + If there are saved objects exist for nonexistent anomaly detection + jobs, they are deleted. type: object - properties: - eventCategoryField: - nullable: true - type: string - query: - nullable: true - type: string - size: - oneOf: - - nullable: true - type: string - - nullable: true - type: number - tiebreakerField: - nullable: true - type: string - timestampField: - nullable: true - type: string - eventType: - nullable: true - type: string - excludedRowRendererIds: - items: - $ref: '#/components/schemas/Security_Solution_Timeline_API_RowRendererId' - nullable: true - type: array - favorite: - items: + data-frame-analytics: + additionalProperties: $ref: >- - #/components/schemas/Security_Solution_Timeline_API_FavoriteTimelineResult - nullable: true - type: array - filters: - items: + #/components/schemas/Machine_learning_APIs_mlSyncResponseDataFrameAnalytics + description: >- + If there are saved objects exist for nonexistent data frame + analytics jobs, they are deleted. + type: object + trained-model: + additionalProperties: $ref: >- - #/components/schemas/Security_Solution_Timeline_API_FilterTimelineResult - nullable: true - type: array - indexNames: - items: - type: string - nullable: true - type: array - kqlMode: - nullable: true - type: string - kqlQuery: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_SerializedFilterQueryResult - nullable: true - savedQueryId: - nullable: true - type: string - savedSearchId: - nullable: true - type: string - sort: - $ref: '#/components/schemas/Security_Solution_Timeline_API_Sort' - nullable: true - status: - enum: - - active - - draft - - immutable - nullable: true - type: string - templateTimelineId: - nullable: true - type: string - templateTimelineVersion: - nullable: true - type: number - timelineType: - $ref: '#/components/schemas/Security_Solution_Timeline_API_TimelineType' - nullable: true - title: - nullable: true - type: string - updated: - nullable: true - type: number - updatedBy: - nullable: true - type: string - Security_Solution_Timeline_API_SerializedFilterQueryResult: + #/components/schemas/Machine_learning_APIs_mlSyncResponseTrainedModels + description: >- + If there are saved objects exist for nonexistent trained models, + they are deleted. + type: object + title: Sync API response for deleted saved objects type: object + Machine_learning_APIs_mlSyncResponseSuccess: + description: The success or failure of the synchronization. + type: boolean + Machine_learning_APIs_mlSyncResponseTrainedModels: + description: >- + The sync machine learning saved objects API response contains this + object when there are trained models affected by the synchronization. + There is an object for each relevant trained model, which contains the + synchronization status. properties: - filterQuery: - nullable: true - type: object - properties: - kuery: - nullable: true - type: object - properties: - expression: - nullable: true - type: string - kind: - nullable: true - type: string - serializedQuery: - nullable: true - type: string - Security_Solution_Timeline_API_Sort: - oneOf: - - $ref: '#/components/schemas/Security_Solution_Timeline_API_SortObject' - - items: - $ref: '#/components/schemas/Security_Solution_Timeline_API_SortObject' - type: array - Security_Solution_Timeline_API_SortFieldTimeline: - description: The field to sort the timelines by. - enum: - - title - - description - - updated - - created - type: string - Security_Solution_Timeline_API_SortObject: + success: + $ref: '#/components/schemas/Machine_learning_APIs_mlSyncResponseSuccess' + title: Sync API response for trained models + type: object + Saved_objects_400_response: + title: Bad request type: object properties: - columnId: - nullable: true - type: string - columnType: - nullable: true + error: + enum: + - Bad Request type: string - sortDirection: - nullable: true + message: type: string - Security_Solution_Timeline_API_TimelineResponse: - allOf: - - $ref: '#/components/schemas/Security_Solution_Timeline_API_SavedTimeline' - - type: object - properties: - eventIdToNoteIds: - items: - $ref: '#/components/schemas/Security_Solution_Timeline_API_Note' - type: array - noteIds: - items: - type: string - type: array - notes: - items: - $ref: '#/components/schemas/Security_Solution_Timeline_API_Note' - type: array - pinnedEventIds: - items: - type: string - type: array - pinnedEventsSaveObject: - items: - $ref: >- - #/components/schemas/Security_Solution_Timeline_API_PinnedEvent - type: array - savedObjectId: - type: string - version: - type: string - required: - - savedObjectId - - version - Security_Solution_Timeline_API_TimelineStatus: - description: >- - The status of the timeline. Valid values are `active`, `draft`, and - `immutable`. - enum: - - active - - draft - - immutable - type: string - Security_Solution_Timeline_API_TimelineType: - description: >- - The type of timeline to create. Valid values are `default` and - `template`. - enum: - - default - - template - type: string + statusCode: + enum: + - 400 + type: integer + required: + - error + - message + - statusCode + Saved_objects_attributes: + description: > + The data that you want to create. WARNING: When you create saved + objects, attributes are not validated, which allows you to pass + arbitrary and ill-formed data into the API that can break Kibana. Make + sure any data that you send to the API is properly formed. + type: object + Saved_objects_initial_namespaces: + description: > + Identifiers for the spaces in which this object is created. If this is + provided, the object is created only in the explicitly defined spaces. + If this is not provided, the object is created in the current space + (default behavior). For shareable object types (registered with + `namespaceType: 'multiple'`), this option can be used to specify one or + more spaces, including the "All spaces" identifier ('*'). For isolated + object types (registered with `namespaceType: 'single'` or + `namespaceType: 'multiple-isolated'`), this option can only be used to + specify a single space, and the "All spaces" identifier ('*') is not + allowed. For global object types (`registered with `namespaceType: + agnostic`), this option cannot be used. + type: array + Saved_objects_references: + description: > + Objects with `name`, `id`, and `type` properties that describe the other + saved objects that this object references. Use `name` in attributes to + refer to the other saved object, but never the `id`, which can update + automatically during migrations or import and export. + type: array SLOs_400_response: title: Bad request type: object @@ -29039,42 +21717,36 @@ tags: Annotations enable you to easily see how events are impacting the performance of your applications. name: APM annotations + - description: Case APIs enable you to open and track issues. + name: cases - description: Connector APIs enable you to create and manage connectors. name: connectors + - name: Data streams - description: >- Data view APIs enable you to manage data views, formerly known as Kibana index patterns. name: data views + - name: Elastic Agent actions + - name: Elastic Agent binary download sources + - name: Elastic Agent policies + - name: Elastic Agent status + - name: Elastic Agents + - name: Elastic Package Manager (EPM) + - name: Fleet enrollment API keys + - name: Fleet internals + - name: Fleet Kubernetes + - name: Fleet outputs + - name: Fleet package policies + - name: Fleet proxies + - name: Fleet Server hosts + - name: Fleet service tokens + - name: Fleet uninstall tokens - description: Machine learning name: ml - description: >- Manage Kibana saved objects, including dashboards, visualizations, and more. name: saved objects - - description: Manage and interact with Security Assistant resources. - name: Security AI Assistant API - - 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. - name: Security Solution Detections API - - description: Interact with and manage endpoints running the Elastic Defend integration. - name: Security Solution Endpoint Management API - - description: '' - name: Security Solution Entity Analytics API - - description: >- - Exceptions API allows you to manage detection rule exceptions to prevent a - rule from generating an alert from incoming events even when the rule's - other criteria are met. - name: Security Solution Exceptions API - - description: 'Lists API allows you to manage lists of keywords, IPs or IP ranges items.' - name: Security Solution Lists API - - description: 'Run live queries, manage packs and saved queries.' - name: Security Solution Osquery API - - description: >- - You can create Timelines and Timeline templates via the API, as well as - import new Timelines from an ndjson file. - name: Security Solution Timeline API - description: 'SLO APIs enable you to define, manage and track service-level objectives' name: slo - name: system diff --git a/oas_docs/overlays/kibana.overlays.serverless.yaml b/oas_docs/overlays/kibana.overlays.serverless.yaml index 6ed2329c24dca..a08e06f866a4c 100644 --- a/oas_docs/overlays/kibana.overlays.serverless.yaml +++ b/oas_docs/overlays/kibana.overlays.serverless.yaml @@ -34,7 +34,7 @@ actions: security: - apiKeyAuth: [] # Mark all operations as beta - - target: '$.paths[*][*]' + - target: "$.paths[*]['get','put','post','delete','options','head','patch','trace']" description: Add x-beta update: x-beta: true diff --git a/oas_docs/overlays/kibana.overlays.yaml b/oas_docs/overlays/kibana.overlays.yaml index 22162721c6867..324e3bdc47c65 100644 --- a/oas_docs/overlays/kibana.overlays.yaml +++ b/oas_docs/overlays/kibana.overlays.yaml @@ -105,10 +105,10 @@ actions: description: Change displayName update: x-displayName: "Saved objects" - # - target: '$.tags[?(@.name=="slo")]' - # description: Change displayName - # update: - # x-displayName: "Service level objectives" + - target: '$.tags[?(@.name=="slo")]' + description: Change displayName + update: + x-displayName: "Service level objectives" - target: '$.tags[?(@.name=="system")]' description: Change displayName update: diff --git a/oas_docs/scripts/merge_ess_oas.js b/oas_docs/scripts/merge_ess_oas.js index a1812670c15f9..dfc054a40b926 100644 --- a/oas_docs/scripts/merge_ess_oas.js +++ b/oas_docs/scripts/merge_ess_oas.js @@ -15,21 +15,17 @@ const { REPO_ROOT } = require('@kbn/repo-info'); sourceGlobs: [ `${REPO_ROOT}/oas_docs/bundle.json`, `${REPO_ROOT}/x-pack/plugins/actions/docs/openapi/bundled.yaml`, + `${REPO_ROOT}/x-pack/plugins/cases/docs/openapi/bundled.yaml`, `${REPO_ROOT}/src/plugins/data_views/docs/openapi/bundled.yaml`, `${REPO_ROOT}/x-pack/plugins/ml/common/openapi/ml_apis.yaml`, `${REPO_ROOT}/packages/core/saved-objects/docs/openapi/bundled.yaml`, + `${REPO_ROOT}/x-pack/plugins/fleet/common/openapi/bundled.yaml`, // Observability Solution `${REPO_ROOT}/x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml`, `${REPO_ROOT}/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml`, // Security solution - `${REPO_ROOT}/x-pack/plugins/security_solution/docs/openapi/ess/*.schema.yaml`, - `${REPO_ROOT}/packages/kbn-securitysolution-lists-common/docs/openapi/ess/*.schema.yaml`, - `${REPO_ROOT}/packages/kbn-securitysolution-exceptions-common/docs/openapi/ess/*.schema.yaml`, - `${REPO_ROOT}/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/ess/*.schema.yaml`, - `${REPO_ROOT}/x-pack/packages/kbn-elastic-assistant-common/docs/openapi/ess/*.schema.yaml`, - `${REPO_ROOT}/x-pack/plugins/osquery/docs/openapi/ess/*.schema.yaml`, ], outputFilePath: `${REPO_ROOT}/oas_docs/output/kibana.yaml`, options: { diff --git a/oas_docs/scripts/merge_ess_oas_staging.js b/oas_docs/scripts/merge_ess_oas_staging.js new file mode 100644 index 0000000000000..022bcbd54e23a --- /dev/null +++ b/oas_docs/scripts/merge_ess_oas_staging.js @@ -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 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. + */ + +require('../../src/setup_node_env'); +const { merge } = require('@kbn/openapi-bundler'); +const { REPO_ROOT } = require('@kbn/repo-info'); + +(async () => { + await merge({ + sourceGlobs: [ + `${REPO_ROOT}/oas_docs/bundle.json`, + `${REPO_ROOT}/x-pack/plugins/actions/docs/openapi/bundled.yaml`, + `${REPO_ROOT}/x-pack/plugins/cases/docs/openapi/bundled.yaml`, + `${REPO_ROOT}/src/plugins/data_views/docs/openapi/bundled.yaml`, + `${REPO_ROOT}/x-pack/plugins/ml/common/openapi/ml_apis.yaml`, + `${REPO_ROOT}/packages/core/saved-objects/docs/openapi/bundled.yaml`, + `${REPO_ROOT}/x-pack/plugins/fleet/common/openapi/bundled.yaml`, + + // Observability Solution + `${REPO_ROOT}/x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml`, + `${REPO_ROOT}/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml`, + + // Security solution + `${REPO_ROOT}/x-pack/plugins/security_solution/docs/openapi/ess/*.schema.yaml`, + `${REPO_ROOT}/packages/kbn-securitysolution-lists-common/docs/openapi/ess/*.schema.yaml`, + `${REPO_ROOT}/packages/kbn-securitysolution-exceptions-common/docs/openapi/ess/*.schema.yaml`, + `${REPO_ROOT}/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/ess/*.schema.yaml`, + `${REPO_ROOT}/x-pack/packages/kbn-elastic-assistant-common/docs/openapi/ess/*.schema.yaml`, + `${REPO_ROOT}/x-pack/plugins/osquery/docs/openapi/ess/*.schema.yaml`, + ], + outputFilePath: `${REPO_ROOT}/oas_docs/output/kibana.staging.yaml`, + options: { + prototypeDocument: `${REPO_ROOT}/oas_docs/kibana.info.yaml`, + }, + }); +})(); diff --git a/oas_docs/scripts/merge_serverless_oas.js b/oas_docs/scripts/merge_serverless_oas.js index e1b9bf3c7ab17..67ae00522741e 100644 --- a/oas_docs/scripts/merge_serverless_oas.js +++ b/oas_docs/scripts/merge_serverless_oas.js @@ -18,22 +18,17 @@ const { REPO_ROOT } = require('@kbn/repo-info'); `${REPO_ROOT}/src/plugins/data_views/docs/openapi/bundled.yaml`, `${REPO_ROOT}/x-pack/plugins/ml/common/openapi/ml_apis_serverless.yaml`, `${REPO_ROOT}/packages/core/saved-objects/docs/openapi/bundled_serverless.yaml`, + `${REPO_ROOT}/x-pack/plugins/fleet/common/openapi/bundled.yaml`, // Observability Solution `${REPO_ROOT}/x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml`, `${REPO_ROOT}/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml`, // Security solution - `${REPO_ROOT}/x-pack/plugins/security_solution/docs/openapi/serverless/*.schema.yaml`, - `${REPO_ROOT}/packages/kbn-securitysolution-lists-common/docs/openapi/serverless/*.schema.yaml`, - `${REPO_ROOT}/packages/kbn-securitysolution-exceptions-common/docs/openapi/serverless/*.schema.yaml`, - `${REPO_ROOT}/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/serverless/*.schema.yaml`, - `${REPO_ROOT}/x-pack/packages/kbn-elastic-assistant-common/docs/openapi/serverless/*.schema.yaml`, - `${REPO_ROOT}/x-pack/plugins/osquery/docs/openapi/serverless/*.schema.yaml`, ], outputFilePath: `${REPO_ROOT}/oas_docs/output/kibana.serverless.yaml`, options: { - prototypeDocument: `${REPO_ROOT}/oas_docs/kibana.info.yaml`, + prototypeDocument: `${REPO_ROOT}/oas_docs/kibana.info.serverless.yaml`, }, }); })(); diff --git a/oas_docs/scripts/merge_serverless_oas_staging.js b/oas_docs/scripts/merge_serverless_oas_staging.js new file mode 100644 index 0000000000000..ea932fc08f291 --- /dev/null +++ b/oas_docs/scripts/merge_serverless_oas_staging.js @@ -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 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. + */ + +require('../../src/setup_node_env'); +const { merge } = require('@kbn/openapi-bundler'); +const { REPO_ROOT } = require('@kbn/repo-info'); + +(async () => { + await merge({ + sourceGlobs: [ + `${REPO_ROOT}/oas_docs/bundle.serverless.json`, + `${REPO_ROOT}/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml`, + `${REPO_ROOT}/src/plugins/data_views/docs/openapi/bundled.yaml`, + `${REPO_ROOT}/x-pack/plugins/ml/common/openapi/ml_apis_serverless.yaml`, + `${REPO_ROOT}/packages/core/saved-objects/docs/openapi/bundled_serverless.yaml`, + `${REPO_ROOT}/x-pack/plugins/fleet/common/openapi/bundled.yaml`, + + // Observability Solution + `${REPO_ROOT}/x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml`, + `${REPO_ROOT}/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml`, + + // Security solution + `${REPO_ROOT}/x-pack/plugins/security_solution/docs/openapi/serverless/*.schema.yaml`, + `${REPO_ROOT}/packages/kbn-securitysolution-lists-common/docs/openapi/serverless/*.schema.yaml`, + `${REPO_ROOT}/packages/kbn-securitysolution-exceptions-common/docs/openapi/serverless/*.schema.yaml`, + `${REPO_ROOT}/packages/kbn-securitysolution-endpoint-exceptions-common/docs/openapi/serverless/*.schema.yaml`, + `${REPO_ROOT}/x-pack/packages/kbn-elastic-assistant-common/docs/openapi/serverless/*.schema.yaml`, + `${REPO_ROOT}/x-pack/plugins/osquery/docs/openapi/serverless/*.schema.yaml`, + ], + outputFilePath: `${REPO_ROOT}/oas_docs/output/kibana.serverless.staging.yaml`, + options: { + prototypeDocument: `${REPO_ROOT}/oas_docs/kibana.info.serverless.yaml`, + }, + }); +})(); diff --git a/package.json b/package.json index b68f56f83d8ef..0e6efae55be51 100644 --- a/package.json +++ b/package.json @@ -114,12 +114,13 @@ "@elastic/ecs": "^8.11.1", "@elastic/elasticsearch": "^8.14.0", "@elastic/ems-client": "8.5.3", - "@elastic/eui": "95.6.0", + "@elastic/eui": "95.7.0", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", "@elastic/react-search-ui": "^1.20.2", "@elastic/react-search-ui-views": "^1.20.2", + "@elastic/request-converter": "^8.15.3", "@elastic/request-crypto": "2.0.2", "@elastic/search-ui": "^1.20.2", "@elastic/search-ui-app-search-connector": "^1.20.2", @@ -456,6 +457,7 @@ "@kbn/enterprise-search-plugin": "link:x-pack/plugins/enterprise_search", "@kbn/entities-data-access-plugin": "link:x-pack/plugins/observability_solution/entities_data_access", "@kbn/entities-schema": "link:x-pack/packages/kbn-entities-schema", + "@kbn/entity-manager-fixture-plugin": "link:x-pack/test/api_integration/apis/entity_manager/fixture_plugin", "@kbn/entityManager-plugin": "link:x-pack/plugins/observability_solution/entity_manager", "@kbn/error-boundary-example-plugin": "link:examples/error_boundary", "@kbn/es-errors": "link:packages/kbn-es-errors", @@ -558,6 +560,7 @@ "@kbn/interpreter": "link:packages/kbn-interpreter", "@kbn/investigate-app-plugin": "link:x-pack/plugins/observability_solution/investigate_app", "@kbn/investigate-plugin": "link:x-pack/plugins/observability_solution/investigate", + "@kbn/investigation-shared": "link:packages/kbn-investigation-shared", "@kbn/io-ts-utils": "link:packages/kbn-io-ts-utils", "@kbn/ipynb": "link:packages/kbn-ipynb", "@kbn/json-schemas": "link:x-pack/packages/ml/json_schemas", @@ -1767,7 +1770,7 @@ "svgo": "^2.8.0", "table": "^6.8.1", "tape": "^5.0.1", - "terser": "^5.31.3", + "terser": "^5.31.4", "terser-webpack-plugin": "^4.2.3", "tough-cookie": "^4.1.4", "tree-kill": "^1.2.2", diff --git a/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.test.ts b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.test.ts index de0702b62aa66..078287a9cb151 100644 --- a/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.test.ts +++ b/packages/core/elasticsearch/core-elasticsearch-client-server-internal/src/client_config.test.ts @@ -80,7 +80,7 @@ describe('parseClientOptions', () => { it('`customHeaders` take precedence to default kibana headers', () => { const customHeader: Record = {}; for (const header in defaultHeaders) { - if (defaultHeaders.hasOwnProperty(header)) { + if (Object.hasOwn(defaultHeaders, header)) { customHeader[header] = 'foo'; } } diff --git a/packages/core/plugins/core-plugins-server-internal/src/create_browser_config.test.ts b/packages/core/plugins/core-plugins-server-internal/src/create_browser_config.test.ts index 11f55d1bc1edb..41da3f1ce2cef 100644 --- a/packages/core/plugins/core-plugins-server-internal/src/create_browser_config.test.ts +++ b/packages/core/plugins/core-plugins-server-internal/src/create_browser_config.test.ts @@ -69,7 +69,7 @@ describe('createBrowserConfig', () => { exposedConfigKeys: { exposed1: 'string', 'nested.exposed2': 'boolean', - 'nested.exposed3': 'number', + 'nested.exposed3': 'number?', // notExposed4 is not present }, }); @@ -182,7 +182,7 @@ describe('createBrowserConfig', () => { exposedConfigKeys: { exposed1: 'string', 'deeply.exposed2': 'boolean', - 'deeply.nested.exposed3': 'number', + 'deeply.nested.exposed3': 'number?', 'deeply.nested.structure.exposed4': 'string', // notExposed5, notExposed6, notExposed7, and notExposed8 are not present }, diff --git a/packages/core/plugins/core-plugins-server-internal/src/plugins_service.test.ts b/packages/core/plugins/core-plugins-server-internal/src/plugins_service.test.ts index 076245a07b758..3320fe22d7d62 100644 --- a/packages/core/plugins/core-plugins-server-internal/src/plugins_service.test.ts +++ b/packages/core/plugins/core-plugins-server-internal/src/plugins_service.test.ts @@ -1046,7 +1046,7 @@ describe('PluginsService', () => { const prebootUIConfig$ = preboot.uiPlugins.browserConfigs.get('plugin-with-expose-preboot')!; await expect(prebootUIConfig$.pipe(take(1)).toPromise()).resolves.toEqual({ browserConfig: { sharedProp: 'sharedProp default value plugin-with-expose-preboot' }, - exposedConfigKeys: { sharedProp: 'string' }, + exposedConfigKeys: { sharedProp: 'string?' }, }); const standardUIConfig$ = standard.uiPlugins.browserConfigs.get( @@ -1054,7 +1054,7 @@ describe('PluginsService', () => { )!; await expect(standardUIConfig$.pipe(take(1)).toPromise()).resolves.toEqual({ browserConfig: { sharedProp: 'sharedProp default value plugin-with-expose-standard' }, - exposedConfigKeys: { sharedProp: 'string' }, + exposedConfigKeys: { sharedProp: 'string?' }, }); }); diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_active_mappings.ts b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_active_mappings.ts index 5525814c07238..5fabc74d118d7 100644 --- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_active_mappings.ts +++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_active_mappings.ts @@ -106,7 +106,7 @@ function validateAndMerge( if (k.startsWith('_')) { throw new Error(`Invalid mapping "${k}". Mappings cannot start with _.`); } - if (dest.hasOwnProperty(k)) { + if (Object.hasOwn(dest, k)) { throw new Error(`Cannot redefine core mapping "${k}".`); } }); diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_index_map.ts b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_index_map.ts index 225b3bb422925..125eec08e52b3 100644 --- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_index_map.ts +++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_index_map.ts @@ -32,7 +32,7 @@ export function createIndexMap({ kibanaIndexName, registry, indexMap }: CreateIn const script = typeDef?.convertToAliasScript; // Defaults to kibanaIndexName if indexPattern isn't defined const indexPattern = typeDef?.indexPattern || kibanaIndexName; - if (!map.hasOwnProperty(indexPattern as string)) { + if (!Object.hasOwn(map, indexPattern as string)) { map[indexPattern] = { typeMappings: {} }; } map[indexPattern].typeMappings[type] = indexMap[type]; diff --git a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_types_mappings.ts b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_types_mappings.ts index 18aa689149c24..d5845c278273e 100644 --- a/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_types_mappings.ts +++ b/packages/core/saved-objects/core-saved-objects-migration-server-internal/src/core/build_types_mappings.ts @@ -16,7 +16,7 @@ export const buildTypesMappings = ( types: SavedObjectsType[] ): SavedObjectsTypeMappingDefinitions => { return types.reduce((acc, { name: type, mappings }) => { - const duplicate = acc.hasOwnProperty(type); + const duplicate = Object.hasOwn(acc, type); if (duplicate) { throw new Error(`Type ${type} is already defined.`); } diff --git a/packages/core/test-helpers/core-test-helpers-kbn-server/src/create_serverless_root.ts b/packages/core/test-helpers/core-test-helpers-kbn-server/src/create_serverless_root.ts index 4dd1486589dbe..e024d3320f8c4 100644 --- a/packages/core/test-helpers/core-test-helpers-kbn-server/src/create_serverless_root.ts +++ b/packages/core/test-helpers/core-test-helpers-kbn-server/src/create_serverless_root.ts @@ -14,6 +14,8 @@ import { REPO_ROOT } from '@kbn/repo-info'; import { ToolingLog } from '@kbn/tooling-log'; import { esTestConfig } from '@kbn/test'; import { CliArgs } from '@kbn/config'; +import { kibanaDevServiceAccount } from '@kbn/dev-utils'; +import { systemIndicesSuperuser } from '@kbn/test'; import { createRoot, type TestElasticsearchUtils, type TestKibanaUtils } from './create_root'; export type TestServerlessESUtils = Pick & { @@ -27,7 +29,6 @@ export interface TestServerlessUtils { } const ES_BASE_PATH_DIR = Path.join(REPO_ROOT, '.es/es_test_serverless'); - const projectType: ServerlessProjectType = 'es'; /** @@ -97,8 +98,6 @@ function createServerlessES() { kill: true, waitForReady: true, ...esServerlessImageParams, - // security is enabled by default, if needed kibana requires serviceAccountToken - esArgs: ['xpack.security.enabled=false'], }); const client = getServerlessESClient({ port: esPort }); @@ -116,6 +115,7 @@ const getServerlessESClient = ({ port }: { port: number }) => { return new Client({ node: `http://localhost:${port}`, Connection: HttpConnection, + auth: { ...systemIndicesSuperuser }, }); }; @@ -130,6 +130,7 @@ const getServerlessDefault = () => { }, elasticsearch: { hosts: [`http://localhost:${esTestConfig.getPort()}`], + serviceAccountToken: kibanaDevServiceAccount.token, }, migrations: { algorithm: 'zdt', diff --git a/packages/core/test-helpers/core-test-helpers-kbn-server/tsconfig.json b/packages/core/test-helpers/core-test-helpers-kbn-server/tsconfig.json index 8afae2b7d74c3..85d14bb04ab59 100644 --- a/packages/core/test-helpers/core-test-helpers-kbn-server/tsconfig.json +++ b/packages/core/test-helpers/core-test-helpers-kbn-server/tsconfig.json @@ -19,6 +19,7 @@ "@kbn/repo-info", "@kbn/repo-packages", "@kbn/es", + "@kbn/dev-utils", ], "exclude": [ "target/**/*", diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/base_ui_settings_client.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/base_ui_settings_client.ts index 04da5a75788ec..b82b1343b4688 100644 --- a/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/base_ui_settings_client.ts +++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/base_ui_settings_client.ts @@ -66,7 +66,7 @@ export abstract class BaseUiSettingsClient implements IUiSettingsClient { } isOverridden(key: string) { - return this.overrides.hasOwnProperty(key); + return Object.hasOwn(this.overrides, key); } isSensitive(key: string): boolean { diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/ui_settings_client_common.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/ui_settings_client_common.ts index c923feaf9da92..e7b0db9e2394a 100644 --- a/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/ui_settings_client_common.ts +++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/clients/ui_settings_client_common.ts @@ -93,7 +93,7 @@ export abstract class UiSettingsClientCommon extends BaseUiSettingsClient { } private assertUpdateAllowed(key: string) { - if (this.overrides.hasOwnProperty(key)) { + if (Object.hasOwn(this.overrides, key)) { throw new CannotOverrideError(`Unable to update "${key}" because it is overridden`); } } @@ -113,7 +113,7 @@ export abstract class UiSettingsClientCommon extends BaseUiSettingsClient { // validate value read from saved objects as it can be changed via SO API const filteredValues: UserProvided = {}; for (const [key, userValue] of Object.entries(values)) { - if (userValue === null || this.overrides.hasOwnProperty(key)) continue; + if (userValue === null || Object.hasOwn(this.overrides, key)) continue; try { this.validateKey(key, userValue); filteredValues[key] = { diff --git a/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts b/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts index 02dfd1562c3b3..cfd12e2432835 100644 --- a/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts +++ b/packages/core/ui-settings/core-ui-settings-server-internal/src/ui_settings_service.ts @@ -94,7 +94,7 @@ export class UiSettingsService registerInternalRoutes(router); // Register public routes by default unless the publicApiEnabled config setting is set to false - if (!config.hasOwnProperty('publicApiEnabled') || config.publicApiEnabled === true) { + if (!Object.hasOwn(config, 'publicApiEnabled') || config.publicApiEnabled === true) { registerRoutes(router); } diff --git a/packages/kbn-ace/src/ace/modes/x_json/worker/x_json.ace.worker.js b/packages/kbn-ace/src/ace/modes/x_json/worker/x_json.ace.worker.js index c27e96624a8b7..c3720e5546628 100644 --- a/packages/kbn-ace/src/ace/modes/x_json/worker/x_json.ace.worker.js +++ b/packages/kbn-ace/src/ace/modes/x_json/worker/x_json.ace.worker.js @@ -472,9 +472,9 @@ }, this.createAnchor = function(row, column) { return new Anchor(this, row, column) }, this.$split = 0 === "aaa".split(/a/).length ? function(text) { - return text.replace(/\r\n|\r/g, "\n").split("\n") + return text.replace(/\r\n|\r/g, "\n").split("\n"); } : function(text) { - return text.split(/\r\n|\r|\n/) + return text.split(/\r\n|\r|\n/); }, this.$detectNewLine = function(text) { var match = text.match(/^.*?(\r\n|\r|\n)/m); this.$autoNewLine = match ? match[1] : "\n", this._signal("changeNewLineMode") @@ -711,9 +711,9 @@ }, exports.arrayRemove = function(array, value) { for (var i = 0; array.length >= i; i++) value === array[i] && array.splice(i, 1) }, exports.escapeRegExp = function(str) { - return str.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1") + return str.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1"); }, exports.escapeHTML = function(str) { - return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/ = async (runOptions) => { +const scenario: Scenario = async ({ + logger, + scenarioOpts = { numInstances: 10 }, +}) => { return { generate: ({ range, clients: { infraEsClient, apmEsClient } }) => { - const { numServices = 3, numHosts = 10 } = runOptions.scenarioOpts || {}; - const { logger } = runOptions; + const { numInstances } = scenarioOpts; + const transactionName = 'GET /host/{id}'; - // Infra hosts Data logic - - const HOSTS = Array(numHosts) - .fill(0) - .map((_, idx) => infra.host(`my-host-${idx}`)); + // Only half of the hosts will have system metrics + const hostList = times(numInstances / 2).map((index) => infra.host(`host-${index}`)); const hosts = range .interval('30s') .rate(1) .generator((timestamp) => - HOSTS.flatMap((host) => [ + hostList.flatMap((host) => [ host.cpu().timestamp(timestamp), host.memory().timestamp(timestamp), host.network().timestamp(timestamp), @@ -39,28 +40,46 @@ const scenario: Scenario = async (runOptions) => { ); // APM Simple Trace + const instances = times(numInstances).map((index) => { + return apm + .service({ + name: `synth-node-${index % 3}`, + environment: ENVIRONMENT, + agentName: 'node-js', + }) + .instance(`host-${index}`); + }); - const instances = [...Array(numServices).keys()].map((index) => - apm - .service({ name: `synth-node-${index}`, environment: ENVIRONMENT, agentName: 'nodejs' }) - .instance('instance') - ); const instanceSpans = (instance: Instance) => { + const hasHighDuration = Math.random() > 0.5; + const throughput = random(1, 10); + + const traces = range.ratePerMinute(throughput).generator((timestamp) => { + const parentDuration = hasHighDuration ? random(1000, 5000) : random(100, 1000); + return instance + .transaction({ transactionName }) + .timestamp(timestamp) + .duration(parentDuration) + .success(); + }); + + const cpuPct = random(0, 1); + const memoryFree = random(0, 1000); const metricsets = range .interval('30s') .rate(1) .generator((timestamp) => instance .appMetrics({ - 'system.memory.actual.free': 800, + 'system.memory.actual.free': memoryFree, 'system.memory.total': 1000, - 'system.cpu.total.norm.pct': 0.6, + 'system.cpu.total.norm.pct': cpuPct, 'system.process.cpu.total.norm.pct': 0.7, }) .timestamp(timestamp) ); - return [metricsets]; + return [traces, metricsets]; }; return [ diff --git a/packages/kbn-check-mappings-update-cli/current_fields.json b/packages/kbn-check-mappings-update-cli/current_fields.json index dd233e14648bd..aa84c709c655b 100644 --- a/packages/kbn-check-mappings-update-cli/current_fields.json +++ b/packages/kbn-check-mappings-update-cli/current_fields.json @@ -460,6 +460,36 @@ "token", "valid_until" ], + "fleet-agent-policies": [ + "advanced_settings", + "agent_features", + "agent_features.enabled", + "agent_features.name", + "data_output_id", + "description", + "download_source_id", + "fleet_server_host_id", + "global_data_tags", + "inactivity_timeout", + "is_default", + "is_default_fleet_server", + "is_managed", + "is_preconfigured", + "is_protected", + "keep_monitoring_alive", + "monitoring_enabled", + "monitoring_output_id", + "name", + "namespace", + "overrides", + "revision", + "schema_version", + "status", + "supports_agentless", + "unenroll_timeout", + "updated_at", + "updated_by" + ], "fleet-fleet-server-host": [ "host_urls", "is_default", @@ -469,6 +499,32 @@ "proxy_id" ], "fleet-message-signing-keys": [], + "fleet-package-policies": [ + "created_at", + "created_by", + "description", + "elasticsearch", + "enabled", + "inputs", + "is_managed", + "name", + "namespace", + "output_id", + "overrides", + "package", + "package.name", + "package.requires_root", + "package.title", + "package.version", + "policy_id", + "policy_ids", + "revision", + "secret_references", + "secret_references.id", + "updated_at", + "updated_by", + "vars" + ], "fleet-preconfiguration-deletion-record": [ "id" ], @@ -630,6 +686,7 @@ "is_managed", "name", "namespace", + "output_id", "overrides", "package", "package.name", @@ -650,7 +707,9 @@ "has_seen_add_data_notice", "output_secret_storage_requirements_met", "prerelease_integrations_enabled", - "secret_storage_requirements_met" + "secret_storage_requirements_met", + "use_space_awareness_migration_started_at", + "use_space_awareness_migration_status" ], "inventory-view": [], "kql-telemetry": [], diff --git a/packages/kbn-check-mappings-update-cli/current_mappings.json b/packages/kbn-check-mappings-update-cli/current_mappings.json index 4ded89844052b..97e34c9b29341 100644 --- a/packages/kbn-check-mappings-update-cli/current_mappings.json +++ b/packages/kbn-check-mappings-update-cli/current_mappings.json @@ -1553,6 +1553,99 @@ } } }, + "fleet-agent-policies": { + "properties": { + "advanced_settings": { + "index": false, + "type": "flattened" + }, + "agent_features": { + "properties": { + "enabled": { + "type": "boolean" + }, + "name": { + "type": "keyword" + } + } + }, + "data_output_id": { + "type": "keyword" + }, + "description": { + "type": "text" + }, + "download_source_id": { + "type": "keyword" + }, + "fleet_server_host_id": { + "type": "keyword" + }, + "global_data_tags": { + "index": false, + "type": "flattened" + }, + "inactivity_timeout": { + "type": "integer" + }, + "is_default": { + "type": "boolean" + }, + "is_default_fleet_server": { + "type": "boolean" + }, + "is_managed": { + "type": "boolean" + }, + "is_preconfigured": { + "type": "keyword" + }, + "is_protected": { + "type": "boolean" + }, + "keep_monitoring_alive": { + "type": "boolean" + }, + "monitoring_enabled": { + "index": false, + "type": "keyword" + }, + "monitoring_output_id": { + "type": "keyword" + }, + "name": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "overrides": { + "index": false, + "type": "flattened" + }, + "revision": { + "type": "integer" + }, + "schema_version": { + "type": "version" + }, + "status": { + "type": "keyword" + }, + "supports_agentless": { + "type": "boolean" + }, + "unenroll_timeout": { + "type": "integer" + }, + "updated_at": { + "type": "date" + }, + "updated_by": { + "type": "keyword" + } + } + }, "fleet-fleet-server-host": { "properties": { "host_urls": { @@ -1581,6 +1674,87 @@ "dynamic": false, "properties": {} }, + "fleet-package-policies": { + "properties": { + "created_at": { + "type": "date" + }, + "created_by": { + "type": "keyword" + }, + "description": { + "type": "text" + }, + "elasticsearch": { + "dynamic": false, + "properties": {} + }, + "enabled": { + "type": "boolean" + }, + "inputs": { + "dynamic": false, + "properties": {} + }, + "is_managed": { + "type": "boolean" + }, + "name": { + "type": "keyword" + }, + "namespace": { + "type": "keyword" + }, + "output_id": { + "type": "keyword" + }, + "overrides": { + "index": false, + "type": "flattened" + }, + "package": { + "properties": { + "name": { + "type": "keyword" + }, + "requires_root": { + "type": "boolean" + }, + "title": { + "type": "keyword" + }, + "version": { + "type": "keyword" + } + } + }, + "policy_id": { + "type": "keyword" + }, + "policy_ids": { + "type": "keyword" + }, + "revision": { + "type": "integer" + }, + "secret_references": { + "properties": { + "id": { + "type": "keyword" + } + } + }, + "updated_at": { + "type": "date" + }, + "updated_by": { + "type": "keyword" + }, + "vars": { + "type": "flattened" + } + } + }, "fleet-preconfiguration-deletion-record": { "properties": { "id": { @@ -2101,6 +2275,9 @@ "namespace": { "type": "keyword" }, + "output_id": { + "type": "keyword" + }, "overrides": { "index": false, "type": "flattened" @@ -2165,6 +2342,14 @@ }, "secret_storage_requirements_met": { "type": "boolean" + }, + "use_space_awareness_migration_started_at": { + "index": false, + "type": "date" + }, + "use_space_awareness_migration_status": { + "index": false, + "type": "keyword" } } }, diff --git a/packages/kbn-cli-dev-mode/src/optimizer.ts b/packages/kbn-cli-dev-mode/src/optimizer.ts index f81f6ec7fb2a4..f82f152dd7e49 100644 --- a/packages/kbn-cli-dev-mode/src/optimizer.ts +++ b/packages/kbn-cli-dev-mode/src/optimizer.ts @@ -92,7 +92,7 @@ export class Optimizer { ); const log = new ToolingLog(); - const has = (obj: T, x: any): x is keyof T => obj.hasOwnProperty(x); + const has = (obj: T, x: any): x is keyof T => Object.hasOwn(obj, x); log.setWriters([ { diff --git a/packages/kbn-config-schema/src/types/object_type.test.ts b/packages/kbn-config-schema/src/types/object_type.test.ts index d12688fa04099..d8828f566d007 100644 --- a/packages/kbn-config-schema/src/types/object_type.test.ts +++ b/packages/kbn-config-schema/src/types/object_type.test.ts @@ -8,7 +8,7 @@ import { get } from 'lodash'; import { expectType } from 'tsd'; -import { schema } from '../..'; +import { offeringBasedSchema, schema } from '../..'; import { TypeOf } from './object_type'; test('returns value by default', () => { @@ -682,6 +682,10 @@ test('returns schema structure', () => { boolean: schema.boolean(), buffer: schema.buffer(), byteSize: schema.byteSize(), + svlConditional: offeringBasedSchema({ + serverless: schema.literal('serverless'), + traditional: schema.literal('stateful'), + }), conditional: schema.conditional( schema.contextRef('context_value_1'), schema.contextRef('context_value_2'), @@ -699,8 +703,9 @@ test('returns schema structure', () => { record: schema.recordOf(schema.string(), schema.string()), stream: schema.stream(), string: schema.string(), - union: schema.oneOf([schema.string()]), + union: schema.oneOf([schema.string(), schema.number(), schema.boolean()]), uri: schema.uri(), + null: schema.literal(null), }); const type = objSchema.extends({ nested: objSchema, @@ -711,39 +716,43 @@ test('returns schema structure', () => { { path: ['boolean'], type: 'boolean' }, { path: ['buffer'], type: 'binary' }, { path: ['byteSize'], type: 'bytes' }, - { path: ['conditional'], type: 'any' }, + { path: ['svlConditional'], type: 'serverless|stateful' }, + { path: ['conditional'], type: 'string' }, { path: ['duration'], type: 'duration' }, { path: ['ip'], type: 'string' }, - { path: ['literal'], type: 'any' }, + { path: ['literal'], type: 'foo' }, { path: ['map'], type: 'map' }, - { path: ['maybe'], type: 'string' }, - { path: ['never'], type: 'any' }, - { path: ['nullable'], type: 'alternatives' }, + { path: ['maybe'], type: 'string?' }, + { path: ['never'], type: 'never' }, + { path: ['nullable'], type: 'string?|null' }, { path: ['number'], type: 'number' }, { path: ['record'], type: 'record' }, { path: ['stream'], type: 'stream' }, { path: ['string'], type: 'string' }, - { path: ['union'], type: 'alternatives' }, + { path: ['union'], type: 'string|number|boolean' }, { path: ['uri'], type: 'string' }, + { path: ['null'], type: 'null' }, { path: ['nested', 'any'], type: 'any' }, { path: ['nested', 'array'], type: 'array' }, { path: ['nested', 'boolean'], type: 'boolean' }, { path: ['nested', 'buffer'], type: 'binary' }, { path: ['nested', 'byteSize'], type: 'bytes' }, - { path: ['nested', 'conditional'], type: 'any' }, + { path: ['nested', 'svlConditional'], type: 'serverless|stateful' }, + { path: ['nested', 'conditional'], type: 'string' }, { path: ['nested', 'duration'], type: 'duration' }, { path: ['nested', 'ip'], type: 'string' }, - { path: ['nested', 'literal'], type: 'any' }, + { path: ['nested', 'literal'], type: 'foo' }, { path: ['nested', 'map'], type: 'map' }, - { path: ['nested', 'maybe'], type: 'string' }, - { path: ['nested', 'never'], type: 'any' }, - { path: ['nested', 'nullable'], type: 'alternatives' }, + { path: ['nested', 'maybe'], type: 'string?' }, + { path: ['nested', 'never'], type: 'never' }, + { path: ['nested', 'nullable'], type: 'string?|null' }, { path: ['nested', 'number'], type: 'number' }, { path: ['nested', 'record'], type: 'record' }, { path: ['nested', 'stream'], type: 'stream' }, { path: ['nested', 'string'], type: 'string' }, - { path: ['nested', 'union'], type: 'alternatives' }, + { path: ['nested', 'union'], type: 'string|number|boolean' }, { path: ['nested', 'uri'], type: 'string' }, + { path: ['nested', 'null'], type: 'null' }, ]); }); diff --git a/packages/kbn-config-schema/src/types/type.ts b/packages/kbn-config-schema/src/types/type.ts index d7e02e439ae3b..eee480723c623 100644 --- a/packages/kbn-config-schema/src/types/type.ts +++ b/packages/kbn-config-schema/src/types/type.ts @@ -6,7 +6,15 @@ * Side Public License, v 1. */ -import type { AnySchema, CustomValidator, ErrorReport } from 'joi'; +import { + isSchema, + type CustomValidator, + type ErrorReport, + type Schema, + type SchemaLike, + type WhenOptions, + CustomHelpers, +} from 'joi'; import { META_FIELD_X_OAS_DEPRECATED } from '../oas_meta_fields'; import { SchemaTypeError, ValidationError } from '../errors'; import { Reference } from '../references'; @@ -91,9 +99,9 @@ export abstract class Type { * Internal "schema" backed by Joi. * @type {Schema} */ - protected readonly internalSchema: AnySchema; + protected readonly internalSchema: Schema; - protected constructor(schema: AnySchema, options: TypeOptions = {}) { + protected constructor(schema: Schema, options: TypeOptions = {}) { if (options.defaultValue !== undefined) { schema = schema.optional(); @@ -214,7 +222,7 @@ export abstract class Type { } } -function recursiveGetSchemaStructure(internalSchema: AnySchema, path: string[] = []) { +function recursiveGetSchemaStructure(internalSchema: Schema, path: string[] = []) { const array: SchemaStructureEntry[] = []; // Note: we are relying on Joi internals to obtain the schema structure (recursive keys). // This is not ideal, but it works for now and we only need it for some integration test assertions. @@ -222,8 +230,69 @@ function recursiveGetSchemaStructure(internalSchema: AnySchema, path: string[] = for (const [key, val] of (internalSchema as any)._ids._byKey.entries()) { array.push(...recursiveGetSchemaStructure(val.schema, [...path, key])); } + if (!array.length) { - array.push({ path, type: internalSchema.type ?? 'unknown' }); + let type: string; + try { + type = prettyPrintType(internalSchema, path); + } catch (error) { + // failed to find special type, might need to update for new joi versions or type usages + type = internalSchema.type || 'unknown'; + } + + array.push({ + path, + type, + }); } return array; } + +/** + * Returns a more accurate type from complex schema definitions. + * + * For example, conditional values resolve to type `any` when the nested value is only ever a `string`. + * + * @param internalSchema + * @param path of current schema + * @returns schema type + */ +function prettyPrintType(schema?: SchemaLike, path: string[] = []): string { + // takes array of possible values and de-dups and joins + return [...new Set([prettyPrintTypeParts(schema, false, path)].flat())].filter(Boolean).join('|'); +} + +/** + * Recursively collects all possible nested schema types. + */ +function prettyPrintTypeParts( + schema?: SchemaLike, + optional = false, + path: string[] = [] +): string | string[] { + if (!isSchema(schema)) { + if (schema === null) return 'null'; + return `${schema ?? 'unknown'}${optional ? '?' : ''}`; + } + + const isOptionalType = optional || schema._flags?.presence === 'optional'; + // For explicit custom schema.never + if (schema._flags?.presence === 'forbidden') return 'never'; + // For offeringBasedSchema, schema.when, schema.conditional + if (schema.$_terms?.whens?.length > 0) + return (schema.$_terms.whens as WhenOptions[]).flatMap((when) => + [when?.then, when?.otherwise].flatMap((s) => prettyPrintTypeParts(s, isOptionalType, path)) + ); + // schema.oneOf, schema.allOf, etc. + if (schema.$_terms?.matches?.length > 0) + return (schema.$_terms.matches as CustomHelpers[]).flatMap((s) => + prettyPrintTypeParts(s.schema, isOptionalType, path) + ); + // schema.literal + if (schema._flags?.only && (schema as any)._valids?._values?.size > 0) + return [...(schema as any)._valids._values.keys()].flatMap((v) => + prettyPrintTypeParts(v, isOptionalType, path) + ); + + return `${schema?.type || 'unknown'}${isOptionalType ? '?' : ''}`; +} diff --git a/packages/kbn-config/src/__fixtures__/unsplittable_3.yml b/packages/kbn-config/src/__fixtures__/unsplittable_3.yml new file mode 100644 index 0000000000000..8e206af4b0228 --- /dev/null +++ b/packages/kbn-config/src/__fixtures__/unsplittable_3.yml @@ -0,0 +1,7 @@ + +'[foo.bar]': "foobar" +list: + - id: "id1" + '[a.b]': ['foo', 'bar'] + test.this.out: ['foo', 'bar'] + diff --git a/packages/kbn-config/src/raw/read_config.test.ts b/packages/kbn-config/src/raw/read_config.test.ts index 4a3754def8ae7..b7beb85d47147 100644 --- a/packages/kbn-config/src/raw/read_config.test.ts +++ b/packages/kbn-config/src/raw/read_config.test.ts @@ -131,6 +131,33 @@ test('supports unsplittable key syntax on nested list', () => { `); }); +test('supports unsplittable key syntax on nested list with splittable subkeys', () => { + const config = getConfigFromFiles([fixtureFile('/unsplittable_3.yml')]); + + expect(config).toMatchInlineSnapshot(` + Object { + "foo.bar": "foobar", + "list": Array [ + Object { + "a.b": Array [ + "foo", + "bar", + ], + "id": "id1", + "test": Object { + "this": Object { + "out": Array [ + "foo", + "bar", + ], + }, + }, + }, + ], + } + `); +}); + test('supports var:default syntax', () => { process.env.KBN_ENV_VAR1 = 'val1'; diff --git a/packages/kbn-config/src/raw/read_config.ts b/packages/kbn-config/src/raw/read_config.ts index 1126ac1bc3f81..8836c16664e5e 100644 --- a/packages/kbn-config/src/raw/read_config.ts +++ b/packages/kbn-config/src/raw/read_config.ts @@ -59,7 +59,9 @@ function processEntryValue(value: any) { delete value[subKey]; set(value, [unsplitKey], processEntryValue(subVal)); } else { - set(value, subKey, processEntryValue(subVal)); + const subKeySplits = splitKey(subKey); + if (subKeySplits.length > 1) delete value[subKey]; + set(value, subKeySplits, processEntryValue(subVal)); } } } else if (typeof value === 'string') { diff --git a/packages/kbn-data-service/src/search/tabify/tabify_docs.ts b/packages/kbn-data-service/src/search/tabify/tabify_docs.ts index ceb60b7492d92..5f8912c32ae20 100644 --- a/packages/kbn-data-service/src/search/tabify/tabify_docs.ts +++ b/packages/kbn-data-service/src/search/tabify/tabify_docs.ts @@ -48,7 +48,7 @@ function flattenAccum( params?: TabifyDocsOptions ) { for (const k in obj) { - if (!obj.hasOwnProperty(k)) { + if (!Object.hasOwn(obj, k)) { continue; } const val = obj[k]; @@ -114,7 +114,7 @@ export function flattenHit(hit: Hit, indexPattern?: DataView, params?: TabifyDoc // merged, since we would otherwise duplicate values, since ignore_field_values and _source // contain the same values. for (const fieldName in hit.ignored_field_values) { - if (!hit.ignored_field_values.hasOwnProperty(fieldName)) { + if (!Object.hasOwn(hit.ignored_field_values, fieldName)) { continue; } const fieldValue = hit.ignored_field_values[fieldName]; diff --git a/packages/kbn-es-archiver/src/lib/indices/__mocks__/stubs.ts b/packages/kbn-es-archiver/src/lib/indices/__mocks__/stubs.ts index 1bfbc80f52a19..f6b602b734bd0 100644 --- a/packages/kbn-es-archiver/src/lib/indices/__mocks__/stubs.ts +++ b/packages/kbn-es-archiver/src/lib/indices/__mocks__/stubs.ts @@ -121,7 +121,7 @@ export const createStubClient = ( return { body: { ok: true } }; }), create: sinon.spy(async ({ index }) => { - if (existingIndices.includes(index) || aliases.hasOwnProperty(index)) { + if (existingIndices.includes(index) || Object.hasOwn(aliases, index)) { throw createEsClientError('resource_already_exists_exception'); } else { existingIndices.push(index); diff --git a/packages/kbn-es/src/cluster.ts b/packages/kbn-es/src/cluster.ts index 65e232a9bbd48..6644e6828f41b 100644 --- a/packages/kbn-es/src/cluster.ts +++ b/packages/kbn-es/src/cluster.ts @@ -18,6 +18,7 @@ import { promisify } from 'util'; import { CA_CERT_PATH, ES_NOPASSWORD_P12_PATH, extract } from '@kbn/dev-utils'; import { ToolingLog } from '@kbn/tooling-log'; import treeKill from 'tree-kill'; +import { MOCK_IDP_REALM_NAME, ensureSAMLRoleMapping } from '@kbn/mock-idp-utils'; import { downloadSnapshot, installSnapshot, installSource, installArchive } from './install'; import { ES_BIN, ES_PLUGIN_BIN, ES_KEYSTORE_BIN } from './paths'; import { @@ -312,7 +313,7 @@ export class Cluster { */ private exec(installPath: string, opts: EsClusterExecOptions) { const { - skipNativeRealmSetup = false, + skipSecuritySetup = false, reportTime = () => {}, startTime, skipReadyCheck, @@ -437,8 +438,8 @@ export class Cluster { }); } - // once the cluster is ready setup the native realm - if (!skipNativeRealmSetup) { + // once the cluster is ready setup the realm + if (!skipSecuritySetup) { const nativeRealm = new NativeRealm({ log: this.log, elasticPassword: options.password, @@ -446,8 +447,12 @@ export class Cluster { }); await nativeRealm.setPasswords(options); - } + const samlRealmConfigPrefix = `authc.realms.saml.${MOCK_IDP_REALM_NAME}.`; + if (args.some((arg) => arg.includes(samlRealmConfigPrefix))) { + await ensureSAMLRoleMapping(client); + } + } this.log.success('kbn/es setup complete'); }); diff --git a/packages/kbn-es/src/cluster_exec_options.ts b/packages/kbn-es/src/cluster_exec_options.ts index 362af62c57954..2cbefe06095e1 100644 --- a/packages/kbn-es/src/cluster_exec_options.ts +++ b/packages/kbn-es/src/cluster_exec_options.ts @@ -7,7 +7,7 @@ */ export interface EsClusterExecOptions { - skipNativeRealmSetup?: boolean; + skipSecuritySetup?: boolean; reportTime?: (...args: any[]) => void; startTime?: number; esArgs?: string[] | string; diff --git a/packages/kbn-es/src/install/install_archive.ts b/packages/kbn-es/src/install/install_archive.ts index 2bfef3ab7abef..c9f3ab3cc274c 100644 --- a/packages/kbn-es/src/install/install_archive.ts +++ b/packages/kbn-es/src/install/install_archive.ts @@ -18,7 +18,7 @@ import { ToolingLog } from '@kbn/tooling-log'; import { BASE_PATH, ES_CONFIG, ES_KEYSTORE_BIN } from '../paths'; import { Artifact } from '../artifact'; import { parseSettings, SettingsFilter } from '../settings'; -import { log as defaultLog } from '../utils/log'; +import { log as defaultLog, isFile, copyFileSync } from '../utils'; import { InstallArchiveOptions } from './types'; const isHttpUrl = (str: string) => { @@ -41,6 +41,7 @@ export async function installArchive(archive: string, options?: InstallArchiveOp log = defaultLog, esArgs = [], disableEsTmpDir = process.env.FTR_DISABLE_ES_TMPDIR?.toLowerCase() === 'true', + resources, } = options || {}; let dest = archive; @@ -84,6 +85,23 @@ export async function installArchive(archive: string, options?: InstallArchiveOp ...parseSettings(esArgs, { filter: SettingsFilter.SecureOnly }), ]); + // copy resources to ES config directory + if (resources) { + resources.forEach((resource) => { + if (!isFile(resource)) { + throw new Error( + `Invalid resource: '${resource}'.\nOnly valid files can be copied to ES config directory` + ); + } + + const filename = path.basename(resource); + const destPath = path.resolve(installPath, 'config', filename); + + copyFileSync(resource, destPath); + log.info('moved %s in config to %s', resource, destPath); + }); + } + return { installPath, disableEsTmpDir }; } diff --git a/packages/kbn-es/src/install/install_snapshot.ts b/packages/kbn-es/src/install/install_snapshot.ts index e4a7fbd678f78..49f5d26df4ad6 100644 --- a/packages/kbn-es/src/install/install_snapshot.ts +++ b/packages/kbn-es/src/install/install_snapshot.ts @@ -51,6 +51,7 @@ export async function installSnapshot({ log = defaultLog, esArgs, useCached = false, + resources, }: InstallSnapshotOptions) { const { downloadPath } = await downloadSnapshot({ license, @@ -68,5 +69,6 @@ export async function installSnapshot({ installPath, log, esArgs, + resources, }); } diff --git a/packages/kbn-es/src/install/install_source.ts b/packages/kbn-es/src/install/install_source.ts index b3fca2b2ac046..6bec4a5d764d9 100644 --- a/packages/kbn-es/src/install/install_source.ts +++ b/packages/kbn-es/src/install/install_source.ts @@ -33,6 +33,7 @@ export async function installSource({ installPath = path.resolve(basePath, 'source'), log = defaultLog, esArgs, + resources, }: InstallSourceOptions) { log.info('source path: %s', chalk.bold(sourcePath)); log.info('install path: %s', chalk.bold(installPath)); @@ -59,6 +60,7 @@ export async function installSource({ installPath, log, esArgs, + resources, }); } diff --git a/packages/kbn-es/src/install/types.ts b/packages/kbn-es/src/install/types.ts index 6217f5b93c7f6..6db62b28eae70 100644 --- a/packages/kbn-es/src/install/types.ts +++ b/packages/kbn-es/src/install/types.ts @@ -17,6 +17,7 @@ export interface InstallSourceOptions { installPath?: string; log?: ToolingLog; esArgs?: string[]; + resources?: string[]; } export interface DownloadSnapshotOptions { @@ -26,6 +27,7 @@ export interface DownloadSnapshotOptions { installPath?: string; log?: ToolingLog; useCached?: boolean; + resources?: string[]; } export interface InstallSnapshotOptions extends DownloadSnapshotOptions { @@ -42,4 +44,5 @@ export interface InstallArchiveOptions { esArgs?: string[]; /** Disable creating a temp directory, allowing ES to write to OS's /tmp directory */ disableEsTmpDir?: boolean; + resources?: string[]; } diff --git a/packages/kbn-es/src/integration_tests/cluster.test.ts b/packages/kbn-es/src/integration_tests/cluster.test.ts index 0ef9803539fdd..d63b81c9a771e 100644 --- a/packages/kbn-es/src/integration_tests/cluster.test.ts +++ b/packages/kbn-es/src/integration_tests/cluster.test.ts @@ -311,6 +311,7 @@ describe('#installArchive()', () => { esArgs: ['foo=true'], log, disableEsTmpDir: true, + resources: ['path/to/resource'], }; const cluster = new Cluster({ log }); await cluster.installArchive('bar', options); diff --git a/packages/kbn-es/src/serverless_resources/project_roles/security/roles.yml b/packages/kbn-es/src/serverless_resources/project_roles/security/roles.yml index b05bb0de2f2c8..3c008407d5c46 100644 --- a/packages/kbn-es/src/serverless_resources/project_roles/security/roles.yml +++ b/packages/kbn-es/src/serverless_resources/project_roles/security/roles.yml @@ -47,6 +47,7 @@ viewer: - feature_siem.endpoint_list_read - feature_securitySolutionCases.read - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.read - feature_osquery.read @@ -124,6 +125,7 @@ editor: - feature_siem.file_operations_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.all - feature_osquery.all @@ -171,6 +173,7 @@ t1_analyst: - feature_siem.endpoint_list_read - feature_securitySolutionCases.read - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.read - feature_osquery.read @@ -224,6 +227,7 @@ t2_analyst: - feature_siem.endpoint_list_read - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.read - feature_osquery.read @@ -292,6 +296,7 @@ t3_analyst: - feature_siem.scan_operations_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.all - feature_osquery.all @@ -352,6 +357,7 @@ threat_intelligence_analyst: - feature_siem.blocklist_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.read - feature_osquery.all @@ -418,6 +424,7 @@ rule_author: - feature_siem.actions_log_management_read - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.all - feature_osquery.all @@ -488,6 +495,7 @@ soc_manager: - feature_siem.scan_operations_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_osquery.all @@ -546,6 +554,7 @@ detections_admin: - feature_siem.crud_alerts - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_dev_tools.all @@ -603,6 +612,7 @@ platform_engineer: - feature_siem.actions_log_management_read - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_fleet.all @@ -674,6 +684,7 @@ endpoint_operations_analyst: - feature_siem.scan_operations_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_osquery.all @@ -747,6 +758,7 @@ endpoint_policy_manager: - feature_siem.blocklist_all # Elastic Defend Policy Management - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_osquery.all diff --git a/packages/kbn-es/src/serverless_resources/security_roles.json b/packages/kbn-es/src/serverless_resources/security_roles.json index 8ba9dc4c6bc73..0554853b82df9 100644 --- a/packages/kbn-es/src/serverless_resources/security_roles.json +++ b/packages/kbn-es/src/serverless_resources/security_roles.json @@ -34,6 +34,7 @@ "ml": ["read"], "siem": ["read", "read_alerts"], "securitySolutionAssistant": ["all"], + "securitySolutionAttackDiscovery": ["all"], "securitySolutionCases": ["read"], "actions": ["read"], "builtInAlerts": ["read"] @@ -80,6 +81,7 @@ "ml": ["read"], "siem": ["read", "read_alerts"], "securitySolutionAssistant": ["all"], + "securitySolutionAttackDiscovery": ["all"], "securitySolutionCases": ["read"], "actions": ["read"], "builtInAlerts": ["read"] @@ -145,6 +147,7 @@ ], "securitySolutionCases": ["all"], "securitySolutionAssistant": ["all"], + "securitySolutionAttackDiscovery": ["all"], "actions": ["read"], "builtInAlerts": ["all"], "osquery": ["all"], @@ -201,6 +204,7 @@ "ml": ["read"], "siem": ["all", "read_alerts", "crud_alerts"], "securitySolutionAssistant": ["all"], + "securitySolutionAttackDiscovery": ["all"], "securitySolutionCases": ["all"], "actions": ["read"], "builtInAlerts": ["all"] @@ -253,6 +257,7 @@ "ml": ["read"], "siem": ["all", "read_alerts", "crud_alerts"], "securitySolutionAssistant": ["all"], + "securitySolutionAttackDiscovery": ["all"], "securitySolutionCases": ["all"], "actions": ["all"], "builtInAlerts": ["all"] @@ -300,6 +305,7 @@ "ml": ["all"], "siem": ["all", "read_alerts", "crud_alerts"], "securitySolutionAssistant": ["all"], + "securitySolutionAttackDiscovery": ["all"], "securitySolutionCases": ["all"], "actions": ["read"], "builtInAlerts": ["all"], @@ -354,6 +360,7 @@ "ml": ["all"], "siem": ["all", "read_alerts", "crud_alerts"], "securitySolutionAssistant": ["all"], + "securitySolutionAttackDiscovery": ["all"], "securitySolutionCases": ["all"], "actions": ["all"], "builtInAlerts": ["all"] diff --git a/packages/kbn-es/src/utils/extract_config_files.ts b/packages/kbn-es/src/utils/extract_config_files.ts index 908005887dbc0..52e382a64fe8b 100644 --- a/packages/kbn-es/src/utils/extract_config_files.ts +++ b/packages/kbn-es/src/utils/extract_config_files.ts @@ -43,11 +43,11 @@ export function extractConfigFiles( return localConfig; } -function isFile(dest = '') { +export function isFile(dest = '') { return fs.existsSync(dest) && fs.statSync(dest).isFile(); } -function copyFileSync(src: string, dest: string) { +export function copyFileSync(src: string, dest: string) { const destPath = path.dirname(dest); if (!fs.existsSync(destPath)) { diff --git a/packages/kbn-es/src/utils/index.ts b/packages/kbn-es/src/utils/index.ts index 04e94d109f58f..f3457fc958b53 100644 --- a/packages/kbn-es/src/utils/index.ts +++ b/packages/kbn-es/src/utils/index.ts @@ -10,7 +10,7 @@ export { cache } from './cache'; export { log } from './log'; export { parseEsLog } from './parse_es_log'; export { findMostRecentlyChanged } from './find_most_recently_changed'; -export { extractConfigFiles } from './extract_config_files'; +export { extractConfigFiles, isFile, copyFileSync } from './extract_config_files'; // @ts-expect-error not typed yet export { NativeRealm, SYSTEM_INDICES_SUPERUSER } from './native_realm'; export { buildSnapshot } from './build_snapshot'; diff --git a/packages/kbn-eslint-config/.eslintrc.js b/packages/kbn-eslint-config/.eslintrc.js index 1391c842b235a..028309aa05774 100644 --- a/packages/kbn-eslint-config/.eslintrc.js +++ b/packages/kbn-eslint-config/.eslintrc.js @@ -312,5 +312,9 @@ module.exports = { '@kbn/imports/uniform_imports': 'error', '@kbn/imports/no_unused_imports': 'error', '@kbn/imports/no_boundary_crossing': 'error', + + 'no-new-func': 'error', + 'no-implied-eval': 'error', + 'no-prototype-builtins': 'error', }, }; diff --git a/packages/kbn-esql-validation-autocomplete/README.md b/packages/kbn-esql-validation-autocomplete/README.md index b5a4fc4d71c61..f964033090c2d 100644 --- a/packages/kbn-esql-validation-autocomplete/README.md +++ b/packages/kbn-esql-validation-autocomplete/README.md @@ -209,12 +209,157 @@ Note that autocomplete works most of the time with incomplete/invalid queries, s Once the AST is produced there's a `getAstContext` function that finds the cursor position node (and its parent command), together with some hint like the type of current context: `expression`, `function`, `newCommand`, `option`. The most complex case is the `expression` as it can cover a multitude of cases. The function is highly commented in order to identify the specific cases, but there's probably some obscure area still to comment/clarify. -### Adding new commands/options/functions/etc... +### Automated testing -To update the definitions: +Both the validation and autocomplete engine are covered by extensive suites of tests. -1. open either appropriate definition file within the `definitions` folder and add a new entry to the relative array -2. if you are adding a function, run `yarn maketests` to add a set of fundamental validation tests for the new definition. If any of the suggested tests are wrong, feel free to correct them by hand. If it seems like a general problem, open an issue with the details so that we can update the generator code. -3. write new tests for validation and autocomplete +#### Running the tests -- if a new function requires a new type of test, make sure to write it manually +All the tests can be run using the `yarn jest:tests packages/kbn-esql-validation-autocomplete/path/to/test/file` command at the root of the repository. + +To run all autocomplete and validation tests you can specifically run + +`yarn test:jest packages/kbn-esql-validation-autocomplete/` + +#### Ongoing refactor + +The test suites are in a state of transition from an older pattern to a newer pattern and so they are more complicated than we would like. We aim to improve and simplify the DX over time. + +The older pattern is + +- a single test file for each engine, one for validation, one for autocomplete. These were always large files and have only grown. +- custom test methods: `testSuggestions` / `testErrorsAndWarnings` +- validation cases are recorded in a JSON file which is then used to check our results against a live Elasticsearch instance in a functional test + +The newer pattern is + +- splitting the tests into multiple smaller files, all found in `__tests__` directories +- standard test methods (`it`, `test`) with custom _assertion_ helpers +- validation cases are checked against Elasticsearch by injecting assertion helpers run API integration tests. This does not require a JSON file. + +#### Validation + +##### The new way + +Validation test logic is found in `packages/kbn-esql-validation-autocomplete/src/validation/__tests__`. + +Tests are found in files named with the following convention: `validation.some-description.test.ts`. + +Here is an example of a block in the new test format. + +```ts +describe('METRICS [ [ BY ]]', () => { + test('errors on invalid command start', async () => { + const { expectErrors } = await setup(); + + await expectErrors('m', [ + "SyntaxError: mismatched input 'm' expecting {'explain', 'from', 'meta', 'metrics', 'row', 'show'}", + ]); + await expectErrors('metrics ', [ + "SyntaxError: mismatched input '' expecting {UNQUOTED_SOURCE, QUOTED_STRING}", + ]); + }); +}); +``` + +`expectErrors` is created in the `setup()` factory. It has a very similar API to `testErrorsAndWarnings` however it is not itself a Jest test case. It is simply an assertion that is wrapped in a test case defined with the standard `test` or `it` function. + +##### The old way + +The old validation tests look like this + +```ts +testErrorsAndWarnings(`ROW var = NOT 5 LIKE "?a"`, [ + `Argument of [LIKE] must be [text], found value [5] type [integer]`, +]); +``` + +and are found in `packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts`. + +`testErrorsAndWarnings` supports `skip` and `only` modifiers e.g. `testErrorsAndWarnings.only('...')`. + +It accepts + +1. a query +2. a list of expected errors (can be empty) +3. a list of expected warnings (can be empty or omitted) + +The bulk of the validation tests are auto-generated from function definitions. All the generated function tests are found within the following describe block + +```ts +describe(FUNCTION_DESCRIBE_BLOCK_NAME, () => { + ... +}); +``` + +They are currently generated in CI when a new function definition is added. The generator script is at `packages/kbn-esql-validation-autocomplete/scripts/generate_function_validation_tests.ts`. + +The generator can be run locally using the `cd packages/kbn-esql-validation-autocomplete && yarn make:tests`. + +It is not perfect and occasionally creates a test case that is invalid for a particular function. So, humans are allowed to edit the expected assertions for any test case—those edits will not be overwritten by the generator script. However, if a human deletes a test case, it will be added back next time the generator runs. So, we should edit the test cases to make them valid, not delete them. + +Running the tests in `validation.test.ts` populates `packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json` which is then used in `test/api_integration/apis/esql/errors.ts` to make sure our validator isn't giving users false positives. Therefore, the validation test suite should always be run after any changes have been made to it so that the JSON file stays in sync. + +#### Autocomplete + +##### The new way + +The new tests are found in `packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__`. + +They look like this. + +```ts +test('lists possible aggregations on space after command', async () => { + const { assertSuggestions } = await setup(); + const expected = ['var0 = ', ...allAggFunctions, ...allEvaFunctions]; + + await assertSuggestions('from a | stats /', expected); + await assertSuggestions('FROM a | STATS /', expected); +}); +``` + +`assertSuggestions` is created by the `setup` factory. It does not set up a Jest test case internally, so it needs to be wrapped in `test` or `it`. + +The suggestion position is calculated from the placement of `/` in the query. + +The arguments are as follows + +1. the query +2. the expected suggestions (`Array`) +3. options + +Options is + +```ts +export interface SuggestOptions { + triggerCharacter?: string; + callbacks?: ESQLCallbacks; +} +``` + +So, that allows you to customize the [trigger kind](https://microsoft.github.io/monaco-editor/typedoc/enums/languages.CompletionTriggerKind.html) in the `ctx` object and the field list and other callback results in `callbacks`. + +##### The old way + +All the legacy autocomplete tests are found in `packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts`. + +They look like this + +```ts +testSuggestions('from a | eval a = 1 year /', [ + ',', + '| ', + ...getFunctionSignaturesByReturnType('eval', 'any', { builtin: true, skipAssign: true }, [ + 'time_interval', + ]), +]); +``` + +Similarly to `testErrorsAndWarnings`, `testSuggestions` is an all-in-one utility that sets up a Jest test case internally. + +Its parameters are as follows + +1. the query +2. the expected suggestions (can be strings or `Partial`) +3. the trigger character. This should only be included if the test is intended to validate a "Trigger Character" trigger kind from Monaco ([ref](https://microsoft.github.io/monaco-editor/typedoc/enums/languages.CompletionTriggerKind.html#TriggerCharacter)) +4. custom callback data such as a list of indicies or a field list diff --git a/packages/kbn-esql-validation-autocomplete/scripts/generate_function_validation_tests.ts b/packages/kbn-esql-validation-autocomplete/scripts/generate_function_validation_tests.ts index 3118c78f0dbf7..02e37108db7b8 100644 --- a/packages/kbn-esql-validation-autocomplete/scripts/generate_function_validation_tests.ts +++ b/packages/kbn-esql-validation-autocomplete/scripts/generate_function_validation_tests.ts @@ -21,8 +21,8 @@ import { SupportedDataType, FunctionDefinition, dataTypes, - isSupportedDataType, fieldTypes, + isFieldType, } from '../src/definitions/types'; import { FUNCTION_DESCRIBE_BLOCK_NAME } from '../src/validation/function_describe_block_name'; import { getMaxMinNumberOfParams } from '../src/validation/helpers'; @@ -1110,7 +1110,7 @@ function getFieldMapping( return params.map(({ name: _name, type, constantOnly, literalOptions, ...rest }) => { const typeString: string = type as string; - if (isSupportedDataType(typeString)) { + if (isFieldType(typeString)) { if (useLiterals && literalOptions) { return { name: `"${literalOptions[0]}"`, diff --git a/packages/kbn-esql-validation-autocomplete/src/__tests__/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/__tests__/helpers.ts index 273679ab1f267..020ee21940fd0 100644 --- a/packages/kbn-esql-validation-autocomplete/src/__tests__/helpers.ts +++ b/packages/kbn-esql-validation-autocomplete/src/__tests__/helpers.ts @@ -72,6 +72,7 @@ export function getCallbackMocks() { indexes.map((name) => ({ name, hidden: name.startsWith('.'), + type: 'Index', })) ), getPolicies: jest.fn(async () => policies), diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.suggest.test.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/autocomplete.suggest.test.ts similarity index 87% rename from packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.suggest.test.ts rename to packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/autocomplete.suggest.test.ts index 7bb96f602c0dc..bafd33a56c204 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.suggest.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/__tests__/autocomplete.suggest.test.ts @@ -7,10 +7,10 @@ */ import { getAstAndSyntaxErrors } from '@kbn/esql-ast'; -import { ESQLCallbacks } from '../shared/types'; -import * as autocomplete from './autocomplete'; -import { getCallbackMocks } from '../__tests__/helpers'; -import { EditorContext } from './types'; +import { ESQLCallbacks } from '../../shared/types'; +import * as autocomplete from '../autocomplete'; +import { getCallbackMocks } from '../../__tests__/helpers'; +import { EditorContext } from '../types'; const setup = async (caret = '?') => { if (caret.length !== 1) throw new Error('Caret must be a single character'); diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts index dfae9d76a73af..bfb8c8e2b16bf 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.test.ts @@ -269,11 +269,7 @@ describe('autocomplete', () => { `dissect keywordField ${constantPattern} |`, ]; for (const subExpression of subExpressions) { - // Unskip once https://github.com/elastic/kibana/issues/190070 is fixed - testSuggestions.skip( - `from a | ${subExpression} grok /`, - getFieldNamesByType(ESQL_STRING_TYPES) - ); + testSuggestions(`from a | ${subExpression} grok /`, getFieldNamesByType(ESQL_STRING_TYPES)); testSuggestions(`from a | ${subExpression} grok keywordField /`, [constantPattern], ' '); testSuggestions(`from a | ${subExpression} grok keywordField ${constantPattern} /`, ['| ']); } @@ -1024,8 +1020,7 @@ describe('autocomplete', () => { ]); // DISSECT field - // enable once https://github.com/elastic/kibana/issues/190070 is fixed - testSuggestions.skip('FROM index1 | DISSECT b/', getFieldNamesByType(ESQL_STRING_TYPES)); + testSuggestions('FROM index1 | DISSECT b/', getFieldNamesByType(ESQL_STRING_TYPES)); // DROP (first field) testSuggestions('FROM index1 | DROP f/', getFieldNamesByType('any')); @@ -1057,8 +1052,7 @@ describe('autocomplete', () => { ]); // GROK field - // enable once https://github.com/elastic/kibana/issues/190070 - testSuggestions.skip('FROM index1 | GROK f/', getFieldNamesByType(ESQL_STRING_TYPES)); + testSuggestions('FROM index1 | GROK f/', getFieldNamesByType(ESQL_STRING_TYPES), undefined); // KEEP (first field) testSuggestions('FROM index1 | KEEP f/', getFieldNamesByType('any')); diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts index e775c3f05fe5f..1ccc6d6e62bf5 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/autocomplete.ts @@ -349,8 +349,8 @@ function getSourcesRetriever(resourceRetriever?: ESQLCallbacks) { return buildSourcesDefinitions( list .filter(({ hidden }) => !hidden) - .map(({ name, dataStreams, title }) => { - return { name, isIntegration: Boolean(dataStreams && dataStreams.length), title }; + .map(({ name, dataStreams, title, type }) => { + return { name, isIntegration: Boolean(dataStreams && dataStreams.length), title, type }; }) ); }; @@ -660,7 +660,7 @@ async function getExpressionSuggestionsByType( if ((!nodeArg || isNewExpression) && !endsWithNot) { suggestions.push( ...(await getFieldsOrFunctionsSuggestions( - [argDef.innerType || 'any'], + argDef.innerTypes ?? ['any'], command.name, option?.name, getFieldsByType, @@ -906,7 +906,7 @@ async function getExpressionSuggestionsByType( } } if (argDef.type === 'source') { - if (argDef.innerType === 'policy') { + if (argDef.innerTypes?.includes('policy')) { // ... | ENRICH const policies = await getPolicies(); suggestions.push(...(policies.length ? policies : [buildNoPoliciesAvailableDefinition()])); diff --git a/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts b/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts index f4c9ad82b80cf..30772d6e070fc 100644 --- a/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts +++ b/packages/kbn-esql-validation-autocomplete/src/autocomplete/factories.ts @@ -187,9 +187,9 @@ export const buildVariablesDefinitions = (variables: string[]): SuggestionRawDef })); export const buildSourcesDefinitions = ( - sources: Array<{ name: string; isIntegration: boolean; title?: string }> + sources: Array<{ name: string; isIntegration: boolean; title?: string; type?: string }> ): SuggestionRawDefinition[] => - sources.map(({ name, isIntegration, title }) => ({ + sources.map(({ name, isIntegration, title, type }) => ({ label: title ?? name, text: getSafeInsertSourceText(name) + (!isIntegration ? ' ' : ''), isSnippet: isIntegration, @@ -199,7 +199,10 @@ export const buildSourcesDefinitions = ( defaultMessage: `Integration`, }) : i18n.translate('kbn-esql-validation-autocomplete.esql.autocomplete.sourceDefinition', { - defaultMessage: `Index`, + defaultMessage: '{type}', + values: { + type: type ?? 'Index', + }, }), sortText: 'A', command: TRIGGER_SUGGESTION_COMMAND, diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts index 1718841711602..2e67461f073c2 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/commands.ts @@ -415,8 +415,7 @@ export const commandDefinitions: CommandDefinition[] = [ signature: { multipleParams: false, params: [ - // innerType: 'string' is interpreted as keyword and text (see columnParamsWithInnerTypes) - { name: 'column', type: 'column', innerType: 'string' }, + { name: 'column', type: 'column', innerTypes: ['keyword', 'text'] }, { name: 'pattern', type: 'string', constantOnly: true }, ], }, @@ -433,8 +432,7 @@ export const commandDefinitions: CommandDefinition[] = [ signature: { multipleParams: false, params: [ - // innerType: 'string' is interpreted as keyword and text (see columnParamsWithInnerTypes) - { name: 'column', type: 'column', innerType: 'string' }, + { name: 'column', type: 'column', innerTypes: ['keyword', 'text'] }, { name: 'pattern', type: 'string', constantOnly: true }, ], }, @@ -449,7 +447,7 @@ export const commandDefinitions: CommandDefinition[] = [ modes: [], signature: { multipleParams: false, - params: [{ name: 'column', type: 'column', innerType: 'any' }], + params: [{ name: 'column', type: 'column', innerTypes: ['any'] }], }, }, { @@ -467,7 +465,7 @@ export const commandDefinitions: CommandDefinition[] = [ modes: [ENRICH_MODES], signature: { multipleParams: false, - params: [{ name: 'policyName', type: 'source', innerType: 'policy' }], + params: [{ name: 'policyName', type: 'source', innerTypes: ['policy'] }], }, }, ]; diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/helpers.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/helpers.ts index 3773a7c30e3d1..9b673cc2d4e6e 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/helpers.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/helpers.ts @@ -93,7 +93,7 @@ function printCommandArgument( return param.name || ''; } return `${param.name}${param.optional ? ':?' : ':'} ${param.type}${ - param.innerType ? `{${param.innerType}}` : '' + param.innerTypes ? `{${param.innerTypes}}` : '' }`; } diff --git a/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts b/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts index d41a18ba99cfe..043fb77eb262b 100644 --- a/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts +++ b/packages/kbn-esql-validation-autocomplete/src/definitions/types.ts @@ -154,13 +154,13 @@ export interface CommandBaseDefinition { hidden?: boolean; signature: { multipleParams: boolean; - // innerType here is useful to drill down the type in case of "column" + // innerTypes here is useful to drill down the type in case of "column" // i.e. column of type string params: Array<{ name: string; type: string; optional?: boolean; - innerType?: string; + innerTypes?: string[]; values?: string[]; valueDescriptions?: string[]; constantOnly?: boolean; diff --git a/packages/kbn-esql-validation-autocomplete/src/shared/types.ts b/packages/kbn-esql-validation-autocomplete/src/shared/types.ts index 08e1cdccc37a3..04a8365c5e51c 100644 --- a/packages/kbn-esql-validation-autocomplete/src/shared/types.ts +++ b/packages/kbn-esql-validation-autocomplete/src/shared/types.ts @@ -20,6 +20,7 @@ export interface ESQLCallbacks { hidden: boolean; title?: string; dataStreams?: Array<{ name: string; title?: string }>; + type?: string; } >; getFieldsFor?: CallbackFn<{ query: string }, ESQLRealField>; diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json index 9eecf5156a892..91a4f120cf2dd 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json +++ b/packages/kbn-esql-validation-autocomplete/src/validation/esql_validation_meta_tests.json @@ -2685,7 +2685,7 @@ { "query": "from a_index | dissect doubleField \"%{firstWord}\"", "error": [ - "DISSECT only supports string type values, found [doubleField] of type [double]" + "DISSECT only supports keyword, text types values, found [doubleField] of type [double]" ], "warning": [] }, @@ -2779,7 +2779,7 @@ { "query": "from a_index | grok doubleField \"%{firstWord}\"", "error": [ - "GROK only supports string type values, found [doubleField] of type [double]" + "GROK only supports keyword, text types values, found [doubleField] of type [double]" ], "warning": [] }, @@ -31920,6 +31920,62 @@ ], "warning": [] }, + { + "query": "from a_index | stats var = max(textField)", + "error": [ + "Argument of [max] must be [double], found value [textField] type [text]" + ], + "warning": [] + }, + { + "query": "from a_index | stats max(textField)", + "error": [ + "Argument of [max] must be [double], found value [textField] type [text]" + ], + "warning": [] + }, + { + "query": "from a_index | where max(textField)", + "error": [ + "WHERE does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | where max(textField) > 0", + "error": [ + "WHERE does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = max(textField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = max(textField) > 0", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(textField)", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, + { + "query": "from a_index | eval max(textField) > 0", + "error": [ + "EVAL does not support function max" + ], + "warning": [] + }, { "query": "from a_index | stats var = min(doubleField)", "error": [], @@ -32504,6 +32560,62 @@ ], "warning": [] }, + { + "query": "from a_index | stats var = min(textField)", + "error": [ + "Argument of [min] must be [double], found value [textField] type [text]" + ], + "warning": [] + }, + { + "query": "from a_index | stats min(textField)", + "error": [ + "Argument of [min] must be [double], found value [textField] type [text]" + ], + "warning": [] + }, + { + "query": "from a_index | where min(textField)", + "error": [ + "WHERE does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | where min(textField) > 0", + "error": [ + "WHERE does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = min(textField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval var = min(textField) > 0", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(textField)", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, + { + "query": "from a_index | eval min(textField) > 0", + "error": [ + "EVAL does not support function min" + ], + "warning": [] + }, { "query": "from a_index | stats var = count(textField)", "error": [], @@ -34937,6 +35049,42 @@ ], "warning": [] }, + { + "query": "from a_index | stats by bucket(dateField, textField)", + "error": [ + "Argument of [bucket] must be a constant, received [textField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats by bin(dateField, textField)", + "error": [ + "Argument of [bin] must be a constant, received [textField]" + ], + "warning": [] + }, + { + "query": "from a_index | sort bucket(dateField, textField)", + "error": [ + "SORT does not support function bucket" + ], + "warning": [] + }, + { + "query": "from a_index | stats bucket(\"2022\", textField)", + "error": [ + "Argument of [bucket] must be a constant, received [textField]" + ], + "warning": [] + }, + { + "query": "from a_index | stats bucket(concat(\"20\", \"22\"), textField)", + "error": [ + "Argument of [bucket] must be [date], found value [concat(\"20\",\"22\")] type [keyword]", + "Argument of [bucket] must be a constant, received [textField]" + ], + "warning": [] + }, { "query": "from a_index | stats var = percentile(doubleField, doubleField)", "error": [ diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts index ab5a7ec61329e..15ca9cbfe6fbf 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts @@ -701,7 +701,7 @@ describe('validation logic', () => { // Do not try to validate the dissect pattern string testErrorsAndWarnings('from a_index | dissect textField "%{firstWord}"', []); testErrorsAndWarnings('from a_index | dissect doubleField "%{firstWord}"', [ - 'DISSECT only supports string type values, found [doubleField] of type [double]', + 'DISSECT only supports keyword, text types values, found [doubleField] of type [double]', ]); testErrorsAndWarnings('from a_index | dissect textField "%{firstWord}" option ', [ "SyntaxError: mismatched input '' expecting '='", @@ -748,11 +748,10 @@ describe('validation logic', () => { testErrorsAndWarnings('from a_index | grok textField %a', [ "SyntaxError: mismatched input '%' expecting QUOTED_STRING", ]); - // @TODO: investigate // Do not try to validate the grok pattern string testErrorsAndWarnings('from a_index | grok textField "%{firstWord}"', []); testErrorsAndWarnings('from a_index | grok doubleField "%{firstWord}"', [ - 'GROK only supports string type values, found [doubleField] of type [double]', + 'GROK only supports keyword, text types values, found [doubleField] of type [double]', ]); testErrorsAndWarnings('from a_index | grok textField "%{firstWord}" | keep firstWord', []); // testErrorsAndWarnings('from a_index | grok s* "%{a}"', [ @@ -12285,6 +12284,38 @@ describe('validation logic', () => { testErrorsAndWarnings('from a_index | stats max(concat("20", "22"))', [ 'Argument of [max] must be [double], found value [concat("20","22")] type [keyword]', ]); + + testErrorsAndWarnings('from a_index | stats var = max(textField)', [ + 'Argument of [max] must be [double], found value [textField] type [text]', + ]); + + testErrorsAndWarnings('from a_index | stats max(textField)', [ + 'Argument of [max] must be [double], found value [textField] type [text]', + ]); + + testErrorsAndWarnings('from a_index | where max(textField)', [ + 'WHERE does not support function max', + ]); + + testErrorsAndWarnings('from a_index | where max(textField) > 0', [ + 'WHERE does not support function max', + ]); + + testErrorsAndWarnings('from a_index | eval var = max(textField)', [ + 'EVAL does not support function max', + ]); + + testErrorsAndWarnings('from a_index | eval var = max(textField) > 0', [ + 'EVAL does not support function max', + ]); + + testErrorsAndWarnings('from a_index | eval max(textField)', [ + 'EVAL does not support function max', + ]); + + testErrorsAndWarnings('from a_index | eval max(textField) > 0', [ + 'EVAL does not support function max', + ]); }); describe('min', () => { @@ -12607,6 +12638,38 @@ describe('validation logic', () => { testErrorsAndWarnings('from a_index | stats min(concat("20", "22"))', [ 'Argument of [min] must be [double], found value [concat("20","22")] type [keyword]', ]); + + testErrorsAndWarnings('from a_index | stats var = min(textField)', [ + 'Argument of [min] must be [double], found value [textField] type [text]', + ]); + + testErrorsAndWarnings('from a_index | stats min(textField)', [ + 'Argument of [min] must be [double], found value [textField] type [text]', + ]); + + testErrorsAndWarnings('from a_index | where min(textField)', [ + 'WHERE does not support function min', + ]); + + testErrorsAndWarnings('from a_index | where min(textField) > 0', [ + 'WHERE does not support function min', + ]); + + testErrorsAndWarnings('from a_index | eval var = min(textField)', [ + 'EVAL does not support function min', + ]); + + testErrorsAndWarnings('from a_index | eval var = min(textField) > 0', [ + 'EVAL does not support function min', + ]); + + testErrorsAndWarnings('from a_index | eval min(textField)', [ + 'EVAL does not support function min', + ]); + + testErrorsAndWarnings('from a_index | eval min(textField) > 0', [ + 'EVAL does not support function min', + ]); }); describe('count', () => { @@ -14565,6 +14628,26 @@ describe('validation logic', () => { 'Argument of [bin] must be a constant, received [longField]', ] ); + + testErrorsAndWarnings('from a_index | stats by bucket(dateField, textField)', [ + 'Argument of [bucket] must be a constant, received [textField]', + ]); + + testErrorsAndWarnings('from a_index | stats by bin(dateField, textField)', [ + 'Argument of [bin] must be a constant, received [textField]', + ]); + + testErrorsAndWarnings('from a_index | sort bucket(dateField, textField)', [ + 'SORT does not support function bucket', + ]); + + testErrorsAndWarnings('from a_index | stats bucket("2022", textField)', [ + 'Argument of [bucket] must be a constant, received [textField]', + ]); + testErrorsAndWarnings('from a_index | stats bucket(concat("20", "22"), textField)', [ + 'Argument of [bucket] must be [date], found value [concat("20","22")] type [keyword]', + 'Argument of [bucket] must be a constant, received [textField]', + ]); }); describe('percentile', () => { diff --git a/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts b/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts index 4de1adf4a3153..aedefb08e7387 100644 --- a/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts +++ b/packages/kbn-esql-validation-autocomplete/src/validation/validation.ts @@ -873,18 +873,21 @@ function validateColumnForCommand( if (getColumnExists(column, references)) { const commandDef = getCommandDefinition(commandName); const columnParamsWithInnerTypes = commandDef.signature.params.filter( - ({ type, innerType }) => type === 'column' && innerType + ({ type, innerTypes }) => type === 'column' && innerTypes ); // this should be guaranteed by the columnCheck above const columnRef = lookupColumn(column, references)!; if (columnParamsWithInnerTypes.length) { - const hasSomeWrongInnerTypes = columnParamsWithInnerTypes.every(({ innerType }) => { - if (innerType === 'string' && isStringType(columnRef.type)) return false; - return innerType !== 'any' && innerType !== columnRef.type; + const hasSomeWrongInnerTypes = columnParamsWithInnerTypes.every(({ innerTypes }) => { + if (innerTypes?.includes('string') && isStringType(columnRef.type)) return false; + return innerTypes && !innerTypes.includes('any') && !innerTypes.includes(columnRef.type); }); if (hasSomeWrongInnerTypes) { - const supportedTypes = columnParamsWithInnerTypes.map(({ innerType }) => innerType); + const supportedTypes: string[] = columnParamsWithInnerTypes + .map(({ innerTypes }) => innerTypes) + .flat() + .filter((type) => type !== undefined) as string[]; messages.push( getMessageFromId({ diff --git a/packages/kbn-expect/expect.js b/packages/kbn-expect/expect.js index 8a7d1802a7e0e..1a48d75a4615d 100644 --- a/packages/kbn-expect/expect.js +++ b/packages/kbn-expect/expect.js @@ -45,7 +45,7 @@ function Assertion (obj, flag, parent) { this.flags[flag] = true; for (var i in parent.flags) { - if (parent.flags.hasOwnProperty(i)) { + if (Object.hasOwn(parent.flags, i)) { this.flags[i] = true; } } @@ -70,7 +70,7 @@ function Assertion (obj, flag, parent) { }; for (var fn in Assertion.prototype) { - if (Assertion.prototype.hasOwnProperty(fn) && fn != name) { + if (Object.hasOwn(Assertion.prototype, fn) && fn != name) { if (typeof this[name] === 'function' && fn === 'length') { continue; } diff --git a/packages/kbn-flot-charts/lib/jquery_flot.js b/packages/kbn-flot-charts/lib/jquery_flot.js index 5252356279e51..3b13b317c616c 100644 --- a/packages/kbn-flot-charts/lib/jquery_flot.js +++ b/packages/kbn-flot-charts/lib/jquery_flot.js @@ -2750,7 +2750,7 @@ Licensed under the MIT license. var ascending = options.legend.sorted != "descending"; entries.sort(function(a, b) { return a.label == b.label ? 0 : ( - (a.label < b.label) != ascending ? 1 : -1 // Logical XOR + ((a.label < b.label) != ascending ? 1 : -1) // Logical XOR ); }); } diff --git a/packages/kbn-ftr-common-functional-services/index.ts b/packages/kbn-ftr-common-functional-services/index.ts index 4bd3eca34c45c..3cc6df44adf01 100644 --- a/packages/kbn-ftr-common-functional-services/index.ts +++ b/packages/kbn-ftr-common-functional-services/index.ts @@ -25,4 +25,7 @@ export type SupertestWithoutAuthProviderType = ProvidedType; + export type { FtrProviderContext } from './services/ftr_provider_context'; diff --git a/packages/kbn-ftr-common-functional-services/services/saml_auth/get_auth_provider.ts b/packages/kbn-ftr-common-functional-services/services/saml_auth/get_auth_provider.ts index 3f1ec7af917ff..dfe6d83908a00 100644 --- a/packages/kbn-ftr-common-functional-services/services/saml_auth/get_auth_provider.ts +++ b/packages/kbn-ftr-common-functional-services/services/saml_auth/get_auth_provider.ts @@ -6,20 +6,12 @@ * Side Public License, v 1. */ -import fs from 'fs'; import { type Config } from '@kbn/test'; -import { ToolingLog } from '@kbn/tooling-log'; -import { MOCK_IDP_REALM_NAME } from '@kbn/mock-idp-utils'; -import { KibanaServer } from '../..'; - import { ServerlessAuthProvider } from './serverless/auth_provider'; import { StatefulAuthProvider } from './stateful/auth_provider'; -import { createRole, createRoleMapping } from './stateful/create_role_mapping'; - -const STATEFUL_ADMIN_ROLE_MAPPING_PATH = './stateful/admin_mapping'; export interface AuthProvider { - getSupportedRoleDescriptors(): any; + getSupportedRoleDescriptors(): Record; getDefaultRole(): string; getRolesDefinitionPath(): string; getCommonRequestHeader(): { [key: string]: string }; @@ -28,26 +20,10 @@ export interface AuthProvider { export interface AuthProviderProps { config: Config; - kibanaServer: KibanaServer; - log: ToolingLog; } -export const getAuthProvider = async (props: AuthProviderProps) => { - const { config, log, kibanaServer } = props; +export const getAuthProvider = (props: AuthProviderProps) => { + const { config } = props; const isServerless = !!props.config.get('serverless'); - if (isServerless) { - return new ServerlessAuthProvider(config); - } - - const provider = new StatefulAuthProvider(); - // TODO: Move it to @kbn-es package, so that roles and its mapping are created before FTR services loading starts. - // 'viewer' and 'editor' roles are available by default, but we have to create 'admin' role - const adminRoleMapping = JSON.parse( - fs.readFileSync(require.resolve(STATEFUL_ADMIN_ROLE_MAPPING_PATH), 'utf8') - ); - await createRole({ roleName: 'admin', roleMapping: adminRoleMapping, kibanaServer, log }); - const roles = Object.keys(provider.getSupportedRoleDescriptors()); - // Creating roles mapping for mock-idp - await createRoleMapping({ name: MOCK_IDP_REALM_NAME, roles, config, log }); - return provider; + return isServerless ? new ServerlessAuthProvider(config) : new StatefulAuthProvider(); }; diff --git a/packages/kbn-ftr-common-functional-services/services/saml_auth/saml_auth_provider.ts b/packages/kbn-ftr-common-functional-services/services/saml_auth/saml_auth_provider.ts index 4e79cad656197..af5dec4efea59 100644 --- a/packages/kbn-ftr-common-functional-services/services/saml_auth/saml_auth_provider.ts +++ b/packages/kbn-ftr-common-functional-services/services/saml_auth/saml_auth_provider.ts @@ -20,14 +20,13 @@ export interface RoleCredentials { cookieHeader: { Cookie: string }; } -export async function SamlAuthProvider({ getService }: FtrProviderContext) { +export function SamlAuthProvider({ getService }: FtrProviderContext) { const config = getService('config'); const log = getService('log'); - const kibanaServer = getService('kibanaServer'); const supertestWithoutAuth = getService('supertestWithoutAuth'); const isCloud = !!process.env.TEST_CLOUD; - const authRoleProvider = await getAuthProvider({ config, kibanaServer, log }); + const authRoleProvider = getAuthProvider({ config }); const supportedRoleDescriptors = authRoleProvider.getSupportedRoleDescriptors(); const supportedRoles = Object.keys(supportedRoleDescriptors); diff --git a/packages/kbn-ftr-common-functional-services/services/saml_auth/serverless/auth_provider.ts b/packages/kbn-ftr-common-functional-services/services/saml_auth/serverless/auth_provider.ts index eecbe3a5862f2..d8cb8ae9b5f0d 100644 --- a/packages/kbn-ftr-common-functional-services/services/saml_auth/serverless/auth_provider.ts +++ b/packages/kbn-ftr-common-functional-services/services/saml_auth/serverless/auth_provider.ts @@ -49,7 +49,7 @@ export class ServerlessAuthProvider implements AuthProvider { this.rolesDefinitionPath = resolve(SERVERLESS_ROLES_ROOT_PATH, this.projectType, 'roles.yml'); } - getSupportedRoleDescriptors(): any { + getSupportedRoleDescriptors(): Record { return readRolesDescriptorsFromResource(this.rolesDefinitionPath); } getDefaultRole(): string { diff --git a/packages/kbn-ftr-common-functional-services/services/saml_auth/stateful/admin_mapping.json b/packages/kbn-ftr-common-functional-services/services/saml_auth/stateful/admin_mapping.json deleted file mode 100644 index f8544f16bd239..0000000000000 --- a/packages/kbn-ftr-common-functional-services/services/saml_auth/stateful/admin_mapping.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "kibana":[ - { - "base":[ - "all" - ], - "feature":{ - - }, - "spaces":[ - "*" - ] - } - ], - "elasticsearch":{ - "cluster":[ - "all" - ], - "indices":[ - { - "names":[ - "*" - ], - "privileges":[ - "all" - ], - "allow_restricted_indices":false - }, - { - "names":[ - "*" - ], - "privileges":[ - "monitor", - "read", - "read_cross_cluster", - "view_index_metadata" - ], - "allow_restricted_indices":true - } - ], - "run_as":[ - - ] - } -} \ No newline at end of file diff --git a/packages/kbn-ftr-common-functional-services/services/saml_auth/stateful/auth_provider.ts b/packages/kbn-ftr-common-functional-services/services/saml_auth/stateful/auth_provider.ts index cf27fd9d5d506..4dfe8ce6550d7 100644 --- a/packages/kbn-ftr-common-functional-services/services/saml_auth/stateful/auth_provider.ts +++ b/packages/kbn-ftr-common-functional-services/services/saml_auth/stateful/auth_provider.ts @@ -17,7 +17,7 @@ import { export class StatefulAuthProvider implements AuthProvider { private readonly rolesDefinitionPath = resolve(REPO_ROOT, STATEFUL_ROLES_ROOT_PATH, 'roles.yml'); - getSupportedRoleDescriptors(): any { + getSupportedRoleDescriptors(): Record { return readRolesDescriptorsFromResource(this.rolesDefinitionPath); } getDefaultRole() { diff --git a/packages/kbn-ftr-common-functional-services/services/saml_auth/stateful/create_role_mapping.ts b/packages/kbn-ftr-common-functional-services/services/saml_auth/stateful/create_role_mapping.ts deleted file mode 100644 index 1e9b897362dc6..0000000000000 --- a/packages/kbn-ftr-common-functional-services/services/saml_auth/stateful/create_role_mapping.ts +++ /dev/null @@ -1,52 +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 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 { Config, createEsClientForFtrConfig } from '@kbn/test'; -import { ToolingLog } from '@kbn/tooling-log'; -import { KibanaServer } from '../../..'; - -export interface CreateRoleProps { - roleName: string; - roleMapping: string[]; - kibanaServer: KibanaServer; - log: ToolingLog; -} - -export interface CreateRoleMappingProps { - name: string; - roles: string[]; - config: Config; - log: ToolingLog; -} - -export async function createRole(props: CreateRoleProps) { - const { roleName, roleMapping, kibanaServer, log } = props; - log.debug(`Adding a role: ${roleName}`); - const { status, statusText } = await kibanaServer.request({ - path: `/api/security/role/${roleName}`, - method: 'PUT', - body: roleMapping, - retries: 0, - }); - if (status !== 204) { - throw new Error(`Expected status code of 204, received ${status} ${statusText}`); - } -} - -export async function createRoleMapping(props: CreateRoleMappingProps) { - const { name, roles, config, log } = props; - log.debug(`Creating a role mapping: {realm.name: ${name}, roles: ${roles}}`); - const esClient = createEsClientForFtrConfig(config); - await esClient.security.putRoleMapping({ - name, - roles, - enabled: true, - // @ts-ignore - rules: { field: { 'realm.name': name } }, - }); -} diff --git a/packages/kbn-ftr-common-functional-services/tsconfig.json b/packages/kbn-ftr-common-functional-services/tsconfig.json index ff10ec6c9d5fb..56a442ad2f5a9 100644 --- a/packages/kbn-ftr-common-functional-services/tsconfig.json +++ b/packages/kbn-ftr-common-functional-services/tsconfig.json @@ -18,7 +18,6 @@ "@kbn/expect", "@kbn/repo-info", "@kbn/es", - "@kbn/mock-idp-utils" ], "exclude": [ "target/**/*", diff --git a/packages/kbn-handlebars/src/spec/index.regressions.test.ts b/packages/kbn-handlebars/src/spec/index.regressions.test.ts index fc2065fe7585d..5ff37a3dd9849 100644 --- a/packages/kbn-handlebars/src/spec/index.regressions.test.ts +++ b/packages/kbn-handlebars/src/spec/index.regressions.test.ts @@ -231,7 +231,7 @@ describe('Regressions', () => { // It's valid to execute a block against an undefined context, but // helpers can not do so, so we expect to have an empty object here; for (const name in this) { - if (Object.prototype.hasOwnProperty.call(this, name)) { + if (Object.hasOwn(this, name)) { return 'found'; } } diff --git a/packages/kbn-handlebars/src/utils.ts b/packages/kbn-handlebars/src/utils.ts index b44f4a9791f02..d33bafcd0ef5e 100644 --- a/packages/kbn-handlebars/src/utils.ts +++ b/packages/kbn-handlebars/src/utils.ts @@ -63,6 +63,7 @@ export function allowUnsafeEval() { try { // Do not remove the `kbnUnsafeEvalTest` parameter. // It is used for filtering out expected CSP failures, and must be the first piece of content in this function. + // eslint-disable-next-line no-new-func new Function('kbnUnsafeEvalTest', 'return true;'); return true; } catch (e) { diff --git a/packages/kbn-handlebars/src/visitor.ts b/packages/kbn-handlebars/src/visitor.ts index 16dc151df8640..2195820bf46de 100644 --- a/packages/kbn-handlebars/src/visitor.ts +++ b/packages/kbn-handlebars/src/visitor.ts @@ -112,7 +112,7 @@ export class ElasticHandlebarsVisitor extends Handlebars.Visitor { if (result == null) { return result; } - if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + if (Object.hasOwn(parent, propertyName)) { return result; } diff --git a/packages/kbn-investigation-shared/README.md b/packages/kbn-investigation-shared/README.md new file mode 100644 index 0000000000000..07c07fe3e7081 --- /dev/null +++ b/packages/kbn-investigation-shared/README.md @@ -0,0 +1,3 @@ +# @kbn/investigation-shared + +Empty package generated by @kbn/generate diff --git a/packages/kbn-investigation-shared/index.ts b/packages/kbn-investigation-shared/index.ts new file mode 100644 index 0000000000000..723a97d762b02 --- /dev/null +++ b/packages/kbn-investigation-shared/index.ts @@ -0,0 +1,23 @@ +/* + * 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 type * from './src/schema/create'; +export type * from './src/schema/create_notes'; +export type * from './src/schema/delete'; +export type * from './src/schema/find'; +export type * from './src/schema/get'; +export type * from './src/schema/get_notes'; +export type * from './src/schema/origin'; + +export * from './src/schema/create'; +export * from './src/schema/create_notes'; +export * from './src/schema/delete'; +export * from './src/schema/find'; +export * from './src/schema/get'; +export * from './src/schema/get_notes'; +export * from './src/schema/origin'; diff --git a/packages/kbn-investigation-shared/jest.config.js b/packages/kbn-investigation-shared/jest.config.js new file mode 100644 index 0000000000000..97bfdd78ff319 --- /dev/null +++ b/packages/kbn-investigation-shared/jest.config.js @@ -0,0 +1,13 @@ +/* + * 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. + */ + +module.exports = { + preset: '@kbn/test/jest_node', + rootDir: '../..', + roots: ['/packages/kbn-investigation-shared'], +}; diff --git a/packages/kbn-investigation-shared/kibana.jsonc b/packages/kbn-investigation-shared/kibana.jsonc new file mode 100644 index 0000000000000..ffc2802ff3af9 --- /dev/null +++ b/packages/kbn-investigation-shared/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/investigation-shared", + "owner": "@elastic/obs-ux-management-team" +} diff --git a/packages/kbn-investigation-shared/package.json b/packages/kbn-investigation-shared/package.json new file mode 100644 index 0000000000000..bf4a97caf483e --- /dev/null +++ b/packages/kbn-investigation-shared/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/investigation-shared", + "private": true, + "version": "1.0.0", + "license": "SSPL-1.0 OR Elastic License 2.0" +} diff --git a/x-pack/plugins/observability_solution/investigate_app/common/schema/create.ts b/packages/kbn-investigation-shared/src/schema/create.ts similarity index 76% rename from x-pack/plugins/observability_solution/investigate_app/common/schema/create.ts rename to packages/kbn-investigation-shared/src/schema/create.ts index 050fa67d5cbaf..99073087d0b43 100644 --- a/x-pack/plugins/observability_solution/investigate_app/common/schema/create.ts +++ b/packages/kbn-investigation-shared/src/schema/create.ts @@ -1,19 +1,23 @@ /* * 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. + * 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 * as t from 'io-ts'; import { investigationResponseSchema } from './investigation'; +import { alertOriginSchema, blankOriginSchema } from './origin'; const createInvestigationParamsSchema = t.type({ body: t.type({ id: t.string, title: t.string, - parameters: t.type({ + params: t.type({ timeRange: t.type({ from: t.number, to: t.number }), }), + origin: t.union([alertOriginSchema, blankOriginSchema]), }), }); diff --git a/packages/kbn-investigation-shared/src/schema/create_notes.ts b/packages/kbn-investigation-shared/src/schema/create_notes.ts new file mode 100644 index 0000000000000..a920a41108e51 --- /dev/null +++ b/packages/kbn-investigation-shared/src/schema/create_notes.ts @@ -0,0 +1,36 @@ +/* + * 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 * as t from 'io-ts'; +import { investigationNoteResponseSchema } from './investigation_note'; + +const createInvestigationNoteParamsSchema = t.type({ + path: t.type({ + id: t.string, + }), + body: t.type({ + content: t.string, + }), +}); + +const createInvestigationNoteResponseSchema = investigationNoteResponseSchema; + +type CreateInvestigationNoteInput = t.OutputOf< + typeof createInvestigationNoteParamsSchema.props.body +>; +type CreateInvestigationNoteParams = t.TypeOf< + typeof createInvestigationNoteParamsSchema.props.body +>; +type CreateInvestigationNoteResponse = t.OutputOf; + +export { createInvestigationNoteParamsSchema, createInvestigationNoteResponseSchema }; +export type { + CreateInvestigationNoteInput, + CreateInvestigationNoteParams, + CreateInvestigationNoteResponse, +}; diff --git a/packages/kbn-investigation-shared/src/schema/delete.ts b/packages/kbn-investigation-shared/src/schema/delete.ts new file mode 100644 index 0000000000000..de0381a6161f3 --- /dev/null +++ b/packages/kbn-investigation-shared/src/schema/delete.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 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 * as t from 'io-ts'; + +const deleteInvestigationParamsSchema = t.type({ + path: t.type({ + id: t.string, + }), +}); + +type DeleteInvestigationParams = t.TypeOf; // Parsed payload used by the backend + +export { deleteInvestigationParamsSchema }; +export type { DeleteInvestigationParams }; diff --git a/x-pack/plugins/observability_solution/investigate_app/common/schema/find.ts b/packages/kbn-investigation-shared/src/schema/find.ts similarity index 81% rename from x-pack/plugins/observability_solution/investigate_app/common/schema/find.ts rename to packages/kbn-investigation-shared/src/schema/find.ts index dc76a39fce679..048a2f01c064a 100644 --- a/x-pack/plugins/observability_solution/investigate_app/common/schema/find.ts +++ b/packages/kbn-investigation-shared/src/schema/find.ts @@ -1,14 +1,17 @@ /* * 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. + * 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 * as t from 'io-ts'; import { investigationResponseSchema } from './investigation'; const findInvestigationsParamsSchema = t.partial({ query: t.partial({ + alertId: t.string, page: t.string, perPage: t.string, }), diff --git a/x-pack/plugins/observability_solution/investigate_app/common/schema/get.ts b/packages/kbn-investigation-shared/src/schema/get.ts similarity index 80% rename from x-pack/plugins/observability_solution/investigate_app/common/schema/get.ts rename to packages/kbn-investigation-shared/src/schema/get.ts index b30fb9f61cff8..6e2b7d6063ff1 100644 --- a/x-pack/plugins/observability_solution/investigate_app/common/schema/get.ts +++ b/packages/kbn-investigation-shared/src/schema/get.ts @@ -1,9 +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. + * 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 * as t from 'io-ts'; import { investigationResponseSchema } from './investigation'; diff --git a/packages/kbn-investigation-shared/src/schema/get_notes.ts b/packages/kbn-investigation-shared/src/schema/get_notes.ts new file mode 100644 index 0000000000000..6162d270a3439 --- /dev/null +++ b/packages/kbn-investigation-shared/src/schema/get_notes.ts @@ -0,0 +1,23 @@ +/* + * 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 * as t from 'io-ts'; +import { investigationNoteResponseSchema } from './investigation_note'; + +const getInvestigationNotesParamsSchema = t.type({ + path: t.type({ + id: t.string, + }), +}); + +const getInvestigationNotesResponseSchema = t.array(investigationNoteResponseSchema); + +type GetInvestigationNotesResponse = t.OutputOf; + +export { getInvestigationNotesParamsSchema, getInvestigationNotesResponseSchema }; +export type { GetInvestigationNotesResponse }; diff --git a/packages/kbn-investigation-shared/src/schema/investigation.ts b/packages/kbn-investigation-shared/src/schema/investigation.ts new file mode 100644 index 0000000000000..d47db8283d02c --- /dev/null +++ b/packages/kbn-investigation-shared/src/schema/investigation.ts @@ -0,0 +1,29 @@ +/* + * 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 * as t from 'io-ts'; +import { alertOriginSchema, blankOriginSchema } from './origin'; +import { investigationNoteResponseSchema } from './investigation_note'; + +const investigationResponseSchema = t.type({ + id: t.string, + title: t.string, + createdAt: t.number, + createdBy: t.string, + params: t.type({ + timeRange: t.type({ from: t.number, to: t.number }), + }), + origin: t.union([alertOriginSchema, blankOriginSchema]), + status: t.union([t.literal('ongoing'), t.literal('closed')]), + notes: t.array(investigationNoteResponseSchema), +}); + +type InvestigationResponse = t.OutputOf; + +export { investigationResponseSchema }; +export type { InvestigationResponse }; diff --git a/packages/kbn-investigation-shared/src/schema/investigation_note.ts b/packages/kbn-investigation-shared/src/schema/investigation_note.ts new file mode 100644 index 0000000000000..f678a70cb929c --- /dev/null +++ b/packages/kbn-investigation-shared/src/schema/investigation_note.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 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 * as t from 'io-ts'; + +const investigationNoteResponseSchema = t.type({ + id: t.string, + content: t.string, + createdAt: t.number, + createdBy: t.string, +}); + +type InvestigationNoteResponse = t.OutputOf; + +export { investigationNoteResponseSchema }; +export type { InvestigationNoteResponse }; diff --git a/packages/kbn-investigation-shared/src/schema/origin.ts b/packages/kbn-investigation-shared/src/schema/origin.ts new file mode 100644 index 0000000000000..7d5c5447b633d --- /dev/null +++ b/packages/kbn-investigation-shared/src/schema/origin.ts @@ -0,0 +1,14 @@ +/* + * 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 * as t from 'io-ts'; + +const blankOriginSchema = t.type({ type: t.literal('blank') }); +const alertOriginSchema = t.type({ type: t.literal('alert'), id: t.string }); + +export { alertOriginSchema, blankOriginSchema }; diff --git a/packages/kbn-investigation-shared/tsconfig.json b/packages/kbn-investigation-shared/tsconfig.json new file mode 100644 index 0000000000000..2f9ddddbeea23 --- /dev/null +++ b/packages/kbn-investigation-shared/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node" + ] + }, + "include": [ + "**/*.ts", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [] +} diff --git a/packages/kbn-managed-vscode-config/src/update_vscode_config.ts b/packages/kbn-managed-vscode-config/src/update_vscode_config.ts index d327ab98ae82c..2e3a3a5d25563 100644 --- a/packages/kbn-managed-vscode-config/src/update_vscode_config.ts +++ b/packages/kbn-managed-vscode-config/src/update_vscode_config.ts @@ -141,7 +141,7 @@ const mergeManagedProperties = ( if ( isBasicObjectProp(prop) && isManaged(prop) && - !Object.prototype.hasOwnProperty.call(managedValue, prop.key.value) + !Object.hasOwn(managedValue, prop.key.value) ) { remove(properties, prop); } diff --git a/packages/kbn-management/settings/components/field_input/input/select_input.tsx b/packages/kbn-management/settings/components/field_input/input/select_input.tsx index 9421d4d3e83b1..a02dbf61bd16f 100644 --- a/packages/kbn-management/settings/components/field_input/input/select_input.tsx +++ b/packages/kbn-management/settings/components/field_input/input/select_input.tsx @@ -42,7 +42,7 @@ export const SelectInput = ({ const options = useMemo( () => optionsProp?.map((option) => ({ - text: optionLabels.hasOwnProperty(option) ? optionLabels[option] : option, + text: Object.hasOwn(optionLabels, option) ? optionLabels[option] : option, value: option, })), [optionsProp, optionLabels] diff --git a/packages/kbn-management/settings/components/form/use_save.ts b/packages/kbn-management/settings/components/form/use_save.ts index 53af23e476d74..5268e6fcb9a5c 100644 --- a/packages/kbn-management/settings/components/form/use_save.ts +++ b/packages/kbn-management/settings/components/form/use_save.ts @@ -39,7 +39,7 @@ export const useSave = (params: UseSaveParameters) => { await saveChanges(changes, params.scope); params.clearChanges(); const requiresReload = params.fields.some( - (setting) => changes.hasOwnProperty(setting.id) && setting.requiresPageReload + (setting) => Object.hasOwn(changes, setting.id) && setting.requiresPageReload ); if (requiresReload) { showReloadPagePrompt(); diff --git a/packages/kbn-mock-idp-plugin/public/role_switcher.tsx b/packages/kbn-mock-idp-plugin/public/role_switcher.tsx index 7ef4e435e4e65..63bf43f4aa52e 100644 --- a/packages/kbn-mock-idp-plugin/public/role_switcher.tsx +++ b/packages/kbn-mock-idp-plugin/public/role_switcher.tsx @@ -145,7 +145,7 @@ const createForm = (url: string, fields: Record) => { form.setAttribute('action', url); for (const key in fields) { - if (!fields.hasOwnProperty(key)) { + if (!Object.hasOwn(fields, key)) { continue; } const input = document.createElement('input'); diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index 84055d662a65b..a33156e376972 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -28,7 +28,7 @@ pageLoadAssetSize: dashboardEnhanced: 65646 data: 454087 dataQuality: 19384 - datasetQuality: 50624 + datasetQuality: 52000 dataViewEditor: 28082 dataViewFieldEditor: 42021 dataViewManagement: 5300 @@ -144,7 +144,7 @@ pageLoadAssetSize: searchprofiler: 67080 security: 81771 securitySolution: 98429 - securitySolutionEss: 16573 + securitySolutionEss: 31781 securitySolutionServerless: 62488 serverless: 16573 serverlessObservability: 68747 diff --git a/packages/kbn-safer-lodash-set/README.md b/packages/kbn-safer-lodash-set/README.md index 823b1acff3b01..110a06421e45e 100644 --- a/packages/kbn-safer-lodash-set/README.md +++ b/packages/kbn-safer-lodash-set/README.md @@ -78,7 +78,7 @@ set(child, 'foo', 3); // object and the `parent` object has not been modified: console.log(child.foo); // 3 console.log(parent.foo); // 1 -console.log(Object.prototype.hasOwnProperty.call(child, 'foo')); // true +console.log(Object.hasOwn(child, 'foo')); // true ``` ### The `path` must not access function prototypes diff --git a/packages/kbn-safer-lodash-set/test/fp_patch_test.js b/packages/kbn-safer-lodash-set/test/fp_patch_test.js index a7a900bd7601f..abc2ce348f5a7 100644 --- a/packages/kbn-safer-lodash-set/test/fp_patch_test.js +++ b/packages/kbn-safer-lodash-set/test/fp_patch_test.js @@ -190,7 +190,7 @@ setFunctions.forEach(([testPermutations, set, testName]) => { t.notStrictEqual(arr, result); t.ok(Array.isArray(result)); Object.keys(expected).forEach((key) => { - t.ok(Object.prototype.hasOwnProperty.call(result, key)); + t.ok(Object.hasOwn(result, key)); t.deepEqual(result[key], expected[key]); }); }); diff --git a/packages/kbn-safer-lodash-set/test/patch_test.js b/packages/kbn-safer-lodash-set/test/patch_test.js index f83cbe1e40b85..cbd2f879dd609 100644 --- a/packages/kbn-safer-lodash-set/test/patch_test.js +++ b/packages/kbn-safer-lodash-set/test/patch_test.js @@ -115,7 +115,7 @@ setAndSetWithFunctions.forEach(([set, testName]) => { const arr = []; set(arr, path, 'foo'); Object.keys(expected).forEach((key) => { - t.ok(Object.prototype.hasOwnProperty.call(arr, key)); + t.ok(Object.hasOwn(arr, key)); t.deepEqual(arr[key], expected[key]); }); t.end(); diff --git a/packages/kbn-securitysolution-autocomplete/src/field/__tests__/__snapshots__/index.test.tsx.snap b/packages/kbn-securitysolution-autocomplete/src/field/__tests__/__snapshots__/index.test.tsx.snap index 1bfa3200b4243..1b462f58b2ed4 100644 --- a/packages/kbn-securitysolution-autocomplete/src/field/__tests__/__snapshots__/index.test.tsx.snap +++ b/packages/kbn-securitysolution-autocomplete/src/field/__tests__/__snapshots__/index.test.tsx.snap @@ -6,21 +6,21 @@ Object { "baseElement":
@@ -30,7 +30,7 @@ Object { aria-expanded="false" aria-invalid="false" autocomplete="off" - class="euiComboBox__input" + class="euiComboBox__input emotion-euiComboBoxInput" data-test-subj="comboBoxSearchInput" id="generated-id__eui-combobox-id" role="combobox" @@ -74,21 +74,21 @@ Object { , "container":
@@ -98,7 +98,7 @@ Object { aria-expanded="false" aria-invalid="false" autocomplete="off" - class="euiComboBox__input" + class="euiComboBox__input emotion-euiComboBoxInput" data-test-subj="comboBoxSearchInput" id="generated-id__eui-combobox-id" role="combobox" @@ -199,20 +199,20 @@ Object { "baseElement":
@@ -222,7 +222,7 @@ Object { aria-expanded="false" aria-invalid="false" autocomplete="off" - class="euiComboBox__input" + class="euiComboBox__input emotion-euiComboBoxInput" data-test-subj="comboBoxSearchInput" disabled="" id="generated-id__eui-combobox-id" @@ -239,20 +239,20 @@ Object { , "container":
@@ -262,7 +262,7 @@ Object { aria-expanded="false" aria-invalid="false" autocomplete="off" - class="euiComboBox__input" + class="euiComboBox__input emotion-euiComboBoxInput" data-test-subj="comboBoxSearchInput" disabled="" id="generated-id__eui-combobox-id" @@ -336,21 +336,21 @@ Object { "baseElement":
@@ -360,7 +360,7 @@ Object { aria-expanded="false" aria-invalid="false" autocomplete="off" - class="euiComboBox__input" + class="euiComboBox__input emotion-euiComboBoxInput" data-test-subj="comboBoxSearchInput" id="generated-id__eui-combobox-id" role="combobox" @@ -393,21 +393,21 @@ Object { , "container":
@@ -417,7 +417,7 @@ Object { aria-expanded="false" aria-invalid="false" autocomplete="off" - class="euiComboBox__input" + class="euiComboBox__input emotion-euiComboBoxInput" data-test-subj="comboBoxSearchInput" id="generated-id__eui-combobox-id" role="combobox" @@ -507,21 +507,21 @@ Object { "baseElement":
@@ -531,7 +531,7 @@ Object { aria-expanded="false" aria-invalid="false" autocomplete="off" - class="euiComboBox__input" + class="euiComboBox__input emotion-euiComboBoxInput" data-test-subj="comboBoxSearchInput" disabled="" id="generated-id__eui-combobox-id" @@ -557,21 +557,21 @@ Object { , "container":
@@ -581,7 +581,7 @@ Object { aria-expanded="false" aria-invalid="false" autocomplete="off" - class="euiComboBox__input" + class="euiComboBox__input emotion-euiComboBoxInput" data-test-subj="comboBoxSearchInput" disabled="" id="generated-id__eui-combobox-id" diff --git a/packages/kbn-server-http-tools/src/default_validation_error_handler.ts b/packages/kbn-server-http-tools/src/default_validation_error_handler.ts index d2f4e993f3e4b..9ee8bac238c44 100644 --- a/packages/kbn-server-http-tools/src/default_validation_error_handler.ts +++ b/packages/kbn-server-http-tools/src/default_validation_error_handler.ts @@ -43,7 +43,7 @@ export function defaultValidationErrorHandler( // // The Hapi code we're 'overwriting' can be found here: // https://github.com/hapijs/hapi/blob/master/lib/validation.js#L102 - if (err && err.name === 'ValidationError' && err.hasOwnProperty('output')) { + if (err && err.name === 'ValidationError' && Object.hasOwn(err, 'output')) { const validationError: HapiValidationError = err as HapiValidationError; const validationKeys: string[] = []; diff --git a/packages/kbn-server-route-repository-utils/index.ts b/packages/kbn-server-route-repository-utils/index.ts index bfcc03c0e64c5..ce2139badd8e6 100644 --- a/packages/kbn-server-route-repository-utils/index.ts +++ b/packages/kbn-server-route-repository-utils/index.ts @@ -24,4 +24,6 @@ export type { DefaultClientOptions, DefaultRouteCreateOptions, DefaultRouteHandlerResources, + IoTsParamsObject, + ZodParamsObject, } from './src/typings'; diff --git a/packages/kbn-server-route-repository-utils/src/typings.ts b/packages/kbn-server-route-repository-utils/src/typings.ts index 0539d9ea1d38e..ff93e760a580a 100644 --- a/packages/kbn-server-route-repository-utils/src/typings.ts +++ b/packages/kbn-server-route-repository-utils/src/typings.ts @@ -9,13 +9,14 @@ import type { HttpFetchOptions } from '@kbn/core-http-browser'; import type { IKibanaResponse } from '@kbn/core-http-server'; import type { - RequestHandlerContext, + KibanaRequest, + KibanaResponseFactory, Logger, + RequestHandlerContext, RouteConfigOptions, RouteMethod, - KibanaRequest, - KibanaResponseFactory, } from '@kbn/core/server'; +import { z } from '@kbn/zod'; import * as t from 'io-ts'; import { RequiredKeys } from 'utility-types'; @@ -30,7 +31,13 @@ type WithoutIncompatibleMethods = Omit t.Encoder; }; -export type RouteParamsRT = WithoutIncompatibleMethods< +export type ZodParamsObject = z.ZodObject<{ + path?: any; + query?: any; + body?: any; +}>; + +export type IoTsParamsObject = WithoutIncompatibleMethods< t.Type<{ path?: any; query?: any; @@ -38,6 +45,8 @@ export type RouteParamsRT = WithoutIncompatibleMethods< }> >; +export type RouteParamsRT = IoTsParamsObject | ZodParamsObject; + export interface RouteState { [endpoint: string]: ServerRoute; } @@ -82,6 +91,10 @@ type ClientRequestParamsOfType = ? MaybeOptional<{ params: t.OutputOf; }> + : TRouteParamsRT extends z.Schema + ? MaybeOptional<{ + params: z.TypeOf; + }> : {}; type DecodedRequestParamsOfType = @@ -89,6 +102,10 @@ type DecodedRequestParamsOfType = ? MaybeOptional<{ params: t.TypeOf; }> + : TRouteParamsRT extends z.Schema + ? MaybeOptional<{ + params: z.TypeOf; + }> : {}; export type EndpointOf = diff --git a/packages/kbn-server-route-repository-utils/tsconfig.json b/packages/kbn-server-route-repository-utils/tsconfig.json index 0f3dd221ec6b7..cb5d9846f6cc8 100644 --- a/packages/kbn-server-route-repository-utils/tsconfig.json +++ b/packages/kbn-server-route-repository-utils/tsconfig.json @@ -19,5 +19,6 @@ "@kbn/core-http-browser", "@kbn/core-http-server", "@kbn/core", + "@kbn/zod", ] } diff --git a/packages/kbn-server-route-repository/README.md b/packages/kbn-server-route-repository/README.md index f46a8f3ee3677..f42bfb4390a20 100644 --- a/packages/kbn-server-route-repository/README.md +++ b/packages/kbn-server-route-repository/README.md @@ -127,22 +127,22 @@ The client translates the endpoint and the options (including request parameters ## Request parameter validation -When creating your routes, you can also provide an `io-ts` codec to be used when validating incoming requests. +When creating your routes, you can provide either a `zod` schema or an `io-ts` codec to be used when validating incoming requests. ```javascript -import * as t from 'io-ts'; +import { z } from '@kbn/zod'; const myRoute = createMyPluginServerRoute({ - endpoint: 'GET /internal/my_plugin/route/{my_path_param}', - params: t.type({ - path: t.type({ - my_path_param: t.string, + endpoint: 'POST /internal/my_plugin/route/{my_path_param}', + params: z.object({ + path: z.object({ + my_path_param: z.string(), }), - query: t.type({ - my_query_param: t.string, + query: z.object({ + my_query_param: z.string(), }), - body: t.type({ - my_body_param: t.string, + body: z.object({ + my_body_param: z.string(), }), }), handler: async (resources) => { @@ -162,7 +162,7 @@ The `params` object is added to the route resources. When calling this endpoint, it will look like this: ```javascript -client('GET /internal/my_plugin/route/{my_path_param}', { +client('POST /internal/my_plugin/route/{my_path_param}', { params: { path: { my_path_param: 'some_path_value', @@ -179,6 +179,9 @@ client('GET /internal/my_plugin/route/{my_path_param}', { Where the shape of `params` is typed to match the expected shape, meaning you don't need to manually use the codec when calling the route. +> When using `zod` you also opt into the Kibana platforms automatic OpenAPI specification generation tooling. +> By adding `server.oas.enabled: true` to your `kibana.yml` and visiting `/api/oas?pluginId=yourPluginId` you can see the generated specification. + ## Public routes To define a public route, you need to change the endpoint path and add a version. diff --git a/packages/kbn-server-route-repository/index.ts b/packages/kbn-server-route-repository/index.ts index e4e43523d25c3..5a2bcb89ec3a4 100644 --- a/packages/kbn-server-route-repository/index.ts +++ b/packages/kbn-server-route-repository/index.ts @@ -9,7 +9,8 @@ export { formatRequest, parseEndpoint } from '@kbn/server-route-repository-utils'; export { createServerRouteFactory } from './src/create_server_route_factory'; export { decodeRequestParams } from './src/decode_request_params'; -export { routeValidationObject } from './src/route_validation_object'; +export { stripNullishRequestParameters } from './src/strip_nullish_request_parameters'; +export { passThroughValidationObject } from './src/validation_objects'; export { registerRoutes } from './src/register_routes'; export type { @@ -24,4 +25,5 @@ export type { RouteState, DefaultRouteCreateOptions, DefaultRouteHandlerResources, + IoTsParamsObject, } from '@kbn/server-route-repository-utils'; diff --git a/packages/kbn-server-route-repository/src/decode_request_params.test.ts b/packages/kbn-server-route-repository/src/decode_request_params.test.ts index 0cb8d280f28e4..9041f68643317 100644 --- a/packages/kbn-server-route-repository/src/decode_request_params.test.ts +++ b/packages/kbn-server-route-repository/src/decode_request_params.test.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 { jsonRt } from '@kbn/io-ts-utils'; + import * as t from 'io-ts'; import { decodeRequestParams } from './decode_request_params'; @@ -14,10 +14,9 @@ describe('decodeRequestParams', () => { const decode = () => { return decodeRequestParams( { - params: { + path: { serviceName: 'opbeans-java', }, - body: null, query: { start: '', }, @@ -48,11 +47,10 @@ describe('decodeRequestParams', () => { const decode = () => { return decodeRequestParams( { - params: { + path: { serviceName: 'opbeans-java', extraKey: '', }, - body: null, query: { start: '', }, @@ -74,81 +72,4 @@ describe('decodeRequestParams', () => { path.extraKey" `); }); - - it('returns the decoded output', () => { - const decode = () => { - return decodeRequestParams( - { - params: {}, - query: { - _inspect: 'true', - }, - body: null, - }, - t.type({ - query: t.type({ - _inspect: jsonRt.pipe(t.boolean), - }), - }) - ); - }; - - expect(decode).not.toThrow(); - - expect(decode()).toEqual({ - query: { - _inspect: true, - }, - }); - }); - - it('strips empty params', () => { - const decode = () => { - return decodeRequestParams( - { - params: {}, - query: {}, - body: {}, - }, - t.type({ - body: t.any, - }) - ); - }; - - expect(decode).not.toThrow(); - - expect(decode()).toEqual({}); - }); - - it('allows excess keys in an any type', () => { - const decode = () => { - return decodeRequestParams( - { - params: {}, - query: {}, - body: { - body: { - query: 'foo', - }, - }, - }, - t.type({ - body: t.type({ - body: t.any, - }), - }) - ); - }; - - expect(decode).not.toThrow(); - - expect(decode()).toEqual({ - body: { - body: { - query: 'foo', - }, - }, - }); - }); }); diff --git a/packages/kbn-server-route-repository/src/decode_request_params.ts b/packages/kbn-server-route-repository/src/decode_request_params.ts index bae6e4d4a0e12..fe7c93b2e7397 100644 --- a/packages/kbn-server-route-repository/src/decode_request_params.ts +++ b/packages/kbn-server-route-repository/src/decode_request_params.ts @@ -7,32 +7,16 @@ */ import Boom from '@hapi/boom'; import { formatErrors, strictKeysRt } from '@kbn/io-ts-utils'; -import { RouteParamsRT } from '@kbn/server-route-repository-utils'; +import { IoTsParamsObject } from '@kbn/server-route-repository-utils'; import { isLeft } from 'fp-ts/lib/Either'; import * as t from 'io-ts'; -import { isEmpty, isPlainObject, omitBy } from 'lodash'; -interface KibanaRequestParams { - body: unknown; - query: unknown; - params: unknown; -} - -export function decodeRequestParams( - params: KibanaRequestParams, +export function decodeRequestParams( + params: Partial<{ path: any; query: any; body: any }>, paramsRt: T ): t.OutputOf { - const paramMap = omitBy( - { - path: params.params, - body: params.body, - query: params.query, - }, - (val) => val === null || val === undefined || (isPlainObject(val) && isEmpty(val)) - ); - // decode = validate - const result = strictKeysRt(paramsRt).decode(paramMap); + const result = strictKeysRt(paramsRt).decode(params); if (isLeft(result)) { throw Boom.badRequest(formatErrors(result.left)); diff --git a/packages/kbn-server-route-repository/src/make_zod_validation_object.test.ts b/packages/kbn-server-route-repository/src/make_zod_validation_object.test.ts new file mode 100644 index 0000000000000..b06bfebe613c5 --- /dev/null +++ b/packages/kbn-server-route-repository/src/make_zod_validation_object.test.ts @@ -0,0 +1,50 @@ +/* + * 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 { z } from '@kbn/zod'; +import { makeZodValidationObject } from './make_zod_validation_object'; +import { noParamsValidationObject } from './validation_objects'; + +describe('makeZodValidationObject', () => { + it('translate path to params', () => { + const schema = z.object({ + path: z.object({}), + }); + + expect(makeZodValidationObject(schema)).toMatchObject({ + params: expect.anything(), + }); + }); + + it('makes all object types strict', () => { + const schema = z.object({ + path: z.object({}), + query: z.object({}), + body: z.string(), + }); + + const pathStrictSpy = jest.spyOn(schema.shape.path, 'strict'); + const queryStrictSpy = jest.spyOn(schema.shape.query, 'strict'); + + expect(makeZodValidationObject(schema)).toEqual({ + params: pathStrictSpy.mock.results[0].value, + query: queryStrictSpy.mock.results[0].value, + body: schema.shape.body, + }); + }); + + it('sets key to strict empty if schema is missing key', () => { + const schema = z.object({}); + + expect(makeZodValidationObject(schema)).toStrictEqual({ + params: noParamsValidationObject.params, + query: noParamsValidationObject.query, + body: noParamsValidationObject.body, + }); + }); +}); diff --git a/packages/kbn-server-route-repository/src/make_zod_validation_object.ts b/packages/kbn-server-route-repository/src/make_zod_validation_object.ts new file mode 100644 index 0000000000000..5e3634f6f0333 --- /dev/null +++ b/packages/kbn-server-route-repository/src/make_zod_validation_object.ts @@ -0,0 +1,27 @@ +/* + * 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 { ZodObject, ZodAny } from '@kbn/zod'; +import { ZodParamsObject } from '@kbn/server-route-repository-utils'; +import { noParamsValidationObject } from './validation_objects'; + +export function makeZodValidationObject(params: ZodParamsObject) { + return { + params: params.shape.path ? asStrict(params.shape.path) : noParamsValidationObject.params, + query: params.shape.query ? asStrict(params.shape.query) : noParamsValidationObject.query, + body: params.shape.body ? asStrict(params.shape.body) : noParamsValidationObject.body, + }; +} + +function asStrict(schema: ZodAny) { + if (schema instanceof ZodObject) { + return schema.strict(); + } else { + return schema; + } +} diff --git a/packages/kbn-server-route-repository/src/register_routes.test.ts b/packages/kbn-server-route-repository/src/register_routes.test.ts index 39180a093835a..8be38bb5891cc 100644 --- a/packages/kbn-server-route-repository/src/register_routes.test.ts +++ b/packages/kbn-server-route-repository/src/register_routes.test.ts @@ -6,59 +6,39 @@ * Side Public License, v 1. */ -import * as t from 'io-ts'; import { CoreSetup, kibanaResponseFactory } from '@kbn/core/server'; import { loggerMock } from '@kbn/logging-mocks'; -import { registerRoutes } from './register_routes'; -import { routeValidationObject } from './route_validation_object'; +import { z } from '@kbn/zod'; +import * as t from 'io-ts'; import { NEVER } from 'rxjs'; +import * as makeZodValidationObject from './make_zod_validation_object'; +import { registerRoutes } from './register_routes'; +import { passThroughValidationObject, noParamsValidationObject } from './validation_objects'; describe('registerRoutes', () => { - const get = jest.fn(); - - const getAddVersion = jest.fn(); - const getWithVersion = jest.fn((_options) => { + const post = jest.fn(); + const postAddVersion = jest.fn(); + const postWithVersion = jest.fn((_options) => { return { - addVersion: getAddVersion, + addVersion: postAddVersion, }; }); - const createRouter = jest.fn().mockReturnValue({ - get, + post, versioned: { - get: getWithVersion, + post: postWithVersion, }, }); - - const internalOptions = { - internal: true, - }; - const publicOptions = { - public: true, - }; - - const internalHandler = jest.fn().mockResolvedValue('internal'); - const publicHandler = jest - .fn() - .mockResolvedValue( - kibanaResponseFactory.custom({ statusCode: 201, body: { message: 'public' } }) - ); - const errorHandler = jest.fn().mockRejectedValue(new Error('error')); - + const coreSetup = { + http: { + createRouter, + }, + } as unknown as CoreSetup; const mockLogger = loggerMock.create(); const mockService = jest.fn(); const mockContext = {}; const mockRequest = { - body: { - bodyParam: 'body', - }, - query: { - queryParam: 'query', - }, - params: { - pathParam: 'path', - }, events: { aborted$: NEVER, }, @@ -66,99 +46,129 @@ describe('registerRoutes', () => { beforeEach(() => { jest.clearAllMocks(); + }); - const coreSetup = { - http: { - createRouter, - }, - } as unknown as CoreSetup; - - const paramsRt = t.type({ - body: t.type({ - bodyParam: t.string, - }), - query: t.type({ - queryParam: t.string, - }), - path: t.type({ - pathParam: t.string, - }), - }); - - registerRoutes({ - core: coreSetup, - repository: { - 'GET /internal/app/feature': { - endpoint: 'GET /internal/app/feature', - handler: internalHandler, - params: paramsRt, - options: internalOptions, - }, - 'GET /api/app/feature version': { - endpoint: 'GET /api/app/feature version', - handler: publicHandler, - params: paramsRt, - options: publicOptions, - }, - 'GET /internal/app/feature/error': { - endpoint: 'GET /internal/app/feature/error', - handler: errorHandler, - params: paramsRt, - options: internalOptions, + it('creates a router and defines the routes', () => { + callRegisterRoutes({ + 'POST /internal/route': { + endpoint: 'POST /internal/route', + handler: jest.fn(), + options: { + internal: true, }, }, - dependencies: { - aService: mockService, + 'POST /api/public_route version': { + endpoint: 'POST /api/public_route version', + handler: jest.fn(), + options: { + public: true, + }, }, - logger: mockLogger, }); - }); - it('creates a router and defines the routes', () => { expect(createRouter).toHaveBeenCalledTimes(1); - expect(get).toHaveBeenCalledTimes(2); + expect(post).toHaveBeenCalledTimes(1); - const [internalRoute] = get.mock.calls[0]; - expect(internalRoute.path).toEqual('/internal/app/feature'); - expect(internalRoute.options).toEqual(internalOptions); - expect(internalRoute.validate).toEqual(routeValidationObject); + const [internalRoute] = post.mock.calls[0]; + expect(internalRoute.path).toEqual('/internal/route'); + expect(internalRoute.options).toEqual({ + internal: true, + }); + expect(internalRoute.validate).toEqual(noParamsValidationObject); - expect(getWithVersion).toHaveBeenCalledTimes(1); - const [publicRoute] = getWithVersion.mock.calls[0]; - expect(publicRoute.path).toEqual('/api/app/feature'); - expect(publicRoute.options).toEqual(publicOptions); + expect(postWithVersion).toHaveBeenCalledTimes(1); + const [publicRoute] = postWithVersion.mock.calls[0]; + expect(publicRoute.path).toEqual('/api/public_route'); + expect(publicRoute.options).toEqual({ + public: true, + }); expect(publicRoute.access).toEqual('public'); - expect(getAddVersion).toHaveBeenCalledTimes(1); - const [versionedRoute] = getAddVersion.mock.calls[0]; + expect(postAddVersion).toHaveBeenCalledTimes(1); + const [versionedRoute] = postAddVersion.mock.calls[0]; expect(versionedRoute.version).toEqual('version'); expect(versionedRoute.validate).toEqual({ - request: routeValidationObject, + request: noParamsValidationObject, }); }); + it('does not allow any params if no schema is provided', () => { + const pathDoesNotAllowExcessKeys = () => { + noParamsValidationObject.params.parse({ + unexpectedKey: 'not_allowed', + }); + }; + const queryDoesNotAllowExcessKeys = () => { + noParamsValidationObject.query.parse({ + unexpectedKey: 'not_allowed', + }); + }; + const bodyDoesNotAllowExcessKeys = () => { + noParamsValidationObject.body.parse({ + unexpectedKey: 'not_allowed', + }); + }; + + expect(pathDoesNotAllowExcessKeys).toThrowErrorMatchingInlineSnapshot(` + "[ + { + \\"code\\": \\"unrecognized_keys\\", + \\"keys\\": [ + \\"unexpectedKey\\" + ], + \\"path\\": [], + \\"message\\": \\"Unrecognized key(s) in object: 'unexpectedKey'\\" + } + ]" + `); + expect(queryDoesNotAllowExcessKeys).toThrowErrorMatchingInlineSnapshot(` + "[ + { + \\"code\\": \\"unrecognized_keys\\", + \\"keys\\": [ + \\"unexpectedKey\\" + ], + \\"path\\": [], + \\"message\\": \\"Unrecognized key(s) in object: 'unexpectedKey'\\" + } + ]" + `); + expect(bodyDoesNotAllowExcessKeys).toThrowErrorMatchingInlineSnapshot(` + "[ + { + \\"code\\": \\"unrecognized_keys\\", + \\"keys\\": [ + \\"unexpectedKey\\" + ], + \\"path\\": [], + \\"message\\": \\"Unrecognized key(s) in object: 'unexpectedKey'\\" + } + ]" + `); + }); + it('calls the route handler with all dependencies', async () => { - const [_, internalRouteHandler] = get.mock.calls[0]; - await internalRouteHandler(mockContext, mockRequest, kibanaResponseFactory); + const handler = jest.fn(); + + callRegisterRoutes({ + 'POST /internal/route': { + endpoint: 'POST /internal/route', + handler, + }, + }); - const [args] = internalHandler.mock.calls[0]; + const [_, wrappedHandler] = post.mock.calls[0]; + await wrappedHandler(mockContext, mockRequest, kibanaResponseFactory); + + expect(handler).toBeCalledTimes(1); + const [args] = handler.mock.calls[0]; expect(Object.keys(args).sort()).toEqual( ['aService', 'request', 'response', 'context', 'params', 'logger'].sort() ); const { params, logger, aService, request, response, context } = args; - expect(params).toEqual({ - body: { - bodyParam: 'body', - }, - query: { - queryParam: 'query', - }, - path: { - pathParam: 'path', - }, - }); + expect(params).toEqual(undefined); expect(request).toBe(mockRequest); expect(response).toBe(kibanaResponseFactory); expect(context).toBe(mockContext); @@ -167,38 +177,226 @@ describe('registerRoutes', () => { }); it('wraps a plain route handler result into a response', async () => { - const [_, internalRouteHandler] = get.mock.calls[0]; - const internalResult = await internalRouteHandler( - mockContext, - mockRequest, - kibanaResponseFactory - ); + const handler = jest.fn().mockResolvedValue('result'); - expect(internalHandler).toHaveBeenCalledTimes(1); - expect(internalResult).toEqual({ + callRegisterRoutes({ + 'POST /internal/route': { + endpoint: 'POST /internal/route', + handler, + }, + }); + + const [_, wrappedHandler] = post.mock.calls[0]; + const result = await wrappedHandler(mockContext, mockRequest, kibanaResponseFactory); + + expect(handler).toHaveBeenCalledTimes(1); + expect(result).toEqual({ status: 200, - payload: 'internal', - options: { body: 'internal' }, + payload: 'result', + options: { body: 'result' }, }); }); it('allows for route handlers to define a custom response', async () => { - const [_, publicRouteHandler] = getAddVersion.mock.calls[0]; - const publicResult = await publicRouteHandler(mockContext, mockRequest, kibanaResponseFactory); + const handler = jest + .fn() + .mockResolvedValue( + kibanaResponseFactory.custom({ statusCode: 201, body: { message: 'result' } }) + ); + + callRegisterRoutes({ + 'POST /internal/route': { + endpoint: 'POST /internal/route', + handler, + }, + }); - expect(publicHandler).toHaveBeenCalledTimes(1); - expect(publicResult).toEqual({ status: 201, payload: { message: 'public' }, options: {} }); + const [_, wrappedHandler] = post.mock.calls[0]; + const result = await wrappedHandler(mockContext, mockRequest, kibanaResponseFactory); + + expect(handler).toHaveBeenCalledTimes(1); + expect(result).toEqual({ status: 201, payload: { message: 'result' }, options: {} }); }); it('translates errors thrown in a route handler to an error response', async () => { - const [_, errorRouteHandler] = get.mock.calls[1]; - const errorResult = await errorRouteHandler(mockContext, mockRequest, kibanaResponseFactory); + const handler = jest.fn().mockRejectedValue(new Error('error')); + + callRegisterRoutes({ + 'POST /internal/route': { + endpoint: 'POST /internal/route', + handler, + }, + }); - expect(errorHandler).toHaveBeenCalledTimes(1); - expect(errorResult).toEqual({ + const [_, wrappedHandler] = post.mock.calls[0]; + const error = await wrappedHandler(mockContext, mockRequest, kibanaResponseFactory); + + expect(handler).toHaveBeenCalledTimes(1); + expect(error).toEqual({ status: 500, payload: { message: 'error', attributes: { data: {} } }, options: {}, }); }); + + describe('when using zod', () => { + const makeZodValidationObjectSpy = jest.spyOn( + makeZodValidationObject, + 'makeZodValidationObject' + ); + + const zodParamsRt = z.object({ + body: z.object({ + bodyParam: z.string(), + }), + query: z.object({ + queryParam: z.string(), + }), + path: z.object({ + pathParam: z.string(), + }), + }); + + it('uses Core validation', () => { + callRegisterRoutes({ + 'POST /internal/route': { + endpoint: 'POST /internal/route', + params: zodParamsRt, + handler: jest.fn, + }, + }); + + const [internalRoute] = post.mock.calls[0]; + expect(makeZodValidationObjectSpy).toHaveBeenCalledWith(zodParamsRt); + expect(internalRoute.validate).toEqual(makeZodValidationObjectSpy.mock.results[0].value); + }); + + it('passes on params', async () => { + const handler = jest.fn(); + callRegisterRoutes({ + 'POST /internal/route': { + endpoint: 'POST /internal/route', + params: zodParamsRt, + handler, + }, + }); + + const [_, wrappedHandler] = post.mock.calls[0]; + + await wrappedHandler( + mockContext, + { + ...mockRequest, + params: { + pathParam: 'path', + }, + query: { + queryParam: 'query', + }, + body: { + bodyParam: 'body', + }, + }, + kibanaResponseFactory + ); + + expect(handler).toBeCalledTimes(1); + const [args] = handler.mock.calls[0]; + const { params } = args; + expect(params).toEqual({ + path: { + pathParam: 'path', + }, + query: { + queryParam: 'query', + }, + body: { + bodyParam: 'body', + }, + }); + }); + }); + + describe('when using io-ts', () => { + const iotsParamsRt = t.type({ + body: t.type({ + bodyParam: t.string, + }), + query: t.type({ + queryParam: t.string, + }), + path: t.type({ + pathParam: t.string, + }), + }); + + it('bypasses Core validation', () => { + callRegisterRoutes({ + 'POST /internal/route': { + endpoint: 'POST /internal/route', + params: iotsParamsRt, + handler: jest.fn, + }, + }); + + const [internalRoute] = post.mock.calls[0]; + expect(internalRoute.validate).toEqual(passThroughValidationObject); + }); + + it('decodes params', async () => { + const handler = jest.fn(); + callRegisterRoutes({ + 'POST /internal/route': { + endpoint: 'POST /internal/route', + params: iotsParamsRt, + handler, + }, + }); + + const [_, wrappedHandler] = post.mock.calls[0]; + + await wrappedHandler( + mockContext, + { + ...mockRequest, + params: { + pathParam: 'path', + }, + query: { + queryParam: 'query', + }, + body: { + bodyParam: 'body', + }, + }, + kibanaResponseFactory + ); + + expect(handler).toBeCalledTimes(1); + const [args] = handler.mock.calls[0]; + const { params } = args; + expect(params).toEqual({ + path: { + pathParam: 'path', + }, + query: { + queryParam: 'query', + }, + body: { + bodyParam: 'body', + }, + }); + }); + }); + + function callRegisterRoutes(repository: any) { + registerRoutes({ + core: coreSetup, + logger: mockLogger, + dependencies: { + aService: mockService, + }, + repository, + }); + } }); diff --git a/packages/kbn-server-route-repository/src/register_routes.ts b/packages/kbn-server-route-repository/src/register_routes.ts index fcf3c5c3281ee..56f42fb499225 100644 --- a/packages/kbn-server-route-repository/src/register_routes.ts +++ b/packages/kbn-server-route-repository/src/register_routes.ts @@ -5,6 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ + import { errors } from '@elastic/elasticsearch'; import { isBoom } from '@hapi/boom'; import type { RequestHandlerContext } from '@kbn/core-http-request-handler-context-server'; @@ -12,15 +13,17 @@ import type { KibanaRequest, KibanaResponseFactory } from '@kbn/core-http-server import { isKibanaResponse } from '@kbn/core-http-server'; import type { CoreSetup } from '@kbn/core-lifecycle-server'; import type { Logger } from '@kbn/logging'; -import * as t from 'io-ts'; -import { merge, pick } from 'lodash'; import { ServerRoute, ServerRouteCreateOptions, + ZodParamsObject, parseEndpoint, } from '@kbn/server-route-repository-utils'; -import { decodeRequestParams } from './decode_request_params'; -import { routeValidationObject } from './route_validation_object'; +import { isZod } from '@kbn/zod'; +import { merge } from 'lodash'; +import { passThroughValidationObject, noParamsValidationObject } from './validation_objects'; +import { validateAndDecodeParams } from './validate_and_decode_params'; +import { makeZodValidationObject } from './make_zod_validation_object'; const CLIENT_CLOSED_REQUEST = { statusCode: 499, @@ -55,12 +58,7 @@ export function registerRoutes>({ response: KibanaResponseFactory ) => { try { - const runtimeType = params || t.strict({}); - - const validatedParams = decodeRequestParams( - pick(request, 'params', 'body', 'query'), - runtimeType - ); + const validatedParams = validateAndDecodeParams(request, params); const { aborted, result } = await Promise.race([ handler({ @@ -122,12 +120,21 @@ export function registerRoutes>({ logger.debug(`Registering endpoint ${endpoint}`); + let validationObject; + if (params === undefined) { + validationObject = noParamsValidationObject; + } else if (isZod(params)) { + validationObject = makeZodValidationObject(params as ZodParamsObject); + } else { + validationObject = passThroughValidationObject; + } + if (!version) { router[method]( { path: pathname, options, - validate: routeValidationObject, + validate: validationObject, }, wrappedHandler ); @@ -140,7 +147,7 @@ export function registerRoutes>({ { version, validate: { - request: routeValidationObject, + request: validationObject, }, }, wrappedHandler diff --git a/packages/kbn-server-route-repository/src/route_validation_object.ts b/packages/kbn-server-route-repository/src/route_validation_object.ts deleted file mode 100644 index 9d033e31fc324..0000000000000 --- a/packages/kbn-server-route-repository/src/route_validation_object.ts +++ /dev/null @@ -1,20 +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 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 { schema } from '@kbn/config-schema'; - -const anyObject = schema.object({}, { unknowns: 'allow' }); - -export const routeValidationObject = { - // `body` can be null, but `validate` expects non-nullable types - // if any validation is defined. Not having validation currently - // means we don't get the payload. See - // https://github.com/elastic/kibana/issues/50179 - body: schema.nullable(schema.oneOf([anyObject, schema.string()])), - params: anyObject, - query: anyObject, -}; diff --git a/packages/kbn-server-route-repository/src/strip_nullish_request_parameters.test.ts b/packages/kbn-server-route-repository/src/strip_nullish_request_parameters.test.ts new file mode 100644 index 0000000000000..b76c28048aeb3 --- /dev/null +++ b/packages/kbn-server-route-repository/src/strip_nullish_request_parameters.test.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 { stripNullishRequestParameters } from './strip_nullish_request_parameters'; + +describe('stripNullishRequestParameters', () => { + it('translate params to path', () => { + expect( + stripNullishRequestParameters({ + params: { + something: 'test', + }, + }) + ).toEqual({ + path: { + something: 'test', + }, + }); + }); + + it('removes invalid values', () => { + expect( + stripNullishRequestParameters({ + params: undefined, + query: null, + body: {}, + }) + ).toEqual({}); + }); +}); diff --git a/packages/kbn-server-route-repository/src/strip_nullish_request_parameters.ts b/packages/kbn-server-route-repository/src/strip_nullish_request_parameters.ts new file mode 100644 index 0000000000000..06668ac55a95a --- /dev/null +++ b/packages/kbn-server-route-repository/src/strip_nullish_request_parameters.ts @@ -0,0 +1,26 @@ +/* + * 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 { omitBy, isPlainObject, isEmpty } from 'lodash'; + +interface KibanaRequestParams { + body?: unknown; + query?: unknown; + params?: unknown; +} + +export function stripNullishRequestParameters(params: KibanaRequestParams) { + return omitBy<{ path: any; body: any; query: any }>( + { + path: params.params, + query: params.query, + body: params.body, + }, + (val) => val === null || val === undefined || (isPlainObject(val) && isEmpty(val)) + ); +} diff --git a/packages/kbn-server-route-repository/src/test_types.ts b/packages/kbn-server-route-repository/src/test_types.ts index 16447a6ef000f..ce4fbb6303c5c 100644 --- a/packages/kbn-server-route-repository/src/test_types.ts +++ b/packages/kbn-server-route-repository/src/test_types.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ import * as t from 'io-ts'; +import { z } from '@kbn/zod'; import { kibanaResponseFactory } from '@kbn/core/server'; import { EndpointOf, ReturnOf, RouteRepositoryClient } from '@kbn/server-route-repository-utils'; import { createServerRouteFactory } from './create_server_route_factory'; @@ -39,6 +40,18 @@ createServerRouteFactory<{}, {}>()({ }, }); +createServerRouteFactory<{}, {}>()({ + endpoint: 'GET /internal/endpoint_with_params', + params: z.object({ + path: z.object({ + serviceName: z.string(), + }), + }), + handler: async (resources) => { + assertType<{ params: { path: { serviceName: string } } }>(resources); + }, +}); + // Resources should be passed to the request handler. createServerRouteFactory<{ context: { getSpaceId: () => string } }, {}>()({ endpoint: 'GET /internal/endpoint_with_params', @@ -53,6 +66,19 @@ createServerRouteFactory<{ context: { getSpaceId: () => string } }, {}>()({ }, }); +createServerRouteFactory<{ context: { getSpaceId: () => string } }, {}>()({ + endpoint: 'GET /internal/endpoint_with_params', + params: z.object({ + path: z.object({ + serviceName: z.string(), + }), + }), + handler: async ({ context }) => { + const spaceId = context.getSpaceId(); + assertType(spaceId); + }, +}); + // Create options are available when registering a route. createServerRouteFactory<{}, { options: { tags: string[] } }>()({ endpoint: 'GET /internal/endpoint_with_params', @@ -125,6 +151,36 @@ const repository = { }; }, }), + ...createServerRoute({ + endpoint: 'GET /internal/endpoint_with_params_zod', + params: z.object({ + path: z.object({ + serviceName: z.string(), + }), + }), + handler: async () => { + return { + yesParamsForMe: true, + }; + }, + }), + ...createServerRoute({ + endpoint: 'GET /internal/endpoint_with_optional_params_zod', + params: z + .object({ + path: z + .object({ + serviceName: z.string(), + }) + .partial(), + }) + .partial(), + handler: async () => { + return { + someParamsForMe: true, + }; + }, + }), ...createServerRoute({ endpoint: 'GET /internal/endpoint_returning_result', handler: async () => { @@ -153,6 +209,10 @@ assertType>>([ 'GET /internal/endpoint_with_params', 'GET /internal/endpoint_without_params', 'GET /internal/endpoint_with_optional_params', + 'GET /internal/endpoint_with_params_zod', + 'GET /internal/endpoint_with_optional_params_zod', + 'GET /internal/endpoint_returning_result', + 'GET /internal/endpoint_returning_kibana_response', ]); // @ts-expect-error Type '"this_endpoint_does_not_exist"' is not assignable to type '"endpoint_without_params" | "endpoint_with_params" | "endpoint_with_optional_params"' @@ -208,11 +268,23 @@ client('GET /internal/endpoint_with_params', { timeout: 1, }); +client('GET /internal/endpoint_with_params_zod', { + params: { + // @ts-expect-error property 'serviceName' is missing in type '{}' + path: {}, + }, + timeout: 1, +}); + // Params are optional if the codec has no required keys client('GET /internal/endpoint_with_optional_params', { timeout: 1, }); +client('GET /internal/endpoint_with_optional_params_zod', { + timeout: 1, +}); + // If optional, an error will still occur if the params do not match client('GET /internal/endpoint_with_optional_params', { timeout: 1, @@ -222,6 +294,14 @@ client('GET /internal/endpoint_with_optional_params', { }, }); +client('GET /internal/endpoint_with_optional_params_zod', { + timeout: 1, + params: { + // @ts-expect-error Object literal may only specify known properties, and 'path' does not exist in type + path: '', + }, +}); + // The return type is correctly inferred client('GET /internal/endpoint_with_params', { params: { @@ -241,6 +321,24 @@ client('GET /internal/endpoint_with_params', { }>(res); }); +client('GET /internal/endpoint_with_params_zod', { + params: { + path: { + serviceName: '', + }, + }, + timeout: 1, +}).then((res) => { + assertType<{ + noParamsForMe: boolean; + // @ts-expect-error Property 'noParamsForMe' is missing in type + }>(res); + + assertType<{ + yesParamsForMe: boolean; + }>(res); +}); + client('GET /internal/endpoint_returning_result', { timeout: 1, }).then((res) => { @@ -261,7 +359,7 @@ client('GET /internal/endpoint_returning_kibana_response', { assertType<{ path: { serviceName: string } }>( decodeRequestParams( { - params: { + path: { serviceName: 'serviceName', }, body: undefined, @@ -275,7 +373,7 @@ assertType<{ path: { serviceName: boolean } }>( // @ts-expect-error The types of 'path.serviceName' are incompatible between these types. decodeRequestParams( { - params: { + path: { serviceName: 'serviceName', }, body: undefined, diff --git a/packages/kbn-server-route-repository/src/validate_and_decode_params.test.ts b/packages/kbn-server-route-repository/src/validate_and_decode_params.test.ts new file mode 100644 index 0000000000000..a60c6322f1d7a --- /dev/null +++ b/packages/kbn-server-route-repository/src/validate_and_decode_params.test.ts @@ -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 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 { KibanaRequest } from '@kbn/core-http-server'; +import { z } from '@kbn/zod'; +import * as t from 'io-ts'; +import { validateAndDecodeParams } from './validate_and_decode_params'; + +describe('validateAndDecodeParams', () => { + it('does nothing if no schema is provided', () => { + const request = {} as KibanaRequest; + expect(validateAndDecodeParams(request, undefined)).toEqual(undefined); + }); + + it('only does formatting when using zod', () => { + const request = { + params: { + my_path_param: 'test', + }, + query: {}, + } as KibanaRequest; + + expect(validateAndDecodeParams(request, z.object({}))).toEqual({ + path: { + my_path_param: 'test', + }, + }); + }); + + it('additionally performs validation when using zod', () => { + const schema = t.type({ + path: t.type({ + my_path_param: t.string, + }), + }); + + const validRequest = { + params: { + my_path_param: 'test', + }, + query: {}, + } as KibanaRequest; + + expect(validateAndDecodeParams(validRequest, schema)).toEqual({ + path: { + my_path_param: 'test', + }, + }); + + const invalidRequest = { + params: { + my_unexpected_param: 'test', + }, + } as KibanaRequest; + const shouldThrow = () => { + return validateAndDecodeParams(invalidRequest, schema); + }; + + expect(shouldThrow).toThrowErrorMatchingInlineSnapshot(` + "Failed to validate: + in /path/my_path_param: undefined does not match expected type string" + `); + }); +}); diff --git a/packages/kbn-server-route-repository/src/validate_and_decode_params.ts b/packages/kbn-server-route-repository/src/validate_and_decode_params.ts new file mode 100644 index 0000000000000..36faf00e40afd --- /dev/null +++ b/packages/kbn-server-route-repository/src/validate_and_decode_params.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 { KibanaRequest } from '@kbn/core-http-server'; +import { ZodParamsObject, IoTsParamsObject } from '@kbn/server-route-repository-utils'; +import { isZod } from '@kbn/zod'; +import { decodeRequestParams } from './decode_request_params'; +import { stripNullishRequestParameters } from './strip_nullish_request_parameters'; + +export function validateAndDecodeParams( + request: KibanaRequest, + paramsSchema: ZodParamsObject | IoTsParamsObject | undefined +) { + if (paramsSchema === undefined) { + return undefined; + } + + const params = stripNullishRequestParameters({ + params: request.params, + body: request.body, + query: request.query, + }); + + if (isZod(paramsSchema)) { + // Already validated by platform + return params; + } + + return decodeRequestParams(params, paramsSchema); +} diff --git a/packages/kbn-server-route-repository/src/validation_objects.ts b/packages/kbn-server-route-repository/src/validation_objects.ts new file mode 100644 index 0000000000000..9b4bab477ae3c --- /dev/null +++ b/packages/kbn-server-route-repository/src/validation_objects.ts @@ -0,0 +1,27 @@ +/* + * 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 { z } from '@kbn/zod'; + +export const passThroughValidationObject = { + body: z.any(), + params: z.any(), + query: z.any(), +}; + +export const noParamsValidationObject = { + params: z.object({}).strict(), + query: z.object({}).strict(), + body: z.union([ + // If the route uses POST, the body should be empty object or null + z.object({}).strict(), + z.null(), + // If the route uses GET, body is undefined, + z.undefined(), + ]), +}; diff --git a/packages/kbn-server-route-repository/tsconfig.json b/packages/kbn-server-route-repository/tsconfig.json index 5202a5bf0c422..bb8a0847c39b6 100644 --- a/packages/kbn-server-route-repository/tsconfig.json +++ b/packages/kbn-server-route-repository/tsconfig.json @@ -12,7 +12,6 @@ "**/*.ts" ], "kbn_references": [ - "@kbn/config-schema", "@kbn/io-ts-utils", "@kbn/core-http-request-handler-context-server", "@kbn/core-http-server", @@ -21,6 +20,7 @@ "@kbn/core", "@kbn/logging-mocks", "@kbn/server-route-repository-utils", + "@kbn/zod", ], "exclude": [ "target/**/*", diff --git a/packages/kbn-std/src/ensure_deep_object.ts b/packages/kbn-std/src/ensure_deep_object.ts index 42550bd09436f..b815c16ac5c6e 100644 --- a/packages/kbn-std/src/ensure_deep_object.ts +++ b/packages/kbn-std/src/ensure_deep_object.ts @@ -49,7 +49,7 @@ function walk(obj: any, keys: string[], value: any, path: string[]) { return; } - if (!obj.hasOwnProperty(key)) { + if (!Object.hasOwn(obj, key)) { obj[key] = {}; } diff --git a/packages/kbn-std/src/ensure_no_unsafe_properties.ts b/packages/kbn-std/src/ensure_no_unsafe_properties.ts index b053a40d62530..cff9946d761fa 100644 --- a/packages/kbn-std/src/ensure_no_unsafe_properties.ts +++ b/packages/kbn-std/src/ensure_no_unsafe_properties.ts @@ -11,12 +11,6 @@ interface StackItem { previousKey: string | null; } -// we have to do Object.prototype.hasOwnProperty because when you create an object using -// Object.create(null), and I assume other methods, you get an object without a prototype, -// so you can't use current.hasOwnProperty -const hasOwnProperty = (obj: any, property: string) => - Object.prototype.hasOwnProperty.call(obj, property); - const isObject = (obj: any) => typeof obj === 'object' && obj !== null; // we're using a stack instead of recursion so we aren't limited by the call stack @@ -40,11 +34,11 @@ export function ensureNoUnsafeProperties(obj: any) { continue; } - if (hasOwnProperty(value, '__proto__')) { + if (Object.hasOwn(value, '__proto__')) { throw new Error(`'__proto__' is an invalid key`); } - if (hasOwnProperty(value, 'prototype') && previousKey === 'constructor') { + if (Object.hasOwn(value, 'prototype') && previousKey === 'constructor') { throw new Error(`'constructor.prototype' is an invalid key`); } diff --git a/packages/kbn-test/src/es/test_es_cluster.ts b/packages/kbn-test/src/es/test_es_cluster.ts index a2078a1e56e16..df83fa89cf607 100644 --- a/packages/kbn-test/src/es/test_es_cluster.ts +++ b/packages/kbn-test/src/es/test_es_cluster.ts @@ -202,6 +202,7 @@ export function createTestEsCluster< license, basePath, esArgs, + resources: files, }; return new (class TestCluster { @@ -297,7 +298,7 @@ export function createTestEsCluster< // If we have multiple nodes, we shouldn't try setting up the native realm // right away or wait for ES to be green, the cluster isn't ready. So we only // set it up after the last node is started. - skipNativeRealmSetup: this.nodes.length > 1 && i < this.nodes.length - 1, + skipSecuritySetup: this.nodes.length > 1 && i < this.nodes.length - 1, skipReadyCheck: this.nodes.length > 1 && i < this.nodes.length - 1, onEarlyExit, writeLogsToPath, diff --git a/packages/kbn-test/src/functional_test_runner/lib/providers/async_instance.ts b/packages/kbn-test/src/functional_test_runner/lib/providers/async_instance.ts index 1f0fb31ccd41d..c870a1538ec29 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/providers/async_instance.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/providers/async_instance.ts @@ -73,7 +73,7 @@ export const createAsyncInstance = ( }, get(_, prop, receiver) { - if (loadingTarget.hasOwnProperty(prop)) { + if (Object.hasOwn(loadingTarget, prop)) { return Reflect.get(loadingTarget as any, prop, receiver); } @@ -84,7 +84,7 @@ export const createAsyncInstance = ( }, getOwnPropertyDescriptor(_, prop) { - if (loadingTarget.hasOwnProperty(prop)) { + if (Object.hasOwn(loadingTarget, prop)) { return Reflect.getOwnPropertyDescriptor(loadingTarget, prop); } @@ -100,7 +100,7 @@ export const createAsyncInstance = ( }, has(_, prop) { - if (!loadingTarget.hasOwnProperty(prop)) { + if (!Object.hasOwn(loadingTarget, prop)) { return Reflect.has(loadingTarget, prop); } diff --git a/packages/kbn-test/src/functional_test_runner/lib/providers/verbose_instance.ts b/packages/kbn-test/src/functional_test_runner/lib/providers/verbose_instance.ts index ca4109961b51c..d4ed0b7099468 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/providers/verbose_instance.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/providers/verbose_instance.ts @@ -59,7 +59,7 @@ export function createVerboseInstance( }; } - if (result.hasOwnProperty('thrown')) { + if (Object.hasOwn(result, 'thrown')) { log.indent(-2); throw result.thrown; } diff --git a/packages/kbn-test/src/jest/setup/polyfills.jsdom.js b/packages/kbn-test/src/jest/setup/polyfills.jsdom.js index 0867862b2d4ca..80fc5185dc115 100644 --- a/packages/kbn-test/src/jest/setup/polyfills.jsdom.js +++ b/packages/kbn-test/src/jest/setup/polyfills.jsdom.js @@ -11,12 +11,12 @@ Object.defineProperty(window, 'MutationObserver', { value: MutationObserver }); require('whatwg-fetch'); -if (!global.URL.hasOwnProperty('createObjectURL')) { +if (!Object.hasOwn(global.URL, 'createObjectURL')) { Object.defineProperty(global.URL, 'createObjectURL', { value: () => '' }); } // https://github.com/jsdom/jsdom/issues/2524 -if (!global.hasOwnProperty('TextEncoder')) { +if (!Object.hasOwn(global, 'TextEncoder')) { const customTextEncoding = require('@kayahr/text-encoding'); global.TextEncoder = customTextEncoding.TextEncoder; global.TextDecoder = customTextEncoding.TextDecoder; @@ -29,11 +29,11 @@ if (!global.hasOwnProperty('TextEncoder')) { // https://github.com/jsdom/jsdom/issues/2555 global.Blob = require('blob-polyfill').Blob; -if (!global.hasOwnProperty('ResizeObserver')) { +if (!Object.hasOwn(global, 'ResizeObserver')) { global.ResizeObserver = require('resize-observer-polyfill'); } -if (!global.hasOwnProperty('Worker')) { +if (!Object.hasOwn(global, 'Worker')) { class Worker { constructor(stringUrl) { this.url = stringUrl; @@ -49,7 +49,7 @@ if (!global.hasOwnProperty('Worker')) { // Mocking matchMedia to resolve TypeError: window.matchMedia is not a function // For more info, see https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom - if (!global.hasOwnProperty('matchMedia')) { + if (!Object.hasOwn(global, 'matchMedia')) { Object.defineProperty(global, 'matchMedia', { writable: true, // eslint-disable-next-line no-undef diff --git a/packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts b/packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts index f15fb0035d670..3f498eb5f4606 100644 --- a/packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts +++ b/packages/kbn-test/src/kbn_client/kbn_client_saved_objects.ts @@ -118,10 +118,13 @@ const STANDARD_LIST_TYPES = [ 'infrastructure-monitoring-log-view', 'apm-indices', // Fleet saved object types + 'ingest_manager_settings', 'ingest-outputs', 'ingest-download-sources', 'ingest-agent-policies', + 'fleet-agent-policies', 'ingest-package-policies', + 'fleet-package-policies', 'epm-packages', 'epm-packages-assets', 'fleet-preconfiguration-deletion-record', diff --git a/packages/kbn-test/src/kbn_client/kbn_client_ui_settings.ts b/packages/kbn-test/src/kbn_client/kbn_client_ui_settings.ts index 599184b30a461..a5a1102a0d44e 100644 --- a/packages/kbn-test/src/kbn_client/kbn_client_ui_settings.ts +++ b/packages/kbn-test/src/kbn_client/kbn_client_ui_settings.ts @@ -69,7 +69,7 @@ export class KbnClientUiSettings { }; for (const [name, { isOverridden }] of Object.entries(await this.getAll())) { - if (!isOverridden && !changes.hasOwnProperty(name)) { + if (!isOverridden && !Object.hasOwn(changes, name)) { changes[name] = null; } } diff --git a/packages/kbn-text-based-editor/src/helpers.test.ts b/packages/kbn-text-based-editor/src/helpers.test.ts index 797e68ce99056..c8b46a75ce444 100644 --- a/packages/kbn-text-based-editor/src/helpers.test.ts +++ b/packages/kbn-text-based-editor/src/helpers.test.ts @@ -249,8 +249,36 @@ describe('helpers', function () { }; const indices = await getIndicesList(updatedDataViewsMock); expect(indices).toStrictEqual([ - { name: '.system1', hidden: true }, - { name: 'logs', hidden: false }, + { name: '.system1', hidden: true, type: 'Index' }, + { name: 'logs', hidden: false, type: 'Index' }, + ]); + }); + + it('should type correctly the aliases', async function () { + const dataViewsMock = dataViewPluginMocks.createStartContract(); + const updatedDataViewsMock = { + ...dataViewsMock, + getIndices: jest.fn().mockResolvedValue([ + { + name: 'alias1', + title: 'system1', + tags: [ + { + name: 'Alias', + type: 'alias', + }, + ], + }, + { + name: 'logs', + title: 'logs', + }, + ]), + }; + const indices = await getIndicesList(updatedDataViewsMock); + expect(indices).toStrictEqual([ + { name: 'alias1', hidden: false, type: 'Alias' }, + { name: 'logs', hidden: false, type: 'Index' }, ]); }); }); @@ -283,7 +311,7 @@ describe('helpers', function () { ]), }; const indices = await getRemoteIndicesList(updatedDataViewsMock); - expect(indices).toStrictEqual([{ name: 'remote:logs', hidden: false }]); + expect(indices).toStrictEqual([{ name: 'remote:logs', hidden: false, type: 'Index' }]); }); }); }); diff --git a/packages/kbn-text-based-editor/src/helpers.ts b/packages/kbn-text-based-editor/src/helpers.ts index 95652a942d7dd..9e3bea6ee0abf 100644 --- a/packages/kbn-text-based-editor/src/helpers.ts +++ b/packages/kbn-text-based-editor/src/helpers.ts @@ -209,7 +209,11 @@ export const getIndicesList = async (dataViews: DataViewsPublicPluginStart) => { pattern: '*', isRollupIndex: () => false, }); - return indices.map((index) => ({ name: index.name, hidden: index.name.startsWith('.') })); + + return indices.map((index) => { + const [tag] = index?.tags ?? []; + return { name: index.name, hidden: index.name.startsWith('.'), type: tag?.name ?? 'Index' }; + }); }; export const getRemoteIndicesList = async (dataViews: DataViewsPublicPluginStart) => { @@ -223,7 +227,10 @@ export const getRemoteIndicesList = async (dataViews: DataViewsPublicPluginStart return !index.startsWith('.') && !Boolean(source.item.indices); }); - return finalIndicesList.map((source) => ({ name: source.name, hidden: false })); + return finalIndicesList.map((source) => { + const [tag] = source?.tags ?? []; + return { name: source.name, hidden: false, type: tag?.name ?? 'Index' }; + }); }; // refresh the esql cache entry after 10 minutes @@ -261,6 +268,7 @@ const getIntegrations = async (core: CoreStart) => { hidden: false, title: source.title, dataStreams: source.dataStreams, + type: 'Integration', })) ?? [] ); }; diff --git a/packages/kbn-tooling-log/src/tooling_log_text_writer.ts b/packages/kbn-tooling-log/src/tooling_log_text_writer.ts index 4fe33241cf77e..063edd75a14cb 100644 --- a/packages/kbn-tooling-log/src/tooling_log_text_writer.ts +++ b/packages/kbn-tooling-log/src/tooling_log_text_writer.ts @@ -25,7 +25,7 @@ const MSG_PREFIXES = { error: `${red('ERROR')} `, }; -const has = (obj: T, key: any): key is keyof T => obj.hasOwnProperty(key); +const has = (obj: T, key: any): key is keyof T => Object.hasOwn(obj, key); export interface ToolingLogTextWriterConfig { /** diff --git a/packages/kbn-try-in-console/components/try_in_console_button.test.tsx b/packages/kbn-try-in-console/components/try_in_console_button.test.tsx index fb4cce16d6134..ffb07c46989f6 100644 --- a/packages/kbn-try-in-console/components/try_in_console_button.test.tsx +++ b/packages/kbn-try-in-console/components/try_in_console_button.test.tsx @@ -73,7 +73,7 @@ describe('TryInConsoleButton', () => { const wrapper = render(); expect(wrapper.getByTestId('tryInConsoleButton')).toBeTruthy(); - expect(wrapper.getByRole('button')).toHaveTextContent('Try in Console'); + expect(wrapper.getByRole('button')).toHaveTextContent('Run in Console'); expect(mockLocatorUseUrl).toHaveBeenCalledWith( { loadFrom: 'data:text/plain,OIUQKgBA9A+gzgFwIYLkA', @@ -87,7 +87,7 @@ describe('TryInConsoleButton', () => { const wrapper = render(); expect(wrapper.getByTestId('tryInConsoleLink')).toBeTruthy(); - expect(wrapper.getByRole('button')).toHaveTextContent('Try in Console'); + expect(wrapper.getByRole('button')).toHaveTextContent('Run in Console'); }); it('renders null if dev tools are unavailable', async () => { const props: Partial = { @@ -153,7 +153,7 @@ describe('TryInConsoleButton', () => { const props: Partial = { request: 'GET /_stats' }; render(); - fireEvent.click(screen.getByText('Try in Console')); + fireEvent.click(screen.getByText('Run in Console')); expect(windowOpenSpy).toHaveBeenCalledTimes(1); expect(windowOpenSpy).toHaveBeenCalledWith('/app/test/dev_tools', '_blank', 'noreferrer'); @@ -161,7 +161,7 @@ describe('TryInConsoleButton', () => { it('can open in new tab without data', async () => { render(); - fireEvent.click(screen.getByText('Try in Console')); + fireEvent.click(screen.getByText('Run in Console')); expect(mockLocatorUseUrl).toHaveBeenCalledWith({}, undefined, [undefined]); expect(windowOpenSpy).toHaveBeenCalledTimes(1); @@ -175,7 +175,7 @@ describe('TryInConsoleButton', () => { /> ); - fireEvent.click(screen.getByText('Try in Console')); + fireEvent.click(screen.getByText('Run in Console')); expect(windowOpenSpy).toHaveBeenCalledTimes(0); expect(mockConsole.openEmbeddedConsole).toHaveBeenCalledTimes(1); @@ -185,7 +185,7 @@ describe('TryInConsoleButton', () => { mockConsole.isEmbeddedConsoleAvailable.mockReturnValue(false); render(); - fireEvent.click(screen.getByText('Try in Console')); + fireEvent.click(screen.getByText('Run in Console')); expect(windowOpenSpy).toHaveBeenCalledTimes(1); expect(mockConsole.openEmbeddedConsole).toHaveBeenCalledTimes(0); diff --git a/packages/kbn-try-in-console/components/try_in_console_button.tsx b/packages/kbn-try-in-console/components/try_in_console_button.tsx index 077c87ca66ed0..aae6ec338dfaa 100644 --- a/packages/kbn-try-in-console/components/try_in_console_button.tsx +++ b/packages/kbn-try-in-console/components/try_in_console_button.tsx @@ -16,7 +16,9 @@ import type { ConsolePluginStart } from '@kbn/console-plugin/public'; import { i18n } from '@kbn/i18n'; import { compressToEncodedURIComponent } from 'lz-string'; -const TRY_IN_CONSOLE = i18n.translate('tryInConsole.button', { defaultMessage: 'Try in Console' }); +const RUN_IN_CONSOLE = i18n.translate('tryInConsole.button.text', { + defaultMessage: 'Run in Console', +}); export interface TryInConsoleButtonProps { request?: string; @@ -32,7 +34,7 @@ export const TryInConsoleButton = ({ application, consolePlugin, sharePlugin, - content = TRY_IN_CONSOLE, + content = RUN_IN_CONSOLE, showIcon = true, type = 'emptyButton', }: TryInConsoleButtonProps) => { @@ -70,11 +72,11 @@ export const TryInConsoleButton = ({ consolePlugin?.isEmbeddedConsoleAvailable?.() ) { return i18n.translate('tryInConsole.embeddedConsoleButton.ariaLabel', { - defaultMessage: 'Try in Console - opens in embedded console', + defaultMessage: 'Run in Console - opens in embedded console', }); } return i18n.translate('tryInConsole.inNewTab.button.ariaLabel', { - defaultMessage: 'Try in Console - opens in a new tab', + defaultMessage: 'Run in Console - opens in a new tab', }); }; @@ -83,7 +85,7 @@ export const TryInConsoleButton = ({ 'aria-label': getAriaLabel(), onClick, }; - const iconType = showIcon ? 'popout' : undefined; + const iconType = showIcon ? 'play' : undefined; switch (type) { case 'link': diff --git a/packages/kbn-unified-field-list/src/services/field_examples_calculator/field_examples_calculator.ts b/packages/kbn-unified-field-list/src/services/field_examples_calculator/field_examples_calculator.ts index ac03aff1387db..878bc24097151 100644 --- a/packages/kbn-unified-field-list/src/services/field_examples_calculator/field_examples_calculator.ts +++ b/packages/kbn-unified-field-list/src/services/field_examples_calculator/field_examples_calculator.ts @@ -97,7 +97,7 @@ export function groupValues( return; } - if (groups.hasOwnProperty(value)) { + if (Object.hasOwn(groups, value)) { groups[value].count++; } else { groups[value] = { diff --git a/packages/presentation/presentation_publishing/interfaces/has_execution_context.ts b/packages/presentation/presentation_publishing/interfaces/has_execution_context.ts index 8aa4d633e1a0e..aa002114b1b68 100644 --- a/packages/presentation/presentation_publishing/interfaces/has_execution_context.ts +++ b/packages/presentation/presentation_publishing/interfaces/has_execution_context.ts @@ -16,6 +16,6 @@ export const apiHasExecutionContext = ( unknownApi: null | unknown ): unknownApi is HasExecutionContext => { return Boolean( - unknownApi && typeof unknownApi === 'object' && unknownApi.hasOwnProperty('executionContext') + unknownApi && typeof unknownApi === 'object' && Object.hasOwn(unknownApi, 'executionContext') ); }; diff --git a/packages/shared-ux/chrome/navigation/src/utils.ts b/packages/shared-ux/chrome/navigation/src/utils.ts index f63ff518a18d4..e8ab1cb3eb689 100644 --- a/packages/shared-ux/chrome/navigation/src/utils.ts +++ b/packages/shared-ux/chrome/navigation/src/utils.ts @@ -44,4 +44,4 @@ export const isAccordionNode = ( node: Pick ) => node.renderAs === 'accordion' || - ['defaultIsCollapsed', 'isCollapsible'].some((prop) => node.hasOwnProperty(prop)); + ['defaultIsCollapsed', 'isCollapsible'].some((prop) => Object.hasOwn(node, prop)); diff --git a/renovate.json b/renovate.json index 6f9e87e5e07a0..5145552ed6420 100644 --- a/renovate.json +++ b/renovate.json @@ -27,9 +27,16 @@ "enabled": true }, { - "groupName": "GitHub actions", + "groupName": "operations actions", "matchManagers": ["github-actions"], - "matchPackageNames": ["actions/checkout"], + "matchPackageNames": [ + "actions/checkout", + "elastic/github-actions/project-assigner", + "hmarr/auto-approve-action", + "octokit/graphql-action", + "sergeysova/jq-action", + "sourenlouv/backport" + ], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "backport:all-open", "release_note:skip"], @@ -61,7 +68,7 @@ }, { "groupName": "LaunchDarkly", - "matchDepNames": ["launchdarkly-js-client-sdk", "@launchdarkly/node-server-sdk"], + "matchDepNames": ["launchdarkly-js-client-sdk", "@launchdarkly/node-server-sdk", "launchdarkly/find-code-references"], "reviewers": ["team:kibana-security", "team:kibana-core"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "Team:Security", "Team:Core", "backport:prev-minor"], @@ -207,6 +214,18 @@ "minimumReleaseAge": "7 days", "enabled": true }, + { + "groupName": "CodeQL", + "matchDepNames": [ + "github/codeql-action/analyze", + "github/codeql-action/init" + ], + "reviewers": ["team:kibana-security"], + "matchBaseBranches": ["main"], + "labels": ["Team:Security", "release_note:skip", "backport:all-open"], + "minimumReleaseAge": "7 days", + "enabled": true + }, { "groupName": "ftr", "matchDepNames": [ diff --git a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts index af58fd9d383bc..d01051ed5fc78 100644 --- a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts +++ b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts @@ -90,7 +90,7 @@ describe('checking migration metadata changes on all registered SO types', () => "endpoint:unified-user-artifact-manifest": "71c7fcb52c658b21ea2800a6b6a76972ae1c776e", "endpoint:user-artifact-manifest": "1c3533161811a58772e30cdc77bac4631da3ef2b", "enterprise_search_telemetry": "9ac912e1417fc8681e0cd383775382117c9e3d3d", - "entity-definition": "331a2ba0ee9f24936ef049683549c8af7e46f03a", + "entity-definition": "61be3e95966045122b55e181bb39658b1dc9bbe9", "entity-discovery-api-key": "c267a65c69171d1804362155c1378365f5acef88", "epm-packages": "8042d4a1522f6c4e6f5486e791b3ffe3a22f88fd", "epm-packages-assets": "7a3e58efd9a14191d0d1a00b8aaed30a145fd0b1", @@ -102,8 +102,10 @@ describe('checking migration metadata changes on all registered SO types', () => "file": "6b65ae5899b60ebe08656fd163ea532e557d3c98", "file-upload-usage-collection-telemetry": "06e0a8c04f991e744e09d03ab2bd7f86b2088200", "fileShare": "5be52de1747d249a221b5241af2838264e19aaa1", + "fleet-agent-policies": "f57d3b70e4175a19a18f18ee72a379ceec82e1fc", "fleet-fleet-server-host": "69be15f6b6f2a2875ad3c7050ddea7a87f505417", "fleet-message-signing-keys": "93421f43fed2526b59092a4e3c65d64bc2266c0f", + "fleet-package-policies": "2f4d524adb49a5281d3af0b66bb3003ba0ff2e44", "fleet-preconfiguration-deletion-record": "c52ea1e13c919afe8a5e8e3adbb7080980ecc08e", "fleet-proxy": "6cb688f0d2dd856400c1dbc998b28704ff70363d", "fleet-setup-lock": "0dc784792c79b5af5a6e6b5dcac06b0dbaa90bde", @@ -119,8 +121,8 @@ describe('checking migration metadata changes on all registered SO types', () => "ingest-agent-policies": "90625b4a5ded9d4867358fcccc14a57c0454fcee", "ingest-download-sources": "279a68147e62e4d8858c09ad1cf03bd5551ce58d", "ingest-outputs": "daafff49255ab700e07491376fe89f04fc998b91", - "ingest-package-policies": "2c0f7c72d211bb7d3076ce2fc0bd368f9c16d274", - "ingest_manager_settings": "91445219e7115ff0c45d1dabd5d614a80b421797", + "ingest-package-policies": "53a94064674835fdb35e5186233bcd7052eabd22", + "ingest_manager_settings": "e794576a05d19dd5306a1e23cbb82c09bffabd65", "inventory-view": "b8683c8e352a286b4aca1ab21003115a4800af83", "kql-telemetry": "93c1d16c1a0dfca9c8842062cf5ef8f62ae401ad", "legacy-url-alias": "9b8cca3fbb2da46fd12823d3cd38fdf1c9f24bc8", diff --git a/src/core/server/integration_tests/elasticsearch/capabilities_serverless.test.ts b/src/core/server/integration_tests/elasticsearch/capabilities_serverless.test.ts index 314fa311cf705..eb1f734347834 100644 --- a/src/core/server/integration_tests/elasticsearch/capabilities_serverless.test.ts +++ b/src/core/server/integration_tests/elasticsearch/capabilities_serverless.test.ts @@ -31,7 +31,15 @@ describe('ES capabilities for serverless ES', () => { }); it('returns the correct capabilities', async () => { - const capabilities = await getCapabilitiesFromClient(client); + const capabilities = await Promise.race([ + getCapabilitiesFromClient(client), + new Promise((_, reject) => + setTimeout( + () => reject('Waited 10+ seconds to get capabilities from ES, timed out...'), + 10_000 + ) + ), + ]); expect(capabilities).toEqual({ serverless: true, }); diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/type_registrations.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group3/type_registrations.test.ts index fff7d32d78af5..e7c1034ba4a1e 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group3/type_registrations.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group3/type_registrations.test.ts @@ -67,6 +67,8 @@ const previouslyRegisteredTypes = [ 'file-upload-usage-collection-telemetry', 'fleet-agent-actions', 'fleet-agent-events', + 'fleet-agent-policies', + 'fleet-package-policies', 'fleet-agents', 'fleet-enrollment-api-keys', 'fleet-fleet-server-host', diff --git a/src/dev/build/tasks/nodejs/clean_node_builds_task.ts b/src/dev/build/tasks/nodejs/clean_node_builds_task.ts index 6498efdcce19f..1b4a8475c7dcc 100644 --- a/src/dev/build/tasks/nodejs/clean_node_builds_task.ts +++ b/src/dev/build/tasks/nodejs/clean_node_builds_task.ts @@ -15,12 +15,12 @@ export const CleanNodeBuilds: Task = { for (const platform of config.getTargetPlatforms()) { await deleteAll( [ - build.resolvePathForPlatform(platform, '*/node/lib/node_modules'), - build.resolvePathForPlatform(platform, '*/node/bin/npm'), - build.resolvePathForPlatform(platform, '*/node/bin/npx'), - build.resolvePathForPlatform(platform, '*/node/bin/corepack'), - build.resolvePathForPlatform(platform, '*/node/CHANGELOG.md'), - build.resolvePathForPlatform(platform, '*/node/README.md'), + build.resolvePathForPlatform(platform, 'node/*/lib/node_modules'), + build.resolvePathForPlatform(platform, 'node/*/bin/npm'), + build.resolvePathForPlatform(platform, 'node/*/bin/npx'), + build.resolvePathForPlatform(platform, 'node/*/bin/corepack'), + build.resolvePathForPlatform(platform, 'node/*/CHANGELOG.md'), + build.resolvePathForPlatform(platform, 'node/*/README.md'), ], log ); diff --git a/src/dev/i18n_tools/__fixtures__/extraction_signatures/template_literal_var.ts b/src/dev/i18n_tools/__fixtures__/extraction_signatures/template_literal_var.ts new file mode 100644 index 0000000000000..1c482370ad725 --- /dev/null +++ b/src/dev/i18n_tools/__fixtures__/extraction_signatures/template_literal_var.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 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 { i18n } from '@kbn/i18n'; + +const e = new Error('Should not work'); + +i18n.translate('contains_variable', { + defaultMessage: `value passed into literal directly (e: ${e.message})`, +}); + +i18n.translate('no_variable', { + defaultMessage: `template literal without any variable expressions (e: {errorMessage})`, + values: { errorMessage: e.message }, +}); diff --git a/src/dev/i18n_tools/extractors/call_expt.ts b/src/dev/i18n_tools/extractors/call_expt.ts index 3677b71fb2bb5..df3d05dc6b73e 100644 --- a/src/dev/i18n_tools/extractors/call_expt.ts +++ b/src/dev/i18n_tools/extractors/call_expt.ts @@ -286,6 +286,15 @@ export function extractMessageDescriptor( break; } } + } else if (typescript.isTemplateExpression(initializer)) { + initializer.forEachChild((child) => { + if (typescript.isTemplateSpan(child)) { + const messageText = initializer.getFullText(); + throw new Error( + `Template literals with variable substitution is not supported. please pass variables via the 'values' object instead. Message ${messageText}` + ); + } + }); } // {id: `id`} else if (typescript.isNoSubstitutionTemplateLiteral(initializer)) { diff --git a/src/dev/i18n_tools/extractors/formatjs.test.ts b/src/dev/i18n_tools/extractors/formatjs.test.ts index 85c1642519e80..3df36c0c7447b 100644 --- a/src/dev/i18n_tools/extractors/formatjs.test.ts +++ b/src/dev/i18n_tools/extractors/formatjs.test.ts @@ -267,6 +267,14 @@ describe('formatJS Runner', () => { } `); }); + + it('throws when template literal has a variable', async () => { + await expect(async () => + formatJsFixtureRunner('template_literal_var.ts') + ).rejects.toMatchInlineSnapshot( + `[Error: Error parsing file template_literal_var.ts: Error: Template literals with variable substitution is not supported. please pass variables via the 'values' object instead. Message \`value passed into literal directly (e: \${e.message})\`]` + ); + }); }); describe('extraction inside react components', () => { diff --git a/src/dev/license_checker/config.ts b/src/dev/license_checker/config.ts index b859c92a36f36..0ebeb9f0a518f 100644 --- a/src/dev/license_checker/config.ts +++ b/src/dev/license_checker/config.ts @@ -86,7 +86,7 @@ export const LICENSE_OVERRIDES = { 'jsts@1.6.2': ['Eclipse Distribution License - v 1.0'], // cf. https://github.com/bjornharrtell/jsts '@mapbox/jsonlint-lines-primitives@2.0.2': ['MIT'], // license in readme https://github.com/tmcw/jsonlint '@elastic/ems-client@8.5.3': ['Elastic License 2.0'], - '@elastic/eui@95.6.0': ['SSPL-1.0 OR Elastic License 2.0'], + '@elastic/eui@95.7.0': ['SSPL-1.0 OR Elastic License 2.0'], 'language-subtag-registry@0.3.21': ['CC-BY-4.0'], // retired ODC‑By license https://github.com/mattcg/language-subtag-registry 'buffers@0.1.1': ['MIT'], // license in importing module https://www.npmjs.com/package/binary '@bufbuild/protobuf@1.2.1': ['Apache-2.0'], // license (Apache-2.0 AND BSD-3-Clause) diff --git a/src/dev/storybook/run_storybook_cli.ts b/src/dev/storybook/run_storybook_cli.ts index 7a6ea7f34d825..587dab475145f 100644 --- a/src/dev/storybook/run_storybook_cli.ts +++ b/src/dev/storybook/run_storybook_cli.ts @@ -32,7 +32,7 @@ run( throw createFlagError('Missing alias'); } - if (!storybookAliases.hasOwnProperty(alias)) { + if (!Object.hasOwn(storybookAliases, alias)) { throw createFlagError(`Unknown alias [${alias}]`); } diff --git a/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_trendline_function.ts b/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_trendline_function.ts index 4d980b85cf059..12bcab058d5d4 100644 --- a/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_trendline_function.ts +++ b/src/plugins/chart_expressions/expression_metric/common/expression_functions/metric_trendline_function.ts @@ -126,7 +126,7 @@ export const metricTrendlineFunction = (): TrendlineExpressionFunctionDefinition }); for (const breakdownTerm in rowsByBreakdown) { - if (!rowsByBreakdown.hasOwnProperty(breakdownTerm)) continue; + if (!Object.hasOwn(rowsByBreakdown, breakdownTerm)) continue; trends[breakdownTerm] = rowsByBreakdown[breakdownTerm].map((row) => ({ x: row[timeColId] !== null ? row[timeColId] : NaN, y: row[metricColId] !== null ? row[metricColId] : NaN, diff --git a/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.ts b/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.ts index b7cd7349880b1..7d4ff89a027cc 100644 --- a/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.ts +++ b/src/plugins/chart_expressions/expression_partition_vis/public/utils/layers/get_color.ts @@ -79,13 +79,13 @@ const getDistinctColor = ( formattedCategoricalKey: string ) => { // TODO move away from Record to a Map to avoid issues with reserved JS keywords - if (overwriteColors.hasOwnProperty(categoricalKey)) { + if (Object.hasOwn(overwriteColors, categoricalKey)) { return overwriteColors[categoricalKey]; } // this is for supporting old visualizations (created by vislib plugin) // it seems that there for some aggs, the uiState saved from vislib is // different from how es-charts handles it - if (overwriteColors.hasOwnProperty(formattedCategoricalKey)) { + if (Object.hasOwn(overwriteColors, formattedCategoricalKey)) { return overwriteColors[formattedCategoricalKey]; } @@ -181,7 +181,7 @@ const overrideColors = ( ) => { let overwriteColor; - if (overwriteColors.hasOwnProperty(name)) { + if (Object.hasOwn(overwriteColors, name)) { overwriteColor = overwriteColors[name]; } diff --git a/src/plugins/console/common/constants/copy_as.ts b/src/plugins/console/common/constants/copy_as.ts new file mode 100644 index 0000000000000..a7b6c80685939 --- /dev/null +++ b/src/plugins/console/common/constants/copy_as.ts @@ -0,0 +1,19 @@ +/* + * 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. + */ + +// Default language for the language selector +export const DEFAULT_LANGUAGE = 'curl'; +// These values are the ones that should match the available languages from the +// `@elastic/request-converter` package but since it cannot run on client side, +// we hardcode the available languages in order to avoid having to make an extra +// request to fetch them. +export const AVAILABLE_LANGUAGES = [ + { value: 'curl', label: 'curl' }, + { value: 'javascript', label: 'JavaScript' }, + { value: 'python', label: 'Python' }, +]; diff --git a/src/plugins/console/common/constants/index.ts b/src/plugins/console/common/constants/index.ts index 4e0df53fdd513..209b47419fc3e 100644 --- a/src/plugins/console/common/constants/index.ts +++ b/src/plugins/console/common/constants/index.ts @@ -16,3 +16,4 @@ export { MANUAL_SUBFOLDER, } from './autocomplete_definitions'; export { DEFAULT_INPUT_VALUE } from './editor_input'; +export { DEFAULT_LANGUAGE, AVAILABLE_LANGUAGES } from './copy_as'; diff --git a/src/plugins/console/public/application/containers/editor/legacy/console_editor/mapbox_vector_tile/convert_mapbox_vector_tile_to_json.ts b/src/plugins/console/public/application/containers/editor/legacy/console_editor/mapbox_vector_tile/convert_mapbox_vector_tile_to_json.ts index 5a64dd98fe160..37c97c08bb998 100644 --- a/src/plugins/console/public/application/containers/editor/legacy/console_editor/mapbox_vector_tile/convert_mapbox_vector_tile_to_json.ts +++ b/src/plugins/console/public/application/containers/editor/legacy/console_editor/mapbox_vector_tile/convert_mapbox_vector_tile_to_json.ts @@ -16,7 +16,7 @@ export function convertMapboxVectorTileToJson(response: VectorTile) { const output: MapboxVectorTileJson = {}; for (const property in data) { - if (data.hasOwnProperty(property)) { + if (Object.hasOwn(data, property)) { const propertyObject: VectorTileLayer = data[property]; const featuresArray = []; diff --git a/src/plugins/console/public/application/containers/editor/monaco/components/context_menu/context_menu.tsx b/src/plugins/console/public/application/containers/editor/monaco/components/context_menu/context_menu.tsx new file mode 100644 index 0000000000000..acdbd03704866 --- /dev/null +++ b/src/plugins/console/public/application/containers/editor/monaco/components/context_menu/context_menu.tsx @@ -0,0 +1,264 @@ +/* + * 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 React, { useState } from 'react'; +import { + EuiIcon, + EuiContextMenuPanel, + EuiContextMenuItem, + EuiPopover, + EuiFlexGroup, + EuiFlexItem, + EuiLink, + EuiLoadingSpinner, +} from '@elastic/eui'; +import { NotificationsSetup } from '@kbn/core/public'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { i18n } from '@kbn/i18n'; +import { LanguageSelectorModal } from './language_selector_modal'; +import { convertRequestToLanguage } from '../../../../../../services'; +import type { EditorRequest } from '../../types'; + +import { useServicesContext } from '../../../../../contexts'; +import { StorageKeys } from '../../../../../../services'; +import { DEFAULT_LANGUAGE, AVAILABLE_LANGUAGES } from '../../../../../../../common/constants'; + +interface Props { + getRequests: () => Promise; + getDocumentation: () => Promise; + autoIndent: (ev: React.MouseEvent) => void; + notifications: NotificationsSetup; +} + +const DELAY_FOR_HIDING_SPINNER = 500; + +const getLanguageLabelByValue = (value: string) => { + return AVAILABLE_LANGUAGES.find((lang) => lang.value === value)?.label || DEFAULT_LANGUAGE; +}; + +export const ContextMenu = ({ + getRequests, + getDocumentation, + autoIndent, + notifications, +}: Props) => { + // Get default language from local storage + const { + services: { storage, esHostService }, + } = useServicesContext(); + const defaultLanguage = storage.get(StorageKeys.DEFAULT_LANGUAGE, DEFAULT_LANGUAGE); + + const [isPopoverOpen, setIsPopoverOpen] = useState(false); + const [isRequestConverterLoading, setRequestConverterLoading] = useState(false); + const [isLanguageSelectorVisible, setLanguageSelectorVisibility] = useState(false); + const [currentLanguage, setCurrentLanguage] = useState(defaultLanguage); + + const copyText = async (text: string) => { + if (window.navigator?.clipboard) { + await window.navigator.clipboard.writeText(text); + return; + } + throw new Error('Could not copy to clipboard!'); + }; + + // This function will convert all the selected requests to the language by + // calling convertRequestToLanguage and then copy the data to clipboard. + const copyAs = async (language?: string) => { + // Get the language we want to convert the requests to + const withLanguage = language || currentLanguage; + // Get all the selected requests + const requests = await getRequests(); + + const { data: requestsAsCode, error: requestError } = await convertRequestToLanguage({ + language: withLanguage, + esHost: esHostService.getHost(), + requests, + }); + + if (requestError) { + notifications.toasts.addDanger({ + title: i18n.translate('console.consoleMenu.copyAsFailedMessage', { + defaultMessage: + '{requestsCount, plural, one {Request} other {Requests}} could not be copied to clipboard', + values: { requestsCount: requests.length }, + }), + }); + + return; + } + + notifications.toasts.addSuccess({ + title: i18n.translate('console.consoleMenu.copyAsSuccessMessage', { + defaultMessage: + '{requestsCount, plural, one {Request} other {Requests}} copied to clipboard as {language}', + values: { language: getLanguageLabelByValue(withLanguage), requestsCount: requests.length }, + }), + }); + + await copyText(requestsAsCode); + }; + + const onCopyAsSubmit = async (language?: string) => { + const withLanguage = language || currentLanguage; + + // Close language selector modal + setLanguageSelectorVisibility(false); + // Show loading spinner + setRequestConverterLoading(true); + + // When copying as worked as expected, close the context menu popover + copyAs(withLanguage) + .then(() => { + setIsPopoverOpen(false); + }) + .finally(() => { + // Delay hiding the spinner to avoid flickering between the spinner and + // the change language button + setTimeout(() => { + setRequestConverterLoading(false); + }, DELAY_FOR_HIDING_SPINNER); + }); + }; + + const changeDefaultLanguage = (language: string) => { + if (currentLanguage !== language) { + storage.set(StorageKeys.DEFAULT_LANGUAGE, language); + } + + setCurrentLanguage(language); + }; + + const closePopover = () => { + setIsPopoverOpen(false); + }; + + const openDocs = async () => { + closePopover(); + const documentation = await getDocumentation(); + if (!documentation) { + notifications.toasts.addWarning({ + title: i18n.translate('console.consoleMenu.missingDocumentationPage', { + defaultMessage: 'Documentation page is not yet available for this API.', + }), + }); + return; + } + window.open(documentation, '_blank'); + }; + + const handleAutoIndent = (event: React.MouseEvent) => { + closePopover(); + autoIndent(event); + }; + + const button = ( + setIsPopoverOpen((prev) => !prev)} + data-test-subj="toggleConsoleMenu" + aria-label={i18n.translate('console.requestOptionsButtonAriaLabel', { + defaultMessage: 'Request options', + })} + > + + + ); + + const items = [ + { + e.preventDefault(); + const target = e.target as HTMLButtonElement; + + if (target.dataset.name === 'changeLanguage') { + setLanguageSelectorVisibility(true); + return; + } + + onCopyAsSubmit(); + }} + icon="copyClipboard" + > + + + + + + + + {getLanguageLabelByValue(currentLanguage)} + + + + + {isRequestConverterLoading ? ( + + ) : ( + // The EuiContextMenuItem renders itself as a button already, so we need to + // force the link to not be a button in order to prevent A11Y issues. + + Change + + )} + + + , + + + , + + + , + ]; + + return ( + <> + + + + {isLanguageSelectorVisible && ( + setLanguageSelectorVisibility(false)} + onSubmit={onCopyAsSubmit} + /> + )} + + ); +}; diff --git a/src/plugins/console/public/application/containers/editor/monaco/components/context_menu/index.ts b/src/plugins/console/public/application/containers/editor/monaco/components/context_menu/index.ts new file mode 100644 index 0000000000000..6ef3a8fab51bf --- /dev/null +++ b/src/plugins/console/public/application/containers/editor/monaco/components/context_menu/index.ts @@ -0,0 +1,9 @@ +/* + * 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 { ContextMenu } from './context_menu'; diff --git a/src/plugins/console/public/application/containers/editor/monaco/components/context_menu/language_selector_modal.tsx b/src/plugins/console/public/application/containers/editor/monaco/components/context_menu/language_selector_modal.tsx new file mode 100644 index 0000000000000..8ce76675b4336 --- /dev/null +++ b/src/plugins/console/public/application/containers/editor/monaco/components/context_menu/language_selector_modal.tsx @@ -0,0 +1,144 @@ +/* + * 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 React, { useState, useMemo } from 'react'; +import { + EuiButton, + EuiModal, + EuiModalBody, + EuiButtonEmpty, + EuiModalFooter, + EuiModalHeader, + EuiModalHeaderTitle, + useGeneratedHtmlId, + EuiSelectable, + EuiSelectableOption, + EuiLink, + EuiTextColor, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { AVAILABLE_LANGUAGES } from '../../../../../../../common/constants'; + +interface Props { + closeModal: () => void; + onSubmit: (language: string) => void; + currentLanguage: string; + changeDefaultLanguage: (lang: string) => void; +} + +const DEFAULT_BADGE = ( + + + {i18n.translate('console.requestPanel.contextMenu.defaultSelectedLanguage', { + defaultMessage: 'Default', + })} + + +); + +export const LanguageSelectorModal = ({ + closeModal, + onSubmit, + currentLanguage, + changeDefaultLanguage, +}: Props) => { + const modalTitleId = useGeneratedHtmlId(); + const [selectedLanguage, setSelectedLanguage] = useState(currentLanguage); + const [options, setOptions] = useState( + AVAILABLE_LANGUAGES.map( + (lang): EuiSelectableOption => ({ + label: lang.label, + key: lang.value, + 'data-test-subj': `languageOption-${lang.value}`, + }) + ) + ); + + const noOptionsSelected = options.every((option) => !option.checked); + + const optionsList = useMemo(() => { + return options.map((option) => ({ + ...option, + ...(noOptionsSelected && option.key === selectedLanguage && { checked: 'on' }), + append: + option.key === selectedLanguage ? ( + DEFAULT_BADGE + ) : ( + setSelectedLanguage(option.key!)} + data-test-subj={`changeDefaultLanguageTo-${option.key}`} + > + {i18n.translate('console.requestPanel.contextMenu.defaultSelectedLanguage', { + defaultMessage: 'Set as default', + })} + + ), + })); + }, [options, selectedLanguage, noOptionsSelected]); + + const onCopyCode = () => { + const selectedOption = options.find((option) => option.checked); + const language = selectedOption?.key || selectedLanguage; + + // If the default language is changed, update the local storage setting + if (currentLanguage !== language) { + changeDefaultLanguage(selectedLanguage); + } + + onSubmit(language); + }; + + const onCloseModal = () => { + changeDefaultLanguage(selectedLanguage); + closeModal(); + }; + + return ( + + + + + + + + + setOptions(changedOptions)} + singleSelection="always" + listProps={{ + onFocusBadge: false, + isVirtualized: false, + }} + > + {(list) => list} + + + + + + + + + + + + + ); +}; diff --git a/src/plugins/console/public/application/containers/editor/monaco/components/index.ts b/src/plugins/console/public/application/containers/editor/monaco/components/index.ts new file mode 100644 index 0000000000000..6ef3a8fab51bf --- /dev/null +++ b/src/plugins/console/public/application/containers/editor/monaco/components/index.ts @@ -0,0 +1,9 @@ +/* + * 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 { ContextMenu } from './context_menu'; diff --git a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor.tsx b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor.tsx index d8fe60dc8c5e9..e1d72fa979b43 100644 --- a/src/plugins/console/public/application/containers/editor/monaco/monaco_editor.tsx +++ b/src/plugins/console/public/application/containers/editor/monaco/monaco_editor.tsx @@ -13,7 +13,7 @@ import { CodeEditor } from '@kbn/code-editor'; import { CONSOLE_LANG_ID, CONSOLE_THEME_ID, monaco } from '@kbn/monaco'; import { i18n } from '@kbn/i18n'; import { useSetInputEditor } from '../../../hooks'; -import { ConsoleMenu } from '../../../components'; +import { ContextMenu } from './components'; import { useServicesContext, useEditorReadContext, @@ -26,6 +26,7 @@ import { useResizeCheckerUtils, useKeyboardCommandsUtils, } from './hooks'; +import type { EditorRequest } from './types'; import { MonacoEditorActionsProvider } from './monaco_editor_actions_provider'; import { getSuggestionProvider } from './monaco_editor_suggestion_provider'; @@ -36,7 +37,7 @@ export interface EditorProps { export const MonacoEditor = ({ initialTextValue }: EditorProps) => { const context = useServicesContext(); const { - services: { notifications, esHostService, settings: settingsService, autocompleteInfo }, + services: { notifications, settings: settingsService, autocompleteInfo }, docLinkVersion, config: { isDevMode }, } = context; @@ -55,10 +56,11 @@ export const MonacoEditor = ({ initialTextValue }: EditorProps) => { const [editorActionsCss, setEditorActionsCss] = useState({}); const setInputEditor = useSetInputEditor(); - const getCurlCallback = useCallback(async (): Promise => { - const curl = await actionsProvider.current?.getCurl(esHostService.getHost()); - return curl ?? ''; - }, [esHostService]); + + const getRequestsCallback = useCallback(async (): Promise => { + const requests = await actionsProvider.current?.getRequests(); + return requests ?? []; + }, []); const getDocumenationLink = useCallback(async () => { return actionsProvider.current!.getDocumentationLink(docLinkVersion); @@ -156,8 +158,8 @@ export const MonacoEditor = ({ initialTextValue }: EditorProps) => { - this.highlightRequests(), @@ -198,7 +197,7 @@ export class MonacoEditorActionsProvider { return selectedRequests; } - private async getRequests() { + public async getRequests() { const parsedRequests = await this.getSelectedParsedRequests(); const stringifiedRequests = parsedRequests.map((parsedRequest) => stringifyRequest(parsedRequest) diff --git a/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/worker.js b/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/worker.js index e8953152a5932..307d7403125fa 100644 --- a/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/worker.js +++ b/src/plugins/console/public/application/models/legacy_core_editor/mode/worker/worker.js @@ -53,10 +53,7 @@ function init(window) { let alias = paths[testPath]; if ('string' === typeof alias) return alias + tail; if (alias) - {return ( - alias.location.replace(/\/*$/, '/') + - (tail || alias.main || alias.name) - );} + {return (alias.location.replace(/\/*$/, '/') + (tail || alias.main || alias.name));} if (alias === !1) return ''; let i = testPath.lastIndexOf('/'); if (-1 === i) break; diff --git a/src/plugins/console/public/plugin.ts b/src/plugins/console/public/plugin.ts index 2728629d288b8..27b8fc1af8ccf 100644 --- a/src/plugins/console/public/plugin.ts +++ b/src/plugins/console/public/plugin.ts @@ -26,6 +26,7 @@ import { EmbeddableConsoleInfo, createStorage, setStorage, + httpService, } from './services'; export class ConsoleUIPlugin @@ -52,6 +53,7 @@ export class ConsoleUIPlugin dev: { enableMonaco: isMonacoEnabled }, } = this.ctx.config.get(); + httpService.setup(http); this.autocompleteInfo.setup(http); setAutocompleteInfo(this.autocompleteInfo); diff --git a/src/plugins/console/public/services/api.ts b/src/plugins/console/public/services/api.ts new file mode 100644 index 0000000000000..77b84b1483c8a --- /dev/null +++ b/src/plugins/console/public/services/api.ts @@ -0,0 +1,27 @@ +/* + * 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 { sendRequest } from './use_request'; +import type { EditorRequest } from '../application/containers/editor/monaco/types'; + +export async function convertRequestToLanguage({ + requests, + language, + esHost, +}: { + language: string; + esHost: string; + requests: EditorRequest[]; +}) { + return sendRequest({ + path: `/api/console/convert_request_to_language`, + method: 'post', + query: { language, esHost }, + body: requests, + }); +} diff --git a/src/plugins/console/public/services/http.ts b/src/plugins/console/public/services/http.ts new file mode 100644 index 0000000000000..afcf5595c55cf --- /dev/null +++ b/src/plugins/console/public/services/http.ts @@ -0,0 +1,23 @@ +/* + * 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 { HttpSetup } from '@kbn/core/public'; + +export class HttpService { + private client: any; + + public setup(httpClient: HttpSetup): void { + this.client = httpClient; + } + + public get httpClient(): HttpSetup { + return this.client; + } +} + +export const httpService = new HttpService(); diff --git a/src/plugins/console/public/services/index.ts b/src/plugins/console/public/services/index.ts index 669ed890729dc..43b603b82b3d6 100644 --- a/src/plugins/console/public/services/index.ts +++ b/src/plugins/console/public/services/index.ts @@ -17,3 +17,6 @@ export { ENTITIES, } from './autocomplete'; export { EmbeddableConsoleInfo } from './embeddable_console'; +export { httpService } from './http'; + +export { convertRequestToLanguage } from './api'; diff --git a/src/plugins/console/public/services/storage.ts b/src/plugins/console/public/services/storage.ts index b38cc2925dfb1..b211724e08872 100644 --- a/src/plugins/console/public/services/storage.ts +++ b/src/plugins/console/public/services/storage.ts @@ -15,6 +15,7 @@ export enum StorageKeys { WIDTH = 'widths', FOLDS = 'folds', VARIABLES = 'variables', + DEFAULT_LANGUAGE = 'defaultLanguage', } export class Storage { diff --git a/src/plugins/console/public/services/use_request.ts b/src/plugins/console/public/services/use_request.ts new file mode 100644 index 0000000000000..bb8926ef04454 --- /dev/null +++ b/src/plugins/console/public/services/use_request.ts @@ -0,0 +1,22 @@ +/* + * 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 { + SendRequestConfig, + SendRequestResponse, + sendRequest as _sendRequest, + Error, +} from '../shared_imports'; + +import { httpService } from './http'; + +export const sendRequest = ( + config: SendRequestConfig +): Promise> => { + return _sendRequest(httpService.httpClient, config); +}; diff --git a/src/plugins/console/public/shared_imports.ts b/src/plugins/console/public/shared_imports.ts index 779a2b9ee1c0a..88c162bbbf48c 100644 --- a/src/plugins/console/public/shared_imports.ts +++ b/src/plugins/console/public/shared_imports.ts @@ -15,3 +15,9 @@ export { sendRequest, collapseLiteralStrings, expandLiteralStrings }; export { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; export { toMountPoint } from '@kbn/react-kibana-mount'; + +export type { + SendRequestConfig, + SendRequestResponse, + Error, +} from '@kbn/es-ui-shared-plugin/public'; diff --git a/src/plugins/console/server/routes/api/__mocks__/request.mock.ts b/src/plugins/console/server/routes/api/__mocks__/request.mock.ts new file mode 100644 index 0000000000000..b3809ce432ce3 --- /dev/null +++ b/src/plugins/console/server/routes/api/__mocks__/request.mock.ts @@ -0,0 +1,16 @@ +/* + * 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 const createRequestMock = (opts?: { + headers?: any; + params?: Record; + query?: Record; + body?: Record; +}) => { + return Object.assign({ headers: {} }, opts || {}); +}; diff --git a/src/plugins/console/server/routes/api/__mocks__/routes.mock.ts b/src/plugins/console/server/routes/api/__mocks__/routes.mock.ts new file mode 100644 index 0000000000000..9aeff818b6715 --- /dev/null +++ b/src/plugins/console/server/routes/api/__mocks__/routes.mock.ts @@ -0,0 +1,52 @@ +/* + * 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 { AwaitedProperties } from '@kbn/utility-types'; +import { RequestHandler, RequestHandlerContext } from '@kbn/core/server'; +import { + elasticsearchServiceMock, + savedObjectsClientMock, + deprecationsServiceMock, +} from '@kbn/core/server/mocks'; + +export const savedObjectsClient = savedObjectsClientMock.create(); +export const routeHandlerContextMock = { + core: { + elasticsearch: { + client: elasticsearchServiceMock.createScopedClusterClient(), + }, + savedObjects: { getClient: () => savedObjectsClient }, + deprecations: { client: deprecationsServiceMock.createClient() }, + }, +} as unknown as AwaitedProperties; + +export const createMockRouter = () => { + const paths: Record>> = {}; + + const assign = + (method: string) => + ({ path }: { path: string }, handler: RequestHandler) => { + paths[method] = { + ...(paths[method] || {}), + ...{ [path]: handler }, + }; + }; + + return { + getHandler({ method, pathPattern }: { method: string; pathPattern: string }) { + return paths[method][pathPattern]; + }, + get: assign('get'), + post: assign('post'), + put: assign('put'), + patch: assign('patch'), + delete: assign('delete'), + }; +}; + +export type MockRouter = ReturnType; diff --git a/src/plugins/console/server/routes/api/console/convert_request_to_language/convert_request_handler.test.ts b/src/plugins/console/server/routes/api/console/convert_request_to_language/convert_request_handler.test.ts new file mode 100644 index 0000000000000..ec567c8e20f82 --- /dev/null +++ b/src/plugins/console/server/routes/api/console/convert_request_to_language/convert_request_handler.test.ts @@ -0,0 +1,90 @@ +/* + * 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 { kibanaResponseFactory } from '@kbn/core/server'; +import { createMockRouter, MockRouter, routeHandlerContextMock } from '../../__mocks__/routes.mock'; +import { createRequestMock } from '../../__mocks__/request.mock'; +import { handleEsError } from '../../../../shared_imports'; + +import { registerConvertRequestRoute } from '.'; + +jest.mock('@elastic/request-converter', () => ({ + convertRequests: (request: string, language: string, options: any) => { + return Promise.resolve({ + converted: true, + meta: { + request, + language, + options, + }, + }); + }, +})); + +describe('Console convert request to language route', () => { + let mockRouter: MockRouter; + let routeDependencies: any; + + beforeEach(() => { + mockRouter = createMockRouter(); + routeDependencies = { + router: mockRouter, + lib: { handleEsError }, + }; + registerConvertRequestRoute(routeDependencies); + }); + + afterEach(() => { + jest.resetAllMocks(); + }); + + describe('GET /api/console/convert_request_to_language', () => { + it('Correctly validates url validation config', async () => { + const resp = await routeDependencies.router.getHandler({ + method: 'post', + pathPattern: '/api/console/convert_request_to_language', + })( + routeHandlerContextMock, + createRequestMock({ + query: { + method: 'PUT', + path: '_ingest/geoip/database/geoip2_enterprise', + language: 'javascript', + esHost: 'http://localhost:9200', + }, + body: [ + '{\n "name": "GeoIP2-Enterprise",\n "maxmind": {\n "account_id": "1234567"\n }\n}', + ], + }), + kibanaResponseFactory + ); + + expect(resp.status).toEqual(200); + expect(resp.payload.converted).toBe(true); + }); + + it('Throws error if some params are missing', async () => { + const resp = await routeDependencies.router.getHandler({ + method: 'post', + pathPattern: '/api/console/convert_request_to_language', + })( + routeHandlerContextMock, + createRequestMock({ + query: { + method: 'GET', + path: '_ingest/geoip/database/geoip2_enterprise', + esHost: 'http://localhost:9200', + }, + }), + kibanaResponseFactory + ); + + expect(resp.status).toEqual(200); + }); + }); +}); diff --git a/src/plugins/console/server/routes/api/console/convert_request_to_language/index.ts b/src/plugins/console/server/routes/api/console/convert_request_to_language/index.ts new file mode 100644 index 0000000000000..5dac3eb15d668 --- /dev/null +++ b/src/plugins/console/server/routes/api/console/convert_request_to_language/index.ts @@ -0,0 +1,79 @@ +/* + * 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 { RequestHandler } from '@kbn/core/server'; +import { schema, TypeOf } from '@kbn/config-schema'; +import { convertRequests } from '@elastic/request-converter'; +import { RouteDependencies } from '../../..'; + +import { acceptedHttpVerb, nonEmptyString } from '../proxy/validation_config'; + +const routeValidationConfig = { + query: schema.object({ + language: schema.string(), + esHost: schema.string(), + }), + body: schema.maybe( + schema.arrayOf( + schema.object({ + method: acceptedHttpVerb, + url: nonEmptyString, + data: schema.arrayOf(schema.string()), + }) + ) + ), +}; + +export type Query = TypeOf; +export type Body = TypeOf; + +export const registerConvertRequestRoute = ({ + router, + lib: { handleEsError }, +}: RouteDependencies) => { + const handler: RequestHandler = async (ctx, req, response) => { + const { body, query } = req; + const { language, esHost } = query; + + try { + // Iterate over each request and build all the requests into a single string + // that can be passed to the request-converter library + let devtoolsScript = ''; + (body || []).forEach((request) => { + devtoolsScript += `${request.method} ${request.url}\n` as string; + if (request.data && request.data.length > 0) { + // We dont care about newlines in the data passed to the request-converter + // since the library will format the data anyway. + // This is specifically important as they rely requests using the ndjson format. + devtoolsScript += request.data.map((data) => data.replaceAll('\n', ' ')).join('\n'); + } + }); + + const codeSnippet = await convertRequests(devtoolsScript, language, { + checkOnly: false, + printResponse: true, + complete: true, + elasticsearchUrl: esHost, + }); + + return response.ok({ + body: codeSnippet as string, + }); + } catch (error) { + return handleEsError({ error, response }); + } + }; + + router.post( + { + path: '/api/console/convert_request_to_language', + validate: routeValidationConfig, + }, + handler + ); +}; diff --git a/src/plugins/console/server/routes/api/console/proxy/validation_config.ts b/src/plugins/console/server/routes/api/console/proxy/validation_config.ts index 9a3ee2efd66c1..129ff1df7f691 100644 --- a/src/plugins/console/server/routes/api/console/proxy/validation_config.ts +++ b/src/plugins/console/server/routes/api/console/proxy/validation_config.ts @@ -11,7 +11,7 @@ import { schema, TypeOf } from '@kbn/config-schema'; export type Query = TypeOf; export type Body = TypeOf; -const acceptedHttpVerb = schema.string({ +export const acceptedHttpVerb = schema.string({ validate: (method) => { return ['HEAD', 'GET', 'POST', 'PUT', 'DELETE', 'PATCH'].some( (verb) => verb.toLowerCase() === method.toLowerCase() @@ -21,7 +21,7 @@ const acceptedHttpVerb = schema.string({ }, }); -const nonEmptyString = schema.string({ +export const nonEmptyString = schema.string({ validate: (s) => (s === '' ? 'Expected non-empty string' : undefined), }); diff --git a/src/plugins/console/server/routes/index.ts b/src/plugins/console/server/routes/index.ts index e1a036f55a62c..033659a62e441 100644 --- a/src/plugins/console/server/routes/index.ts +++ b/src/plugins/console/server/routes/index.ts @@ -18,6 +18,7 @@ import { registerEsConfigRoute } from './api/console/es_config'; import { registerProxyRoute } from './api/console/proxy'; import { registerSpecDefinitionsRoute } from './api/console/spec_definitions'; import { registerAutocompleteEntitiesRoute } from './api/console/autocomplete_entities'; +import { registerConvertRequestRoute } from './api/console/convert_request_to_language'; export interface ProxyDependencies { readLegacyESConfig: () => Promise; @@ -44,4 +45,5 @@ export const registerRoutes = (dependencies: RouteDependencies) => { registerProxyRoute(dependencies); registerSpecDefinitionsRoute(dependencies); registerAutocompleteEntitiesRoute(dependencies); + registerConvertRequestRoute(dependencies); }; diff --git a/src/plugins/controls/public/react_controls/control_group/components/control_group.tsx b/src/plugins/controls/public/react_controls/control_group/components/control_group.tsx index 72c891444081a..c825e9021b48d 100644 --- a/src/plugins/controls/public/react_controls/control_group/components/control_group.tsx +++ b/src/plugins/controls/public/react_controls/control_group/components/control_group.tsx @@ -7,6 +7,7 @@ */ import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import { css } from '@emotion/react'; import { BehaviorSubject } from 'rxjs'; import { DndContext, @@ -24,14 +25,7 @@ import { SortableContext, sortableKeyboardCoordinates, } from '@dnd-kit/sortable'; -import { - EuiButtonIcon, - EuiFlexGroup, - EuiFlexItem, - EuiLoadingChart, - EuiPanel, - EuiToolTip, -} from '@elastic/eui'; +import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem, EuiPanel, EuiToolTip } from '@elastic/eui'; import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; import { ControlStyle } from '../../..'; import { ControlsInOrder } from '../init_controls_manager'; @@ -114,8 +108,15 @@ export function ControlGroup({ ); }, [hasUnappliedSelections, applySelections]); + if (controlsInOrder.length === 0) { + return null; + } + return ( - {!isInitialized && } setDraggingId(`${active.id}`)} @@ -167,7 +167,7 @@ export function ControlGroup({ - {isInitialized && !autoApplySelections && ( + {!autoApplySelections && ( {hasUnappliedSelections ? ( ApplyButtonComponent diff --git a/src/plugins/controls/public/react_controls/control_group/get_control_group_factory.tsx b/src/plugins/controls/public/react_controls/control_group/get_control_group_factory.tsx index 06676a6c9d4be..ee241dcfea0fc 100644 --- a/src/plugins/controls/public/react_controls/control_group/get_control_group_factory.tsx +++ b/src/plugins/controls/public/react_controls/control_group/get_control_group_factory.tsx @@ -23,6 +23,7 @@ import { PublishesDataViews, useBatchedPublishingSubjects, } from '@kbn/presentation-publishing'; +import { apiPublishesReload } from '@kbn/presentation-publishing/interfaces/fetch/publishes_reload'; import { ControlStyle, ParentIgnoreSettings } from '../..'; import { ControlGroupChainingSystem, @@ -72,7 +73,13 @@ export const getControlGroupEmbeddableFactory = (services: { } = initialRuntimeState; const autoApplySelections$ = new BehaviorSubject(autoApplySelections); - const controlsManager = initControlsManager(initialChildControlState); + const parentDataViewId = apiPublishesDataViews(parentApi) + ? parentApi.dataViews.value?.[0]?.id + : undefined; + const controlsManager = initControlsManager( + initialChildControlState, + parentDataViewId ?? (await services.dataViews.getDefaultId()) + ); const selectionsManager = initSelectionsManager({ ...controlsManager.api, autoApplySelections$, @@ -171,6 +178,7 @@ export const getControlGroupEmbeddableFactory = (services: { initialState: { grow: api.grow.getValue(), width: api.width.getValue(), + dataViewId: controlsManager.api.lastUsedDataViewId$.value, }, onSave: ({ type: controlType, state: initialState }) => { api.addNewPanel({ @@ -205,6 +213,7 @@ export const getControlGroupEmbeddableFactory = (services: { saveNotification$: apiHasSaveNotification(parentApi) ? parentApi.saveNotification$ : undefined, + reload$: apiPublishesReload(parentApi) ? parentApi.reload$ : undefined, }); /** Subscribe to all children's output data views, combine them, and output them */ diff --git a/src/plugins/controls/public/react_controls/control_group/init_controls_manager.test.ts b/src/plugins/controls/public/react_controls/control_group/init_controls_manager.test.ts index 451681fe5b3fd..76899c3d9d0b4 100644 --- a/src/plugins/controls/public/react_controls/control_group/init_controls_manager.test.ts +++ b/src/plugins/controls/public/react_controls/control_group/init_controls_manager.test.ts @@ -7,19 +7,24 @@ */ import { DefaultControlApi } from '../controls/types'; -import { initControlsManager } from './init_controls_manager'; +import { initControlsManager, getLastUsedDataViewId } from './init_controls_manager'; jest.mock('uuid', () => ({ v4: jest.fn().mockReturnValue('delta'), })); +const DEFAULT_DATA_VIEW_ID = 'myDataView'; + describe('PresentationContainer api', () => { test('addNewPanel should add control at end of controls', async () => { - const controlsManager = initControlsManager({ - alpha: { type: 'testControl', order: 0 }, - bravo: { type: 'testControl', order: 1 }, - charlie: { type: 'testControl', order: 2 }, - }); + const controlsManager = initControlsManager( + { + alpha: { type: 'testControl', order: 0 }, + bravo: { type: 'testControl', order: 1 }, + charlie: { type: 'testControl', order: 2 }, + }, + DEFAULT_DATA_VIEW_ID + ); const addNewPanelPromise = controlsManager.api.addNewPanel({ panelType: 'testControl', initialState: {}, @@ -35,11 +40,14 @@ describe('PresentationContainer api', () => { }); test('removePanel should remove control', () => { - const controlsManager = initControlsManager({ - alpha: { type: 'testControl', order: 0 }, - bravo: { type: 'testControl', order: 1 }, - charlie: { type: 'testControl', order: 2 }, - }); + const controlsManager = initControlsManager( + { + alpha: { type: 'testControl', order: 0 }, + bravo: { type: 'testControl', order: 1 }, + charlie: { type: 'testControl', order: 2 }, + }, + DEFAULT_DATA_VIEW_ID + ); controlsManager.api.removePanel('bravo'); expect(controlsManager.controlsInOrder$.value.map((element) => element.id)).toEqual([ 'alpha', @@ -48,11 +56,14 @@ describe('PresentationContainer api', () => { }); test('replacePanel should replace control', async () => { - const controlsManager = initControlsManager({ - alpha: { type: 'testControl', order: 0 }, - bravo: { type: 'testControl', order: 1 }, - charlie: { type: 'testControl', order: 2 }, - }); + const controlsManager = initControlsManager( + { + alpha: { type: 'testControl', order: 0 }, + bravo: { type: 'testControl', order: 1 }, + charlie: { type: 'testControl', order: 2 }, + }, + DEFAULT_DATA_VIEW_ID + ); const replacePanelPromise = controlsManager.api.replacePanel('bravo', { panelType: 'testControl', initialState: {}, @@ -68,10 +79,13 @@ describe('PresentationContainer api', () => { describe('untilInitialized', () => { test('should not resolve until all controls are initialized', async () => { - const controlsManager = initControlsManager({ - alpha: { type: 'testControl', order: 0 }, - bravo: { type: 'testControl', order: 1 }, - }); + const controlsManager = initControlsManager( + { + alpha: { type: 'testControl', order: 0 }, + bravo: { type: 'testControl', order: 1 }, + }, + DEFAULT_DATA_VIEW_ID + ); let isDone = false; controlsManager.api.untilInitialized().then(() => { isDone = true; @@ -89,10 +103,13 @@ describe('PresentationContainer api', () => { }); test('should resolve when all control already initialized ', async () => { - const controlsManager = initControlsManager({ - alpha: { type: 'testControl', order: 0 }, - bravo: { type: 'testControl', order: 1 }, - }); + const controlsManager = initControlsManager( + { + alpha: { type: 'testControl', order: 0 }, + bravo: { type: 'testControl', order: 1 }, + }, + DEFAULT_DATA_VIEW_ID + ); controlsManager.setControlApi('alpha', {} as unknown as DefaultControlApi); controlsManager.setControlApi('bravo', {} as unknown as DefaultControlApi); @@ -109,10 +126,13 @@ describe('PresentationContainer api', () => { describe('snapshotControlsRuntimeState', () => { test('should snapshot runtime state for all controls', async () => { - const controlsManager = initControlsManager({ - alpha: { type: 'testControl', order: 1 }, - bravo: { type: 'testControl', order: 0 }, - }); + const controlsManager = initControlsManager( + { + alpha: { type: 'testControl', order: 1 }, + bravo: { type: 'testControl', order: 0 }, + }, + DEFAULT_DATA_VIEW_ID + ); controlsManager.setControlApi('alpha', { snapshotRuntimeState: () => { return { key1: 'alpha value' }; @@ -137,3 +157,33 @@ describe('snapshotControlsRuntimeState', () => { }); }); }); + +describe('getLastUsedDataViewId', () => { + test('should return last used data view id', () => { + const dataViewId = getLastUsedDataViewId( + [ + { id: 'alpha', type: 'testControl' }, + { id: 'bravo', type: 'testControl' }, + { id: 'charlie', type: 'testControl' }, + ], + { + alpha: { dataViewId: '1', type: 'testControl', order: 0 }, + bravo: { dataViewId: '2', type: 'testControl', order: 1 }, + charlie: { type: 'testControl', order: 2 }, + } + ); + expect(dataViewId).toBe('2'); + }); + + test('should return undefined when there are no controls', () => { + const dataViewId = getLastUsedDataViewId([], {}); + expect(dataViewId).toBeUndefined(); + }); + + test('should return undefined when there are no controls with data views', () => { + const dataViewId = getLastUsedDataViewId([{ id: 'alpha', type: 'testControl' }], { + alpha: { type: 'testControl', order: 0 }, + }); + expect(dataViewId).toBeUndefined(); + }); +}); diff --git a/src/plugins/controls/public/react_controls/control_group/init_controls_manager.ts b/src/plugins/controls/public/react_controls/control_group/init_controls_manager.ts index d9eccfa126a8a..0e762bfd53fa3 100644 --- a/src/plugins/controls/public/react_controls/control_group/init_controls_manager.ts +++ b/src/plugins/controls/public/react_controls/control_group/init_controls_manager.ts @@ -18,9 +18,10 @@ import { BehaviorSubject, first, merge } from 'rxjs'; import { PublishingSubject, StateComparators } from '@kbn/presentation-publishing'; import { omit } from 'lodash'; import { apiHasSnapshottableState } from '@kbn/presentation-containers/interfaces/serialized_state'; -import { ControlPanelsState, ControlPanelState } from './types'; +import { ControlGroupApi, ControlPanelsState, ControlPanelState } from './types'; import { DefaultControlApi, DefaultControlState } from '../controls/types'; import { ControlGroupComparatorState } from './control_group_unsaved_changes_api'; +import { DefaultDataControlState } from '../controls/data_controls/types'; export type ControlsInOrder = Array<{ id: string; type: string }>; @@ -35,7 +36,10 @@ export function getControlsInOrder(initialControlPanelsState: ControlPanelsState .map(({ id, type }) => ({ id, type })); // filter out `order` } -export function initControlsManager(initialControlPanelsState: ControlPanelsState) { +export function initControlsManager( + initialControlPanelsState: ControlPanelsState, + defaultDataViewId: string | null +) { const lastSavedControlsPanelState$ = new BehaviorSubject(initialControlPanelsState); const initialControlIds = Object.keys(initialControlPanelsState); const children$ = new BehaviorSubject<{ [key: string]: DefaultControlApi }>({}); @@ -45,6 +49,11 @@ export function initControlsManager(initialControlPanelsState: ControlPanelsStat const controlsInOrder$ = new BehaviorSubject( getControlsInOrder(initialControlPanelsState) ); + const lastUsedDataViewId$ = new BehaviorSubject( + getLastUsedDataViewId(controlsInOrder$.value, initialControlPanelsState) ?? + defaultDataViewId ?? + undefined + ); function untilControlLoaded( id: string @@ -79,6 +88,9 @@ export function initControlsManager(initialControlPanelsState: ControlPanelsStat { panelType, initialState }: PanelPackage, index: number ) { + if ((initialState as DefaultDataControlState)?.dataViewId) { + lastUsedDataViewId$.next((initialState as DefaultDataControlState).dataViewId); + } const id = generateId(); const nextControlsInOrder = [...controlsInOrder$.value]; nextControlsInOrder.splice(index, 0, { @@ -156,6 +168,7 @@ export function initControlsManager(initialControlPanelsState: ControlPanelsStat return controlsRuntimeState; }, api: { + lastUsedDataViewId$: lastUsedDataViewId$ as PublishingSubject, getSerializedStateForChild: (childId: string) => { const controlPanelState = controlsPanelState[childId]; return controlPanelState ? { rawState: controlPanelState } : undefined; @@ -196,7 +209,8 @@ export function initControlsManager(initialControlPanelsState: ControlPanelsStat }); }, } as PresentationContainer & - HasSerializedChildState & { untilInitialized: () => Promise }, + HasSerializedChildState & + Pick, comparators: { controlsInOrder: [ controlsInOrder$, @@ -222,3 +236,21 @@ export function initControlsManager(initialControlPanelsState: ControlPanelsStat >, }; } + +export function getLastUsedDataViewId( + controlsInOrder: ControlsInOrder, + initialControlPanelsState: ControlPanelsState< + ControlPanelState & Partial + > +) { + let dataViewId: string | undefined; + for (let i = controlsInOrder.length - 1; i >= 0; i--) { + const controlId = controlsInOrder[i].id; + const controlState = initialControlPanelsState[controlId]; + if (controlState?.dataViewId) { + dataViewId = controlState.dataViewId; + break; + } + } + return dataViewId; +} diff --git a/src/plugins/controls/public/react_controls/control_group/types.ts b/src/plugins/controls/public/react_controls/control_group/types.ts index d58a487b86a79..f00aaeae578b4 100644 --- a/src/plugins/controls/public/react_controls/control_group/types.ts +++ b/src/plugins/controls/public/react_controls/control_group/types.ts @@ -27,6 +27,7 @@ import { } from '@kbn/presentation-publishing'; import { PublishesDataViews } from '@kbn/presentation-publishing/interfaces/publishes_data_views'; +import { PublishesReload } from '@kbn/presentation-publishing/interfaces/fetch/publishes_reload'; import { ParentIgnoreSettings } from '../..'; import { ControlInputTransform } from '../../../common'; import { ControlGroupChainingSystem } from '../../../common/control_group/types'; @@ -61,7 +62,7 @@ export type ControlGroupApi = PresentationContainer & Pick & PublishesControlGroupDisplaySettings & PublishesTimeslice & - Partial & HasSaveNotification> & { + Partial & HasSaveNotification & PublishesReload> & { asyncResetUnsavedChanges: () => Promise; autoApplySelections$: PublishingSubject; controlFetch$: (controlUuid: string) => Observable; @@ -72,6 +73,7 @@ export type ControlGroupApi = PresentationContainer & openAddDataControlFlyout: (settings?: { controlInputTransform?: ControlInputTransform; }) => void; + lastUsedDataViewId$: PublishingSubject; }; export interface ControlGroupRuntimeState { diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.test.tsx b/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.test.tsx index 9b5798efdc220..58715f6b2305e 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.test.tsx +++ b/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.test.tsx @@ -25,7 +25,6 @@ jest.mock('../../control_factory_registry', () => ({ import { DEFAULT_CONTROL_GROW, DEFAULT_CONTROL_WIDTH } from '../../../../common'; import { ControlGroupApi } from '../../control_group/types'; import { DataControlEditor } from './data_control_editor'; -import { DataControlEditorState } from './open_data_control_editor'; import { getMockedOptionsListControlFactory, getMockedRangeSliderControlFactory, @@ -57,7 +56,6 @@ mockDataViews.get = jest.fn().mockResolvedValue(mockDataView); const dashboardApi = { timeRange$: new BehaviorSubject(undefined), - lastUsedDataViewId$: new BehaviorSubject(mockDataView.id!), }; const controlGroupApi = { parentApi: dashboardApi, @@ -68,8 +66,14 @@ const controlGroupApi = { describe('Data control editor', () => { const mountComponent = async ({ initialState, + controlId, + controlType, + initialDefaultPanelTitle, }: { - initialState?: Partial; + initialState?: Partial; + controlId?: string; + controlType?: string; + initialDefaultPanelTitle?: string; }) => { mockDataViews.get = jest.fn().mockResolvedValue(mockDataView); @@ -78,11 +82,14 @@ describe('Data control editor', () => { {}} onSave={() => {}} - parentApi={controlGroupApi} + controlGroupApi={controlGroupApi} initialState={{ - dataViewId: dashboardApi.lastUsedDataViewId$.getValue(), + dataViewId: mockDataView.id, ...initialState, }} + controlId={controlId} + controlType={controlType} + initialDefaultPanelTitle={initialDefaultPanelTitle} services={{ dataViews: mockDataViews }} /> @@ -238,11 +245,11 @@ describe('Data control editor', () => { test('auto-fills input with the default title', async () => { const controlEditor = await mountComponent({ initialState: { - controlType: 'optionsList', - controlId: 'testId', fieldName: 'machine.os.raw', - defaultPanelTitle: 'OS', }, + controlType: 'optionsList', + controlId: 'testId', + initialDefaultPanelTitle: 'OS', }); const titleInput = await controlEditor.findByTestId('control-editor-title-input'); expect(titleInput.getAttribute('value')).toBe('OS'); @@ -252,11 +259,11 @@ describe('Data control editor', () => { test('auto-fills input with the custom title', async () => { const controlEditor = await mountComponent({ initialState: { - controlType: 'optionsList', - controlId: 'testId', fieldName: 'machine.os.raw', title: 'Custom title', }, + controlType: 'optionsList', + controlId: 'testId', }); const titleInput = await controlEditor.findByTestId('control-editor-title-input'); expect(titleInput.getAttribute('value')).toBe('Custom title'); @@ -267,10 +274,10 @@ describe('Data control editor', () => { test('selects the provided control type', async () => { const controlEditor = await mountComponent({ initialState: { - controlType: 'rangeSlider', - controlId: 'testId', fieldName: 'bytes', }, + controlType: 'rangeSlider', + controlId: 'testId', }); expect(controlEditor.getByTestId('create__optionsList')).toBeEnabled(); diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.tsx b/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.tsx index 701d8c1d85391..a39b0ea03b422 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.tsx +++ b/src/plugins/controls/public/react_controls/controls/data_controls/data_control_editor.tsx @@ -46,14 +46,18 @@ import { getAllControlTypes, getControlFactory } from '../../control_factory_reg import { ControlGroupApi } from '../../control_group/types'; import { DataControlEditorStrings } from './data_control_constants'; import { getDataControlFieldRegistry } from './data_control_editor_utils'; -import { DataControlEditorState } from './open_data_control_editor'; import { DataControlFactory, DefaultDataControlState, isDataControlFactory } from './types'; -export interface ControlEditorProps { - initialState: State; - parentApi: ControlGroupApi; // controls must always have a parent API - onCancel: (newState: State) => void; - onSave: (newState: State, type: string) => void; +export interface ControlEditorProps< + State extends DefaultDataControlState = DefaultDataControlState +> { + initialState: Partial; + controlType?: string; + controlId?: string; + initialDefaultPanelTitle?: string; + controlGroupApi: ControlGroupApi; // controls must always have a parent API + onCancel: (newState: Partial) => void; + onSave: (newState: Partial, type: string) => void; services: { dataViews: DataViewsPublicPluginStart; }; @@ -130,27 +134,27 @@ const CompatibleControlTypesComponent = ({ ); }; -export const DataControlEditor = ({ +export const DataControlEditor = ({ initialState, + controlId, + controlType, + initialDefaultPanelTitle, onSave, onCancel, - parentApi: controlGroup, + controlGroupApi, /** TODO: These should not be props */ services: { dataViews: dataViewService }, }: ControlEditorProps) => { const [defaultGrow, defaultWidth] = useBatchedPublishingSubjects( - controlGroup.grow, - controlGroup.width - // controlGroup.parentApi?.lastUsedDataViewId, // TODO: Make this work + controlGroupApi.grow, + controlGroupApi.width ); - const [editorState, setEditorState] = useState(initialState); + const [editorState, setEditorState] = useState>(initialState); const [defaultPanelTitle, setDefaultPanelTitle] = useState( - initialState.defaultPanelTitle ?? initialState.fieldName ?? '' + initialDefaultPanelTitle ?? initialState.fieldName ?? '' ); const [panelTitle, setPanelTitle] = useState(initialState.title ?? defaultPanelTitle); - const [selectedControlType, setSelectedControlType] = useState( - initialState.controlType - ); + const [selectedControlType, setSelectedControlType] = useState(controlType); const [controlOptionsValid, setControlOptionsValid] = useState(true); /** TODO: Make `editorConfig` work when refactoring the `ControlGroupRenderer` */ @@ -209,22 +213,22 @@ export const DataControlEditor = setEditorState({ ...editorState, ...newState })} setControlEditorValid={setControlOptionsValid} - parentApi={controlGroup} + controlGroupApi={controlGroupApi} /> ); - }, [fieldRegistry, selectedControlType, initialState, editorState, controlGroup]); + }, [fieldRegistry, selectedControlType, initialState, editorState, controlGroupApi]); return ( <>

- {!initialState.controlId // if no ID, then we are creating a new control + {!controlId // if no ID, then we are creating a new control ? DataControlEditorStrings.manageControl.getFlyoutCreateTitle() : DataControlEditorStrings.manageControl.getFlyoutEditTitle()}

@@ -385,7 +389,7 @@ export const DataControlEditor = {CustomSettingsComponent} - {initialState.controlId && ( + {controlId && ( <> { onCancel(initialState); // don't want to show "lost changes" warning - controlGroup.removePanel(initialState.controlId!); + controlGroupApi.removePanel(controlId!); }} > {DataControlEditorStrings.manageControl.getDeleteButtonTitle()} diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.ts b/src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.ts index 12bfba658c9f5..312701dd22c32 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.ts +++ b/src/plugins/controls/public/react_controls/controls/data_controls/initialize_data_control.ts @@ -36,7 +36,7 @@ export const initializeDataControl = ( * responsible for managing */ editorStateManager: ControlStateManager, - controlGroup: ControlGroupApi, + controlGroupApi: ControlGroupApi, services: { core: CoreStart; dataViews: DataViewsPublicPluginStart; @@ -159,22 +159,24 @@ export const initializeDataControl = ( (Object.keys(initialState) as Array).forEach( (key) => { if (!isEqual(mergedStateManager[key].getValue(), newState[key])) { - mergedStateManager[key].next(newState[key]); + mergedStateManager[key].next( + newState[key] as DefaultDataControlState & EditorState[typeof key] + ); } } ); } else { // replace the control with a new one of the updated type - controlGroup.replacePanel(controlId, { panelType: newType, initialState: newState }); + controlGroupApi.replacePanel(controlId, { panelType: newType, initialState: newState }); } }, initialState: { ...initialState, - controlType, - controlId, - defaultPanelTitle: defaultPanelTitle.getValue(), }, - controlGroupApi: controlGroup, + controlType, + controlId, + initialDefaultPanelTitle: defaultPanelTitle.getValue(), + controlGroupApi, }); }; diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/open_data_control_editor.tsx b/src/plugins/controls/public/react_controls/controls/data_controls/open_data_control_editor.tsx index fbddf0e7af831..4aadfbb78deff 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/open_data_control_editor.tsx +++ b/src/plugins/controls/public/react_controls/controls/data_controls/open_data_control_editor.tsx @@ -20,23 +20,22 @@ import { ControlGroupApi } from '../../control_group/types'; import { DataControlEditor } from './data_control_editor'; import { DefaultDataControlState } from './types'; -export type DataControlEditorState = Partial & { - fieldName?: string; - controlType?: string; - controlId?: string; - defaultPanelTitle?: string; -}; - export const openDataControlEditor = < - State extends DataControlEditorState = DataControlEditorState + State extends DefaultDataControlState = DefaultDataControlState >({ initialState, + controlType, + controlId, + initialDefaultPanelTitle, onSave, controlGroupApi, services, }: { - initialState: State; - onSave: ({ type, state }: { type: string; state: State }) => void; + initialState: Partial; + controlType?: string; + controlId?: string; + initialDefaultPanelTitle?: string; + onSave: ({ type, state }: { type: string; state: Partial }) => void; controlGroupApi: ControlGroupApi; services: { core: CoreStart; @@ -50,7 +49,7 @@ export const openDataControlEditor = < overlayRef.close(); }; - const onCancel = (newState: State, overlay: OverlayRef) => { + const onCancel = (newState: Partial, overlay: OverlayRef) => { if (deepEqual(initialState, newState)) { closeOverlay(overlay); return; @@ -83,8 +82,11 @@ export const openDataControlEditor = < const overlay = services.core.overlays.openFlyout( toMountPoint( - parentApi={controlGroupApi} + controlGroupApi={controlGroupApi} initialState={initialState} + controlType={controlType} + controlId={controlId} + initialDefaultPanelTitle={initialDefaultPanelTitle} onCancel={(state) => { onCancel(state, overlay); }} diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx b/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx index f463400b351c8..a8cd948c511c4 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx +++ b/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.test.tsx @@ -34,9 +34,9 @@ describe('Options list sorting button', () => { const mountComponent = ({ initialState, field, - parentApi = getMockedControlGroupApi(), + controlGroupApi = getMockedControlGroupApi(), }: Pick & { - parentApi?: ControlGroupApi; + controlGroupApi?: ControlGroupApi; }) => { const component = render( { field={field} updateState={updateState} setControlEditorValid={jest.fn()} - parentApi={parentApi} + controlGroupApi={controlGroupApi} /> ); return component; @@ -85,7 +85,7 @@ describe('Options list sorting button', () => { const component = mountComponent({ initialState: getMockedState(), field: { type: 'string' } as DataViewField, - parentApi: controlGroupApi, + controlGroupApi, }); expect( component.queryByTestId('optionsListControl__searchOptionsRadioGroup') @@ -152,14 +152,14 @@ describe('Options list sorting button', () => { describe('responds to field type changing', () => { test('reset back to initial state when valid', async () => { const initialState = getMockedState({ searchTechnique: 'exact' }); - const parentApi = getMockedControlGroupApi(); + const controlGroupApi = getMockedControlGroupApi(); const component = render( ); @@ -175,7 +175,7 @@ describe('Options list sorting button', () => { field={{ type: 'ip' } as DataViewField} // initial search technique IS valid updateState={jest.fn()} setControlEditorValid={jest.fn()} - parentApi={parentApi} + controlGroupApi={controlGroupApi} /> ); @@ -187,14 +187,14 @@ describe('Options list sorting button', () => { test('if the current selection is valid, send that to the parent editor state', async () => { const initialState = getMockedState(); - const parentApi = getMockedControlGroupApi(); + const controlGroupApi = getMockedControlGroupApi(); const component = render( ); @@ -218,7 +218,7 @@ describe('Options list sorting button', () => { field={{ type: 'number' } as DataViewField} // current selected search technique IS valid, initial state is not updateState={jest.fn()} setControlEditorValid={jest.fn()} - parentApi={parentApi} + controlGroupApi={controlGroupApi} /> ); @@ -227,14 +227,14 @@ describe('Options list sorting button', () => { test('if neither the initial or current search technique is valid, revert to the default', async () => { const initialState = getMockedState({ searchTechnique: 'wildcard' }); - const parentApi = getMockedControlGroupApi(); + const controlGroupApi = getMockedControlGroupApi(); const component = render( ); @@ -250,7 +250,7 @@ describe('Options list sorting button', () => { field={{ type: 'number' } as DataViewField} // neither initial nor current search technique is valid updateState={jest.fn()} setControlEditorValid={jest.fn()} - parentApi={parentApi} + controlGroupApi={controlGroupApi} /> ); diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.tsx b/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.tsx index e749973c99f74..48ac94c46236c 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.tsx +++ b/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/components/options_list_editor_options.tsx @@ -71,9 +71,11 @@ export const OptionsListEditorOptions = ({ initialState, field, updateState, - parentApi, + controlGroupApi, }: CustomOptionsComponentProps) => { - const allowExpensiveQueries = useStateFromPublishingSubject(parentApi.allowExpensiveQueries$); + const allowExpensiveQueries = useStateFromPublishingSubject( + controlGroupApi.allowExpensiveQueries$ + ); const [singleSelect, setSingleSelect] = useState(initialState.singleSelect ?? false); const [runPastTimeout, setRunPastTimeout] = useState( diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/fetch_and_validate.tsx b/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/fetch_and_validate.tsx index 7b6db45a1ba2a..f3633b13d3d1a 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/fetch_and_validate.tsx +++ b/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/fetch_and_validate.tsx @@ -11,12 +11,15 @@ import { combineLatest, debounceTime, Observable, + of, + startWith, switchMap, tap, withLatestFrom, } from 'rxjs'; import { PublishingSubject } from '@kbn/presentation-publishing'; +import { apiPublishesReload } from '@kbn/presentation-publishing/interfaces/fetch/publishes_reload'; import { OptionsListSuccessResponse } from '../../../../../common/options_list/types'; import { isValidSearch } from '../../../../../common/options_list/is_valid_search'; import { OptionsListSelection } from '../../../../../common/options_list/options_list_selections'; @@ -57,6 +60,12 @@ export function fetchAndValidate$({ stateManager.searchTechnique, // cannot use requestSize directly, because we need to be able to reset the size to the default without refetching api.loadMoreSubject.pipe(debounceTime(100)), // debounce load more so "loading" state briefly shows + apiPublishesReload(api.parentApi) + ? api.parentApi.reload$.pipe( + tap(() => requestCache.clearCache()), + startWith(undefined) + ) + : of(undefined), ]).pipe( tap(() => { // abort any in progress requests diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_fetch_cache.ts b/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_fetch_cache.ts index 7b30504e3ab1c..6a4bc779a61a2 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_fetch_cache.ts +++ b/src/plugins/controls/public/react_controls/controls/data_controls/options_list_control/options_list_fetch_cache.ts @@ -119,4 +119,8 @@ export class OptionsListFetchCache { return result; } } + + public clearCache = () => { + this.cache.reset(); + }; } diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx b/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx index 110de033520de..72a754c4fabf4 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx +++ b/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.test.tsx @@ -243,7 +243,7 @@ describe('RangesliderControlApi', () => { field={{} as DataViewField} updateState={jest.fn()} setControlEditorValid={jest.fn()} - parentApi={controlGroupApi} + controlGroupApi={controlGroupApi} /> ); expect( @@ -260,7 +260,7 @@ describe('RangesliderControlApi', () => { field={{} as DataViewField} updateState={jest.fn()} setControlEditorValid={setControlEditorValid} - parentApi={controlGroupApi} + controlGroupApi={controlGroupApi} /> ); diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.tsx b/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.tsx index cc953e3109a07..a2819460d05c9 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.tsx +++ b/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/get_range_slider_control_factory.tsx @@ -144,6 +144,7 @@ export const getRangesliderControlFactory = ( } loadingMinMax$.next(isLoading); }, + controlGroupApi, }).subscribe( ({ error, diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/min_max.ts b/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/min_max.ts index 54ee8bf68031d..e68a83eaa4f13 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/min_max.ts +++ b/src/plugins/controls/public/react_controls/controls/data_controls/range_slider/min_max.ts @@ -11,24 +11,35 @@ import { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { DataView, DataViewField } from '@kbn/data-views-plugin/public'; import { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query'; import { PublishesDataViews, PublishingSubject } from '@kbn/presentation-publishing'; -import { combineLatest, lastValueFrom, Observable, switchMap, tap } from 'rxjs'; +import { combineLatest, lastValueFrom, Observable, of, startWith, switchMap, tap } from 'rxjs'; +import { apiPublishesReload } from '@kbn/presentation-publishing/interfaces/fetch/publishes_reload'; import { ControlFetchContext } from '../../../control_group/control_fetch'; +import { ControlGroupApi } from '../../../control_group/types'; export function minMax$({ controlFetch$, + controlGroupApi, data, dataViews$, fieldName$, setIsLoading, }: { controlFetch$: Observable; + controlGroupApi: ControlGroupApi; data: DataPublicPluginStart; dataViews$: PublishesDataViews['dataViews']; fieldName$: PublishingSubject; setIsLoading: (isLoading: boolean) => void; }) { let prevRequestAbortController: AbortController | undefined; - return combineLatest([controlFetch$, dataViews$, fieldName$]).pipe( + return combineLatest([ + controlFetch$, + dataViews$, + fieldName$, + apiPublishesReload(controlGroupApi) + ? controlGroupApi.reload$.pipe(startWith(undefined)) + : of(undefined), + ]).pipe( tap(() => { if (prevRequestAbortController) { prevRequestAbortController.abort(); diff --git a/src/plugins/controls/public/react_controls/controls/data_controls/types.ts b/src/plugins/controls/public/react_controls/controls/data_controls/types.ts index 07025d6380071..5bff65081441f 100644 --- a/src/plugins/controls/public/react_controls/controls/data_controls/types.ts +++ b/src/plugins/controls/public/react_controls/controls/data_controls/types.ts @@ -38,11 +38,11 @@ export type DataControlApi = DefaultControlApi & export interface CustomOptionsComponentProps< State extends DefaultDataControlState = DefaultDataControlState > { - initialState: Omit; + initialState: Partial; field: DataViewField; updateState: (newState: Partial) => void; setControlEditorValid: (valid: boolean) => void; - parentApi: ControlGroupApi; + controlGroupApi: ControlGroupApi; } export interface DataControlFactory< diff --git a/src/plugins/custom_integrations/server/custom_integration_registry.ts b/src/plugins/custom_integrations/server/custom_integration_registry.ts index e594a2ed514fd..3bf0b4a75f1a6 100644 --- a/src/plugins/custom_integrations/server/custom_integration_registry.ts +++ b/src/plugins/custom_integrations/server/custom_integration_registry.ts @@ -45,7 +45,7 @@ export class CustomIntegrationRegistry { const allowedCategories: IntegrationCategory[] = (customIntegration.categories ?? []).filter( (category) => { - return INTEGRATION_CATEGORY_DISPLAY.hasOwnProperty(category); + return Object.hasOwn(INTEGRATION_CATEGORY_DISPLAY, category); } ) as IntegrationCategory[]; diff --git a/src/plugins/dashboard/common/lib/dashboard_panel_converters.test.ts b/src/plugins/dashboard/common/lib/dashboard_panel_converters.test.ts index b1865571e42b9..1e5f24f36691f 100644 --- a/src/plugins/dashboard/common/lib/dashboard_panel_converters.test.ts +++ b/src/plugins/dashboard/common/lib/dashboard_panel_converters.test.ts @@ -69,7 +69,7 @@ test('convertSavedDashboardPanelToPanelState does not include undefined id', () }; const converted = convertSavedDashboardPanelToPanelState(savedDashboardPanel); - expect(converted.hasOwnProperty('savedObjectId')).toBe(false); + expect(Object.hasOwn(converted, 'savedObjectId')).toBe(false); }); test('convertPanelStateToSavedDashboardPanel', () => { @@ -123,7 +123,7 @@ test('convertPanelStateToSavedDashboardPanel will not add an undefined id when n }; const converted = convertPanelStateToSavedDashboardPanel(dashboardPanel); - expect(converted.hasOwnProperty('id')).toBe(false); + expect(Object.hasOwn(converted, 'id')).toBe(false); }); test('convertPanelStateToSavedDashboardPanel will not leave title as part of embeddable config', () => { @@ -143,7 +143,7 @@ test('convertPanelStateToSavedDashboardPanel will not leave title as part of emb }; const converted = convertPanelStateToSavedDashboardPanel(dashboardPanel); - expect(converted.embeddableConfig.hasOwnProperty('title')).toBe(false); + expect(Object.hasOwn(converted.embeddableConfig, 'title')).toBe(false); expect(converted.title).toBe('title'); }); diff --git a/src/plugins/data/common/search/search_source/search_source.test.ts b/src/plugins/data/common/search/search_source/search_source.test.ts index ef8341c3d2c5d..703e66ca7d657 100644 --- a/src/plugins/data/common/search/search_source/search_source.test.ts +++ b/src/plugins/data/common/search/search_source/search_source.test.ts @@ -841,7 +841,7 @@ describe('SearchSource', () => { searchSource.setField('fields', ['*']); const request = searchSource.getSearchRequestBody(); - expect(request.hasOwnProperty('docvalue_fields')).toBe(false); + expect(Object.hasOwn(request, 'docvalue_fields')).toBe(false); expect(request.fields).toEqual([ { field: 'foo-bar' }, { field: 'field1' }, diff --git a/src/plugins/data/common/search/search_source/search_source.ts b/src/plugins/data/common/search/search_source/search_source.ts index c0dc5598e9067..3c91160a01636 100644 --- a/src/plugins/data/common/search/search_source/search_source.ts +++ b/src/plugins/data/common/search/search_source/search_source.ts @@ -808,7 +808,7 @@ export class SearchSource { // set defaults const _source = - index && !body.hasOwnProperty('_source') ? dataView?.getSourceFiltering() : body._source; + index && !Object.hasOwn(body, '_source') ? dataView?.getSourceFiltering() : body._source; // get filter if data view specified, otherwise null filter const filter = this.getFieldFilter({ bodySourceExcludes: _source?.excludes, metaFields }); @@ -962,7 +962,7 @@ export class SearchSource { private getBuiltEsQuery({ index, query = [], filters = [], getConfig, sort }: SearchRequest) { // If sorting by _score, build queries in the "must" clause instead of "filter" clause to enable scoring const filtersInMustClause = (sort ?? []).some((srt: EsQuerySortValue[]) => - srt.hasOwnProperty('_score') + Object.hasOwn(srt, '_score') ); const esQueryConfigs = { ...getEsQueryConfig({ get: getConfig }), diff --git a/src/plugins/data/common/search/tabify/response_writer.ts b/src/plugins/data/common/search/tabify/response_writer.ts index bbaab641e82f4..57d3ed7773f4b 100644 --- a/src/plugins/data/common/search/tabify/response_writer.ts +++ b/src/plugins/data/common/search/tabify/response_writer.ts @@ -63,7 +63,7 @@ export class TabbedAggResponseWriter { let isPartialRow = false; for (let i = 0; i < this.columns.length; i++) { const column = this.columns[i]; - if (!rowBuffer.hasOwnProperty(column.id)) { + if (!Object.hasOwn(rowBuffer, column.id)) { isPartialRow = true; break; } diff --git a/src/plugins/data/public/utils/shallow_equal.ts b/src/plugins/data/public/utils/shallow_equal.ts index e0387e07a163c..557c2e961c4dd 100644 --- a/src/plugins/data/public/utils/shallow_equal.ts +++ b/src/plugins/data/public/utils/shallow_equal.ts @@ -24,7 +24,7 @@ export function shallowEqual(objA: unknown, objB: unknown): boolean { for (let i = 0; i < keysA.length; i++) { if ( - !Object.prototype.hasOwnProperty.call(objB, keysA[i]) || + !Object.hasOwn(objB, keysA[i]) || // @ts-ignore !Object.is(objA[keysA[i]], objB[keysA[i]]) ) { diff --git a/src/plugins/data/server/search/session/session_service.ts b/src/plugins/data/server/search/session/session_service.ts index d729795d4f8fe..efd41990493b3 100644 --- a/src/plugins/data/server/search/session/session_service.ts +++ b/src/plugins/data/server/search/session/session_service.ts @@ -400,7 +400,7 @@ export class SearchSessionService implements ISearchSessionService { const session = await this.get(deps, user, sessionId); const requestHash = createRequestHash(searchRequest.params); - if (!session.attributes.idMapping.hasOwnProperty(requestHash)) { + if (!Object.hasOwn(session.attributes.idMapping, requestHash)) { this.logger.error(`SearchSessionService: getId | ${sessionId} | ${requestHash} not found`); this.logger.debug( `SearchSessionService: getId not found search with params: ${JSON.stringify( diff --git a/src/plugins/data_views/server/fetcher/lib/field_capabilities/overrides.ts b/src/plugins/data_views/server/fetcher/lib/field_capabilities/overrides.ts index 87afa69a99e55..18f5c9c716e34 100644 --- a/src/plugins/data_views/server/fetcher/lib/field_capabilities/overrides.ts +++ b/src/plugins/data_views/server/fetcher/lib/field_capabilities/overrides.ts @@ -29,7 +29,7 @@ const OVERRIDES: Record> = { * @return {FieldDescriptor} */ export function mergeOverrides(field: FieldDescriptor): FieldDescriptor { - if (OVERRIDES.hasOwnProperty(field.name)) { + if (Object.hasOwn(OVERRIDES, field.name)) { return merge(field, OVERRIDES[field.name]); } else { return field; diff --git a/src/plugins/discover/public/application/main/state_management/discover_state.test.ts b/src/plugins/discover/public/application/main/state_management/discover_state.test.ts index f928c6585e631..d9acde1645fcf 100644 --- a/src/plugins/discover/public/application/main/state_management/discover_state.test.ts +++ b/src/plugins/discover/public/application/main/state_management/discover_state.test.ts @@ -756,12 +756,15 @@ describe('Test discover state actions', () => { test('transitionFromDataViewToESQL', async () => { const savedSearchWithQuery = copySavedSearch(savedSearchMock); const query = { query: "foo: 'bar'", language: 'kuery' }; + const filters = [{ meta: { index: 'the-data-view-id' }, query: { match_all: {} } }]; savedSearchWithQuery.searchSource.setField('query', query); + savedSearchWithQuery.searchSource.setField('filter', filters); const { state } = await getState('/', { savedSearch: savedSearchWithQuery }); await state.actions.transitionFromDataViewToESQL(dataViewMock); expect(state.appState.getState().query).toStrictEqual({ esql: 'FROM the-data-view-title | LIMIT 10', }); + expect(state.appState.getState().filters).toStrictEqual([]); }); test('transitionFromESQLToDataView', async () => { diff --git a/src/plugins/discover/public/application/main/state_management/discover_state.ts b/src/plugins/discover/public/application/main/state_management/discover_state.ts index 2a50801a88aa4..e146c4d3d263f 100644 --- a/src/plugins/discover/public/application/main/state_management/discover_state.ts +++ b/src/plugins/discover/public/application/main/state_management/discover_state.ts @@ -383,6 +383,7 @@ export function getDiscoverStateContainer({ const queryString = getInitialESQLQuery(dataView); appStateContainer.update({ query: { esql: queryString }, + filters: [], dataSource: { type: DataSourceType.Esql, }, 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 f538c7b1164b1..5b198f7ad45fc 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 @@ -65,6 +65,7 @@ export const ReactEmbeddableRenderer = < | 'showBorder' | 'showBadges' | 'showNotifications' + | 'hideLoader' | 'hideHeader' | 'hideInspector' >; diff --git a/src/plugins/expressions/common/ast/build_function.ts b/src/plugins/expressions/common/ast/build_function.ts index 1ccd8d8795a86..eb93714fd35c3 100644 --- a/src/plugins/expressions/common/ast/build_function.ts +++ b/src/plugins/expressions/common/ast/build_function.ts @@ -190,7 +190,7 @@ export function buildExpressionFunction< addArgument(key, value) { if (value !== undefined) { - if (!args.hasOwnProperty(key)) { + if (!Object.hasOwn(args, key)) { args[key] = []; } args[key].push(value); @@ -199,14 +199,14 @@ export function buildExpressionFunction< }, getArgument(key) { - if (!args.hasOwnProperty(key)) { + if (!Object.hasOwn(args, key)) { return; } return args[key]; }, replaceArgument(key, values) { - if (!args.hasOwnProperty(key)) { + if (!Object.hasOwn(args, key)) { throw new Error('Argument to replace does not exist on this function'); } args[key] = values; diff --git a/src/plugins/field_formats/common/converters/url.ts b/src/plugins/field_formats/common/converters/url.ts index 5f7567bfc66a1..cdb760e820eed 100644 --- a/src/plugins/field_formats/common/converters/url.ts +++ b/src/plugins/field_formats/common/converters/url.ts @@ -108,7 +108,7 @@ export class UrlFormat extends FieldFormat { let i = -1; while (++i < parts.length) { if (i % 2) { - if (locals.hasOwnProperty(parts[i])) { + if (Object.hasOwn(locals, parts[i])) { const local = locals[parts[i]]; output += local == null ? '' : local; } diff --git a/src/plugins/management/public/management_sections_service.ts b/src/plugins/management/public/management_sections_service.ts index 7344057e2e993..b12c08dfb5936 100644 --- a/src/plugins/management/public/management_sections_service.ts +++ b/src/plugins/management/public/management_sections_service.ts @@ -71,12 +71,12 @@ export class ManagementSectionsService { start({ capabilities }: SectionsServiceStartDeps) { this.getAllSections().forEach((section) => { - if (capabilities.management.hasOwnProperty(section.id)) { + if (Object.hasOwn(capabilities.management, section.id)) { const sectionCapabilities = capabilities.management[section.id]; section.apps.forEach((app) => { const capabilitiesId = app.capabilitiesId || app.id; if ( - sectionCapabilities.hasOwnProperty(capabilitiesId) && + Object.hasOwn(sectionCapabilities, capabilitiesId) && sectionCapabilities[capabilitiesId] !== true ) { app.disable(); diff --git a/src/plugins/navigation/public/plugin.test.ts b/src/plugins/navigation/public/plugin.test.ts index 1d9abb6f85dbc..e1f9cd9ea3991 100644 --- a/src/plugins/navigation/public/plugin.test.ts +++ b/src/plugins/navigation/public/plugin.test.ts @@ -69,6 +69,31 @@ describe('Navigation Plugin', () => { expect(coreStart.chrome.project.changeActiveSolutionNavigation).toHaveBeenCalledWith('es'); }); + it('should not load the active space on non authenticated pages', async () => { + const { plugin, coreStart, unifiedSearch, cloud, spaces } = setup(); + + coreStart.http.anonymousPaths.isAnonymous.mockReturnValue(true); + + const activeSpace$ = of({ solution: 'es' } as Pick); + activeSpace$.pipe = jest.fn().mockReturnValue(activeSpace$); + activeSpace$.subscribe = jest.fn().mockReturnValue(activeSpace$); + spaces.getActiveSpace$ = jest.fn().mockReturnValue(activeSpace$); + + plugin.start(coreStart, { unifiedSearch, cloud, spaces }); + await new Promise((resolve) => setTimeout(resolve)); + + expect(activeSpace$.pipe).not.toHaveBeenCalled(); + expect(activeSpace$.subscribe).not.toHaveBeenCalled(); + + // Test that the activeSpace$ observable is accessed when not an anonymous path + coreStart.http.anonymousPaths.isAnonymous.mockReturnValue(false); + plugin.start(coreStart, { unifiedSearch, cloud, spaces }); + await new Promise((resolve) => setTimeout(resolve)); + + expect(activeSpace$.pipe).toHaveBeenCalled(); + expect(activeSpace$.subscribe).toHaveBeenCalled(); + }); + describe('addSolutionNavigation()', () => { it('should update the solution navigation definitions', async () => { const { plugin, coreStart, unifiedSearch, cloud } = setup(); diff --git a/src/plugins/navigation/public/plugin.tsx b/src/plugins/navigation/public/plugin.tsx index 66ef8cb808720..73dc93609bcf7 100644 --- a/src/plugins/navigation/public/plugin.tsx +++ b/src/plugins/navigation/public/plugin.tsx @@ -6,8 +6,14 @@ * Side Public License, v 1. */ import React from 'react'; -import { of, ReplaySubject, take, map, Observable } from 'rxjs'; -import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { of, ReplaySubject, take, map, Observable, switchMap } from 'rxjs'; +import { + PluginInitializerContext, + CoreSetup, + CoreStart, + Plugin, + HttpStart, +} from '@kbn/core/public'; import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; import type { Space } from '@kbn/spaces-plugin/public'; import type { SolutionNavigationDefinition } from '@kbn/core-chrome-browser'; @@ -89,8 +95,7 @@ export class NavigationPublicPlugin return createTopNav(customUnifiedSearch ?? unifiedSearch, customExtensions ?? extensions); }; - // Initialize the solution navigation if it is enabled - activeSpace$.pipe(take(1)).subscribe((activeSpace) => { + const initSolutionNavigation = (activeSpace?: Space) => { this.initiateChromeStyleAndSideNav(chrome, { isServerless, activeSpace, @@ -99,7 +104,14 @@ export class NavigationPublicPlugin if (!this.isSolutionNavEnabled) return; chrome.project.setCloudUrls(cloud!); - }); + }; + + if (this.getIsUnauthenticated(core.http)) { + // Don't fetch the active space if the user is not authenticated + initSolutionNavigation(); + } else { + activeSpace$.pipe(take(1)).subscribe(initSolutionNavigation); + } return { ui: { @@ -111,9 +123,14 @@ export class NavigationPublicPlugin if (!this.isSolutionNavEnabled) return; this.addSolutionNavigation(solutionNavigation); }, - isSolutionNavEnabled$: activeSpace$.pipe( - map((activeSpace) => { - return this.isSolutionNavEnabled && getIsProjectNav(activeSpace?.solution); + isSolutionNavEnabled$: of(this.getIsUnauthenticated(core.http)).pipe( + switchMap((isUnauthenticated) => { + if (isUnauthenticated) return of(false); + return activeSpace$.pipe( + map((activeSpace) => { + return this.isSolutionNavEnabled && getIsProjectNav(activeSpace?.solution); + }) + ); }) ), }; @@ -172,6 +189,11 @@ export class NavigationPublicPlugin chrome.project.changeActiveSolutionNavigation(solutionView!); } } + + private getIsUnauthenticated(http: HttpStart) { + const { anonymousPaths } = http; + return anonymousPaths.isAnonymous(window.location.pathname); + } } function getIsProjectNav(solutionView?: string) { diff --git a/src/plugins/navigation/server/ui_settings.test.ts b/src/plugins/navigation/server/ui_settings.test.ts index 1d8431b359109..6d8b12d41cbf9 100644 --- a/src/plugins/navigation/server/ui_settings.test.ts +++ b/src/plugins/navigation/server/ui_settings.test.ts @@ -41,6 +41,21 @@ describe('ui settings', () => { await expect(defaultRoute.getValue!()).resolves.toBe(DEFAULT_ROUTES.classic); }); + it('should return classic when accessing a non authenticated route', async () => { + const spaces = spacesMock.createStart(); + const mockSpace: Pick = { solution: 'es' }; + spaces.spacesService.getActiveSpace.mockResolvedValue(mockSpace as Space); + core.getStartServices.mockResolvedValue([{} as any, { spaces }, {} as any]); + + const { defaultRoute } = getUiSettings(core, logger); + const requestMock = { + auth: { isAuthenticated: false }, + }; + await expect(defaultRoute.getValue!({ request: requestMock as any })).resolves.toBe( + DEFAULT_ROUTES.classic + ); + }); + it('should return the route based on the active space', async () => { const spaces = spacesMock.createStart(); @@ -50,7 +65,10 @@ describe('ui settings', () => { core.getStartServices.mockResolvedValue([{} as any, { spaces }, {} as any]); const { defaultRoute } = getUiSettings(core, logger); - await expect(defaultRoute.getValue!({ request: {} as any })).resolves.toBe( + const requestMock = { + auth: { isAuthenticated: true }, + }; + await expect(defaultRoute.getValue!({ request: requestMock as any })).resolves.toBe( DEFAULT_ROUTES[solution] ); } diff --git a/src/plugins/navigation/server/ui_settings.ts b/src/plugins/navigation/server/ui_settings.ts index bcf128f2d348a..be216e5d5175f 100644 --- a/src/plugins/navigation/server/ui_settings.ts +++ b/src/plugins/navigation/server/ui_settings.ts @@ -34,6 +34,8 @@ export const getUiSettings = ( } try { + if (!request.auth.isAuthenticated) return DEFAULT_ROUTES.classic; + const activeSpace = await spaces.spacesService.getActiveSpace(request); const solution = activeSpace?.solution ?? 'classic'; diff --git a/src/plugins/presentation_panel/public/panel_component/presentation_panel.tsx b/src/plugins/presentation_panel/public/panel_component/presentation_panel.tsx index 772714eb44e33..811492b8f9e7d 100644 --- a/src/plugins/presentation_panel/public/panel_component/presentation_panel.tsx +++ b/src/plugins/presentation_panel/public/panel_component/presentation_panel.tsx @@ -50,7 +50,7 @@ export const PresentationPanel = < }, []); if (loading) - return ( + return props.hideLoader ? null : ( { const table = component.find('EuiBasicTable'); const columns = table.prop('columns') as any[]; - const actionColumn = columns.find((x) => x.hasOwnProperty('actions')) as { actions: any[] }; + const actionColumn = columns.find((x) => Object.hasOwn(x, 'actions')) as { actions: any[] }; const someAction = actionColumn.actions.find( (x) => x['data-test-subj'] === 'savedObjectsTableAction-someAction' ); diff --git a/src/plugins/unified_search/public/filter_bar/filter_editor/phrase_suggestor.tsx b/src/plugins/unified_search/public/filter_bar/filter_editor/phrase_suggestor.tsx index 3f542be18d9f8..134c0bb72c89b 100644 --- a/src/plugins/unified_search/public/filter_bar/filter_editor/phrase_suggestor.tsx +++ b/src/plugins/unified_search/public/filter_bar/filter_editor/phrase_suggestor.tsx @@ -62,11 +62,12 @@ export class PhraseSuggestorUI extends React.Com const isVersionFieldType = field?.esTypes?.includes('version'); return ( + // suggestions don't work for version fields shouldSuggestValues && field && field.aggregatable && field.type === 'string' && - !isVersionFieldType // suggestions don't work for version fields + !isVersionFieldType ); } diff --git a/src/plugins/unified_search/public/query_string_input/query_string_input.tsx b/src/plugins/unified_search/public/query_string_input/query_string_input.tsx index 04c1dab19c8a8..2720a13b1ff06 100644 --- a/src/plugins/unified_search/public/query_string_input/query_string_input.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_string_input.tsx @@ -228,7 +228,11 @@ export default class QueryStringInputUI extends PureComponent(this.props.indexPatterns || [], (indexPattern): indexPattern is DataView => { - return indexPattern.hasOwnProperty('fields') && indexPattern.hasOwnProperty('title'); + return ( + typeof indexPattern === 'object' && + Object.hasOwn(indexPattern, 'fields') && + Object.hasOwn(indexPattern, 'title') + ); }); const idOrTitlePatterns = stringPatterns.map((sp) => typeof sp === 'string' ? { type: 'title', value: sp } : sp diff --git a/src/plugins/unified_search/public/utils/shallow_equal.ts b/src/plugins/unified_search/public/utils/shallow_equal.ts index e0387e07a163c..557c2e961c4dd 100644 --- a/src/plugins/unified_search/public/utils/shallow_equal.ts +++ b/src/plugins/unified_search/public/utils/shallow_equal.ts @@ -24,7 +24,7 @@ export function shallowEqual(objA: unknown, objB: unknown): boolean { for (let i = 0; i < keysA.length; i++) { if ( - !Object.prototype.hasOwnProperty.call(objB, keysA[i]) || + !Object.hasOwn(objB, keysA[i]) || // @ts-ignore !Object.is(objA[keysA[i]], objB[keysA[i]]) ) { diff --git a/src/plugins/vis_default_editor/public/components/agg_params.tsx b/src/plugins/vis_default_editor/public/components/agg_params.tsx index 8e5d04a277814..aa1fe36d797e4 100644 --- a/src/plugins/vis_default_editor/public/components/agg_params.tsx +++ b/src/plugins/vis_default_editor/public/components/agg_params.tsx @@ -141,8 +141,8 @@ function DefaultEditorAggParams({ Object.entries(editorConfig).forEach(([param, paramConfig]) => { const paramOptions = agg.type.params.find((paramOption) => paramOption.name === param); - const hasFixedValue = paramConfig.hasOwnProperty(FIXED_VALUE_PROP); - const hasDefault = paramConfig.hasOwnProperty(DEFAULT_PROP); + const hasFixedValue = Object.hasOwn(paramConfig, FIXED_VALUE_PROP); + const hasDefault = Object.hasOwn(paramConfig, DEFAULT_PROP); // If the parameter has a fixed value in the config, set this value. // Also for all supported configs we should freeze the editor for this param. if (hasFixedValue || hasDefault) { diff --git a/src/plugins/vis_types/table/public/utils/table_vis_response_handler.ts b/src/plugins/vis_types/table/public/utils/table_vis_response_handler.ts index be03295284c23..baee20a61930f 100644 --- a/src/plugins/vis_types/table/public/utils/table_vis_response_handler.ts +++ b/src/plugins/vis_types/table/public/utils/table_vis_response_handler.ts @@ -33,7 +33,7 @@ export function tableVisResponseHandler(input: Datatable, visConfig: TableVisCon input.rows.forEach((row) => { const splitValue: string | number = row[splitColumn.id]; - if (!splitMap.hasOwnProperty(splitValue)) { + if (!Object.hasOwn(splitMap, splitValue)) { splitMap[splitValue] = splitIndex++; const tableGroup: TableGroup = { title: `${splitColumnFormatter.convert(splitValue)}: ${splitColumn.name}`, diff --git a/src/plugins/vis_types/timelion/server/series_functions/props.js b/src/plugins/vis_types/timelion/server/series_functions/props.js index 938c7e470bb55..efbba6cfe30dc 100644 --- a/src/plugins/vis_types/timelion/server/series_functions/props.js +++ b/src/plugins/vis_types/timelion/server/series_functions/props.js @@ -21,7 +21,7 @@ function unflatten(data) { let prop = ''; let m; while ((m = regex.exec(p))) { - cur = (cur.hasOwnProperty(prop) && cur[prop]) || (cur[prop] = m[2] ? [] : {}); + cur = (Object.hasOwn(cur, prop) && cur[prop]) || (cur[prop] = m[2] ? [] : {}); prop = m[2] || m[1]; } cur[prop] = data[p]; diff --git a/src/plugins/vis_types/vega/public/vega_inspector/components/inspector_data_grid.tsx b/src/plugins/vis_types/vega/public/vega_inspector/components/inspector_data_grid.tsx index 97890b3373cf8..688247c5eb6d5 100644 --- a/src/plugins/vis_types/vega/public/vega_inspector/components/inspector_data_grid.tsx +++ b/src/plugins/vis_types/vega/public/vega_inspector/components/inspector_data_grid.tsx @@ -75,7 +75,7 @@ export const InspectorDataGrid = ({ columns, data, dataGridAriaLabel }: Inspecto // then the row index must be adjusted as `data` has already been pruned to the page size adjustedRowIndex = rowIndex - pagination.pageIndex * pagination.pageSize; - return gridData.hasOwnProperty(adjustedRowIndex) + return Object.hasOwn(gridData, adjustedRowIndex) ? gridData[adjustedRowIndex][columnId] || null : null; }) as EuiDataGridProps['renderCellValue']; diff --git a/src/plugins/vis_types/vislib/public/vis_wrapper.tsx b/src/plugins/vis_types/vislib/public/vis_wrapper.tsx index 50e1b266963db..262f6cc70038a 100644 --- a/src/plugins/vis_types/vislib/public/vis_wrapper.tsx +++ b/src/plugins/vis_types/vislib/public/vis_wrapper.tsx @@ -48,37 +48,32 @@ const VislibWrapper = ({ core, charts, visData, visConfig, handlers }: VislibWra const visController = useRef(null); const skipRenderComplete = useRef(true); - const renderComplete = useMemo( - () => () => { - const usageCollection = getUsageCollectionStart(); - const containerType = extractContainerType(handlers.getExecutionContext()); - - if (usageCollection && containerType) { - usageCollection.reportUiCounter( - containerType, - METRIC_TYPE.COUNT, - `render_agg_based_${visConfig!.type}` - ); - } - handlers.done(); - }, - [handlers, visConfig] - ); + const renderComplete = useCallback(() => { + if (skipRenderComplete.current) { + return; + } + const usageCollection = getUsageCollectionStart(); + const containerType = extractContainerType(handlers.getExecutionContext()); + + if (usageCollection && containerType) { + usageCollection.reportUiCounter( + containerType, + METRIC_TYPE.COUNT, + `render_agg_based_${visConfig!.type}` + ); + } + handlers.done(); + skipRenderComplete.current = true; + }, [handlers, visConfig]); const renderChart = useMemo( () => debounce(() => { if (visController.current) { - visController.current.render( - visData, - visConfig, - handlers, - skipRenderComplete.current ? undefined : renderComplete - ); + visController.current.render(visData, visConfig, handlers, renderComplete); } - skipRenderComplete.current = true; }, 100), - [handlers, renderComplete, skipRenderComplete, visConfig, visData] + [handlers, renderComplete, visConfig, visData] ); const onResize: EuiResizeObserverProps['onResize'] = useCallback(() => { diff --git a/src/plugins/vis_types/vislib/public/vislib/lib/data.js b/src/plugins/vis_types/vislib/public/vislib/lib/data.js index 6b6bcb6101595..5ca9e7257ef62 100644 --- a/src/plugins/vis_types/vislib/public/vislib/lib/data.js +++ b/src/plugins/vis_types/vislib/public/vislib/lib/data.js @@ -23,7 +23,7 @@ import { getFormatService } from '../../services'; class D3MappableObject { constructor(data) { for (const key in data) { - if (data.hasOwnProperty(key)) { + if (Object.hasOwn(data, key)) { this[key] = data[key]; } } diff --git a/src/plugins/vis_types/vislib/public/vislib/response_handler.js b/src/plugins/vis_types/vislib/public/vislib/response_handler.js index cba5cdc5c5b70..3b7da6b3ea548 100644 --- a/src/plugins/vis_types/vislib/public/vislib/response_handler.js +++ b/src/plugins/vis_types/vislib/public/vislib/response_handler.js @@ -25,7 +25,7 @@ function tableResponseHandler(table, dimensions) { const splitValue = row[splitColumn.id]; const formattedValue = splitColumnFormatter.convert(splitValue); - if (!splitMap.hasOwnProperty(splitValue)) { + if (!Object.hasOwn(splitMap, splitValue)) { splitMap[splitValue] = splitIndex++; const tableGroup = { $parent: converted, diff --git a/test/functional/apps/console/monaco/_context_menu.ts b/test/functional/apps/console/monaco/_context_menu.ts index f74e9d2814242..0fbcb123937db 100644 --- a/test/functional/apps/console/monaco/_context_menu.ts +++ b/test/functional/apps/console/monaco/_context_menu.ts @@ -13,6 +13,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const log = getService('log'); const retry = getService('retry'); const PageObjects = getPageObjects(['common', 'console']); + const testSubjects = getService('testSubjects'); const browser = getService('browser'); const toasts = getService('toasts'); @@ -31,36 +32,89 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(PageObjects.console.isContextMenuOpen()).to.be.eql(true); }); - it('should have options to copy as curl, open documentation, and auto indent', async () => { + it('should have options to copy as, open documentation, and auto indent', async () => { await PageObjects.console.clickContextMenu(); expect(PageObjects.console.isContextMenuOpen()).to.be.eql(true); - expect(PageObjects.console.isCopyAsCurlButtonVisible()).to.be.eql(true); + expect(PageObjects.console.isCopyAsButtonVisible()).to.be.eql(true); expect(PageObjects.console.isOpenDocumentationButtonVisible()).to.be.eql(true); expect(PageObjects.console.isAutoIndentButtonVisible()).to.be.eql(true); }); - it('should copy as curl and show toast when copy as curl button is clicked', async () => { - await PageObjects.console.clickContextMenu(); - await PageObjects.console.clickCopyAsCurlButton(); + describe('Copy as', () => { + beforeEach(async () => { + await PageObjects.common.navigateToApp('console'); + await PageObjects.console.closeHelpIfExists(); + await PageObjects.console.monaco.clearEditorText(); + await PageObjects.console.monaco.enterText('GET _search'); + }); + + it('by default it should copy as curl and show toast when copy as button is clicked', async () => { + await PageObjects.console.clickContextMenu(); + await PageObjects.console.clickCopyAsButton(); + + const resultToast = await toasts.getElementByIndex(1); + const toastText = await resultToast.getVisibleText(); + + if (toastText.includes('Write permission denied')) { + log.debug('Write permission denied, skipping test'); + return; + } + + expect(toastText).to.be('Request copied to clipboard as curl'); + + const canReadClipboard = await browser.checkBrowserPermission('clipboard-read'); + if (canReadClipboard) { + const clipboardText = await browser.getClipboardValue(); + expect(clipboardText).to.contain('curl -X GET'); + } + }); + + it.skip('allows to change default language', async () => { + await PageObjects.console.clickContextMenu(); + + // By default should be copy as cURL + let copyAsButton = await testSubjects.find('consoleMenuCopyAsButton'); + let buttonLabel = await copyAsButton.getVisibleText(); + expect(buttonLabel).to.contain('curl'); + + // Select python as default language + await PageObjects.console.changeDefaultLanguage('python'); + // Wait until async operation is done + await PageObjects.common.sleep(2000); + // Open the context menu once again + await PageObjects.console.clickContextMenu(); + + // By default should be copy as cURL + copyAsButton = await testSubjects.find('consoleMenuCopyAsButton'); + buttonLabel = await copyAsButton.getVisibleText(); + expect(buttonLabel).to.contain('Python'); + }); + + it('allows to select a different language to copy as and should copy it right away to clipboard', async () => { + await PageObjects.console.clickContextMenu(); + await PageObjects.console.changeLanguageAndCopy('javascript'); - const resultToast = await toasts.getElementByIndex(1); - const toastText = await resultToast.getVisibleText(); + const resultToast = await toasts.getElementByIndex(1); + const toastText = await resultToast.getVisibleText(); - if (toastText.includes('Write permission denied')) { - log.debug('Write permission denied, skipping test'); - return; - } + if (toastText.includes('Write permission denied')) { + log.debug('Write permission denied, skipping test'); + return; + } - expect(toastText).to.be('Request copied as cURL'); + expect(toastText).to.be('Request copied to clipboard as JavaScript'); - const canReadClipboard = await browser.checkBrowserPermission('clipboard-read'); - if (canReadClipboard) { - const clipboardText = await browser.getClipboardValue(); - expect(clipboardText).to.contain('curl -XGET'); - } + const canReadClipboard = await browser.checkBrowserPermission('clipboard-read'); + if (canReadClipboard) { + const clipboardText = await browser.getClipboardValue(); + expect(clipboardText).to.contain('require("@elastic/elasticsearch")'); + } + }); }); it('should open documentation when open documentation button is clicked', async () => { + await PageObjects.console.monaco.clearEditorText(); + await PageObjects.console.monaco.enterText('GET _search'); await PageObjects.console.clickContextMenu(); await PageObjects.console.clickOpenDocumentationButton(); diff --git a/test/functional/apps/dashboard/group1/edit_embeddable_redirects.ts b/test/functional/apps/dashboard/group1/edit_embeddable_redirects.ts index f11ca330bf178..e81c38a94736c 100644 --- a/test/functional/apps/dashboard/group1/edit_embeddable_redirects.ts +++ b/test/functional/apps/dashboard/group1/edit_embeddable_redirects.ts @@ -36,7 +36,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('redirects via save and return button after edit', async () => { - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); await PageObjects.visualize.saveVisualizationAndReturn(); }); @@ -45,7 +44,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const newTitle = 'wowee, looks like I have a new title'; await PageObjects.header.waitUntilLoadingHasFinished(); const originalPanelCount = await PageObjects.dashboard.getPanelCount(); - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); await PageObjects.visualize.saveVisualizationExpectSuccess(newTitle, { saveAsNew: false, @@ -62,7 +60,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const newTitle = 'wowee, my title just got cooler'; await PageObjects.header.waitUntilLoadingHasFinished(); const originalPanelCount = await PageObjects.dashboard.getPanelCount(); - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); await PageObjects.visualize.saveVisualizationExpectSuccess(newTitle, { saveAsNew: true, @@ -78,8 +75,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('loses originatingApp connection after save as when redirectToOrigin is false', async () => { const newTitle = 'wowee, my title just got cooler again'; await PageObjects.header.waitUntilLoadingHasFinished(); - await dashboardPanelActions.openContextMenu(); - await dashboardPanelActions.clickEdit(); + await dashboardPanelActions.editPanelByTitle('wowee, my title just got cooler'); await PageObjects.visualize.linkedToOriginatingApp(); await PageObjects.visualize.saveVisualizationExpectSuccess(newTitle, { saveAsNew: true, diff --git a/test/functional/apps/dashboard/group1/edit_visualizations.js b/test/functional/apps/dashboard/group1/edit_visualizations.js index 20234ca1f8055..51492733ce06b 100644 --- a/test/functional/apps/dashboard/group1/edit_visualizations.js +++ b/test/functional/apps/dashboard/group1/edit_visualizations.js @@ -34,7 +34,6 @@ export default function ({ getService, getPageObjects }) { }; const editMarkdownVis = async () => { - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.visEditor.setMarkdownTxt(modifiedMarkdownText); @@ -86,7 +85,6 @@ export default function ({ getService, getPageObjects }) { }); it('cancel button returns to dashboard with no modal if there are no changes to apply', async () => { - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); await PageObjects.header.waitUntilLoadingHasFinished(); diff --git a/test/functional/apps/dashboard/group2/dashboard_filtering.ts b/test/functional/apps/dashboard/group2/dashboard_filtering.ts index 92f89280e7f90..5b51e6c7e4f55 100644 --- a/test/functional/apps/dashboard/group2/dashboard_filtering.ts +++ b/test/functional/apps/dashboard/group2/dashboard_filtering.ts @@ -268,7 +268,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.waitForRenderComplete(); await pieChart.expectPieSliceCount(5); - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); await queryBar.setQuery('weightLbs:>50'); await queryBar.submitQuery(); @@ -290,7 +289,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('Nested visualization filter pills filters data as expected', async () => { - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); await PageObjects.header.waitUntilLoadingHasFinished(); await renderable.waitForRender(); @@ -305,7 +303,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('Removing filter pills and query unfiters data as expected', async () => { - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); await PageObjects.header.waitUntilLoadingHasFinished(); await renderable.waitForRender(); diff --git a/test/functional/apps/dashboard/group2/full_screen_mode.ts b/test/functional/apps/dashboard/group2/full_screen_mode.ts index 23be5e4b7afe6..24ead0ce27fad 100644 --- a/test/functional/apps/dashboard/group2/full_screen_mode.ts +++ b/test/functional/apps/dashboard/group2/full_screen_mode.ts @@ -69,7 +69,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('displays exit full screen logo button when panel is expanded', async () => { - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickExpandPanelToggle(); const exists = await PageObjects.dashboard.exitFullScreenTextButtonExists(); diff --git a/test/functional/apps/dashboard/group2/panel_expand_toggle.ts b/test/functional/apps/dashboard/group2/panel_expand_toggle.ts index 99d09a5f42e7e..3a18389824758 100644 --- a/test/functional/apps/dashboard/group2/panel_expand_toggle.ts +++ b/test/functional/apps/dashboard/group2/panel_expand_toggle.ts @@ -35,7 +35,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('hides other panels', async () => { - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickExpandPanelToggle(); await retry.try(async () => { const panelCount = await PageObjects.dashboard.getPanelCount(); @@ -46,9 +45,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('shows other panels after being minimized', async () => { const panelCount = await PageObjects.dashboard.getPanelCount(); // Panels are all minimized on a fresh open of a dashboard, so we need to re-expand in order to then minimize. - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickExpandPanelToggle(); - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickExpandPanelToggle(); // Add a retry to fix https://github.com/elastic/kibana/issues/14574. Perhaps the recent changes to this diff --git a/test/functional/apps/dashboard/group3/copy_panel_to.ts b/test/functional/apps/dashboard/group3/copy_panel_to.ts index 3c6fa6d790eaf..bcf7ddc12551f 100644 --- a/test/functional/apps/dashboard/group3/copy_panel_to.ts +++ b/test/functional/apps/dashboard/group3/copy_panel_to.ts @@ -100,9 +100,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.existOrFail('saveDashboardSuccess'); await PageObjects.dashboard.clickCancelOutOfEditMode(); - const panelOptions = await dashboardPanelActions.getPanelHeading(markdownTitle); - await dashboardPanelActions.openContextMenu(panelOptions); - await dashboardPanelActions.expectMissingEditPanelAction(); + await dashboardPanelActions.expectMissingEditPanelAction(markdownTitle); }); it('does not show the current dashboard in the dashboard picker', async () => { diff --git a/test/functional/apps/dashboard/group3/panel_context_menu.ts b/test/functional/apps/dashboard/group3/panel_context_menu.ts index d2807bc006d4c..56e9deeab4660 100644 --- a/test/functional/apps/dashboard/group3/panel_context_menu.ts +++ b/test/functional/apps/dashboard/group3/panel_context_menu.ts @@ -76,7 +76,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('visualization object edit menu', () => { it('opens a visualization when edit link is clicked', async () => { - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); await PageObjects.header.waitUntilLoadingHasFinished(); const currentUrl = await browser.getCurrentUrl(); @@ -118,7 +117,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('opens a saved search when edit link is clicked', async () => { - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); await PageObjects.header.waitUntilLoadingHasFinished(); const queryName = await PageObjects.discover.getCurrentQueryName(); @@ -147,7 +145,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); before('expand panel to "full screen"', async () => { - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickExpandPanelToggle(); }); diff --git a/test/functional/apps/dashboard/group5/data_shared_attributes.ts b/test/functional/apps/dashboard/group5/data_shared_attributes.ts index 3202d418bd512..825e5bfc32d0a 100644 --- a/test/functional/apps/dashboard/group5/data_shared_attributes.ts +++ b/test/functional/apps/dashboard/group5/data_shared_attributes.ts @@ -129,8 +129,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('data-shared-item title should update a saved search when using a custom panel title', async () => { await PageObjects.dashboard.switchToEditMode(); const CUSTOM_SEARCH_TITLE = 'ima custom title for a search!'; - const el = await dashboardPanelActions.getPanelHeading('Rendering Test: saved search'); - await dashboardPanelActions.customizePanel(el); + await dashboardPanelActions.customizePanelByTitle('Rendering Test: saved search'); await dashboardCustomizePanel.expectCustomizePanelSettingsFlyoutOpen(); await dashboardCustomizePanel.setCustomPanelTitle(CUSTOM_SEARCH_TITLE); await dashboardCustomizePanel.clickSaveButton(); diff --git a/test/functional/apps/dashboard/group5/saved_search_embeddable.ts b/test/functional/apps/dashboard/group5/saved_search_embeddable.ts index f20172d10ed5c..c2c7c9db70aa6 100644 --- a/test/functional/apps/dashboard/group5/saved_search_embeddable.ts +++ b/test/functional/apps/dashboard/group5/saved_search_embeddable.ts @@ -11,7 +11,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const dashboardAddPanel = getService('dashboardAddPanel'); const dashboardPanelActions = getService('dashboardPanelActions'); - const testSubjects = getService('testSubjects'); const filterBar = getService('filterBar'); const find = getService('find'); const esArchiver = getService('esArchiver'); @@ -77,17 +76,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.dashboard.waitForRenderComplete(); - await dashboardPanelActions.openContextMenu(); - const actionExists = await testSubjects.exists( + await dashboardPanelActions.clickContextMenuItem( 'embeddablePanelAction-ACTION_VIEW_SAVED_SEARCH' ); - if (!actionExists) { - await dashboardPanelActions.clickContextMenuMoreItem(); - } - const actionElement = await testSubjects.find( - 'embeddablePanelAction-ACTION_VIEW_SAVED_SEARCH' - ); - await actionElement.click(); await PageObjects.discover.waitForDiscoverAppOnScreen(); expect(await PageObjects.discover.getSavedSearchTitle()).to.equal( diff --git a/test/functional/apps/dashboard/group6/dashboard_snapshots.ts b/test/functional/apps/dashboard/group6/dashboard_snapshots.ts index 23b8b071e41d1..5c24db05fcafc 100644 --- a/test/functional/apps/dashboard/group6/dashboard_snapshots.ts +++ b/test/functional/apps/dashboard/group6/dashboard_snapshots.ts @@ -63,7 +63,6 @@ export default function ({ await PageObjects.dashboard.saveDashboard('tsvb'); await PageObjects.dashboard.clickFullScreenMode(); - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickExpandPanelToggle(); await PageObjects.dashboard.waitForRenderComplete(); @@ -85,7 +84,6 @@ export default function ({ await PageObjects.dashboard.saveDashboard('area'); await PageObjects.dashboard.clickFullScreenMode(); - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickExpandPanelToggle(); await PageObjects.dashboard.waitForRenderComplete(); diff --git a/test/functional/apps/dashboard_elements/image_embeddable/image_embeddable.ts b/test/functional/apps/dashboard_elements/image_embeddable/image_embeddable.ts index 2636d00fb5cce..f408ea7a9681e 100644 --- a/test/functional/apps/dashboard_elements/image_embeddable/image_embeddable.ts +++ b/test/functional/apps/dashboard_elements/image_embeddable/image_embeddable.ts @@ -16,7 +16,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const kibanaServer = getService('kibanaServer'); const retry = getService('retry'); - const dashboardPanelActions = getService('dashboardPanelActions'); const dashboardDrilldownPanelActions = getService('dashboardDrilldownPanelActions'); const dashboardDrilldownsManage = getService('dashboardDrilldownsManage'); @@ -53,8 +52,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('image embeddable should support drilldowns', async () => { - await dashboardPanelActions.openContextMenu(); - await dashboardPanelActions.clickContextMenuMoreItem(); await dashboardDrilldownPanelActions.expectExistsCreateDrilldownAction(); await dashboardDrilldownPanelActions.clickCreateDrilldown(); await dashboardDrilldownsManage.expectsCreateDrilldownFlyoutOpen(); diff --git a/test/functional/apps/dashboard_elements/links/links_create_edit.ts b/test/functional/apps/dashboard_elements/links/links_create_edit.ts index 54a58fbe0bc67..3842172cfdab4 100644 --- a/test/functional/apps/dashboard_elements/links/links_create_edit.ts +++ b/test/functional/apps/dashboard_elements/links/links_create_edit.ts @@ -139,7 +139,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dashboard.loadSavedDashboard('links 001'); await dashboard.switchToEditMode(); - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); await dashboardLinks.expectPanelEditorFlyoutIsOpen(); @@ -159,7 +158,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dashboard.loadSavedDashboard('links 001'); await dashboard.switchToEditMode(); - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); await dashboardLinks.expectPanelEditorFlyoutIsOpen(); @@ -178,7 +176,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dashboard.loadSavedDashboard('links 001'); await dashboard.switchToEditMode(); - await dashboardPanelActions.openContextMenu(); await dashboardPanelActions.clickEdit(); await dashboardLinks.expectPanelEditorFlyoutIsOpen(); diff --git a/test/functional/apps/discover/context_awareness/extensions/_get_default_app_state.ts b/test/functional/apps/discover/context_awareness/extensions/_get_default_app_state.ts index 4991aa5f36ee1..7e057da66b764 100644 --- a/test/functional/apps/discover/context_awareness/extensions/_get_default_app_state.ts +++ b/test/functional/apps/discover/context_awareness/extensions/_get_default_app_state.ts @@ -11,19 +11,29 @@ import kbnRison from '@kbn/rison'; import type { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const PageObjects = getPageObjects(['common', 'discover', 'unifiedFieldList']); + const PageObjects = getPageObjects(['common', 'discover', 'unifiedFieldList', 'header']); const dataViews = getService('dataViews'); const dataGrid = getService('dataGrid'); const queryBar = getService('queryBar'); const monacoEditor = getService('monacoEditor'); const testSubjects = getService('testSubjects'); const kibanaServer = getService('kibanaServer'); + const retry = getService('retry'); describe('extension getDefaultAppState', () => { afterEach(async () => { await kibanaServer.uiSettings.unset('defaultColumns'); }); + async function expectColumns(columns: string[]) { + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await retry.try(async () => { + const actualColumns = await PageObjects.discover.getColumnHeaders(); + expect(actualColumns).to.eql(columns); + }); + } + describe('ES|QL mode', () => { it('should render default columns and row height', async () => { const state = kbnRison.encode({ @@ -35,9 +45,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.common.navigateToActualUrl('discover', `?_a=${state}`, { ensureCurrentUrl: false, }); - await PageObjects.discover.waitUntilSearchingHasFinished(); - const columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message']); + await expectColumns(['@timestamp', 'log.level', 'message']); await dataGrid.clickGridSettings(); const rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -55,9 +63,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.common.navigateToActualUrl('discover', `?_a=${state}`, { ensureCurrentUrl: false, }); - await PageObjects.discover.waitUntilSearchingHasFinished(); - let columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'Document']); + await expectColumns(['@timestamp', 'Document']); await dataGrid.clickGridSettings(); let rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -65,9 +71,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(rowHeightNumber).to.be(3); await monacoEditor.setCodeEditorValue('from my-example-logs'); await queryBar.clickQuerySubmitButton(); - await PageObjects.discover.waitUntilSearchingHasFinished(); - columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message']); + await expectColumns(['@timestamp', 'log.level', 'message']); await dataGrid.clickGridSettings(); rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -88,16 +92,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.waitUntilSearchingHasFinished(); await PageObjects.unifiedFieldList.clickFieldListItemRemove('log.level'); await PageObjects.unifiedFieldList.clickFieldListItemRemove('message'); - let columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'Document']); + await expectColumns(['@timestamp', 'Document']); await dataGrid.clickGridSettings(); await dataGrid.changeRowHeightValue('Single'); let rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Single'); await testSubjects.click('discoverNewButton'); - await PageObjects.discover.waitUntilSearchingHasFinished(); - columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message']); + await expectColumns(['@timestamp', 'log.level', 'message']); await dataGrid.clickGridSettings(); rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -118,9 +119,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.common.navigateToActualUrl('discover', `?_a=${state}`, { ensureCurrentUrl: false, }); - await PageObjects.discover.waitUntilSearchingHasFinished(); - const columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message', 'data_stream.type']); + await expectColumns(['@timestamp', 'log.level', 'message', 'data_stream.type']); }); }); @@ -130,9 +129,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ensureCurrentUrl: false, }); await dataViews.switchTo('my-example-logs'); - await PageObjects.discover.waitUntilSearchingHasFinished(); - const columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message']); + await expectColumns(['@timestamp', 'log.level', 'message']); await dataGrid.clickGridSettings(); const rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -145,18 +142,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ensureCurrentUrl: false, }); await dataViews.switchTo('my-example-*'); - await PageObjects.discover.waitUntilSearchingHasFinished(); - let columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'Document']); + await expectColumns(['@timestamp', 'Document']); await dataGrid.clickGridSettings(); let rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); let rowHeightNumber = await dataGrid.getCustomRowHeightNumber(); expect(rowHeightNumber).to.be(3); await dataViews.switchTo('my-example-logs'); - await PageObjects.discover.waitUntilSearchingHasFinished(); - columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message']); + await expectColumns(['@timestamp', 'log.level', 'message']); await dataGrid.clickGridSettings(); rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -172,16 +165,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.waitUntilSearchingHasFinished(); await PageObjects.unifiedFieldList.clickFieldListItemRemove('log.level'); await PageObjects.unifiedFieldList.clickFieldListItemRemove('message'); - let columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'Document']); + await expectColumns(['@timestamp', 'Document']); await dataGrid.clickGridSettings(); await dataGrid.changeRowHeightValue('Single'); let rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Single'); await testSubjects.click('discoverNewButton'); - await PageObjects.discover.waitUntilSearchingHasFinished(); - columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message']); + await expectColumns(['@timestamp', 'log.level', 'message']); await dataGrid.clickGridSettings(); rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -197,9 +187,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ensureCurrentUrl: false, }); await dataViews.switchTo('my-example-logs'); - await PageObjects.discover.waitUntilSearchingHasFinished(); - const columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message', 'data_stream.type']); + await expectColumns(['@timestamp', 'log.level', 'message', 'data_stream.type']); }); }); }); diff --git a/test/functional/apps/visualize/group2/_gauge_chart.ts b/test/functional/apps/visualize/group2/_gauge_chart.ts index 5c35a90d42027..e9b7ff7d29582 100644 --- a/test/functional/apps/visualize/group2/_gauge_chart.ts +++ b/test/functional/apps/visualize/group2/_gauge_chart.ts @@ -18,8 +18,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']); - // FLAKY: https://github.com/elastic/kibana/issues/181883 - describe.skip('gauge chart', function indexPatternCreation() { + describe('gauge chart', function indexPatternCreation() { before(async () => { await PageObjects.visualize.initTests(); }); @@ -57,7 +56,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.click('gaugePercentageMode'); await testSubjects.setValue('gaugePercentageModeFormatPattern', '0.0%'); await PageObjects.visChart.waitForVisualizationRenderingStabilized(); - await PageObjects.visEditor.clickGo(); + await PageObjects.visEditor.clickGo(false); await retry.try(async function tryingForTime() { const expectedTexts = ['57.3%', 'Average bytes']; @@ -77,7 +76,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.visEditor.selectField('machine.os.raw'); log.debug('Size = 4'); await PageObjects.visEditor.setSize(4); - await PageObjects.visEditor.clickGo(); + await PageObjects.visEditor.clickGo(false); }); it('should show Split Gauges', async () => { @@ -113,7 +112,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.visEditor.clickBucket('Metric', 'metrics'); await PageObjects.visEditor.selectAggregation('Min', 'metrics'); await PageObjects.visEditor.selectField('bytes', 'metrics'); - await PageObjects.visEditor.clickGo(); + await PageObjects.visEditor.clickGo(false); await retry.try(async function tryingForTime() { const metricValue = await PageObjects.visChart.getGaugeValue(); diff --git a/test/functional/apps/visualize/group2/_heatmap_chart.ts b/test/functional/apps/visualize/group2/_heatmap_chart.ts index 09439635ebc5e..4054ea334cac8 100644 --- a/test/functional/apps/visualize/group2/_heatmap_chart.ts +++ b/test/functional/apps/visualize/group2/_heatmap_chart.ts @@ -15,8 +15,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const inspector = getService('inspector'); const PageObjects = getPageObjects(['visualize', 'visEditor', 'visChart', 'timePicker']); - // FLAKY: https://github.com/elastic/kibana/issues/181884 - describe.skip('heatmap chart', function indexPatternCreation() { + describe('heatmap chart', function indexPatternCreation() { const vizName1 = 'Visualization HeatmapChart'; let isNewChartsLibraryEnabled = false; @@ -38,7 +37,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { log.debug('Field = @timestamp'); await PageObjects.visEditor.selectField('@timestamp'); // leaving Interval set to Auto - await PageObjects.visEditor.clickGo(); + await PageObjects.visEditor.clickGo(isNewChartsLibraryEnabled); }); it('should save and load', async function () { @@ -97,7 +96,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show 6 color ranges if changed on options', async function () { await PageObjects.visEditor.clickOptionsTab(); await PageObjects.visEditor.changeHeatmapColorNumbers(6); - await PageObjects.visEditor.clickGo(); + await PageObjects.visEditor.clickGo(isNewChartsLibraryEnabled); await PageObjects.visChart.waitForVisualizationRenderingStabilized(); const legends = await PageObjects.visChart.getLegendEntries(); @@ -138,7 +137,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { log.debug('customize 2 last ranges'); await PageObjects.visEditor.setCustomRangeByIndex(6, '650', '720'); await PageObjects.visEditor.setCustomRangeByIndex(7, '800', '905'); - await PageObjects.visEditor.clickGo(); + await PageObjects.visEditor.clickGo(isNewChartsLibraryEnabled); await PageObjects.visChart.waitForVisualizationRenderingStabilized(); const legends = await PageObjects.visChart.getLegendEntries(); diff --git a/test/functional/page_objects/console_page.ts b/test/functional/page_objects/console_page.ts index 942f9f998afb9..fcc971343cc42 100644 --- a/test/functional/page_objects/console_page.ts +++ b/test/functional/page_objects/console_page.ts @@ -638,11 +638,44 @@ export class ConsolePageObject extends FtrService { return await this.testSubjects.exists('a11y-overlay'); } + public async isCopyAsButtonVisible() { + return await this.testSubjects.exists('consoleMenuCopyAsButton'); + } + public async clickCopyAsCurlButton() { const button = await this.testSubjects.find('consoleMenuCopyAsCurl'); await button.click(); } + public async changeLanguageAndCopy(language: string) { + const openModalButton = await this.testSubjects.find('changeLanguageButton'); + await openModalButton.click(); + + const changeLangButton = await this.testSubjects.find(`languageOption-${language}`); + await changeLangButton.click(); + + const submitButton = await this.testSubjects.find('copyAsLanguageSubmit'); + await submitButton.click(); + } + + public async changeDefaultLanguage(language: string) { + const openModalButton = await this.testSubjects.find('changeLanguageButton'); + await openModalButton.click(); + + const changeDefaultLangButton = await this.testSubjects.find( + `changeDefaultLanguageTo-${language}` + ); + await changeDefaultLangButton.click(); + + const submitButton = await this.testSubjects.find('copyAsLanguageSubmit'); + await submitButton.click(); + } + + public async clickCopyAsButton() { + const button = await this.testSubjects.find('consoleMenuCopyAsButton'); + await button.click(); + } + public async clickOpenDocumentationButton() { const button = await this.testSubjects.find('consoleMenuOpenDocs'); await button.click(); diff --git a/test/functional/page_objects/visualize_editor_page.ts b/test/functional/page_objects/visualize_editor_page.ts index f6f4f121ad11a..1d399f4e9c741 100644 --- a/test/functional/page_objects/visualize_editor_page.ts +++ b/test/functional/page_objects/visualize_editor_page.ts @@ -68,6 +68,8 @@ export class VisualizeEditorPageObject extends FtrService { await this.elasticChart.setNewChartUiDebugFlag(); } + await this.common.sleep(500); // wait for the visualization to render + const prevRenderingCount = await this.visChart.getVisualizationRenderingCount(); this.log.debug(`Before Rendering count ${prevRenderingCount}`); await this.testSubjects.clickWhenNotDisabledWithoutRetry('visualizeEditorRenderButton'); diff --git a/test/functional/services/dashboard/panel_actions.ts b/test/functional/services/dashboard/panel_actions.ts index 3e63d526760ef..ef8ca6eaa759a 100644 --- a/test/functional/services/dashboard/panel_actions.ts +++ b/test/functional/services/dashboard/panel_actions.ts @@ -13,7 +13,6 @@ const REMOVE_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-deletePanel'; const EDIT_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-editPanel'; const INLINE_EDIT_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-ACTION_CONFIGURE_IN_LENS'; const EDIT_IN_LENS_EDITOR_DATA_TEST_SUBJ = 'navigateToLensEditorLink'; -const REPLACE_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-replacePanel'; const CLONE_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-clonePanel'; const TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-togglePanel'; const CUSTOMIZE_PANEL_DATA_TEST_SUBJ = 'embeddablePanelAction-ACTION_CUSTOMIZE_PANEL'; @@ -32,6 +31,7 @@ export class DashboardPanelActionsService extends FtrService { private readonly log = this.ctx.getService('log'); private readonly retry = this.ctx.getService('retry'); private readonly browser = this.ctx.getService('browser'); + private readonly find = this.ctx.getService('find'); private readonly inspector = this.ctx.getService('inspector'); private readonly testSubjects = this.ctx.getService('testSubjects'); @@ -62,6 +62,12 @@ export class DashboardPanelActionsService extends FtrService { await toggleMenuItem.click(DASHBOARD_TOP_OFFSET); } + async toggleContextMenuByTitle(title = '') { + this.log.debug(`toggleContextMenu(${title})`); + const header = await this.getPanelHeading(title); + await this.toggleContextMenu(header); + } + async expectContextMenuToBeOpen() { this.log.debug('expectContextMenuToBeOpen'); await this.testSubjects.existOrFail('embeddablePanelContextMenuOpen'); @@ -69,11 +75,19 @@ export class DashboardPanelActionsService extends FtrService { async openContextMenu(parent?: WebElementWrapper) { this.log.debug(`openContextMenu(${parent}`); - await this.toggleContextMenu(parent); + const open = await this.testSubjects.exists('embeddablePanelContextMenuOpen'); + if (!open) await this.toggleContextMenu(parent); await this.expectContextMenuToBeOpen(); } + async openContextMenuByTitle(title = '') { + this.log.debug(`openContextMenuByTitle(${title})`); + const header = await this.getPanelHeading(title); + await this.openContextMenu(header); + } + async hasContextMenuMoreItem() { + this.log.debug('hasContextMenuMoreItem'); return await this.testSubjects.exists('embeddablePanelMore-mainMenu'); } @@ -87,21 +101,30 @@ export class DashboardPanelActionsService extends FtrService { } async openContextMenuMorePanel(parent?: WebElementWrapper) { + this.log.debug('openContextMenuMorePanel'); await this.openContextMenu(parent); await this.clickContextMenuMoreItem(); } - async clickContextMenuItem(itemSelector: string, parent?: WebElementWrapper) { + async clickContextMenuItem(testSubject: string, parent?: WebElementWrapper) { + this.log.debug(`clickContextMenuItem`); await this.openContextMenu(parent); - const exists = await this.testSubjects.exists(itemSelector); + const exists = await this.testSubjects.exists(testSubject); if (!exists) { await this.clickContextMenuMoreItem(); } - await this.testSubjects.click(itemSelector); + await this.testSubjects.click(testSubject); + } + + async clickContextMenuItemByTitle(testSubject: string, title = '') { + this.log.debug(`openContextMenuByTitle(${title})`); + const header = await this.getPanelHeading(title); + await this.clickContextMenuItem(testSubject, header); } async navigateToEditorFromFlyout() { - await this.testSubjects.clickWhenNotDisabledWithoutRetry(INLINE_EDIT_PANEL_DATA_TEST_SUBJ); + this.log.debug('navigateToEditorFromFlyout'); + await this.clickContextMenuItem(INLINE_EDIT_PANEL_DATA_TEST_SUBJ); await this.header.waitUntilLoadingHasFinished(); await this.testSubjects.click(EDIT_IN_LENS_EDITOR_DATA_TEST_SUBJ); const isConfirmModalVisible = await this.testSubjects.exists('confirmModalConfirmButton'); @@ -112,12 +135,7 @@ export class DashboardPanelActionsService extends FtrService { async clickInlineEdit() { this.log.debug('clickInlineEditAction'); - await this.expectContextMenuToBeOpen(); - const isInlineEditingActionVisible = await this.testSubjects.exists( - INLINE_EDIT_PANEL_DATA_TEST_SUBJ - ); - if (!isInlineEditingActionVisible) await this.clickContextMenuMoreItem(); - await this.testSubjects.clickWhenNotDisabledWithoutRetry(INLINE_EDIT_PANEL_DATA_TEST_SUBJ); + await this.clickContextMenuItem(INLINE_EDIT_PANEL_DATA_TEST_SUBJ); await this.header.waitUntilLoadingHasFinished(); await this.common.waitForTopNavToBeVisible(); } @@ -126,9 +144,9 @@ export class DashboardPanelActionsService extends FtrService { * The dashboard/canvas panels can be either edited on their editor or inline. * The inline editing panels allow the navigation to the editor after the flyout opens */ - async clickEdit() { + async clickEdit(parent?: WebElementWrapper) { this.log.debug('clickEdit'); - await this.expectContextMenuToBeOpen(); + await this.openContextMenu(parent); const isActionVisible = await this.testSubjects.exists(EDIT_PANEL_DATA_TEST_SUBJ); const isInlineEditingActionVisible = await this.testSubjects.exists( INLINE_EDIT_PANEL_DATA_TEST_SUBJ @@ -149,40 +167,26 @@ export class DashboardPanelActionsService extends FtrService { * The dashboard/canvas panels can be either edited on their editor or inline. * The inline editing panels allow the navigation to the editor after the flyout opens */ - async editPanelByTitle(title?: string) { + async editPanelByTitle(title = '') { this.log.debug(`editPanelByTitle(${title})`); - if (title) { - const panelOptions = await this.getPanelHeading(title); - await this.openContextMenu(panelOptions); - } else { - await this.openContextMenu(); - } - if (await this.testSubjects.exists(EDIT_PANEL_DATA_TEST_SUBJ)) { - await this.testSubjects.clickWhenNotDisabledWithoutRetry(EDIT_PANEL_DATA_TEST_SUBJ); - } else { - await this.navigateToEditorFromFlyout(); - } + const header = await this.getPanelHeading(title); + await this.clickEdit(header); } async clickExpandPanelToggle() { this.log.debug(`clickExpandPanelToggle`); - await this.expectContextMenuToBeOpen(); - const isActionVisible = await this.testSubjects.exists(TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ); - if (!isActionVisible) await this.clickContextMenuMoreItem(); - await this.testSubjects.click(TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ); + await this.openContextMenu(); + await this.clickContextMenuItem(TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ); } async removePanel(parent?: WebElementWrapper) { this.log.debug('removePanel'); await this.openContextMenu(parent); - const isActionVisible = await this.testSubjects.exists(REMOVE_PANEL_DATA_TEST_SUBJ); - if (!isActionVisible) await this.clickContextMenuMoreItem(); - const isPanelActionVisible = await this.testSubjects.exists(REMOVE_PANEL_DATA_TEST_SUBJ); - if (!isPanelActionVisible) await this.clickContextMenuMoreItem(); - await this.testSubjects.click(REMOVE_PANEL_DATA_TEST_SUBJ); + await this.clickContextMenuItem(REMOVE_PANEL_DATA_TEST_SUBJ, parent); } - async removePanelByTitle(title: string) { + async removePanelByTitle(title = '') { + this.log.debug(`removePanel(${title})`); const header = await this.getPanelHeading(title); this.log.debug('found header? ', Boolean(header)); await this.removePanel(header); @@ -190,62 +194,36 @@ export class DashboardPanelActionsService extends FtrService { async customizePanel(parent?: WebElementWrapper) { this.log.debug('customizePanel'); - await this.openContextMenu(parent); - const isActionVisible = await this.testSubjects.exists(CUSTOMIZE_PANEL_DATA_TEST_SUBJ); - if (!isActionVisible) await this.clickContextMenuMoreItem(); - const isPanelActionVisible = await this.testSubjects.exists(CUSTOMIZE_PANEL_DATA_TEST_SUBJ); - if (!isPanelActionVisible) await this.clickContextMenuMoreItem(); - await this.testSubjects.click(CUSTOMIZE_PANEL_DATA_TEST_SUBJ); + await this.clickContextMenuItem(CUSTOMIZE_PANEL_DATA_TEST_SUBJ, parent); } - async replacePanelByTitle(title?: string) { - this.log.debug(`replacePanel(${title})`); - if (title) { - const panelOptions = await this.getPanelHeading(title); - await this.openContextMenu(panelOptions); - } else { - await this.openContextMenu(); - } - const actionExists = await this.testSubjects.exists(REPLACE_PANEL_DATA_TEST_SUBJ); - if (!actionExists) { - await this.clickContextMenuMoreItem(); - } - await this.testSubjects.click(REPLACE_PANEL_DATA_TEST_SUBJ); + async customizePanelByTitle(title = '') { + this.log.debug('customizePanel'); + const header = await this.getPanelHeading(title); + await this.clickContextMenuItem(CUSTOMIZE_PANEL_DATA_TEST_SUBJ, header); } - async clonePanelByTitle(title?: string) { + async clonePanelByTitle(title = '') { this.log.debug(`clonePanel(${title})`); - if (title) { - const panelOptions = await this.getPanelHeading(title); - await this.openContextMenu(panelOptions); - } else { - await this.openContextMenu(); - } - const isActionVisible = await this.testSubjects.exists(CLONE_PANEL_DATA_TEST_SUBJ); - if (!isActionVisible) await this.clickContextMenuMoreItem(); - await this.testSubjects.click(CLONE_PANEL_DATA_TEST_SUBJ); + const header = await this.getPanelHeading(title); + await this.clickContextMenuItem(CLONE_PANEL_DATA_TEST_SUBJ, header); await this.dashboard.waitForRenderComplete(); } - async openCopyToModalByTitle(title?: string) { + async openCopyToModalByTitle(title = '') { this.log.debug(`copyPanelTo(${title})`); - if (title) { - const panelOptions = await this.getPanelHeading(title); - await this.openContextMenu(panelOptions); - } else { - await this.openContextMenu(); - } - const isActionVisible = await this.testSubjects.exists(COPY_PANEL_TO_DATA_TEST_SUBJ); - if (!isActionVisible) await this.clickContextMenuMoreItem(); - await this.testSubjects.click(COPY_PANEL_TO_DATA_TEST_SUBJ); + const header = await this.getPanelHeading(title); + await this.clickContextMenuItem(COPY_PANEL_TO_DATA_TEST_SUBJ, header); } async openInspectorByTitle(title: string) { + this.log.debug(`openInspector(${title})`); const header = await this.getPanelHeading(title); await this.openInspector(header); } async getSearchSessionIdByTitle(title: string) { + this.log.debug(`getSearchSessionId(${title})`); await this.openInspectorByTitle(title); await this.inspector.openInspectorRequestsView(); const searchSessionId = await ( @@ -256,6 +234,7 @@ export class DashboardPanelActionsService extends FtrService { } async getSearchResponseByTitle(title: string) { + this.log.debug(`setSearchResponse(${title})`); await this.openInspectorByTitle(title); await this.inspector.openInspectorRequestsView(); const response = await this.inspector.getResponse(); @@ -264,6 +243,7 @@ export class DashboardPanelActionsService extends FtrService { } async openInspector(parent?: WebElementWrapper) { + this.log.debug(`openInspector`); await this.clickContextMenuItem(OPEN_INSPECTOR_TEST_SUBJ, parent); } @@ -311,12 +291,11 @@ export class DashboardPanelActionsService extends FtrService { }); } - async expectExistsPanelAction(testSubject: string, title?: string) { - this.log.debug('expectExistsPanelAction', testSubject); + async expectExistsPanelAction(testSubject: string, title = '') { + this.log.debug('expectExistsPanelAction', testSubject, title); const panelWrapper = title ? await this.getPanelHeading(title) : undefined; await this.openContextMenu(panelWrapper); - if (!(await this.testSubjects.exists(testSubject))) { if (await this.hasContextMenuMoreItem()) { await this.clickContextMenuMoreItem(); @@ -326,12 +305,12 @@ export class DashboardPanelActionsService extends FtrService { await this.toggleContextMenu(panelWrapper); } - async expectExistsRemovePanelAction() { + async expectExistsRemovePanelAction(title = '') { this.log.debug('expectExistsRemovePanelAction'); - await this.expectExistsPanelAction(REMOVE_PANEL_DATA_TEST_SUBJ); + await this.expectExistsPanelAction(REMOVE_PANEL_DATA_TEST_SUBJ, title); } - async expectExistsEditPanelAction(title?: string, allowsInlineEditing?: boolean) { + async expectExistsEditPanelAction(title = '', allowsInlineEditing?: boolean) { this.log.debug('expectExistsEditPanelAction'); let testSubj = EDIT_PANEL_DATA_TEST_SUBJ; if (allowsInlineEditing) { @@ -340,43 +319,45 @@ export class DashboardPanelActionsService extends FtrService { await this.expectExistsPanelAction(testSubj, title); } - async expectExistsClonePanelAction() { + async expectExistsClonePanelAction(title = '') { this.log.debug('expectExistsClonePanelAction'); - await this.expectExistsPanelAction(CLONE_PANEL_DATA_TEST_SUBJ); + await this.expectExistsPanelAction(CLONE_PANEL_DATA_TEST_SUBJ, title); } - async expectExistsToggleExpandAction() { + async expectExistsToggleExpandAction(title = '') { this.log.debug('expectExistsToggleExpandAction'); - await this.expectExistsPanelAction(TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ); + await this.expectExistsPanelAction(TOGGLE_EXPAND_PANEL_DATA_TEST_SUBJ, title); } - async expectMissingPanelAction(testSubject: string) { - this.log.debug('expectMissingPanelAction', testSubject); - await this.openContextMenu(); + async expectMissingPanelAction(testSubject: string, title = '') { + this.log.debug('expectMissingPanelAction', testSubject, title); + await this.openContextMenuByTitle(title); await this.testSubjects.missingOrFail(testSubject); if (await this.hasContextMenuMoreItem()) { await this.clickContextMenuMoreItem(); await this.testSubjects.missingOrFail(testSubject); } - await this.toggleContextMenu(); + await this.toggleContextMenuByTitle(title); } - async expectMissingEditPanelAction() { + async expectMissingEditPanelAction(title = '') { this.log.debug('expectMissingEditPanelAction'); - await this.expectMissingPanelAction(EDIT_PANEL_DATA_TEST_SUBJ); + await this.expectMissingPanelAction(EDIT_PANEL_DATA_TEST_SUBJ, title); } - async expectMissingDuplicatePanelAction() { + async expectMissingDuplicatePanelAction(title = '') { this.log.debug('expectMissingDuplicatePanelAction'); - await this.expectMissingPanelAction(CLONE_PANEL_DATA_TEST_SUBJ); + await this.expectMissingPanelAction(CLONE_PANEL_DATA_TEST_SUBJ, title); } - async expectMissingRemovePanelAction() { + async expectMissingRemovePanelAction(title = '') { this.log.debug('expectMissingRemovePanelAction'); - await this.expectMissingPanelAction(REMOVE_PANEL_DATA_TEST_SUBJ); + await this.expectMissingPanelAction(REMOVE_PANEL_DATA_TEST_SUBJ, title); } - async getPanelHeading(title: string) { + async getPanelHeading(title = '') { + this.log.debug(`getPanelHeading(${title})`); + if (!title) return await this.find.byClassName('embPanel__header'); return await this.testSubjects.find(`embeddablePanelHeading-${title.replace(/\s/g, '')}`); } @@ -399,11 +380,15 @@ export class DashboardPanelActionsService extends FtrService { await this.openContextMenu(parent); const isActionVisible = await this.testSubjects.exists(CONVERT_TO_LENS_TEST_SUBJ); if (!isActionVisible) await this.clickContextMenuMoreItem(); - const isPanelActionVisible = await this.testSubjects.exists(CONVERT_TO_LENS_TEST_SUBJ); - if (!isPanelActionVisible) await this.clickContextMenuMoreItem(); return await this.testSubjects.exists(CONVERT_TO_LENS_TEST_SUBJ, { timeout: 500 }); } + async canConvertToLensByTitle(title = '') { + this.log.debug(`canConvertToLens(${title})`); + const header = await this.getPanelHeading(title); + return await this.canConvertToLens(header); + } + async convertToLens(parent?: WebElementWrapper) { this.log.debug('convertToLens'); @@ -415,4 +400,10 @@ export class DashboardPanelActionsService extends FtrService { await this.testSubjects.click(CONVERT_TO_LENS_TEST_SUBJ); }); } + + async convertToLensByTitle(title = '') { + this.log.debug(`convertToLens(${title})`); + const header = await this.getPanelHeading(title); + return await this.convertToLens(header); + } } diff --git a/test/functional/services/dashboard/panel_drilldown_actions.ts b/test/functional/services/dashboard/panel_drilldown_actions.ts index 57fc42f323fbe..f4ff1b3ede975 100644 --- a/test/functional/services/dashboard/panel_drilldown_actions.ts +++ b/test/functional/services/dashboard/panel_drilldown_actions.ts @@ -15,31 +15,44 @@ const MANAGE_DRILLDOWNS_DATA_TEST_SUBJ = 'embeddablePanelAction-OPEN_FLYOUT_EDIT export function DashboardDrilldownPanelActionsProvider({ getService }: FtrProviderContext) { const log = getService('log'); const testSubjects = getService('testSubjects'); + const dashboardPanelActions = getService('dashboardPanelActions'); return new (class DashboardDrilldownPanelActions { async expectExistsCreateDrilldownAction() { log.debug('expectExistsCreateDrilldownAction'); - await testSubjects.existOrFail(CREATE_DRILLDOWN_DATA_TEST_SUBJ); + await dashboardPanelActions.openContextMenu(); + await dashboardPanelActions.expectContextMenuToBeOpen(); + await dashboardPanelActions.clickContextMenuMoreItem(); + await await testSubjects.existOrFail(CREATE_DRILLDOWN_DATA_TEST_SUBJ); } async expectMissingCreateDrilldownAction() { log.debug('expectMissingCreateDrilldownAction'); + await dashboardPanelActions.openContextMenu(); + await dashboardPanelActions.expectContextMenuToBeOpen(); + await dashboardPanelActions.clickContextMenuMoreItem(); await testSubjects.existOrFail(MANAGE_DRILLDOWNS_DATA_TEST_SUBJ); } async clickCreateDrilldown() { log.debug('clickCreateDrilldown'); await this.expectExistsCreateDrilldownAction(); - await testSubjects.clickWhenNotDisabledWithoutRetry(CREATE_DRILLDOWN_DATA_TEST_SUBJ); + await dashboardPanelActions.clickContextMenuItem(CREATE_DRILLDOWN_DATA_TEST_SUBJ); } async expectExistsManageDrilldownsAction() { log.debug('expectExistsCreateDrilldownAction'); + await dashboardPanelActions.openContextMenu(); + await dashboardPanelActions.expectContextMenuToBeOpen(); + await dashboardPanelActions.clickContextMenuMoreItem(); await testSubjects.existOrFail(CREATE_DRILLDOWN_DATA_TEST_SUBJ); } async expectMissingManageDrilldownsAction() { log.debug('expectExistsRemovePanelAction'); + await dashboardPanelActions.openContextMenu(); + await dashboardPanelActions.expectContextMenuToBeOpen(); + await dashboardPanelActions.clickContextMenuMoreItem(); await testSubjects.existOrFail(MANAGE_DRILLDOWNS_DATA_TEST_SUBJ); } diff --git a/test/plugin_functional/test_suites/core_plugins/rendering.ts b/test/plugin_functional/test_suites/core_plugins/rendering.ts index ba6ff39066939..a7afb228f5c1f 100644 --- a/test/plugin_functional/test_suites/core_plugins/rendering.ts +++ b/test/plugin_functional/test_suites/core_plugins/rendering.ts @@ -100,211 +100,209 @@ export default function ({ getService }: PluginFunctionalProviderContext) { // what types of config settings can be exposed to the browser. // When plugin owners make a change that exposes additional config values, the changes will be reflected in this test assertion. // Ensure that your change does not unintentionally expose any sensitive values! - 'console.autocompleteDefinitions.endpointsAvailability (alternatives)', - 'console.dev.enableMonaco (boolean)', - 'console.ui.enabled (boolean)', - 'console.ui.embeddedEnabled (boolean)', - 'dashboard.allowByValueEmbeddables (boolean)', - 'unifiedSearch.autocomplete.querySuggestions.enabled (boolean)', - 'unifiedSearch.autocomplete.valueSuggestions.enabled (boolean)', - 'unifiedSearch.autocomplete.valueSuggestions.terminateAfter (duration)', - 'unifiedSearch.autocomplete.valueSuggestions.tiers (array)', - 'unifiedSearch.autocomplete.valueSuggestions.timeout (duration)', - 'data.search.aggs.shardDelay.enabled (boolean)', - 'data.search.asyncSearch.batchedReduceSize (number)', - 'data.search.asyncSearch.keepAlive (duration)', - 'data.search.asyncSearch.waitForCompletion (duration)', - 'data.search.asyncSearch.pollInterval (number)', - 'data.search.sessions.defaultExpiration (duration)', - 'data.search.sessions.enabled (boolean)', - 'data.search.sessions.management.expiresSoonWarning (duration)', - 'data.search.sessions.management.maxSessions (number)', - 'data.search.sessions.management.refreshInterval (duration)', - 'data.search.sessions.management.refreshTimeout (duration)', - 'data.search.sessions.maxUpdateRetries (number)', - 'data.search.sessions.notTouchedTimeout (duration)', - 'data_views.scriptedFieldsEnabled (any)', // It's a boolean (any because schema.conditional) + 'console.autocompleteDefinitions.endpointsAvailability (stack?|serverless?)', + 'console.dev.enableMonaco (boolean?)', + 'console.ui.enabled (boolean?)', + 'console.ui.embeddedEnabled (boolean?)', + 'dashboard.allowByValueEmbeddables (boolean?)', + 'unifiedSearch.autocomplete.querySuggestions.enabled (boolean?)', + 'unifiedSearch.autocomplete.valueSuggestions.enabled (boolean?)', + 'unifiedSearch.autocomplete.valueSuggestions.terminateAfter (duration?)', + 'unifiedSearch.autocomplete.valueSuggestions.tiers (array?)', + 'unifiedSearch.autocomplete.valueSuggestions.timeout (duration?)', + 'data.search.aggs.shardDelay.enabled (boolean?)', + 'data.search.asyncSearch.batchedReduceSize (number?)', + 'data.search.asyncSearch.keepAlive (duration?)', + 'data.search.asyncSearch.waitForCompletion (duration?)', + 'data.search.asyncSearch.pollInterval (number?)', + 'data.search.sessions.defaultExpiration (duration?)', + 'data.search.sessions.enabled (boolean?)', + 'data.search.sessions.management.expiresSoonWarning (duration?)', + 'data.search.sessions.management.maxSessions (number?)', + 'data.search.sessions.management.refreshInterval (duration?)', + 'data.search.sessions.management.refreshTimeout (duration?)', + 'data.search.sessions.maxUpdateRetries (number?)', + 'data.search.sessions.notTouchedTimeout (duration?)', + 'data_views.scriptedFieldsEnabled (boolean?|never)', 'data_visualizer.resultLinks.fileBeat.enabled (boolean)', - 'dev_tools.deeplinks.navLinkStatus (string)', - 'discover.experimental.enabledProfiles (array)', - 'enterpriseSearch.canDeployEntSearch (boolean)', - 'enterpriseSearch.host (string)', - 'enterpriseSearch.ui.enabled (boolean)', - 'home.disableWelcomeScreen (boolean)', - 'management.deeplinks.navLinkStatus (string)', - 'map.emsFileApiUrl (string)', - 'map.emsFontLibraryUrl (string)', - 'map.emsLandingPageUrl (string)', - 'map.emsTileApiUrl (string)', - 'map.emsTileLayerId.bright (string)', - 'map.emsTileLayerId.dark (string)', - 'map.emsTileLayerId.desaturated (string)', - 'map.emsUrl (string)', - 'map.includeElasticMapsService (boolean)', - 'map.tilemap.options.attribution (string)', - 'map.tilemap.options.bounds (array)', - 'map.tilemap.options.default (boolean)', - 'map.tilemap.options.errorTileUrl (string)', - 'map.tilemap.options.maxZoom (number)', - 'map.tilemap.options.minZoom (number)', - 'map.tilemap.options.reuseTiles (boolean)', - 'map.tilemap.options.subdomains (array)', - 'map.tilemap.options.tileSize (number)', - 'map.tilemap.options.tms (boolean)', - 'map.tilemap.url (string)', - 'monitoring.kibana.collection.enabled (boolean)', - 'monitoring.kibana.collection.interval (number)', - 'monitoring.ui.ccs.enabled (boolean)', - 'monitoring.ui.kibana.reporting.stale_status_threshold_seconds (number)', - 'monitoring.ui.container.apm.enabled (boolean)', - 'monitoring.ui.container.elasticsearch.enabled (boolean)', - 'monitoring.ui.container.logstash.enabled (boolean)', - 'monitoring.ui.enabled (boolean)', - 'monitoring.ui.min_interval_seconds (number)', - 'monitoring.ui.show_license_expiration (boolean)', - 'newsfeed.fetchInterval (duration)', - 'newsfeed.mainInterval (duration)', - 'newsfeed.service.pathTemplate (string)', - 'newsfeed.service.urlRoot (string)', - 'no_data_page.analyticsNoDataPageFlavor (any)', // It's a string (any because schema.conditional) - 'telemetry.allowChangingOptInStatus (boolean)', - 'telemetry.appendServerlessChannelsSuffix (any)', // It's a boolean (any because schema.conditional) - 'telemetry.banner (boolean)', - 'telemetry.labels.branch (string)', - 'telemetry.labels.ciBuildId (string)', - 'telemetry.labels.ciBuildJobId (string)', - 'telemetry.labels.ciBuildNumber (number)', - 'telemetry.labels.environment (string)', - 'telemetry.labels.ftrConfig (string)', - 'telemetry.labels.gitRev (string)', - 'telemetry.labels.isPr (boolean)', - 'telemetry.labels.journeyName (string)', - 'telemetry.labels.prId (number)', - 'telemetry.labels.testBuildId (string)', - 'telemetry.labels.testJobId (string)', - 'telemetry.labels.ciBuildName (string)', - 'telemetry.labels.performancePhase (string)', - 'telemetry.labels.serverless (any)', // It's the project type (string), claims any because schema.conditional. Can only be set on Serverless. - 'telemetry.hidePrivacyStatement (boolean)', - 'telemetry.optIn (boolean)', - 'telemetry.sendUsageFrom (alternatives)', - 'telemetry.sendUsageTo (any)', - 'usageCollection.uiCounters.debug (boolean)', - 'usageCollection.uiCounters.enabled (boolean)', - // readOnly is boolean flag - 'input_control_vis.readOnly (any)', - 'vis_type_gauge.readOnly (any)', - 'vis_type_heatmap.readOnly (any)', - 'vis_type_metric.readOnly (any)', - 'vis_type_pie.readOnly (any)', - 'vis_type_table.readOnly (any)', - 'vis_type_tagcloud.readOnly (any)', - 'vis_type_timelion.readOnly (any)', - 'vis_type_timeseries.readOnly (any)', - 'vis_type_vislib.readOnly (any)', - 'vis_type_xy.readOnly (any)', - 'vis_type_vega.enableExternalUrls (boolean)', + 'dev_tools.deeplinks.navLinkStatus (string?)', + 'discover.experimental.enabledProfiles (array?)', + 'enterpriseSearch.canDeployEntSearch (boolean?)', + 'enterpriseSearch.host (string?)', + 'enterpriseSearch.ui.enabled (boolean?)', + 'home.disableWelcomeScreen (boolean?)', + 'management.deeplinks.navLinkStatus (string?)', + 'map.emsFileApiUrl (string?)', + 'map.emsFontLibraryUrl (string?)', + 'map.emsLandingPageUrl (string?)', + 'map.emsTileApiUrl (string?)', + 'map.emsTileLayerId.bright (string?)', + 'map.emsTileLayerId.dark (string?)', + 'map.emsTileLayerId.desaturated (string?)', + 'map.emsUrl (string?)', + 'map.includeElasticMapsService (boolean?)', + 'map.tilemap.options.attribution (string?)', + 'map.tilemap.options.bounds (array?)', + 'map.tilemap.options.default (boolean?)', + 'map.tilemap.options.errorTileUrl (string?)', + 'map.tilemap.options.maxZoom (number?)', + 'map.tilemap.options.minZoom (number?)', + 'map.tilemap.options.reuseTiles (boolean?)', + 'map.tilemap.options.subdomains (array?)', + 'map.tilemap.options.tileSize (number?)', + 'map.tilemap.options.tms (boolean?)', + 'map.tilemap.url (string?)', + 'monitoring.kibana.collection.enabled (boolean?)', + 'monitoring.kibana.collection.interval (number?)', + 'monitoring.ui.ccs.enabled (boolean?)', + 'monitoring.ui.kibana.reporting.stale_status_threshold_seconds (number?)', + 'monitoring.ui.container.apm.enabled (boolean?)', + 'monitoring.ui.container.elasticsearch.enabled (boolean?)', + 'monitoring.ui.container.logstash.enabled (boolean?)', + 'monitoring.ui.enabled (boolean?)', + 'monitoring.ui.min_interval_seconds (number?)', + 'monitoring.ui.show_license_expiration (boolean?)', + 'newsfeed.fetchInterval (duration?)', + 'newsfeed.mainInterval (duration?)', + 'newsfeed.service.pathTemplate (string?)', + 'newsfeed.service.urlRoot (string?)', + 'no_data_page.analyticsNoDataPageFlavor (kibana?|serverless_search?|serverless_observability?|never)', + 'telemetry.allowChangingOptInStatus (boolean?)', + 'telemetry.appendServerlessChannelsSuffix (true?|false?)', + 'telemetry.banner (boolean?)', + 'telemetry.labels.branch (string?)', + 'telemetry.labels.ciBuildId (string?)', + 'telemetry.labels.ciBuildJobId (string?)', + 'telemetry.labels.ciBuildNumber (number?)', + 'telemetry.labels.environment (string?)', + 'telemetry.labels.ftrConfig (string?)', + 'telemetry.labels.gitRev (string?)', + 'telemetry.labels.isPr (boolean?)', + 'telemetry.labels.journeyName (string?)', + 'telemetry.labels.prId (number?)', + 'telemetry.labels.testBuildId (string?)', + 'telemetry.labels.testJobId (string?)', + 'telemetry.labels.ciBuildName (string?)', + 'telemetry.labels.performancePhase (string?)', + 'telemetry.labels.serverless (string?|never)', // Can only be set on Serverless. + 'telemetry.hidePrivacyStatement (boolean?)', + 'telemetry.optIn (boolean?)', + 'telemetry.sendUsageFrom (server?|browser?)', + 'telemetry.sendUsageTo (prod?|staging?)', + 'usageCollection.uiCounters.debug (boolean?)', + 'usageCollection.uiCounters.enabled (boolean?)', + 'input_control_vis.readOnly (boolean?|never)', + 'vis_type_gauge.readOnly (boolean?|never)', + 'vis_type_heatmap.readOnly (boolean?|never)', + 'vis_type_metric.readOnly (boolean?|never)', + 'vis_type_pie.readOnly (boolean?|never)', + 'vis_type_table.readOnly (boolean?|never)', + 'vis_type_tagcloud.readOnly (boolean?|never)', + 'vis_type_timelion.readOnly (boolean?|never)', + 'vis_type_timeseries.readOnly (boolean?|never)', + 'vis_type_vislib.readOnly (boolean?|never)', + 'vis_type_xy.readOnly (boolean?|never)', + 'vis_type_vega.enableExternalUrls (boolean?)', 'xpack.actions.email.domain_allowlist (array)', - 'xpack.apm.serviceMapEnabled (boolean)', - 'xpack.apm.ui.enabled (boolean)', - 'xpack.apm.ui.maxTraceItems (number)', - 'xpack.apm.managedServiceUrl (any)', - 'xpack.apm.serverlessOnboarding (any)', - 'xpack.apm.latestAgentVersionsUrl (string)', - 'xpack.apm.featureFlags.agentConfigurationAvailable (any)', - 'xpack.apm.featureFlags.configurableIndicesAvailable (any)', - 'xpack.apm.featureFlags.infrastructureTabAvailable (any)', - 'xpack.apm.featureFlags.infraUiAvailable (any)', - 'xpack.apm.featureFlags.migrationToFleetAvailable (any)', - 'xpack.apm.featureFlags.sourcemapApiAvailable (any)', - 'xpack.apm.featureFlags.storageExplorerAvailable (any)', - 'xpack.apm.featureFlags.profilingIntegrationAvailable (boolean)', - 'xpack.apm.serverless.enabled (any)', // It's a boolean (any because schema.conditional) - 'xpack.observability_onboarding.serverless.enabled (any)', // It's a boolean (any because schema.conditional) - 'xpack.cases.files.allowedMimeTypes (array)', - 'xpack.cases.files.maxSize (number)', - 'xpack.cases.markdownPlugins.lens (boolean)', - 'xpack.cases.stack.enabled (boolean)', - 'xpack.ccr.ui.enabled (boolean)', - 'xpack.cloud.base_url (string)', - 'xpack.cloud.cname (string)', - 'xpack.cloud.deployment_url (string)', - 'xpack.cloud.deployments_url (string)', - 'xpack.cloud.is_elastic_staff_owned (boolean)', - 'xpack.cloud.trial_end_date (string)', - 'xpack.cloud_integrations.chat.chatURL (string)', - 'xpack.cloud_integrations.chat.trialBuffer (number)', + 'xpack.apm.serviceMapEnabled (boolean?)', + 'xpack.apm.ui.enabled (boolean?)', + 'xpack.apm.ui.maxTraceItems (number?)', + 'xpack.apm.managedServiceUrl (string?|never)', + 'xpack.apm.serverlessOnboarding (boolean?|never)', + 'xpack.apm.latestAgentVersionsUrl (string?)', + 'xpack.apm.featureFlags.agentConfigurationAvailable (boolean?|true?)', + 'xpack.apm.featureFlags.configurableIndicesAvailable (boolean?|true?)', + 'xpack.apm.featureFlags.infrastructureTabAvailable (boolean?|true?)', + 'xpack.apm.featureFlags.infraUiAvailable (boolean?|true?)', + 'xpack.apm.featureFlags.migrationToFleetAvailable (boolean?|true?)', + 'xpack.apm.featureFlags.sourcemapApiAvailable (boolean?|true?)', + 'xpack.apm.featureFlags.storageExplorerAvailable (boolean?|true?)', + 'xpack.apm.featureFlags.profilingIntegrationAvailable (boolean?)', + 'xpack.apm.serverless.enabled (true?|never)', + 'xpack.observability_onboarding.serverless.enabled (true?|never)', + 'xpack.cases.files.allowedMimeTypes (array?)', + 'xpack.cases.files.maxSize (number?)', + 'xpack.cases.markdownPlugins.lens (boolean?)', + 'xpack.cases.stack.enabled (boolean?)', + 'xpack.ccr.ui.enabled (boolean?)', + 'xpack.cloud.base_url (string?)', + 'xpack.cloud.cname (string?)', + 'xpack.cloud.deployment_url (string?)', + 'xpack.cloud.deployments_url (string?)', + 'xpack.cloud.is_elastic_staff_owned (boolean?)', + 'xpack.cloud.trial_end_date (string?)', + 'xpack.cloud_integrations.chat.chatURL (string?)', + 'xpack.cloud_integrations.chat.trialBuffer (number?)', // No PII. This is an escape patch to override LaunchDarkly's flag resolution mechanism for testing or quick fix. - 'xpack.cloud_integrations.experiments.flag_overrides (record)', + 'xpack.cloud_integrations.experiments.flag_overrides (record?)', // Commented because it's inside a schema conditional, and the test is not able to resolve it. But it's shared. // Added here for documentation purposes. // 'xpack.cloud_integrations.experiments.launch_darkly.client_id (string)', // 'xpack.cloud_integrations.experiments.launch_darkly.client_log_level (string)', - 'xpack.cloud_integrations.experiments.metadata_refresh_interval (duration)', - 'xpack.cloud_integrations.full_story.org_id (any)', + 'xpack.cloud_integrations.experiments.metadata_refresh_interval (duration?)', + 'xpack.cloud_integrations.full_story.org_id (string|string?)', // No PII. Just the list of event types we want to forward to FullStory. - 'xpack.cloud_integrations.full_story.eventTypesAllowlist (array)', - 'xpack.cloud_integrations.full_story.pageVarsDebounceTime (duration)', - 'xpack.cloud.id (string)', - 'xpack.cloud.organization_id (string)', - 'xpack.cloud.organization_url (string)', - 'xpack.cloud.billing_url (string)', - 'xpack.cloud.profile_url (string)', - 'xpack.cloud.performance_url (string)', - 'xpack.cloud.users_and_roles_url (string)', - 'xpack.cloud.projects_url (any)', // It's a string (any because schema.conditional) + 'xpack.cloud_integrations.full_story.eventTypesAllowlist (array?)', + 'xpack.cloud_integrations.full_story.pageVarsDebounceTime (duration?)', + 'xpack.cloud.id (string?)', + 'xpack.cloud.organization_id (string?)', + 'xpack.cloud.organization_url (string?)', + 'xpack.cloud.billing_url (string?)', + 'xpack.cloud.profile_url (string?)', + 'xpack.cloud.performance_url (string?)', + 'xpack.cloud.users_and_roles_url (string?)', + 'xpack.cloud.projects_url (string?|never)', // can't be used to infer urls or customer id from the outside - 'xpack.cloud.serverless.project_id (string)', - 'xpack.cloud.serverless.project_name (string)', - 'xpack.cloud.serverless.project_type (string)', - 'xpack.cloud.serverless.orchestrator_target (string)', - 'xpack.cloud.onboarding.default_solution (string)', - 'xpack.discoverEnhanced.actions.exploreDataInChart.enabled (boolean)', - 'xpack.discoverEnhanced.actions.exploreDataInContextMenu.enabled (boolean)', - 'xpack.fleet.agents.enabled (boolean)', - 'xpack.fleet.agentless.api.url (string)', - 'xpack.fleet.enableExperimental (array)', - 'xpack.fleet.internal.activeAgentsSoftLimit (number)', - 'xpack.fleet.internal.fleetServerStandalone (boolean)', - 'xpack.fleet.internal.onlyAllowAgentUpgradeToKnownVersions (boolean)', - 'xpack.fleet.developer.maxAgentPoliciesWithInactivityTimeout (number)', - 'xpack.global_search.search_timeout (duration)', - 'xpack.global_search_bar.input_max_limit (number)', - 'xpack.graph.canEditDrillDownUrls (boolean)', - 'xpack.graph.savePolicy (alternatives)', - 'xpack.ilm.ui.enabled (boolean)', - 'xpack.index_management.ui.enabled (boolean)', - 'xpack.infra.sources.default.fields.message (array)', - 'xpack.index_management.enableTogglingDataRetention (any)', // It's a boolean (any because schema.conditional) + 'xpack.cloud.serverless.project_id (string?)', + 'xpack.cloud.serverless.project_name (string?)', + 'xpack.cloud.serverless.project_type (string?)', + 'xpack.cloud.serverless.orchestrator_target (string?)', + 'xpack.cloud.onboarding.default_solution (string?)', + 'xpack.discoverEnhanced.actions.exploreDataInChart.enabled (boolean?)', + 'xpack.discoverEnhanced.actions.exploreDataInContextMenu.enabled (boolean?)', + 'xpack.fleet.agents.enabled (boolean?)', + 'xpack.fleet.agentless.enabled (boolean?)', + 'xpack.fleet.enableExperimental (array?)', + 'xpack.fleet.internal.activeAgentsSoftLimit (number?)', + 'xpack.fleet.internal.fleetServerStandalone (boolean?)', + 'xpack.fleet.internal.onlyAllowAgentUpgradeToKnownVersions (boolean?)', + 'xpack.fleet.developer.maxAgentPoliciesWithInactivityTimeout (number?)', + 'xpack.global_search.search_timeout (duration?)', + 'xpack.global_search_bar.input_max_limit (number?)', + 'xpack.graph.canEditDrillDownUrls (boolean?)', + 'xpack.graph.savePolicy (none?|config?|configAndData?|configAndDataWithConsent?)', + 'xpack.ilm.ui.enabled (boolean?)', + 'xpack.index_management.ui.enabled (boolean?)', + 'xpack.infra.sources.default.fields.message (array?)', + 'xpack.index_management.enableTogglingDataRetention (boolean?|never)', /** * Feature flags bellow are conditional based on traditional/serverless offering - * and will all resolve to xpack.infra.featureFlags.* (boolean) */ - 'xpack.infra.featureFlags.metricsExplorerEnabled (any)', - 'xpack.infra.featureFlags.customThresholdAlertsEnabled (any)', - 'xpack.infra.featureFlags.osqueryEnabled (boolean)', - 'xpack.infra.featureFlags.inventoryThresholdAlertRuleEnabled (any)', - 'xpack.infra.featureFlags.metricThresholdAlertRuleEnabled (any)', - 'xpack.infra.featureFlags.logThresholdAlertRuleEnabled (any)', - 'xpack.infra.featureFlags.logsUIEnabled (any)', - 'xpack.infra.featureFlags.alertsAndRulesDropdownEnabled (any)', - 'xpack.infra.featureFlags.profilingEnabled (boolean)', - - 'xpack.index_management.enableIndexActions (any)', - 'xpack.index_management.enableLegacyTemplates (any)', - 'xpack.index_management.enableIndexStats (any)', - 'xpack.index_management.enableDataStreamStats (any)', - 'xpack.index_management.editableIndexSettings (any)', - 'xpack.index_management.enableMappingsSourceFieldSection (any)', - 'xpack.index_management.dev.enableSemanticText (boolean)', - 'xpack.license_management.ui.enabled (boolean)', - 'xpack.maps.preserveDrawingBuffer (boolean)', - 'xpack.maps.showMapsInspectorAdapter (boolean)', + 'xpack.infra.featureFlags.metricsExplorerEnabled (boolean?)', + 'xpack.infra.featureFlags.customThresholdAlertsEnabled (boolean?)', + 'xpack.infra.featureFlags.osqueryEnabled (boolean?)', + 'xpack.infra.featureFlags.inventoryThresholdAlertRuleEnabled (boolean?)', + 'xpack.infra.featureFlags.metricThresholdAlertRuleEnabled (boolean?)', + 'xpack.infra.featureFlags.logThresholdAlertRuleEnabled (boolean?)', + 'xpack.infra.featureFlags.logsUIEnabled (boolean?)', + 'xpack.infra.featureFlags.alertsAndRulesDropdownEnabled (boolean?)', + 'xpack.infra.featureFlags.profilingEnabled (boolean?)', + + 'xpack.index_management.enableIndexActions (boolean?|never)', + 'xpack.index_management.enableLegacyTemplates (boolean?|never)', + 'xpack.index_management.enableIndexStats (boolean?|never)', + 'xpack.index_management.enableDataStreamStats (boolean?|never)', + 'xpack.index_management.editableIndexSettings (all?|limited?|never)', + 'xpack.index_management.enableMappingsSourceFieldSection (boolean?|never)', + 'xpack.index_management.dev.enableSemanticText (boolean?)', + 'xpack.license_management.ui.enabled (boolean?)', + 'xpack.maps.preserveDrawingBuffer (boolean?)', + 'xpack.maps.showMapsInspectorAdapter (boolean?)', 'xpack.ml.ad.enabled (boolean)', 'xpack.ml.dfa.enabled (boolean)', 'xpack.ml.nlp.enabled (boolean)', - 'xpack.osquery.actionEnabled (boolean)', - 'xpack.remote_clusters.ui.enabled (boolean)', + 'xpack.osquery.actionEnabled (boolean?)', + 'xpack.remote_clusters.ui.enabled (boolean?)', /** * NOTE: The Reporting plugin is currently disabled in functional tests (see test/functional/config.base.js). * It will be re-enabled once #102552 is completed. @@ -315,54 +313,54 @@ export default function ({ getService }: PluginFunctionalProviderContext) { // 'xpack.reporting.poll.jobCompletionNotifier.intervalErrorMultiplier (number)', // 'xpack.reporting.poll.jobsRefresh.interval (number)', // 'xpack.reporting.poll.jobsRefresh.intervalErrorMultiplier (number)', - 'xpack.rollup.ui.enabled (boolean)', - 'xpack.saved_object_tagging.cache_refresh_interval (duration)', - 'xpack.search.homepage.ui.enabled (boolean)', - 'xpack.searchInferenceEndpoints.ui.enabled (boolean)', - 'xpack.searchPlayground.ui.enabled (boolean)', - 'xpack.security.loginAssistanceMessage (string)', - 'xpack.security.sameSiteCookies (alternatives)', - 'xpack.security.showInsecureClusterWarning (boolean)', - 'xpack.security.showNavLinks (boolean)', - 'xpack.security.ui (any)', - 'xpack.security.roleManagementEnabled (any)', - 'xpack.spaces.maxSpaces (number)', - 'xpack.spaces.allowFeatureVisibility (any)', - 'xpack.spaces.allowSolutionVisibility (any)', - 'xpack.securitySolution.enableExperimental (array)', - 'xpack.securitySolution.prebuiltRulesPackageVersion (string)', - 'xpack.securitySolution.offeringSettings (record)', - 'xpack.snapshot_restore.slm_ui.enabled (boolean)', - 'xpack.snapshot_restore.ui.enabled (boolean)', - 'xpack.stack_connectors.enableExperimental (array)', - 'xpack.trigger_actions_ui.enableExperimental (array)', - 'xpack.trigger_actions_ui.enableGeoTrackingThresholdAlert (boolean)', - 'xpack.timelines.enableExperimental (array)', - 'xpack.alerting.rules.run.alerts.max (number)', - 'xpack.upgrade_assistant.featureSet.migrateSystemIndices (boolean)', - 'xpack.upgrade_assistant.featureSet.mlSnapshots (boolean)', - 'xpack.upgrade_assistant.featureSet.reindexCorrectiveActions (boolean)', - 'xpack.upgrade_assistant.ui.enabled (boolean)', - 'xpack.observability.unsafe.alertDetails.metrics.enabled (boolean)', - 'xpack.observability.unsafe.alertDetails.logs.enabled (boolean)', - 'xpack.observability.unsafe.alertDetails.uptime.enabled (boolean)', - 'xpack.observability.unsafe.alertDetails.observability.enabled (boolean)', - 'xpack.observability.unsafe.thresholdRule.enabled (any)', // conditional, is actually a boolean - 'xpack.observability_onboarding.ui.enabled (boolean)', - 'xpack.observabilityLogsExplorer.navigation.showAppLink (any)', // conditional, is actually a boolean - 'share.new_version.enabled (boolean)', - 'aiAssistantManagementSelection.preferredAIAssistantType (alternatives)', + 'xpack.rollup.ui.enabled (boolean?)', + 'xpack.saved_object_tagging.cache_refresh_interval (duration?)', + 'xpack.search.homepage.ui.enabled (boolean?)', + 'xpack.searchInferenceEndpoints.ui.enabled (boolean?)', + 'xpack.searchPlayground.ui.enabled (boolean?)', + 'xpack.security.loginAssistanceMessage (string?)', + 'xpack.security.sameSiteCookies (Strict?|Lax?|None?)', + 'xpack.security.showInsecureClusterWarning (boolean?)', + 'xpack.security.showNavLinks (boolean?)', + 'xpack.security.ui (object?|never)', + 'xpack.security.roleManagementEnabled (boolean?|never)', + 'xpack.spaces.maxSpaces (number?)', + 'xpack.spaces.allowFeatureVisibility (false|boolean?)', + 'xpack.spaces.allowSolutionVisibility (false|boolean?)', + 'xpack.securitySolution.enableExperimental (array?)', + 'xpack.securitySolution.prebuiltRulesPackageVersion (string?)', + 'xpack.securitySolution.offeringSettings (record?)', + 'xpack.snapshot_restore.slm_ui.enabled (boolean?)', + 'xpack.snapshot_restore.ui.enabled (boolean?)', + 'xpack.stack_connectors.enableExperimental (array?)', + 'xpack.trigger_actions_ui.enableExperimental (array?)', + 'xpack.trigger_actions_ui.enableGeoTrackingThresholdAlert (boolean?)', + 'xpack.timelines.enableExperimental (array?)', + 'xpack.alerting.rules.run.alerts.max (number?)', + 'xpack.upgrade_assistant.featureSet.migrateSystemIndices (boolean?)', + 'xpack.upgrade_assistant.featureSet.mlSnapshots (boolean?)', + 'xpack.upgrade_assistant.featureSet.reindexCorrectiveActions (boolean?)', + 'xpack.upgrade_assistant.ui.enabled (boolean?)', + 'xpack.observability.unsafe.alertDetails.metrics.enabled (boolean?)', + 'xpack.observability.unsafe.alertDetails.logs.enabled (boolean?)', + 'xpack.observability.unsafe.alertDetails.uptime.enabled (boolean?)', + 'xpack.observability.unsafe.alertDetails.observability.enabled (boolean?)', + 'xpack.observability.unsafe.thresholdRule.enabled (boolean?)', + 'xpack.observability_onboarding.ui.enabled (boolean?)', + 'xpack.observabilityLogsExplorer.navigation.showAppLink (boolean?|never)', + 'share.new_version.enabled (boolean?)', + 'aiAssistantManagementSelection.preferredAIAssistantType (default?|never?|observability?)', /** * Rule form V2 feature flags */ - 'discover.experimental.ruleFormV2Enabled (boolean)', - 'xpack.infra.featureFlags.ruleFormV2Enabled (boolean)', - 'xpack.legacy_uptime.experimental.ruleFormV2Enabled (boolean)', + 'discover.experimental.ruleFormV2Enabled (boolean?)', + 'xpack.infra.featureFlags.ruleFormV2Enabled (boolean?)', + 'xpack.legacy_uptime.experimental.ruleFormV2Enabled (boolean?)', 'xpack.ml.experimental.ruleFormV2.enabled (boolean)', - 'xpack.transform.experimental.ruleFormV2Enabled (boolean)', - 'xpack.apm.featureFlags.ruleFormV2Enabled (boolean)', - 'xpack.observability.unsafe.ruleFormV2.enabled (boolean)', - 'xpack.slo.experimental.ruleFormV2.enabled (boolean)', + 'xpack.transform.experimental.ruleFormV2Enabled (boolean?)', + 'xpack.apm.featureFlags.ruleFormV2Enabled (boolean?)', + 'xpack.observability.unsafe.ruleFormV2.enabled (boolean?)', + 'xpack.slo.experimental.ruleFormV2.enabled (boolean?)', /**/ ]; // We don't assert that actualExposedConfigKeys and expectedExposedConfigKeys are equal, because test failure messages with large @@ -401,37 +399,37 @@ export default function ({ getService }: PluginFunctionalProviderContext) { // what types of config settings can be exposed to the browser. // When plugin owners make a change that exposes additional config values, the changes will be reflected in this test assertion. // Ensure that your change does not unintentionally expose any sensitive values! - 'xpack.security.loginAssistanceMessage (string)', - 'xpack.security.sameSiteCookies (alternatives)', - 'xpack.security.showInsecureClusterWarning (boolean)', - 'xpack.security.showNavLinks (boolean)', - 'xpack.security.ui (any)', - 'xpack.security.roleManagementEnabled (any)', - - 'telemetry.allowChangingOptInStatus (boolean)', - 'telemetry.appendServerlessChannelsSuffix (any)', // It's a boolean (any because schema.conditional) - 'telemetry.banner (boolean)', - 'telemetry.labels.branch (string)', - 'telemetry.labels.ciBuildId (string)', - 'telemetry.labels.ciBuildJobId (string)', - 'telemetry.labels.ciBuildNumber (number)', - 'telemetry.labels.environment (string)', - 'telemetry.labels.ftrConfig (string)', - 'telemetry.labels.gitRev (string)', - 'telemetry.labels.isPr (boolean)', - 'telemetry.labels.journeyName (string)', - 'telemetry.labels.prId (number)', - 'telemetry.labels.testBuildId (string)', - 'telemetry.labels.testJobId (string)', - 'telemetry.labels.ciBuildName (string)', - 'telemetry.labels.performancePhase (string)', - 'telemetry.labels.serverless (any)', // It's the project type (string), claims any because schema.conditional. Can only be set on Serverless. - 'telemetry.hidePrivacyStatement (boolean)', - 'telemetry.optIn (boolean)', - 'telemetry.sendUsageFrom (alternatives)', - 'telemetry.sendUsageTo (any)', - 'usageCollection.uiCounters.debug (boolean)', - 'usageCollection.uiCounters.enabled (boolean)', + 'xpack.security.loginAssistanceMessage (string?)', + 'xpack.security.sameSiteCookies (Strict?|Lax?|None?)', + 'xpack.security.showInsecureClusterWarning (boolean?)', + 'xpack.security.showNavLinks (boolean?)', + 'xpack.security.ui (object?|never)', + 'xpack.security.roleManagementEnabled (boolean?|never)', + + 'telemetry.allowChangingOptInStatus (boolean?)', + 'telemetry.appendServerlessChannelsSuffix (true?|false?)', + 'telemetry.banner (boolean?)', + 'telemetry.labels.branch (string?)', + 'telemetry.labels.ciBuildId (string?)', + 'telemetry.labels.ciBuildJobId (string?)', + 'telemetry.labels.ciBuildNumber (number?)', + 'telemetry.labels.environment (string?)', + 'telemetry.labels.ftrConfig (string?)', + 'telemetry.labels.gitRev (string?)', + 'telemetry.labels.isPr (boolean?)', + 'telemetry.labels.journeyName (string?)', + 'telemetry.labels.prId (number?)', + 'telemetry.labels.testBuildId (string?)', + 'telemetry.labels.testJobId (string?)', + 'telemetry.labels.ciBuildName (string?)', + 'telemetry.labels.performancePhase (string?)', + 'telemetry.labels.serverless (string?|never)', // Can only be set on Serverless. + 'telemetry.hidePrivacyStatement (boolean?)', + 'telemetry.optIn (boolean?)', + 'telemetry.sendUsageFrom (server?|browser?)', + 'telemetry.sendUsageTo (prod?|staging?)', + 'usageCollection.uiCounters.debug (boolean?)', + 'usageCollection.uiCounters.enabled (boolean?)', ]; // We don't assert that actualExposedConfigKeys and expectedExposedConfigKeys are equal, because test failure messages with large // arrays are hard to grok. Instead, we take the difference between the two arrays and assert them separately, that way it's diff --git a/tsconfig.base.json b/tsconfig.base.json index 3bdbb5f015ae9..d063f6a880441 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -784,6 +784,8 @@ "@kbn/entities-data-access-plugin/*": ["x-pack/plugins/observability_solution/entities_data_access/*"], "@kbn/entities-schema": ["x-pack/packages/kbn-entities-schema"], "@kbn/entities-schema/*": ["x-pack/packages/kbn-entities-schema/*"], + "@kbn/entity-manager-fixture-plugin": ["x-pack/test/api_integration/apis/entity_manager/fixture_plugin"], + "@kbn/entity-manager-fixture-plugin/*": ["x-pack/test/api_integration/apis/entity_manager/fixture_plugin/*"], "@kbn/entityManager-plugin": ["x-pack/plugins/observability_solution/entity_manager"], "@kbn/entityManager-plugin/*": ["x-pack/plugins/observability_solution/entity_manager/*"], "@kbn/error-boundary-example-plugin": ["examples/error_boundary"], @@ -1024,6 +1026,8 @@ "@kbn/investigate-app-plugin/*": ["x-pack/plugins/observability_solution/investigate_app/*"], "@kbn/investigate-plugin": ["x-pack/plugins/observability_solution/investigate"], "@kbn/investigate-plugin/*": ["x-pack/plugins/observability_solution/investigate/*"], + "@kbn/investigation-shared": ["packages/kbn-investigation-shared"], + "@kbn/investigation-shared/*": ["packages/kbn-investigation-shared/*"], "@kbn/io-ts-utils": ["packages/kbn-io-ts-utils"], "@kbn/io-ts-utils/*": ["packages/kbn-io-ts-utils/*"], "@kbn/ipynb": ["packages/kbn-ipynb"], diff --git a/x-pack/dev-tools/api_debug/request_from_api.js b/x-pack/dev-tools/api_debug/request_from_api.js index 1363a6a3b244d..ba5cb79ecf471 100644 --- a/x-pack/dev-tools/api_debug/request_from_api.js +++ b/x-pack/dev-tools/api_debug/request_from_api.js @@ -45,7 +45,7 @@ function logHeaders(res) { // use `--headers` to print the response headers const headers = res.headers.raw(); for (const key in headers) { - if (headers.hasOwnProperty(key)) { + if (Object.hasOwn(headers, key)) { console.log(`${key}: ${headers[key]}`); } } diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/action_type_selector_modal.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/action_type_selector_modal.tsx index 83437bb7dc69b..9e019d10140a4 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/action_type_selector_modal.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_selector_inline/action_type_selector_modal.tsx @@ -41,7 +41,7 @@ export const ActionTypeSelectorModal = React.memo( ({ actionTypes, actionTypeRegistry, onClose, onSelect, actionTypeSelectorInline }: Props) => { const content = useMemo( () => ( - + {actionTypes?.map((actionType: ActionType) => { const fullAction = actionTypeRegistry.get(actionType.id); return ( diff --git a/x-pack/packages/kbn-entities-schema/src/schema/entity.test.ts b/x-pack/packages/kbn-entities-schema/src/schema/entity.test.ts new file mode 100644 index 0000000000000..c8ef716371338 --- /dev/null +++ b/x-pack/packages/kbn-entities-schema/src/schema/entity.test.ts @@ -0,0 +1,76 @@ +/* + * 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 { entityLatestSchema, entityMetadataSchema } from './entity'; + +const entity = { + entity: { + lastSeenTimestamp: '2024-08-06T17:03:50.722Z', + schemaVersion: 'v1', + definitionVersion: '999.999.999', + displayName: 'message_processor', + identityFields: ['log.logger', 'event.category'], + id: '6UHVPiduEC2qk6rMjs1Jzg==', + metrics: { + logRate: 100, + errorRate: 0, + }, + type: 'service', + firstSeenTimestamp: '2024-08-06T16:50:00.000Z', + definitionId: 'admin-console-services', + }, +}; + +const metadata = { + host: { + os: { + name: [], + }, + name: [ + 'message_processor.prod.002', + 'message_processor.prod.001', + 'message_processor.prod.010', + 'message_processor.prod.006', + 'message_processor.prod.005', + 'message_processor.prod.004', + 'message_processor.prod.003', + 'message_processor.prod.009', + 'message_processor.prod.008', + 'message_processor.prod.007', + ], + }, + event: { + ingested: '2024-08-06T17:06:24.444700Z', + category: '', + }, + sourceIndex: ['kbn-data-forge-fake_stack.message_processor-2024-08-01'], + log: { + logger: 'message_processor', + }, + tags: ['infra:message_processor'], +}; + +describe('Entity Schemas', () => { + describe('entityMetadataSchema', () => { + it('should parse metadata object', () => { + const results = entityMetadataSchema.safeParse(metadata); + expect(results).toHaveProperty('success', true); + }); + }); + + describe('entitySummarySchema', () => { + it('should parse an entity with metadata', () => { + const doc = { + ...entity, + ...metadata, + }; + + const result = entityLatestSchema.safeParse(doc); + expect(result).toHaveProperty('success', true); + }); + }); +}); diff --git a/x-pack/packages/kbn-entities-schema/src/schema/entity.ts b/x-pack/packages/kbn-entities-schema/src/schema/entity.ts index 58a9c011091b4..44d08325e9b9f 100644 --- a/x-pack/packages/kbn-entities-schema/src/schema/entity.ts +++ b/x-pack/packages/kbn-entities-schema/src/schema/entity.ts @@ -8,24 +8,42 @@ import { z } from 'zod'; import { arrayOfStringsSchema } from './common'; -const entitySchema = z.object({ - entity: z.object({ - id: z.string(), - identityFields: arrayOfStringsSchema, - displayName: z.string(), - metrics: z.record(z.string(), z.number()), - }), +export const entityBaseSchema = z.object({ + id: z.string(), + type: z.string(), + identityFields: arrayOfStringsSchema, + displayName: z.string(), + metrics: z.record(z.string(), z.number()), + definitionVersion: z.string(), + schemaVersion: z.string(), + definitionId: z.string(), }); -export const entitySummarySchema = z.intersection( - entitySchema.extend({ - lastSeenTimestamp: z.string(), - firstSeenTimestamp: z.string(), - }), - z.record(z.string(), z.string().or(z.number())) -); +export interface MetadataRecord { + [key: string]: string[] | MetadataRecord | string; +} -export const entityHistorySchema = z.intersection( - entitySchema.extend({ ['@timestamp']: z.string() }), - z.record(z.string(), z.string().or(z.number())) +const literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]); +type Literal = z.infer; +type Metadata = Literal | { [key: string]: Metadata } | Metadata[]; +export const entityMetadataSchema: z.ZodType = z.lazy(() => + z.union([literalSchema, z.array(entityMetadataSchema), z.record(entityMetadataSchema)]) ); + +export const entityLatestSchema = z + .object({ + entity: entityBaseSchema.merge( + z.object({ + lastSeenTimestamp: z.string(), + firstSeenTimestamp: z.string(), + }) + ), + }) + .and(entityMetadataSchema); + +export const entityHistorySchema = z + .object({ + '@timestamp': z.string(), + entity: entityBaseSchema, + }) + .and(entityMetadataSchema); diff --git a/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts b/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts index bcb26cf8818db..8ff710adc1e62 100644 --- a/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts +++ b/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts @@ -48,6 +48,15 @@ export const entityDefinitionSchema = z.object({ ), }) ), + installStatus: z.optional( + z.union([ + z.literal('installing'), + z.literal('upgrading'), + z.literal('installed'), + z.literal('failed'), + ]) + ), + installStartedAt: z.optional(z.string()), }); export type EntityDefinition = z.infer; diff --git a/x-pack/packages/ml/data_grid/lib/common.ts b/x-pack/packages/ml/data_grid/lib/common.ts index 54a1f08ef6242..82c6cfa618174 100644 --- a/x-pack/packages/ml/data_grid/lib/common.ts +++ b/x-pack/packages/ml/data_grid/lib/common.ts @@ -368,11 +368,11 @@ export const useRenderCellValue = ( } function getCellValue(cId: string) { - if (tableItems.hasOwnProperty(adjustedRowIndex)) { + if (Object.hasOwn(tableItems, adjustedRowIndex)) { const item = tableItems[adjustedRowIndex]; // Try if the field name is available as is. - if (item.hasOwnProperty(cId)) { + if (Object.hasOwn(item, cId)) { return item[cId]; } diff --git a/x-pack/packages/ml/url_state/src/url_state.tsx b/x-pack/packages/ml/url_state/src/url_state.tsx index 585761b93cce3..4fd5dfe6e0538 100644 --- a/x-pack/packages/ml/url_state/src/url_state.tsx +++ b/x-pack/packages/ml/url_state/src/url_state.tsx @@ -124,7 +124,7 @@ export const UrlStateProvider: FC> = ({ children }) = const urlState = parseUrlState(prevSearchString); const parsedQueryString = parse(prevSearchString, { sort: false }); - if (!Object.prototype.hasOwnProperty.call(urlState, accessor)) { + if (!Object.hasOwn(urlState, accessor)) { urlState[accessor] = {}; } diff --git a/x-pack/packages/security-solution/data_table/mock/mock_source.ts b/x-pack/packages/security-solution/data_table/mock/mock_source.ts index 467bbfc01dc51..2260cd7ab831b 100644 --- a/x-pack/packages/security-solution/data_table/mock/mock_source.ts +++ b/x-pack/packages/security-solution/data_table/mock/mock_source.ts @@ -5,7 +5,6 @@ * 2.0. */ -import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { BrowserFields } from '@kbn/timelines-plugin/common'; export const mockBrowserFields: BrowserFields = { @@ -316,12 +315,3 @@ export const mockBrowserFields: BrowserFields = { }, }, }; - -export const mockRuntimeMappings: MappingRuntimeFields = { - '@a.runtime.field': { - script: { - source: 'emit("Radical dude: " + doc[\'host.name\'].value)', - }, - type: 'keyword', - }, -}; diff --git a/x-pack/packages/security-solution/features/config.ts b/x-pack/packages/security-solution/features/config.ts index 8f36393ffd530..9fa14ab0ba7c2 100644 --- a/x-pack/packages/security-solution/features/config.ts +++ b/x-pack/packages/security-solution/features/config.ts @@ -8,5 +8,6 @@ export { securityDefaultProductFeaturesConfig } from './src/security/product_feature_config'; export { getCasesDefaultProductFeaturesConfig } from './src/cases/product_feature_config'; export { assistantDefaultProductFeaturesConfig } from './src/assistant/product_feature_config'; +export { attackDiscoveryDefaultProductFeaturesConfig } from './src/attack_discovery/product_feature_config'; export { createEnabledProductFeaturesConfigMap } from './src/helpers'; diff --git a/x-pack/packages/security-solution/features/product_features.ts b/x-pack/packages/security-solution/features/product_features.ts index b9209441cff85..b2c524ff6de1d 100644 --- a/x-pack/packages/security-solution/features/product_features.ts +++ b/x-pack/packages/security-solution/features/product_features.ts @@ -8,3 +8,4 @@ export { getSecurityFeature } from './src/security'; export { getCasesFeature } from './src/cases'; export { getAssistantFeature } from './src/assistant'; +export { getAttackDiscoveryFeature } from './src/attack_discovery'; diff --git a/x-pack/packages/security-solution/features/src/attack_discovery/index.ts b/x-pack/packages/security-solution/features/src/attack_discovery/index.ts new file mode 100644 index 0000000000000..c72485c8f229e --- /dev/null +++ b/x-pack/packages/security-solution/features/src/attack_discovery/index.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 { getAttackDiscoveryBaseKibanaFeature } from './kibana_features'; +import type { ProductFeatureParams } from '../types'; + +export const getAttackDiscoveryFeature = (): ProductFeatureParams => ({ + baseKibanaFeature: getAttackDiscoveryBaseKibanaFeature(), + baseKibanaSubFeatureIds: [], + subFeaturesMap: new Map(), +}); diff --git a/x-pack/packages/security-solution/features/src/attack_discovery/kibana_features.ts b/x-pack/packages/security-solution/features/src/attack_discovery/kibana_features.ts new file mode 100644 index 0000000000000..130ee907b8e83 --- /dev/null +++ b/x-pack/packages/security-solution/features/src/attack_discovery/kibana_features.ts @@ -0,0 +1,48 @@ +/* + * 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 { DEFAULT_APP_CATEGORIES } from '@kbn/core-application-common'; +import { i18n } from '@kbn/i18n'; + +import { APP_ID, ATTACK_DISCOVERY_FEATURE_ID } from '../constants'; +import { type BaseKibanaFeatureConfig } from '../types'; + +export const getAttackDiscoveryBaseKibanaFeature = (): BaseKibanaFeatureConfig => ({ + id: ATTACK_DISCOVERY_FEATURE_ID, + name: i18n.translate( + 'securitySolutionPackages.features.featureRegistry.linkSecuritySolutionAttackDiscoveryTitle', + { + defaultMessage: 'Attack discovery', + } + ), + order: 1100, + category: DEFAULT_APP_CATEGORIES.security, + app: [ATTACK_DISCOVERY_FEATURE_ID, 'kibana'], + catalogue: [APP_ID], + minimumLicense: 'enterprise', + privileges: { + all: { + api: ['elasticAssistant'], + app: [ATTACK_DISCOVERY_FEATURE_ID, 'kibana'], + catalogue: [APP_ID], + savedObject: { + all: [], + read: [], + }, + ui: [], + }, + read: { + // No read-only mode currently supported + disabled: true, + savedObject: { + all: [], + read: [], + }, + ui: [], + }, + }, +}); diff --git a/x-pack/packages/security-solution/features/src/attack_discovery/product_feature_config.ts b/x-pack/packages/security-solution/features/src/attack_discovery/product_feature_config.ts new file mode 100644 index 0000000000000..94af601307849 --- /dev/null +++ b/x-pack/packages/security-solution/features/src/attack_discovery/product_feature_config.ts @@ -0,0 +1,33 @@ +/* + * 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 { ProductFeatureAttackDiscoveryKey } from '../product_features_keys'; +import type { ProductFeatureKibanaConfig } from '../types'; + +/** + * App features privileges configuration for the Attack discovery feature. + * These are the configs that are shared between both offering types (ess and serverless). + * They can be extended on each offering plugin to register privileges using different way on each offering type. + * + * Privileges can be added in different ways: + * - `privileges`: the privileges that will be added directly into the main Security feature. + * - `subFeatureIds`: the ids of the sub-features that will be added into the Security subFeatures entry. + * - `subFeaturesPrivileges`: the privileges that will be added into the existing Security subFeature with the privilege `id` specified. + */ +export const attackDiscoveryDefaultProductFeaturesConfig: Record< + ProductFeatureAttackDiscoveryKey, + ProductFeatureKibanaConfig +> = { + [ProductFeatureAttackDiscoveryKey.attackDiscovery]: { + privileges: { + all: { + ui: ['attack-discovery'], + }, + }, + subFeatureIds: [], + }, +}; diff --git a/x-pack/packages/security-solution/features/src/constants.ts b/x-pack/packages/security-solution/features/src/constants.ts index c92376fd36209..5027a7c8d393b 100644 --- a/x-pack/packages/security-solution/features/src/constants.ts +++ b/x-pack/packages/security-solution/features/src/constants.ts @@ -11,6 +11,7 @@ export const SERVER_APP_ID = 'siem' as const; export const CASES_FEATURE_ID = 'securitySolutionCases' as const; export const ASSISTANT_FEATURE_ID = 'securitySolutionAssistant' as const; +export const ATTACK_DISCOVERY_FEATURE_ID = 'securitySolutionAttackDiscovery' as const; // Same as the plugin id defined by Cloud Security Posture export const CLOUD_POSTURE_APP_ID = 'csp' as const; diff --git a/x-pack/packages/security-solution/features/src/product_features_keys.ts b/x-pack/packages/security-solution/features/src/product_features_keys.ts index 9f1a268b6f674..2bb8cdc0f1e9f 100644 --- a/x-pack/packages/security-solution/features/src/product_features_keys.ts +++ b/x-pack/packages/security-solution/features/src/product_features_keys.ts @@ -93,17 +93,26 @@ export enum ProductFeatureAssistantKey { assistant = 'assistant', } +export enum ProductFeatureAttackDiscoveryKey { + /** + * Enables Attack discovery + */ + attackDiscovery = 'attack_discovery', +} + // Merges the two enums. export const ProductFeatureKey = { ...ProductFeatureSecurityKey, ...ProductFeatureCasesKey, ...ProductFeatureAssistantKey, + ...ProductFeatureAttackDiscoveryKey, }; // We need to merge the value and the type and export both to replicate how enum works. export type ProductFeatureKeyType = | ProductFeatureSecurityKey | ProductFeatureCasesKey - | ProductFeatureAssistantKey; + | ProductFeatureAssistantKey + | ProductFeatureAttackDiscoveryKey; export const ALL_PRODUCT_FEATURE_KEYS = Object.freeze(Object.values(ProductFeatureKey)); diff --git a/x-pack/packages/security-solution/features/src/types.ts b/x-pack/packages/security-solution/features/src/types.ts index 29778ed8cad7b..17e4869fa66f1 100644 --- a/x-pack/packages/security-solution/features/src/types.ts +++ b/x-pack/packages/security-solution/features/src/types.ts @@ -13,6 +13,7 @@ import type { import type { RecursivePartial } from '@kbn/utility-types'; import type { ProductFeatureAssistantKey, + ProductFeatureAttackDiscoveryKey, ProductFeatureCasesKey, ProductFeatureKeyType, ProductFeatureSecurityKey, @@ -51,6 +52,11 @@ export type ProductFeaturesAssistantConfig = Map< ProductFeatureKibanaConfig >; +export type ProductFeaturesAttackDiscoveryConfig = Map< + ProductFeatureAttackDiscoveryKey, + ProductFeatureKibanaConfig +>; + export type AppSubFeaturesMap = Map; export interface ProductFeatureParams { diff --git a/x-pack/packages/security-solution/upselling/pages/attack_discovery/index.test.tsx b/x-pack/packages/security-solution/upselling/pages/attack_discovery/index.test.tsx new file mode 100644 index 0000000000000..3301f27c74079 --- /dev/null +++ b/x-pack/packages/security-solution/upselling/pages/attack_discovery/index.test.tsx @@ -0,0 +1,56 @@ +/* + * 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 { render, screen } from '@testing-library/react'; +import React from 'react'; + +import { AttackDiscoveryUpsellingPage } from '.'; + +const availabilityMessage = 'This feature is available...'; +const upgradeMessage = 'Please upgrade...'; + +const mockActions =
; + +jest.mock('@kbn/security-solution-navigation', () => { + const original = jest.requireActual('@kbn/security-solution-navigation'); + return { + ...original, + useNavigation: () => ({ + navigateTo: jest.fn(), + }), + }; +}); + +describe('AttackDiscoveryUpsellingPage', () => { + beforeEach(() => { + render( + + ); + }); + + it('renders the availability message', () => { + const attackDiscoveryIsAvailable = screen.getByTestId('availabilityMessage'); + + expect(attackDiscoveryIsAvailable).toHaveTextContent(availabilityMessage); + }); + + it('renders the upgrade message', () => { + const pleaseUpgrade = screen.getByTestId('upgradeMessage'); + + expect(pleaseUpgrade).toHaveTextContent(upgradeMessage); + }); + + it('renders the actions', () => { + const actions = screen.getByTestId('mockActions'); + + expect(actions).toBeInTheDocument(); + }); +}); diff --git a/x-pack/packages/security-solution/upselling/pages/attack_discovery/index.tsx b/x-pack/packages/security-solution/upselling/pages/attack_discovery/index.tsx new file mode 100644 index 0000000000000..7d3353e6431e7 --- /dev/null +++ b/x-pack/packages/security-solution/upselling/pages/attack_discovery/index.tsx @@ -0,0 +1,48 @@ +/* + * 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 { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; +import { EuiPageHeader, EuiSpacer } from '@elastic/eui'; +import React, { useMemo } from 'react'; + +import { PageTitle } from './page_title'; +import { AttackDiscoveryUpsellingSection } from '../../sections/attack_discovery'; + +interface Props { + actions?: React.ReactNode; + availabilityMessage: string; + upgradeMessage: string; +} + +/** + * This component handles the styling of the _page_ that hosts the `AttackDiscoveryUpsellingSection` + */ +const AttackDiscoveryUpsellingPageComponent: React.FC = ({ + actions, + availabilityMessage, + upgradeMessage, +}) => { + const pageTitle = useMemo(() => , []); + + return ( + + + + + + + + ); +}; + +AttackDiscoveryUpsellingPageComponent.displayName = 'AttackDiscoveryUpsellingPage'; + +export const AttackDiscoveryUpsellingPage = React.memo(AttackDiscoveryUpsellingPageComponent); diff --git a/x-pack/packages/security-solution/upselling/pages/attack_discovery/page_title/index.test.tsx b/x-pack/packages/security-solution/upselling/pages/attack_discovery/page_title/index.test.tsx new file mode 100644 index 0000000000000..630000cecd5be --- /dev/null +++ b/x-pack/packages/security-solution/upselling/pages/attack_discovery/page_title/index.test.tsx @@ -0,0 +1,30 @@ +/* + * 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 { render, screen } from '@testing-library/react'; +import React from 'react'; + +import { PageTitle } from '.'; +import { ATTACK_DISCOVERY_PAGE_TITLE } from './translations'; + +describe('PageTitle', () => { + beforeEach(() => { + render(); + }); + + it('renders the expected title', () => { + const attackDiscoveryPageTitle = screen.getByTestId('attackDiscoveryPageTitle'); + + expect(attackDiscoveryPageTitle).toHaveTextContent(ATTACK_DISCOVERY_PAGE_TITLE); + }); + + it('renders the beta badge icon', () => { + const betaBadge = screen.getByTestId('betaBadge'); + + expect(betaBadge).toBeInTheDocument(); + }); +}); diff --git a/x-pack/packages/security-solution/upselling/pages/attack_discovery/page_title/index.tsx b/x-pack/packages/security-solution/upselling/pages/attack_discovery/page_title/index.tsx new file mode 100644 index 0000000000000..564488a0264ee --- /dev/null +++ b/x-pack/packages/security-solution/upselling/pages/attack_discovery/page_title/index.tsx @@ -0,0 +1,52 @@ +/* + * 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 { EuiBetaBadge, EuiFlexGroup, EuiFlexItem, EuiTitle, useEuiTheme } from '@elastic/eui'; +import { css } from '@emotion/react'; +import React from 'react'; + +import * as i18n from './translations'; + +const PageTitleComponent: React.FC = () => { + const { euiTheme } = useEuiTheme(); + + return ( + + + +

{i18n.ATTACK_DISCOVERY_PAGE_TITLE}

+
+
+ + + + +
+ ); +}; + +PageTitleComponent.displayName = 'PageTitle'; + +export const PageTitle = React.memo(PageTitleComponent); diff --git a/x-pack/packages/security-solution/upselling/pages/attack_discovery/page_title/translations.ts b/x-pack/packages/security-solution/upselling/pages/attack_discovery/page_title/translations.ts new file mode 100644 index 0000000000000..7b3f3400e0443 --- /dev/null +++ b/x-pack/packages/security-solution/upselling/pages/attack_discovery/page_title/translations.ts @@ -0,0 +1,30 @@ +/* + * 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 ATTACK_DISCOVERY_PAGE_TITLE = i18n.translate( + 'securitySolutionPackages.upselling.pages.attackDiscovery.pageTitle.pageTitle', + { + defaultMessage: 'Attack discovery', + } +); + +export const BETA = i18n.translate( + 'securitySolutionPackages.upselling.pages.attackDiscovery.pageTitle.betaBadge', + { + defaultMessage: 'Technical preview', + } +); + +export const BETA_TOOLTIP = i18n.translate( + 'securitySolutionPackages.upselling.pages.attackDiscovery.pageTitle.betaTooltip', + { + defaultMessage: + 'This functionality is in technical preview and is subject to change. Please use Attack Discovery with caution in production environments.', + } +); diff --git a/x-pack/packages/security-solution/upselling/sections/attack_discovery/assistant_avatar/assistant_avatar.tsx b/x-pack/packages/security-solution/upselling/sections/attack_discovery/assistant_avatar/assistant_avatar.tsx new file mode 100644 index 0000000000000..626c3a4126334 --- /dev/null +++ b/x-pack/packages/security-solution/upselling/sections/attack_discovery/assistant_avatar/assistant_avatar.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 React from 'react'; + +interface Props { + className?: string; + size?: keyof typeof sizeMap; +} + +export const sizeMap = { + xl: 64, + l: 48, + m: 32, + s: 24, + xs: 16, + xxs: 12, +}; + +/** + * Default Elastic AI Assistant logo + * + * TODO: This may be removed when the logo is added to EUI + */ +export const AssistantAvatar = ({ className, size = 's' }: Props) => ( + + + + + + +); diff --git a/x-pack/packages/security-solution/upselling/sections/attack_discovery/index.test.tsx b/x-pack/packages/security-solution/upselling/sections/attack_discovery/index.test.tsx new file mode 100644 index 0000000000000..85795ae1195e1 --- /dev/null +++ b/x-pack/packages/security-solution/upselling/sections/attack_discovery/index.test.tsx @@ -0,0 +1,61 @@ +/* + * 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 { render, screen } from '@testing-library/react'; +import React from 'react'; + +import { AttackDiscoveryUpsellingSection } from '.'; +import { FIND_POTENTIAL_ATTACKS_WITH_AI } from './translations'; + +const availabilityMessage = 'Serverless or self-managed-specific availability message'; +const upgradeMessage = 'Serverless or self-managed-specific upgrade message'; + +const mockActions = ( +
{'typically call to action buttons or links'}
+); + +describe('AttackDiscoveryUpsellingSection', () => { + beforeEach(() => { + render( + + ); + }); + + it('renders the assistant avatar', () => { + const assistantAvatar = screen.getByTestId('assistantAvatar'); + + expect(assistantAvatar).toBeInTheDocument(); + }); + + it('renders the expected upgrade title', () => { + const upgradeTitle = screen.getByTestId('upgradeTitle'); + + expect(upgradeTitle).toHaveTextContent(FIND_POTENTIAL_ATTACKS_WITH_AI); + }); + + it('renders the expected availability message', () => { + const attackDiscoveryIsAvailable = screen.getByTestId('availabilityMessage'); + + expect(attackDiscoveryIsAvailable).toHaveTextContent(availabilityMessage); + }); + + it('renders the expected upgrade message', () => { + const pleaseUpgrade = screen.getByTestId('upgradeMessage'); + + expect(pleaseUpgrade).toHaveTextContent(upgradeMessage); + }); + + it('renders the actions', () => { + const actions = screen.getByTestId('mockActions'); + + expect(actions).toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/index.tsx b/x-pack/packages/security-solution/upselling/sections/attack_discovery/index.tsx similarity index 63% rename from x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/index.tsx rename to x-pack/packages/security-solution/upselling/sections/attack_discovery/index.tsx index bf2cd241408a1..0c6a12c88d7fd 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/index.tsx +++ b/x-pack/packages/security-solution/upselling/sections/attack_discovery/index.tsx @@ -5,15 +5,27 @@ * 2.0. */ -import { AssistantAvatar, UpgradeButtons, useAssistantContext } from '@kbn/elastic-assistant'; import { EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText } from '@elastic/eui'; import React, { useMemo } from 'react'; +import { AssistantAvatar } from './assistant_avatar/assistant_avatar'; import * as i18n from './translations'; -const UpgradeComponent: React.FC = () => { - const { http } = useAssistantContext(); +interface Props { + actions?: React.ReactNode; + availabilityMessage: string; + upgradeMessage: string; +} +/** + * This `section` component handles (just) the styling of the upselling message + * (by itself, without the page wrapper) + */ +const AttackDiscoveryUpsellingSectionComponent: React.FC = ({ + actions, + availabilityMessage, + upgradeMessage, +}) => { const title = useMemo( () => ( @@ -38,33 +50,24 @@ const UpgradeComponent: React.FC = () => { () => ( - - {i18n.ATTACK_DISCOVERY_IS_AVAILABLE} + + {availabilityMessage} - - {i18n.PLEASE_UPGRADE} + + {upgradeMessage} ), - [] - ); - - const actions = useMemo( - () => ( - - - - - - ), - [http.basePath] + [availabilityMessage, upgradeMessage] ); return ; }; -export const Upgrade = React.memo(UpgradeComponent); +AttackDiscoveryUpsellingSectionComponent.displayName = 'AttackDiscoveryUpsellingSection'; + +export const AttackDiscoveryUpsellingSection = React.memo(AttackDiscoveryUpsellingSectionComponent); diff --git a/x-pack/packages/security-solution/upselling/sections/attack_discovery/translations.ts b/x-pack/packages/security-solution/upselling/sections/attack_discovery/translations.ts new file mode 100644 index 0000000000000..776aa19ebf207 --- /dev/null +++ b/x-pack/packages/security-solution/upselling/sections/attack_discovery/translations.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 { i18n } from '@kbn/i18n'; + +export const FIND_POTENTIAL_ATTACKS_WITH_AI = i18n.translate( + 'securitySolutionPackages.upselling.sections.attackDiscovery.findPotentialAttacksWithAiTitle', + { + defaultMessage: 'Find potential attacks with AI', + } +); diff --git a/x-pack/plugins/actions/server/index.ts b/x-pack/plugins/actions/server/index.ts index ef1c277ff049b..1d5aa22ba07cf 100644 --- a/x-pack/plugins/actions/server/index.ts +++ b/x-pack/plugins/actions/server/index.ts @@ -61,8 +61,8 @@ export const config: PluginConfigDescriptor = { if ( customHostSettings.find( (customHostSchema: CustomHostSettings) => - customHostSchema.hasOwnProperty('ssl') && - customHostSchema.ssl?.hasOwnProperty('rejectUnauthorized') + Object.hasOwn(customHostSchema, 'ssl') && + Object.hasOwn(customHostSchema.ssl ?? {}, 'rejectUnauthorized') ) ) { addDeprecation({ @@ -93,7 +93,7 @@ export const config: PluginConfigDescriptor = { }, (settings, fromPath, addDeprecation) => { const actions = get(settings, fromPath); - if (actions?.hasOwnProperty('rejectUnauthorized')) { + if (Object.hasOwn(actions ?? {}, 'rejectUnauthorized')) { addDeprecation({ level: 'warning', configPath: `${fromPath}.rejectUnauthorized`, @@ -121,7 +121,7 @@ export const config: PluginConfigDescriptor = { }, (settings, fromPath, addDeprecation) => { const actions = get(settings, fromPath); - if (actions?.hasOwnProperty('proxyRejectUnauthorizedCertificates')) { + if (Object.hasOwn(actions ?? {}, 'proxyRejectUnauthorizedCertificates')) { addDeprecation({ level: 'warning', configPath: `${fromPath}.proxyRejectUnauthorizedCertificates`, diff --git a/x-pack/plugins/actions/server/lib/mustache_renderer.ts b/x-pack/plugins/actions/server/lib/mustache_renderer.ts index bd35e499fb426..06f067493468b 100644 --- a/x-pack/plugins/actions/server/lib/mustache_renderer.ts +++ b/x-pack/plugins/actions/server/lib/mustache_renderer.ts @@ -104,7 +104,7 @@ function buildObject(key: string, value: unknown) { function addToStringDeep(object: unknown): void { // for objects, add a toString method, and then walk if (isNonNullObject(object)) { - if (!object.hasOwnProperty('toString')) { + if (!Object.hasOwn(object, 'toString')) { object.toString = () => JSON.stringify(object); } Object.values(object).forEach((value) => addToStringDeep(value)); diff --git a/x-pack/plugins/actions/server/saved_objects/actions_migrations.ts b/x-pack/plugins/actions/server/saved_objects/actions_migrations.ts index f785fa9ee4ac9..77eef6457e0e5 100644 --- a/x-pack/plugins/actions/server/saved_objects/actions_migrations.ts +++ b/x-pack/plugins/actions/server/saved_objects/actions_migrations.ts @@ -42,7 +42,7 @@ export function getActionsMigrations( const migrationActionsTen = createEsoMigration( encryptedSavedObjects, (doc): doc is SavedObjectUnsanitizedDoc => - doc.attributes.config?.hasOwnProperty('casesConfiguration') || + Object.hasOwn(doc.attributes.config ?? {}, 'casesConfiguration') || doc.attributes.actionTypeId === '.email', pipeMigrations(renameCasesConfigurationObject, addHasAuthConfigurationObject) ); @@ -50,8 +50,8 @@ export function getActionsMigrations( const migrationActionsEleven = createEsoMigration( encryptedSavedObjects, (doc): doc is SavedObjectUnsanitizedDoc => - doc.attributes.config?.hasOwnProperty('isCaseOwned') || - doc.attributes.config?.hasOwnProperty('incidentConfiguration') || + Object.hasOwn(doc.attributes.config ?? {}, 'isCaseOwned') || + Object.hasOwn(doc.attributes.config ?? {}, 'incidentConfiguration') || doc.attributes.actionTypeId === '.webhook', pipeMigrations(removeCasesFieldMappings, addHasAuthConfigurationObject) ); @@ -142,8 +142,8 @@ function removeCasesFieldMappings( doc: SavedObjectUnsanitizedDoc ): SavedObjectUnsanitizedDoc { if ( - !doc.attributes.config?.hasOwnProperty('isCaseOwned') && - !doc.attributes.config?.hasOwnProperty('incidentConfiguration') + !Object.hasOwn(doc.attributes.config ?? {}, 'isCaseOwned') && + !Object.hasOwn(doc.attributes.config ?? {}, 'incidentConfiguration') ) { return doc; } diff --git a/x-pack/plugins/aiops/public/application/utils/search_utils.ts b/x-pack/plugins/aiops/public/application/utils/search_utils.ts index a561fbbca4864..533303436fa92 100644 --- a/x-pack/plugins/aiops/public/application/utils/search_utils.ts +++ b/x-pack/plugins/aiops/public/application/utils/search_utils.ts @@ -160,7 +160,7 @@ export function getEsQueryFromSavedSearch({ if (Array.isArray(savedQuery.bool.filter) && timeField !== undefined) { savedQuery.bool.filter = savedQuery.bool.filter.filter( (c: QueryDslQueryContainer) => - !(c.hasOwnProperty('range') && c.range?.hasOwnProperty(timeField)) + !(Object.hasOwn(c, 'range') && Object.hasOwn(c.range ?? {}, timeField)) ); } return { diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table_groups.tsx b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table_groups.tsx index 7f9df2468acf7..905ac53b149ca 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table_groups.tsx +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/log_rate_analysis_results_table_groups.tsx @@ -345,7 +345,7 @@ export const LogRateAnalysisResultsGroupsTable: FC diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/use_columns.tsx b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/use_columns.tsx index 9de3e25cf2576..637aa0dc69b39 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/use_columns.tsx +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis_results_table/use_columns.tsx @@ -596,7 +596,7 @@ export const useColumns = ( for (const columnName in columnNamesToReturn) { if ( - columnNamesToReturn.hasOwnProperty(columnName) === false || + Object.hasOwn(columnNamesToReturn, columnName) === false || skippedColumns.includes(columnNamesToReturn[columnName as ColumnNames] as string) || ((columnName === 'p-value' || columnName === 'Impact') && zeroDocsFallback) ) 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 42031c9ceeeac..162cdb3cd21fb 100644 --- a/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts +++ b/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts @@ -429,7 +429,7 @@ export class AlertsClient< // See if there's an existing active alert document if (!!activeAlerts[id]) { if ( - this.fetchedAlerts.data.hasOwnProperty(id) && + Object.hasOwn(this.fetchedAlerts.data, id) && get(this.fetchedAlerts.data[id], ALERT_STATUS) === 'active' ) { const isImproving = isAlertImproving< @@ -491,7 +491,7 @@ export class AlertsClient< for (const id of keys(recoveredAlertsToReturn)) { // See if there's an existing alert document // If there is not, log an error because there should be - if (this.fetchedAlerts.data.hasOwnProperty(id)) { + if (Object.hasOwn(this.fetchedAlerts.data, id)) { recoveredAlertsToIndex.push( currentRecoveredAlerts[id] ? buildRecoveredAlert< diff --git a/x-pack/plugins/alerting/server/alerts_client/legacy_alerts_client.ts b/x-pack/plugins/alerting/server/alerts_client/legacy_alerts_client.ts index c3ff97c645520..3a1838342c5d6 100644 --- a/x-pack/plugins/alerting/server/alerts_client/legacy_alerts_client.ts +++ b/x-pack/plugins/alerting/server/alerts_client/legacy_alerts_client.ts @@ -229,7 +229,7 @@ export class LegacyAlertsClient< public getProcessedAlerts( type: 'new' | 'active' | 'activeCurrent' | 'recovered' | 'recoveredCurrent' ) { - if (this.processedAlerts.hasOwnProperty(type)) { + if (Object.hasOwn(this.processedAlerts, type)) { return this.processedAlerts[type]; } diff --git a/x-pack/plugins/alerting/server/integration_tests/__snapshots__/serverless_upgrade_and_rollback_checks.test.ts.snap b/x-pack/plugins/alerting/server/integration_tests/__snapshots__/serverless_upgrade_and_rollback_checks.test.ts.snap index 932daa1fed69d..c84a3565d48f6 100644 --- a/x-pack/plugins/alerting/server/integration_tests/__snapshots__/serverless_upgrade_and_rollback_checks.test.ts.snap +++ b/x-pack/plugins/alerting/server/integration_tests/__snapshots__/serverless_upgrade_and_rollback_checks.test.ts.snap @@ -5619,12 +5619,6 @@ Object { }, "name": "custom", }, - Object { - "args": Object { - "method": [Function], - }, - "name": "custom", - }, ], "type": "string", }, @@ -5639,6 +5633,12 @@ Object { }, "name": "custom", }, + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, ], "type": "string", }, diff --git a/x-pack/plugins/alerting/server/lib/process_alerts.ts b/x-pack/plugins/alerting/server/lib/process_alerts.ts index 628beebbe772e..2fef33636441d 100644 --- a/x-pack/plugins/alerting/server/lib/process_alerts.ts +++ b/x-pack/plugins/alerting/server/lib/process_alerts.ts @@ -105,7 +105,7 @@ function processAlertsHelper< const recoveredAlerts: Record> = {}; for (const id in alerts) { - if (alerts.hasOwnProperty(id)) { + if (Object.hasOwn(alerts, id)) { // alerts with scheduled actions are considered "active" if (alerts[id].hasScheduledActions()) { activeAlerts[id] = alerts[id]; @@ -209,8 +209,8 @@ function processAlertsLimitReached< // update duration for existing alerts for (const id in activeAlerts) { - if (activeAlerts.hasOwnProperty(id)) { - if (alerts.hasOwnProperty(id)) { + if (Object.hasOwn(activeAlerts, id)) { + if (Object.hasOwn(alerts, id)) { activeAlerts[id] = alerts[id]; } const state = existingAlerts[id].getState(); @@ -241,7 +241,7 @@ function processAlertsLimitReached< // look for new alerts and add until we hit capacity for (const id in alerts) { - if (alerts.hasOwnProperty(id) && alerts[id].hasScheduledActions()) { + if (Object.hasOwn(alerts, id) && alerts[id].hasScheduledActions()) { // if this alert did not exist in previous run, it is considered "new" if (!existingAlertIds.has(id)) { activeAlerts[id] = alerts[id]; diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/transforms/format_default_aggregation_result/index.ts b/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/transforms/format_default_aggregation_result/index.ts index d751875e104d7..1f8635e9351e6 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/transforms/format_default_aggregation_result/index.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/aggregate/transforms/format_default_aggregation_result/index.ts @@ -72,12 +72,12 @@ export const formatDefaultAggregationResult = ( // Fill missing keys with zeroes for (const key of RuleExecutionStatusValues) { - if (!result.ruleExecutionStatus.hasOwnProperty(key)) { + if (!Object.hasOwn(result.ruleExecutionStatus, key)) { result.ruleExecutionStatus[key] = 0; } } for (const key of RuleLastRunOutcomeValues) { - if (!result.ruleLastRunOutcome.hasOwnProperty(key)) { + if (!Object.hasOwn(result.ruleLastRunOutcome, key)) { result.ruleLastRunOutcome[key] = 0; } } diff --git a/x-pack/plugins/alerting/server/rules_client/lib/update_meta.ts b/x-pack/plugins/alerting/server/rules_client/lib/update_meta.ts index 278a6ac267df5..635778b5a5a1a 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/update_meta.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/update_meta.ts @@ -15,7 +15,7 @@ export function updateMeta>( context: RulesClientContext, alertAttributes: T ): T { - if (alertAttributes.hasOwnProperty('apiKey') || alertAttributes.hasOwnProperty('apiKeyOwner')) { + if (Object.hasOwn(alertAttributes, 'apiKey') || Object.hasOwn(alertAttributes, 'apiKeyOwner')) { alertAttributes.meta = alertAttributes.meta ?? {}; alertAttributes.meta.versionApiKeyLastmodified = context.kibanaVersion; } diff --git a/x-pack/plugins/alerting/server/rules_client/lib/update_meta_attributes.ts b/x-pack/plugins/alerting/server/rules_client/lib/update_meta_attributes.ts index 716e0a8beacb9..9570539b24046 100644 --- a/x-pack/plugins/alerting/server/rules_client/lib/update_meta_attributes.ts +++ b/x-pack/plugins/alerting/server/rules_client/lib/update_meta_attributes.ts @@ -12,7 +12,7 @@ export function updateMetaAttributes>( context: RulesClientContext, alertAttributes: T ): T { - if (alertAttributes.hasOwnProperty('apiKey') || alertAttributes.hasOwnProperty('apiKeyOwner')) { + if (Object.hasOwn(alertAttributes, 'apiKey') || Object.hasOwn(alertAttributes, 'apiKeyOwner')) { return { ...alertAttributes, meta: { diff --git a/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts b/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts index 0a4dc41390f2b..29d86b2b2d860 100644 --- a/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts +++ b/x-pack/plugins/alerting/server/saved_objects/migrations/7.11/index.ts @@ -19,7 +19,7 @@ export const isAnyActionSupportIncidents = (doc: SavedObjectUnsanitizedDoc = ({ const [searchValue, setSearchValue] = useState(''); const { euiTheme } = useEuiTheme(); - const renderOption = useCallback((option: ItemSelectableOption, search: string) => { - const dataTestSubj = option.newItem - ? 'cases-actions-tags-edit-selectable-add-new-tag-icon' - : `cases-actions-tags-edit-selectable-tag-${option.label}-icon-${option.itemIcon}`; - - return ( - <> - - {option.label} - - ); - }, []); + const renderOption = useCallback( + (option: ItemSelectableOption, search: string) => { + const dataTestSubj = option.newItem + ? 'cases-actions-tags-edit-selectable-add-new-tag-icon' + : `cases-actions-tags-edit-selectable-tag-${option.label}-icon-${option.itemIcon}`; + + return ( + <> + + {option.label} + + ); + }, + [euiTheme] + ); /** * While the user searches we need to add the ability diff --git a/x-pack/plugins/cases/public/components/all_cases/multi_select_filter.test.tsx b/x-pack/plugins/cases/public/components/all_cases/multi_select_filter.test.tsx index c2575b146b9f8..cecd3d60e773a 100644 --- a/x-pack/plugins/cases/public/components/all_cases/multi_select_filter.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/multi_select_filter.test.tsx @@ -28,7 +28,7 @@ describe('multi select filter', () => { render(); - userEvent.click(await screen.findByRole('button', { name: 'Tags' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-tags')); await waitForEuiPopoverOpen(); expect(await screen.findByText('4 options')).toBeInTheDocument(); @@ -52,7 +52,7 @@ describe('multi select filter', () => { const { rerender } = render(); - userEvent.click(await screen.findByRole('button', { name: 'Tags' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-tags')); await waitForEuiPopoverOpen(); expect(await screen.findByText('Limit reached')).toBeInTheDocument(); @@ -86,7 +86,7 @@ describe('multi select filter', () => { const { rerender } = render(); - userEvent.click(await screen.findByRole('button', { name: 'Tags' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-tags')); await waitForEuiPopoverOpen(); expect(screen.queryByText('Limit reached')).not.toBeInTheDocument(); @@ -123,7 +123,7 @@ describe('multi select filter', () => { render(); - userEvent.click(await screen.findByRole('button', { name: 'Tags' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-tags')); await waitForEuiPopoverOpen(); expect(await screen.findByText('Limit reached')).toBeInTheDocument(); @@ -174,7 +174,7 @@ describe('multi select filter', () => { }; render(); - userEvent.click(await screen.findByRole('button', { name: 'Tags' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-tags')); await waitForEuiPopoverOpen(); expect((await screen.findAllByTestId(TEST_ID)).length).toBe(2); }); diff --git a/x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx b/x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx index c8cc85bde823e..eb299ee59250b 100644 --- a/x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/multi_select_filter.tsx @@ -144,7 +144,6 @@ export const MultiSelectFilter = ({ numFilters={showActiveOptionsNumber ? options.length : undefined} hasActiveFilters={showActiveOptionsNumber ? selectedOptionKeys.length > 0 : undefined} numActiveFilters={showActiveOptionsNumber ? selectedOptionKeys.length : undefined} - aria-label={buttonLabel} > {buttonLabel} diff --git a/x-pack/plugins/cases/public/components/all_cases/status_filter.test.tsx b/x-pack/plugins/cases/public/components/all_cases/status_filter.test.tsx index 22ac90472a6dc..df41f1e58c665 100644 --- a/x-pack/plugins/cases/public/components/all_cases/status_filter.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/status_filter.test.tsx @@ -38,7 +38,7 @@ describe('StatusFilter', () => { expect(await screen.findByTestId('options-filter-popover-button-status')).not.toBeDisabled(); - userEvent.click(await screen.findByRole('button', { name: 'Status' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-status')); await waitForEuiPopoverOpen(); @@ -53,7 +53,7 @@ describe('StatusFilter', () => { it('should call onStatusChanged when changing status to open', async () => { render(); - userEvent.click(await screen.findByRole('button', { name: 'Status' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-status')); await waitForEuiPopoverOpen(); userEvent.click(await screen.findByRole('option', { name: LABELS.open })); @@ -68,7 +68,7 @@ describe('StatusFilter', () => { it('should not render hidden statuses', async () => { render(); - userEvent.click(await screen.findByRole('button', { name: 'Status' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-status')); await waitForEuiPopoverOpen(); diff --git a/x-pack/plugins/cases/public/components/all_cases/table_filters.test.tsx b/x-pack/plugins/cases/public/components/all_cases/table_filters.test.tsx index 3d6bfa856b7a8..fd9a3f099f639 100644 --- a/x-pack/plugins/cases/public/components/all_cases/table_filters.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/table_filters.test.tsx @@ -367,7 +367,7 @@ describe('CasesTableFilters ', () => { /> ); - userEvent.click(screen.getByRole('button', { name: 'Solution' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-owner')); await waitForEuiPopoverOpen(); const allOptions = screen.getAllByRole('option'); @@ -490,7 +490,7 @@ describe('CasesTableFilters ', () => { it('should render its options', async () => { appMockRender.render(); - userEvent.click(await screen.findByRole('button', { name: 'Toggle' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-toggleKey')); await waitForEuiPopoverOpen(); const allOptions = screen.getAllByRole('option'); @@ -502,7 +502,7 @@ describe('CasesTableFilters ', () => { it('should call onFilterChange when On option changes', async () => { appMockRender.render(); - userEvent.click(await screen.findByRole('button', { name: 'Toggle' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-toggleKey')); await waitForEuiPopoverOpen(); userEvent.click(await screen.findByTestId('options-filter-popover-item-on')); @@ -521,7 +521,7 @@ describe('CasesTableFilters ', () => { it('should call onFilterChange when Off option changes', async () => { appMockRender.render(); - userEvent.click(await screen.findByRole('button', { name: 'Toggle' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-toggleKey')); await waitForEuiPopoverOpen(); userEvent.click(await screen.findByTestId('options-filter-popover-item-off')); @@ -552,7 +552,7 @@ describe('CasesTableFilters ', () => { }; appMockRender.render(); - userEvent.click(await screen.findByRole('button', { name: 'Toggle' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-toggleKey')); await waitForEuiPopoverOpen(); userEvent.click(await screen.findByTestId('options-filter-popover-item-off')); @@ -588,7 +588,7 @@ describe('CasesTableFilters ', () => { }; appMockRender.render(); - userEvent.click(await screen.findByRole('button', { name: 'More' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-filters')); userEvent.click(await screen.findByRole('option', { name: 'Toggle' })); expect(onFilterChanged).toHaveBeenCalledWith({ @@ -654,9 +654,7 @@ describe('CasesTableFilters ', () => { userEvent.click(screen.getByRole('button', { name: 'More' })); await waitFor(() => expect(screen.getAllByRole('option')).toHaveLength(5)); - expect(screen.queryByRole('button', { name: 'Toggle' })).not.toBeInTheDocument(); userEvent.click(screen.getByRole('option', { name: 'Toggle' })); - expect(screen.getByRole('button', { name: 'Toggle' })).toBeInTheDocument(); const filterBar = await screen.findByTestId('cases-table-filters'); const allFilters = within(filterBar).getAllByRole('button'); @@ -709,9 +707,8 @@ describe('CasesTableFilters ', () => { userEvent.click(screen.getByRole('button', { name: 'More' })); await waitFor(() => expect(screen.getAllByRole('option')).toHaveLength(5)); - expect(screen.getByRole('button', { name: 'Status' })).toBeInTheDocument(); + expect(await screen.findByTestId('options-filter-popover-button-status')).toBeInTheDocument(); userEvent.click(screen.getByRole('option', { name: 'Status' })); - expect(screen.queryByRole('button', { name: 'Status' })).not.toBeInTheDocument(); const filterBar = await screen.findByTestId('cases-table-filters'); const allFilters = within(filterBar).getAllByRole('button'); @@ -895,11 +892,11 @@ describe('CasesTableFilters ', () => { expect(allFilters[index]).toHaveTextContent(label); }); - expect(screen.getByRole('button', { name: 'Status' })).toBeInTheDocument(); - userEvent.click(screen.getByRole('button', { name: 'More' })); + expect(await screen.findByTestId('options-filter-popover-button-status')).toBeInTheDocument(); + userEvent.click(await screen.findByTestId('options-filter-popover-button-filters')); userEvent.click(await screen.findByRole('option', { name: 'Status' })); - userEvent.click(screen.getByRole('button', { name: 'More' })); + userEvent.click(await screen.findByTestId('options-filter-popover-button-filters')); userEvent.click(await screen.findByRole('option', { name: 'Status' })); allFilters = within(filterBar).getAllByRole('button'); @@ -1030,12 +1027,12 @@ describe('CasesTableFilters ', () => { appMockRender.render(); const filters = [ - { name: 'Status', active: 2 }, - { name: 'Severity', active: 1 }, - { name: 'Tags', active: 1 }, - { name: 'Categories', active: 1 }, - { name: 'Toggle', active: 1 }, - { name: 'click to filter assignees', active: 1 }, + { testId: 'options-filter-popover-button-status', active: 2 }, + { testId: 'options-filter-popover-button-severity', active: 1 }, + { testId: 'options-filter-popover-button-tags', active: 1 }, + { testId: 'options-filter-popover-button-category', active: 1 }, + { testId: 'options-filter-popover-button-toggle', active: 1 }, + { testId: 'options-filter-popover-button-assignees', active: 1 }, ]; await waitForComponentToUpdate(); @@ -1045,7 +1042,7 @@ describe('CasesTableFilters ', () => { expect(totalFilters.length).toBe(filters.length + 1); for (const filter of filters) { - const button = await screen.findByRole('button', { name: filter.name }); + const button = await screen.findByTestId(filter.testId); expect(button).toBeInTheDocument(); expect( await within(button).findByLabelText(`${filter.active} active filters`) @@ -1077,12 +1074,12 @@ describe('CasesTableFilters ', () => { appMockRender.render(); const filters = [ - { name: 'Status', active: 2 }, - { name: 'Severity', active: 1 }, - { name: 'Tags', active: 1 }, - { name: 'Categories', active: 1 }, - { name: 'Toggle', active: 1 }, - { name: 'click to filter assignees', active: 1 }, + { testId: 'options-filter-popover-button-status', active: 2 }, + { testId: 'options-filter-popover-button-severity', active: 1 }, + { testId: 'options-filter-popover-button-tags', active: 1 }, + { testId: 'options-filter-popover-button-category', active: 1 }, + { testId: 'options-filter-popover-button-toggle', active: 1 }, + { testId: 'options-filter-popover-button-assignees', active: 1 }, ]; await waitForComponentToUpdate(); @@ -1092,7 +1089,7 @@ describe('CasesTableFilters ', () => { expect(totalFilters.length).toBe(filters.length + 1); for (const filter of filters) { - const button = await screen.findByRole('button', { name: filter.name }); + const button = await screen.findByTestId(filter.testId); expect(button).toBeInTheDocument(); expect( await within(button).findByLabelText(`${filter.active} active filters`) diff --git a/x-pack/plugins/cases/public/components/create/template.test.tsx b/x-pack/plugins/cases/public/components/create/template.test.tsx index d3b1c59b71254..837b87827e591 100644 --- a/x-pack/plugins/cases/public/components/create/template.test.tsx +++ b/x-pack/plugins/cases/public/components/create/template.test.tsx @@ -13,7 +13,8 @@ import { createAppMockRenderer } from '../../common/mock'; import { templatesConfigurationMock } from '../../containers/mock'; import { TemplateSelector } from './templates'; -describe('CustomFields', () => { +// FLAKY: https://github.com/elastic/kibana/issues/178457 +describe.skip('CustomFields', () => { let appMockRender: AppMockRenderer; const onTemplateChange = jest.fn(); diff --git a/x-pack/plugins/cases/public/components/custom_fields/text/view.tsx b/x-pack/plugins/cases/public/components/custom_fields/text/view.tsx index 239ab8a1a5387..ddd1554cbd1d6 100644 --- a/x-pack/plugins/cases/public/components/custom_fields/text/view.tsx +++ b/x-pack/plugins/cases/public/components/custom_fields/text/view.tsx @@ -14,7 +14,14 @@ import type { CustomFieldType } from '../types'; const ViewComponent: CustomFieldType['View'] = ({ customField }) => { const value = customField?.value ?? '-'; - return {value}; + return ( + + {value} + + ); }; ViewComponent.displayName = 'View'; diff --git a/x-pack/plugins/cases/public/components/files/file_type.test.tsx b/x-pack/plugins/cases/public/components/files/file_type.test.tsx index 6a96870f14cf9..242fb2fa6af09 100644 --- a/x-pack/plugins/cases/public/components/files/file_type.test.tsx +++ b/x-pack/plugins/cases/public/components/files/file_type.test.tsx @@ -17,7 +17,8 @@ import { basicCase, basicFileMock } from '../../containers/mock'; import { getFileType } from './file_type'; import { FILE_ATTACHMENT_TYPE } from '../../../common/constants'; -describe('getFileType', () => { +// FLAKY: https://github.com/elastic/kibana/issues/175841 +describe.skip('getFileType', () => { const fileType = getFileType(); it('invalid props return blank FileAttachmentViewObject', () => { diff --git a/x-pack/plugins/cases/public/components/user_actions/status.tsx b/x-pack/plugins/cases/public/components/user_actions/status.tsx index a58461d89ab87..9d384500fb09b 100644 --- a/x-pack/plugins/cases/public/components/user_actions/status.tsx +++ b/x-pack/plugins/cases/public/components/user_actions/status.tsx @@ -15,8 +15,7 @@ import { createCommonUpdateUserActionBuilder } from './common'; import { statuses } from '../status'; import * as i18n from './translations'; -const isStatusValid = (status: string): status is CaseStatuses => - Object.prototype.hasOwnProperty.call(statuses, status); +const isStatusValid = (status: string): status is CaseStatuses => Object.hasOwn(statuses, status); const getLabelTitle = (userAction: SnakeToCamelCase) => { const status = userAction.payload.status ?? ''; diff --git a/x-pack/plugins/cloud_defend/public/common/utils.ts b/x-pack/plugins/cloud_defend/public/common/utils.ts index 633302dcf7705..c86ae3c32fe04 100644 --- a/x-pack/plugins/cloud_defend/public/common/utils.ts +++ b/x-pack/plugins/cloud_defend/public/common/utils.ts @@ -91,7 +91,7 @@ function selectorsIncludeConditionsForFIMOperations( !!( selector && conditions.reduce((p, c) => { - return p && selector.hasOwnProperty(c); + return p && Object.hasOwn(selector, c); }, true) ); diff --git a/x-pack/plugins/cloud_defend/public/components/control_general_view_selector/index.tsx b/x-pack/plugins/cloud_defend/public/components/control_general_view_selector/index.tsx index 04033509fbe7f..4511aa71f056c 100644 --- a/x-pack/plugins/cloud_defend/public/components/control_general_view_selector/index.tsx +++ b/x-pack/plugins/cloud_defend/public/components/control_general_view_selector/index.tsx @@ -141,7 +141,7 @@ const StringArrayCondition = ({ label={label} fullWidth={true} key={prop} - isInvalid={!!errorMap.hasOwnProperty(prop)} + isInvalid={!!Object.hasOwn(errorMap, prop)} > @@ -216,7 +216,7 @@ export const ControlGeneralViewSelector = ({ const availableConditions = useMemo(() => getSelectorConditions(selector.type), [selector]); const remainingConditions = useMemo(() => { - return availableConditions.filter((condition) => !selector.hasOwnProperty(condition)); + return availableConditions.filter((condition) => !Object.hasOwn(selector, condition)); }, [availableConditions, selector]); const conditionsAdded = useMemo(() => { @@ -462,14 +462,14 @@ export const ControlGeneralViewSelector = ({ diff --git a/x-pack/plugins/cloud_integrations/cloud_full_story/server/assets/fullstory_library.js b/x-pack/plugins/cloud_integrations/cloud_full_story/server/assets/fullstory_library.js index bfe2af8d44668..b522ae7e4cbcc 100644 --- a/x-pack/plugins/cloud_integrations/cloud_full_story/server/assets/fullstory_library.js +++ b/x-pack/plugins/cloud_integrations/cloud_full_story/server/assets/fullstory_library.js @@ -6,4 +6,4 @@ /* eslint-disable prettier/prettier,no-var,eqeqeq,new-cap,no-nested-ternary,no-use-before-define,no-sequences,block-scoped-var,one-var, dot-notation,no-script-url,no-restricted-globals,no-unused-vars,guard-for-in,no-proto,camelcase,no-empty,no-redeclare,no-caller, strict,no-extend-native,no-undef,no-loop-func */ -!function(){"use strict";var t={248:function(t,n,i){var r,e=i(940);function s(t){}!function(t){t[t.Unknown=0]="Unknown",t[t.Clean=1]="Clean",t[t.UnrecoverableFailure=2]="UnrecoverableFailure"}(r||(r={}));var o=new(function(){function t(t){this.rebuildFromSnapshot(t)}return t.prototype.rebuildFromSnapshot=function(t){var n=this.snapshot;if(this.snapshot=t,!n||n.functions!==t.functions){var i=t.functions;this.arrayIsArray=i.arrayIsArray,this.clearWindowInterval=a(i.clearWindowInterval),this.clearWindowTimeout=a(i.clearWindowTimeout),this.dateGetTime=a(i.dateGetTime),this.dateNow=i.dateNow,this.docFragQuerySelectorAll=a(i.docFragQuerySelectorAll),this.docQuerySelectorAll=a(i.docQuerySelectorAll),this.elMatches=a(i.elMatches),this.elQuerySelectorAll=a(i.elQuerySelectorAll),this.jsonParse=i.jsonParse,this.jsonStringify=i.jsonStringify,this.matchMedia=c(i.matchMedia),this.mathAbs=i.mathAbs,this.mathFloor=i.mathFloor,this.mathMax=i.mathMax,this.mathMin=i.mathMin,this.mathPow=i.mathPow,this.mathRandom=i.mathRandom,this.mathRound=i.mathRound,this.objectHasOwnProp=a(i.objectHasOwnProp),this.objectKeys=i.objectKeys,this.objectValues=i.objectValues||null,this.requestWindowAnimationFrame=c(i.requestWindowAnimationFrame),this.requestWindowIdleCallback=c(i.requestWindowIdleCallback),this.setWindowInterval=a(i.setWindowInterval),this.setWindowTimeout=a(i.setWindowTimeout)}},t}())(u(window));function u(t,n){void 0===n&&(n=r.Unknown);var i=n,e=[],s=function(t){return i=r.UnrecoverableFailure,e.push("Snapshot failed: "+t),function(){throw new Error("Invoked failed snapshot")}},o=function(t){try{return t()}catch(t){return s(t.message)}},u=function(t){try{return t()||s("snapshot not found")}catch(t){return s(t.message)}},a={arrayIsArray:o(function(){return t.Array.isArray}),clearWindowInterval:o(function(){return t.clearInterval}),clearWindowTimeout:o(function(){return t.clearTimeout}),dateGetTime:o(function(){return t.Date.prototype.getTime}),dateNow:o(function(){return t.Date.now}),docFragQuerySelectorAll:u(function(){var n;return null===(n=t.DocumentFragment)||void 0===n?void 0:n.prototype.querySelectorAll}),docQuerySelectorAll:u(function(){var n;return null!==(n=t.Document.prototype.querySelectorAll)&&void 0!==n?n:t.document.querySelectorAll}),elMatches:u(function(){return v(t,h)}),elQuerySelectorAll:u(function(){return v(t,f)}),jsonParse:o(function(){return t.JSON.parse}),jsonStringify:o(function(){return t.JSON.stringify}),matchMedia:o(function(){return t.matchMedia}),mathAbs:o(function(){return t.Math.abs}),mathFloor:o(function(){return t.Math.floor}),mathMax:o(function(){return t.Math.max}),mathMin:o(function(){return t.Math.min}),mathPow:o(function(){return t.Math.pow}),mathRandom:o(function(){return t.Math.random}),mathRound:o(function(){return t.Math.round}),objectHasOwnProp:o(function(){return t.Object.prototype.hasOwnProperty}),objectKeys:o(function(){return t.Object.keys}),objectValues:o(function(){return t.Object.values}),requestWindowAnimationFrame:o(function(){return t.requestAnimationFrame}),requestWindowIdleCallback:o(function(){return t.requestIdleCallback}),setWindowInterval:o(function(){return t.setInterval}),setWindowTimeout:o(function(){return t.setTimeout})},c={functionToString:o(function(){return t.Function.prototype.toString}),objectToString:o(function(){return t.Object.prototype.toString})};return{status:i,functions:a,helpers:c,errors:e}}function a(t){return function(n){for(var i=[],r=1;r=0){var s=e.split("/"),o=s[0],u=s[1];i[r]=o,n=u;break}}var a=function(t){var n=parseInt(null!=t?t:"",10),i=E(),r=S();return isNaN(n)?r:n<=i?void 0:n>r?r:n}(n);if(!a)return null;i[0];var c=i[1],h=i[2],f=i[3],v="";f&&(v=decodeURIComponent(f),(y.indexOf(v)>=0||b.indexOf(v)>=0)&&(v=""));var l=(null!=h?h:"").split(":"),d=l[0],p=l[1],w=l[2];return l[3],{appKeyHash:v,expirationAbsTimeSeconds:a,userId:d,orgId:c,pageCount:_(l[4]),sessionId:null!=p?p:"",sessionStartTime:_(w)}}function k(t){var n={};try{for(var i=t.cookie.split(";"),r=0;r1))return s}}(t);if(!i||!K(n))return n;var r="";return 0===n.indexOf("www.")&&(n=n.slice(4),r="www."),0===n.indexOf(i+".")&&(n=n.slice((i+".").length)),""+r+i+"."+n}}function $(t){return t?C(function(t){var n=t,i=n.indexOf(":");return i>=0&&(n=n.slice(0,i)),n}(t))?t:0==t.indexOf("www.")?"app."+t.slice(4):"app."+t:t}function G(t){var n=j(t);if(n)return n+"/s/fs.js"}function X(t,n){return function(){for(var i=[],r=0;rn)return!1;return i==n}function ot(t,n){var i=0;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&++i>n)return!0;return!1}function ut(t){var n=t.nextSibling;return n&&t.parentNode&&n===t.parentNode.firstChild?null:n}function at(t){var n=t.previousSibling;return n&&t.parentNode&&n===t.parentNode.lastChild?null:n}function ct(t){return function(){for(var n=this,i=[],r=0;r"}function pt(t){return o.jsonParse(t)}var wt=function(){function t(t,n,i){void 0===i&&(i=!1),this.i=t,this.u=n,this.l=i,this.g=J,this.m=J,this.S=J,this.k=!1}return t.prototype.before=function(t){return this.g=ft(t),this},t.prototype.afterSync=function(t){return this.m=ft(t),this},t.prototype.afterAsync=function(t){return this.S=ft(function(n){o.setWindowTimeout(window,X(function(){t(n)}),0)}),this},t.prototype.disable=function(){if(this.k=!1,this._){var t=this._,n=t.override,i=t["native"];this.i[this.u]===n&&(this.i[this.u]=i,this._=void 0)}},t.prototype.enable=function(){if(this.k=!0,this._)return!0;this._=this.A();try{this.i[this.u]=this._.override}catch(t){return!1}return!0},t.prototype.getTarget=function(){return this.i},t.prototype.A=function(){var t=this,n=this,i=this.i[this.u],r=function(){for(var t=[],r=0;r\n";var i=[];try{for(var r=arguments.callee.caller.caller;r&&i.length<10;){var e=kt.test(r.toString())&&RegExp.$1||xt;i.push(e),r=r.caller}}catch(t){t.toString()}n=i.join("\n")}return t+n}function It(){try{return window.self!==window.top}catch(t){return!0}}var Tt=function(){function t(){}return t.wrap=function(n,i){return void 0===i&&(i="error"),X(n,function(n){return t.sendToBugsnag(n,i)})},t.I=15,t.sendToBugsnag=function(n,i,r){if(!(t.I<=0)){t.I--;var e=n;"string"==typeof e&&(e=new Error(e));var s=k(document).fs_uid,o=s?x(s):void 0;o&&o.orgId!=F(window)&&(o=void 0);var u=new Date(1678707725e3).toISOString(),a={projectRoot:window.location.origin,deviceTime:p(),inIframe:It(),CompiledVersion:"11aa377d19",CompiledTimestamp:1678707725,CompiledTime:u,orgId:F(window),"userId:sessionId":o?o.userId+":"+o.sessionId:"NA",context:document.location&&document.location.pathname,message:e.message,name:"Recording Error",releaseStage:"production "+u,severity:i,language:Et(window),stacktrace:_t(e)||At()},c=function(t,n,i){var r=encodeURIComponent(n)+"="+encodeURIComponent(i);t.push(r)},h=[];for(var f in a)c(h,f,a[f]||"");if(r)for(var f in r)c(h,"aux_"+f,Ct(r[f]));new Image().src="https://"+L(window)+"/rec/except?"+h.join("&")}},t}();function Ct(t){try{var n=typeof t+": "+vt(t);return"function"==typeof t.toString&&(n+=" (toString: "+t.toString()+")"),n}catch(t){return"failed to serialize \""+(null==t?void 0:t.message)+"\""}}var Pt={};function jt(t,n,i){if(void 0===i&&(i=1),t)return!0;if(Pt[n]=Pt[n]||0,Pt[n]++,Pt[n]>i)return!1;var r=new Error("Assertion failed: "+n);return Tt.sendToBugsnag(r,"error"),t}var Ot,Mt,Kt,Rt,Ht,Nt,Lt={};function Ut(t,n,i){var r;Lt[t]=null!==(r=Lt[t])&&void 0!==r?r:0,Lt[t]++,Lt[t]>1||Tt.sendToBugsnag(n,"error",i)}!function(t){t.MUT_INSERT=2,t.MUT_REMOVE=3,t.MUT_ATTR=4,t.MUT_TEXT=6,t.MOUSEMOVE=8,t.MOUSEMOVE_CURVE=9,t.SCROLL_LAYOUT=10,t.SCROLL_LAYOUT_CURVE=11,t.MOUSEDOWN=12,t.MOUSEUP=13,t.CLICK=16,t.FOCUS=17,t.VALUECHANGE=18,t.RESIZE_LAYOUT=19,t.DOMLOADED=20,t.LOAD=21,t.PLACEHOLDER_SIZE=22,t.UNLOAD=23,t.BLUR=24,t.SET_FRAME_BASE=25,t.TOUCHSTART=32,t.TOUCHEND=33,t.TOUCHCANCEL=34,t.TOUCHMOVE=35,t.TOUCHMOVE_CURVE=36,t.NAVIGATE=37,t.PLAY=38,t.PAUSE=39,t.RESIZE_VISUAL=40,t.RESIZE_VISUAL_CURVE=41,t.RESIZE_DOCUMENT_CONTENT=42,t.RESIZE_SCROLLABLE_ELEMENT_CONTENT=43,t.LOG=48,t.ERROR=49,t.DBL_CLICK=50,t.FORM_SUBMIT=51,t.WINDOW_FOCUS=52,t.WINDOW_BLUR=53,t.HEARTBEAT=54,t.WATCHED_ELEM=56,t.PERF_ENTRY=57,t.REC_FEAT_SUPPORTED=58,t.SELECT=59,t.CSSRULE_INSERT=60,t.CSSRULE_DELETE=61,t.FAIL_THROTTLED=62,t.AJAX_REQUEST=63,t.SCROLL_VISUAL_OFFSET=64,t.SCROLL_VISUAL_OFFSET_CURVE=65,t.MEDIA_QUERY_CHANGE=66,t.RESOURCE_TIMING_BUFFER_FULL=67,t.MUT_SHADOW=68,t.DISABLE_STYLESHEET=69,t.FULLSCREEN=70,t.FULLSCREEN_ERROR=71,t.ADOPTED_STYLESHEETS=72,t.CUSTOM_ELEMENT_DEFINED=73,t.MODAL_OPEN=74,t.MODAL_CLOSE=75,t.SLOW_INTERACTION=76,t.LONG_FRAME=77,t.TIMING=78,t.STORAGE_WRITE_FAILURE=79,t.DOCUMENT_PROPERTIES=80,t.ENTRY_NAVIGATE=81,t.STATS=82,t.VIEWPORT_INTERSECTION=83,t.COPY=84,t.PASTE=85,t.URL_SALT=86,t.URL_ID=87,t.FRAME_STATUS=88,t.SCRIPT_COMPILED_VERSION=89,t.RESET_CSS_SHEET=90,t.ANIMATION_CREATED=91,t.ANIMATION_METHOD_CALLED=92,t.ANIMATION_PROPERTY_SET=93,t.DOCUMENT_TIMELINE_CREATED=94,t.KEYFRAME_EFFECT_CREATED=95,t.KEYFRAME_EFFECT_METHOD_CALLED=96,t.KEYFRAME_EFFECT_PROPERTY_SET=97,t.CAPTURE_SOURCE=98,t.PAGE_DATA=99,t.VISIBILITY_STATE=100,t.DIALOG=101,t.CSSRULE_UPDATE=102,t.CANVAS=103,t.CANVAS_DETACHED_DIMENSION=104,t.INIT_API=105,t.DEFERRED_RESOLVED=106,t.KEEP_ELEMENT=2e3,t.KEEP_URL=2001,t.KEEP_BOUNCE=2002,t.SYS_SETVAR=8193,t.SYS_RESOURCEHASH=8195,t.SYS_SETCONSENT=8196,t.SYS_CUSTOM=8197,t.SYS_REPORTCONSENT=8198,t.SYS_LETHE_MOBILE_BUNDLE_SEQ=8199}(Ot||(Ot={})),function(t){t.Animation=0,t.CSSAnimation=1,t.CSSTransition=2}(Mt||(Mt={})),function(t){t.Unknown=0,t.Serialization=1}(Kt||(Kt={})),function(t){t.Unknown=0,t.Successful=1,t.BlocklistedFrame=2,t.PartiallyLoaded=3,t.MissingWindowOrDocument=4,t.MissingDocumentHead=5,t.MissingBodyOrChildren=6,t.AlreadyDefined=7,t.NoNonScriptElement=8,t.Exception=9}(Rt||(Rt={})),function(t){t.Unknown=0,t.DomSnapshot=1,t.NodeEncoding=2,t.LzEncoding=3}(Ht||(Ht={})),function(t){t.Internal=0,t.Public=1}(Nt||(Nt={}));var Ft,Dt,Bt,Wt,qt,Qt,Vt,zt,$t,Gt,Xt,Jt,Zt,Yt,tn,nn,rn,en,sn,on,un,an,cn,hn=["print","alert","confirm"];function fn(t){switch(t){case Ot.MOUSEDOWN:case Ot.MOUSEMOVE:case Ot.MOUSEMOVE_CURVE:case Ot.MOUSEUP:case Ot.TOUCHSTART:case Ot.TOUCHEND:case Ot.TOUCHMOVE:case Ot.TOUCHMOVE_CURVE:case Ot.TOUCHCANCEL:case Ot.CLICK:case Ot.SCROLL_LAYOUT:case Ot.SCROLL_LAYOUT_CURVE:case Ot.SCROLL_VISUAL_OFFSET:case Ot.SCROLL_VISUAL_OFFSET_CURVE:case Ot.NAVIGATE:return!0;}return!1}!function(t){t[t.Index=1]="Index",t[t.Cached=2]="Cached"}(Ft||(Ft={})),function(t){t.GrantConsent=!0,t.RevokeConsent=!1}(Dt||(Dt={})),function(t){t.Page=0,t.Document=1}(Bt||(Bt={})),function(t){t.Unknown=0,t.Api=1,t.FsShutdownFrame=2,t.Hibernation=3,t.Reidentify=4,t.SettingsBlocked=5,t.Size=6,t.Unload=7,t.Hidden=8}(Wt||(Wt={})),function(t){t.Unknown=0,t.NotEmpty=1,t.EmptyBody=2}(qt||(qt={})),function(t){t.Timing=0,t.Navigation=1,t.Resource=2,t.Paint=3,t.Mark=4,t.Measure=5,t.Memory=6,t.TimeOrigin=7,t.LayoutShift=8,t.FirstInput=9,t.LargestContentfulPaint=10,t.LongTask=11}(Qt||(Qt={})),function(t){t.Timing=["navigationStart","unloadEventStart","unloadEventEnd","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","domLoading","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd"],t.Navigation=["name","startTime","duration","initiatorType","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","unloadEventStart","unloadEventEnd","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd","type","redirectCount","decodedBodySize","encodedBodySize","transferSize"],t.Resource=["name","startTime","duration","initiatorType","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","decodedBodySize","encodedBodySize","transferSize"],t.Measure=["name","startTime","duration"],t.Memory=["jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize"],t.TimeOrigin=["timeOrigin"],t.LayoutShift=["startTime","value","hadRecentInput"],t.FirstInput=["name","startTime","duration","processingStart"],t.LargestContentfulPaint=["name","startTime","duration","renderTime","loadTime","size"]}(Vt||(Vt={})),function(t){t.Performance=0,t.PerformanceEntries=1,t.PerformanceMemory=2,t.Console=3,t.Ajax=4,t.PerformanceObserver=5,t.PerformanceTimeOrigin=7,t.WebAnimation=8,t.LayoutShift=9,t.FirstInput=10,t.LargestContentfulPaint=11,t.LongTask=12,t.HTMLDialogElement=13,t.CaptureOnStartEnabled=14,t.CanvasWatcherEnabled=15}(zt||(zt={})),function(t){t.Node=1,t.Sheet=2}($t||($t={})),function(t){t.StyleSheetHooks=0,t.SetPropertyHooks=1}(Gt||(Gt={})),function(t){t.Document="document",t.Event="evt",t.Page="page",t.User="user"}(Xt||(Xt={})),function(t){t.FsId="fsidentity",t.NewUid="newuid"}(Jt||(Jt={})),function(t){t.Elide=0,t.Record=1,t.Allowlist=2}(Zt||(Zt={})),function(t){t.Any=0,t.Exclude=1,t.Mask=2}(Yt||(Yt={})),function(t){t.Erase=0,t.MaskText=1,t.ScrubUrl=2,t.ScrubCss=3}(tn||(tn={})),function(t){t.Static=0,t.Prefix=1}(nn||(nn={})),function(t){t.SignalInvalid=0,t.SignalDeadClick=1,t.SignalRageClick=2}(rn||(rn={})),function(t){t.ReasonNoSuchOrg=1,t.ReasonOrgDisabled=2,t.ReasonOrgOverQuota=3,t.ReasonBlockedDomain=4,t.ReasonBlockedIp=5,t.ReasonBlockedUserAgent=6,t.ReasonBlockedGeo=7,t.ReasonBlockedTrafficRamping=8,t.ReasonInvalidURL=9,t.ReasonUserOptOut=10,t.ReasonInvalidRecScript=11,t.ReasonDeletingUser=12,t.ReasonNativeHookFailure=13}(en||(en={})),function(t){t.Unset=0,t.Exclude=1,t.Mask=2,t.Unmask=3,t.Watch=4,t.Keep=5,t.Defer=6}(sn||(sn={})),function(t){t.Unset=0,t.Click=1}(on||(on={})),function(t){t[t.Page=1]="Page",t[t.Bundle=2]="Bundle"}(un||(un={})),function(t){t[t.Error=3]="Error",t[t.Page=4]="Page",t[t.Bundle=5]="Bundle",t[t.Settings=6]="Settings"}(an||(an={})),function(t){t.MaxPerfMarksPerPage=16384,t.MaxLogsPerPage=1024,t.MaxUrlLength=2048,t.MutationProcessingInterval=250,t.CurveSamplingInterval=142,t.DefaultBundleUploadInterval=5e3,t.HeartbeatInitial=4e3,t.HeartbeatMax=256200,t.PageInactivityTimeout=18e5,t.BackoffMax=3e5,t.ScrollSampleInterval=t.MutationProcessingInterval/5,t.InactivityThreshold=4e3,t.MaxAjaxPayloadLength=16384,t.DefaultOrgSettings={MaxPerfMarksPerPage:t.MaxPerfMarksPerPage,MaxConsoleLogPerPage:t.MaxLogsPerPage,MaxAjaxPayloadLength:t.MaxAjaxPayloadLength,MaxUrlLength:t.MaxUrlLength,RecordPerformanceResourceImg:!0,RecordPerformanceResourceTiming:!0,HttpRequestHeadersAllowlist:[],HttpResponseHeadersAllowlist:[],UrlPrivacyConfig:[{Exclude:{Hash:[{Expression:"#.*"}],QueryParam:[{Expression:"(=)(.*)"}]}}],AttributeBlocklist:[{Target:Yt.Any,Tag:"*",Name:"",Type:nn.Prefix,Action:tn.Erase}]},t.DefaultStatsSettings={MaxPayloadLength:8192,MaxEventTypeLength:1024},t.BlockedFieldValue="__fs__redacted"}(cn||(cn={}));var vn,ln,dn,pn="_fs_uid",wn="_fs_cid",gn="_fs_lua";function mn(t,n,i,r){void 0!==i&&("function"==typeof t.addEventListener?t.addEventListener(n,i,r):"function"==typeof t.addListener&&t.addListener(i))}function yn(t,n,i,r){void 0!==i&&("function"==typeof t.removeEventListener?t.removeEventListener(n,i,r):"function"==typeof t.removeListener&&t.removeListener(i))}!function(t){t[t.Shutdown=1]="Shutdown",t[t.Starting=2]="Starting",t[t.Started=3]="Started"}(vn||(vn={})),function(t){t.Set=0,t.Function=1}(ln||(ln={})),function(t){t[t.Disabled=0]="Disabled",t[t.CaptureCanvasOps=1]="CaptureCanvasOps",t[t.ScreenshotCanvas=2]="ScreenshotCanvas"}(dn||(dn={}));var bn=function(){function t(){var t=this;this.T=[],this.C=[],this.P=!0,this.j=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t.P={capture:!0,passive:!0},t.j={capture:!1,passive:!0}}});window.addEventListener("test",J,n)}catch(t){}}return t.prototype.add=function(t,n,i,r,e){return void 0===e&&(e=!1),this.addCustom(t,n,i,r,e)},t.prototype.addCustom=function(t,n,i,r,e){void 0===e&&(e=!1);var s={target:t,type:n,fn:Tt.wrap(function(t){(e||!1!==t.isTrusted||"message"==n||t._fs_trust_event)&&r(t)}),options:i?this.P:this.j,index:this.T.length};return this.T.push(s),mn(t,n,s.fn,s.options),s},t.prototype.remove=function(t){t.target&&(yn(t.target,t.type,t.fn,t.options),t.target=null,t.fn=void 0)},t.prototype.clear=function(){for(var t=0;ti){n.Z||(n.Z=!0,Tt.sendToBugsnag("Out of time for remaining measurement tasks.","warning",{totalRunningTimeMs:a-t}));break t}}n.G=null}finally{n.X=!1,n.wnd}}}),this.wnd=t}return t.create=function(t){return t.ResizeObserver?new ai(t,t.ResizeObserver):new ci(t)},t.prototype.requestMeasureTask=function(t,n){var i,r=this;if(this.J>16)Tt.sendToBugsnag("Too much synchronous recursion in requestMeasureTask","error");else{var e=this.X?this.J:0,s=Tt.wrap(function(){var t=r.J;r.J=e+1;try{n()}finally{r.J=t}});this.G?this.G[t].push(s):(this.G=((i={})[ii.Essential]=[],i[ii.High]=[],i[ii.Medium]=[],i[ii.Low]=[],i[t]=[s],i),this.schedule())}},t.prototype.performMeasurementsNow=function(){this.performMeasurements()},t}(),ai=function(t){function n(n,i){var r=t.call(this,n)||this;return r.Y=i,r}return(0,e.__extends)(n,t),n.prototype.schedule=function(){var t=this,n=this.Y,i=this.wnd.document,r=i.documentElement||i.body||i.head,e=new n(function(){e.unobserve(r),t.performMeasurements()});e.observe(r)},n}(ui),ci=function(t){function n(n){return t.call(this,n)||this}return(0,e.__extends)(n,t),n.prototype.schedule=function(){(0,e.__awaiter)(void 0,void 0,Yn,function(){var t;return(0,e.__generator)(this,function(n){switch(n.label){case 0:return(t=o.requestWindowAnimationFrame)?[4,new Yn(function(n){return t(window,n)})]:[3,2];case 1:n.sent(),n.label=2;case 2:return[4,ei()];case 3:return n.sent(),[2];}})}).then(this.performMeasurements)},n}(ui);function hi(t,n){return n&&t.pageLeft==n.pageLeft&&t.pageTop==n.pageTop}function fi(t,n){return n&&t.width==n.width&&t.height==n.height}function vi(t){return{pageLeft:t.pageLeft,pageTop:t.pageTop,width:t.width,height:t.height}}var li=[["@import\\s+\"","\""],["@import\\s+'","'"]].concat([["url\\(\\s*\"","\"\\s*\\)"],["url\\(\\s*'","'\\s*\\)"],["url\\(\\s*","\\s*\\)"]]),di=".*?"+/(?:[^\\](?:\\\\)*)/.source,pi=new RegExp(li.map(function(t){var n=t[0],i=t[1];return"("+n+")("+di+")("+i+")"}).join("|"),"g"),wi=/url\(["']?(.+?)["']?\)/g,gi=/^\s*\/\//;function mi(t){return"BackCompat"==t.compatMode}function yi(t){return t&&t.body&&t.documentElement?mi(t)?[t.body.clientWidth,t.body.clientHeight]:[t.documentElement.clientWidth,t.documentElement.clientHeight]:[0,0]}var bi=function(){function t(t,n){var i,r,e,s;this.hasKnownPosition=!1,this.pageLeft=0,this.pageTop=0,this.width=0,this.height=0,this.clientWidth=0,this.clientHeight=0;var o=t.document;if(o&&o.documentElement&&o.body){i=yi(o),this.clientWidth=i[0],this.clientHeight=i[1];var u=t.visualViewport;if(u){this.hasKnownPosition=!0,this.pageTop=u.pageTop-u.offsetTop,this.pageLeft=u.pageLeft-u.offsetLeft,0==this.pageTop&&(this.pageTop=0),0==this.pageLeft&&(this.pageLeft=0);var a=null!==(e=xi(t,"innerWidth"))&&void 0!==e?e:0,c=null!==(s=xi(t,"innerHeight"))&&void 0!==s?s:0;if(a>0&&c>0)return this.width=a,void(this.height=c)}if(void 0!==n&&this.clientWidth==n.clientWidth&&this.clientHeight==n.clientHeight&&n.width>0&&n.height>0)return this.width=n.width,void(this.height=n.height);r=this.tt(t),this.width=r[0],this.height=r[1]}}return t.prototype.tt=function(t){var n=this.it(t,"width",this.clientWidth,this.clientWidth+128);void 0===n&&(n=xi(t,"innerWidth")),void 0===n&&(n=this.clientWidth);var i=this.it(t,"height",this.clientHeight,this.clientHeight+128);return void 0===i&&(i=xi(t,"innerHeight")),void 0===i&&(i=this.clientHeight),[n,i]},t.prototype.it=function(t,n,i,r){if(o.matchMedia){var e=i,s=r,u=o.matchMedia(t,"(min-"+n+": "+e+"px)");if(null!=u){if(u.matches&&o.matchMedia(t,"(max-"+n+": "+e+"px)").matches)return e;for(;e<=s;){var a=o.mathFloor((e+s)/2);if(o.matchMedia(t,"(min-"+n+": "+a+"px)").matches){if(o.matchMedia(t,"(max-"+n+": "+a+"px)").matches)return a;e=a+1}else s=a-1}}}},t}();function Ei(t,n){return new bi(t,n)}var Si=function(t,n){this.offsetLeft=0,this.offsetTop=0,this.pageLeft=0,this.pageTop=0,this.width=0,this.height=0,this.scale=0;var i=t.document;if(i.body){"pageXOffset"in t?(this.pageLeft=t.pageXOffset,this.pageTop=t.pageYOffset):i.scrollingElement?(this.pageLeft=i.scrollingElement.scrollLeft,this.pageTop=i.scrollingElement.scrollTop):mi(i)?(this.pageLeft=i.body.scrollLeft,this.pageTop=i.body.scrollTop):i.documentElement&&(i.documentElement.scrollLeft>0||i.documentElement.scrollTop>0)?(this.pageLeft=i.documentElement.scrollLeft,this.pageTop=i.documentElement.scrollTop):(this.pageLeft=i.body.scrollLeft||0,this.pageTop=i.body.scrollTop||0),this.offsetLeft=this.pageLeft-n.pageLeft,this.offsetTop=this.pageTop-n.pageTop;var r=0,e=0;try{r=t.innerWidth,e=t.innerHeight}catch(t){return}if(0!=r&&0!=e){this.scale=n.width/r,this.scale<1&&(this.scale=1);var s=n.width-n.clientWidth,o=n.height-n.clientHeight;this.width=r-s/this.scale,this.height=e-o/this.scale}}};function xi(t,n){try{return t[n]}catch(t){return}}function ki(t){var n=t;return n.tagName?"object"==typeof n.tagName?"form":n.tagName.toLowerCase():null}var _i,Ai,Ii=new RegExp("[^\\s]"),Ti=new RegExp("[\\s]*$");function Ci(t){var n=Ii.exec(t);if(!n)return t;for(var i=n.index,r=(n=Ti.exec(t))?t.length-n.index:0,e="\uFFFF",s=t.slice(i,t.length-r).split(/\r\n?|\n/g),o=0;o0&&n.length<1e4;){var i=n.pop();delete Mi[i.id],i.node._fs==i.id&&(i.node._fs=0),i.id=0,i.next&&n.push(i.next),i.child&&n.push(i.child)}jt(n.length<1e4,"clearIds is fast")}function Qi(t,n){void 0===n&&(n=1024);try{var i={tokens:[],opath:[],cyclic:Vi(t,n/4)};return $i(t,n,0,i),i.tokens.join("")}catch(t){return lt(t)}}function Vi(t,n){var i=0;try{o.jsonStringify(t,function(t,r){if(i++>n)throw"break";if("object"==typeof r)return r})}catch(t){return"break"!=t}return!1}var zi=function(t,n,i){return void 0===i&&(i="..."),t.length<=n?t:t.length<=i.length||n<=i.length?t.substring(0,n):t.substring(0,n-i.length)+i};function $i(t,n,i,r){if(n<1)return 0;var e=function(t){switch(!0){case function(t){return!(!t||t.constructor!=Date)}(t):return n=t,isNaN(n)?"Invalid Date":n.toUTCString();case function(t){return"object"==typeof Node?t instanceof Node:t&&"object"==typeof t&&t.nodeType>0&&"string"==typeof t.nodeName}(t):return function(t){return t.toString()}(t);case void 0===t:return"undefined";case"object"!=typeof t||null==t:return t;case t instanceof Error:return[t.toString(),t.stack].filter(Boolean).join(",");}var n}(t);if(void 0!==e){var s=function(t,n){var i=o.jsonStringify(t);return i&&"\""==i[0]?zi(i,n,"...\""):i}(e,n);return"string"==typeof s&&s.length<=n?(r.tokens.push(s),s.length):0}if(r.cyclic){r.opath.splice(i);var u=r.opath.lastIndexOf(t);if(u>-1){var a="";return a="\""+zi(a,n-2)+"\"",r.tokens.push(a),a.length}r.opath.push(t)}var c=n,h=function(t){return c>=t.length&&(c-=t.length,r.tokens.push(t),!0)},f=function(t){var n=r.tokens.length-1;","===r.tokens[n]?r.tokens[n]=t:h(t)};if(c<2)return 0;if(tt(t)){h("[");for(var v=0;v0;v++){var l=$i(t[v],c-1,i+1,r);if(c-=l,0==l&&!h("null"))break;h(",")}f("]")}else{h("{");var d=nt(t);for(v=0;v0;v++){var p=d[v],w=t[p];if(!h("\""+p+"\":"))break;if(0==(l=$i(w,c-1,i+1,r))){r.tokens.pop();break}c-=l,h(",")}f("}")}return n==1/0?1:n-c}var Gi,Xi,Ji=function(){function t(){var n=this;this.rt=Tt.wrap(function(){n.unregister(),n.et&&n.et()}),this.st=0,this.ot=t.ut++}return t.ct=function(){t.checkedAlready=!1,t.ht=0},t.checkForBrokenSchedulers=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var n,i;return(0,e.__generator)(this,function(r){switch(r.label){case 0:return!o.requestWindowAnimationFrame||t.checkedAlready||(n=p())-t.ht<100?[2,!1]:(t.ht=n,t.checkedAlready=!0,[4,new Yn(function(t){return o.requestWindowAnimationFrame(window,t)})]);case 1:return r.sent(),i=[],rt(t.ft,function(t){var r=t.vt(n);r&&i.push(r)}),[4,Yn.all(i)];case 2:return r.sent(),o.requestWindowAnimationFrame(window,Tt.wrap(function(){t.checkedAlready=!1})),[2,!0];}})})},t.stopAll=function(){rt(this.ft,function(t){return t.stop()})},t.prototype.setTick=function(t){this.et=t},t.prototype.stop=function(){this.cancel(),delete t.ft[this.ot]},t.prototype.register=function(n){this.st=p()+100+1.5*n,t.ft[this.ot]=this},t.prototype.timerIsRunning=function(){return null!=t.ft[this.ot]},t.prototype.unregister=function(){delete t.ft[this.ot]},t.prototype.vt=function(t){if(t>this.st)return Yn.resolve().then(this.rt)["catch"](function(){})},t.ft={},t.ut=0,t.checkedAlready=!1,t.ht=0,t}(),Zi=function(t){function n(n){var i=t.call(this)||this;return i.lt=n,i.dt=-1,i}return(0,e.__extends)(n,t),n.prototype.start=function(t){var n=this;-1==this.dt&&(this.setTick(function(){t(),n.register(n.lt)}),this.dt=o.setWindowInterval(window,this.rt,this.lt),this.register(this.lt))},n.prototype.cancel=function(){-1!=this.dt&&(o.clearWindowInterval(window,this.dt),this.dt=-1,this.setTick(function(){}))},n}(Ji),Yi=function(t){function n(n,i,r){void 0===i&&(i=0);for(var e=[],s=3;sn&&(this.St=t-n,this.St>1e3&&this.kt("timekeeper set with future ts"))},t.prototype.kt=function(t){Qi({msg:t,skew:this.St,startTime:this.xt,wallTime:this.wallTime()},1024)},t}(),ir=function(){function t(t,n){this._t=t,this.At=n,this.It=!1,this.Tt={},this.Ct={},this.Pt={},this.jt=!1,this.Ot=!1,Gi=this,this.Mt=t.window.document}return t.prototype.start=function(){var t;(t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))&&t.set&&(rr||(yt(HTMLInputElement,"value",ar),yt(HTMLInputElement,"checked",ar),yt(HTMLSelectElement,"value",ar),yt(HTMLTextAreaElement,"value",ar),yt(HTMLSelectElement,"selectedIndex",ar),yt(HTMLOptionElement,"selected",ar),rr=!0),1)||(this.It=!0)},t.prototype.hookInstance=function(t){if("input"===ki(t))switch(t.type){case"checkbox":case"radio":bt(t,"checked",ar);break;default:bt(t,"value",ar);}},t.prototype.addInput=function(t){if(t){var n=Bi(t);if(n){"input"===ki(t)&&this.Kt(t);var i=!1;if(function(t){switch(t.type){case"checkbox":case"radio":return t.checked!=t.hasAttribute("checked");default:return(t.value||"")!=function(t){if("select"!=ki(t))return t.getAttribute("value")||"";var n=t,i=n.querySelector("option[selected]")||n.querySelector("option");return i&&i.value||""}(t);}}(t)&&(this.Rt(t),i=!0),this.It&&(this.Tt[n]={elem:t}),!i)if(hr(t)){var r=or(t);t.checked&&(this.Pt[r]=n)}else this.Ct[n]=cr(t)}}},t.prototype.Kt=function(t){if(this.jt)this.Ot&&this.hookInstance(t);else{var n="checkbox"===t.type||"radio"===t.type?"checked":"value",i=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,n),r=Object.getOwnPropertyDescriptor(t,n);i&&r&&i!==r&&(this.Ot=!0,this.hookInstance(t)),this.jt=!0}},t.prototype.diffValue=function(t,n){void 0===n&&(n=cr(t));var i=Bi(t);if(!t||!i)return!1;if(hr(t)){var r=or(t);return this.Pt[r]===i!=("true"===n)}return this.Ct[i]!==n},t.prototype.onChange=function(t,n,i){void 0===i&&(i=cr(t));var r=Bi(t);t&&r&&(n||this.diffValue(t,i))&&this.Rt(t,n)},t.prototype.onKeyboardChange=function(t){var n,i=function(t){for(var n=t.activeElement;n&&n.shadowRoot;){var i=n.shadowRoot.activeElement;if(!i)return n;n=i}return n}(this.Mt);i&&("value"in(n=i)||"checked"in n)&&!Hi(i)&&this.diffValue(i)&&this.Rt(i,t)},t.prototype.tick=function(){for(var t in this.Tt){var n=this.Tt[t],i=n.elem;if(Bi(i))try{delete this.Tt[t];var r=cr(i);if(this.diffValue(i,r))this.Rt(i);else if(n.noFsIdInOption){var e=i;Array.prototype.slice.call(e.options).every(function(t){return Bi(t)})&&(n.noFsIdInOption=!1,this.Rt(i))}}finally{this.It&&(this.Tt[t]=n)}else delete this.Tt[t],delete this.Ct[t],hr(i)&&delete this.Pt[or(i)]}},t.prototype.stop=function(){Gi=void 0},t.prototype.Rt=function(t,n){var i=this;void 0===n&&(n=!1);var r=Bi(t);if(t&&r&&!this.Ht(r,t)){var e=cr(t);if(hr(t)){var s=or(t);"false"===e&&this.Pt[s]===r?delete this.Pt[s]:"true"===e&&(this.Pt[s]=r)}else this.Ct[r]=e;this._t.measurer.requestMeasureTask(ii.Medium,function(){var s=t.getBoundingClientRect(),o=s.width>0&&s.height>0,u=Ni(t)?Ci(e):e;i.At.enqueue({Kind:Ot.VALUECHANGE,Args:[r,u,n,o]})})}},t.prototype.Ht=function(t,n){if(this.Tt[t])return!0;if("select"!==ki(n))return!1;for(var i=n.options,r=0;r-1||wr.indexOf("Trident/")>-1,mr=(gr&&wr.indexOf("Trident/5"),gr&&wr.indexOf("Trident/6"),gr&&wr.indexOf("rv:11")>-1),yr=wr.indexOf("Edge/")>-1,br=(wr.indexOf("CriOS"),wr.indexOf("Snapchat")>-1),Er=/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);function Sr(){var t=window.navigator.userAgent.match(/Version\/(\d+)/);return t&&t[1]?parseInt(t[1],10):-1}function xr(t){if(!Er)return!1;var n=Sr();return n>=0&&n===t}function kr(t){if(!Er)return!1;var n=Sr();return n>=0&&nne?(Tt.sendToBugsnag("Ignoring huge text node","warning",{length:s}),""):t.parentNode&&"style"==ki(t.parentNode)?r:e.mask?Ci(r):r}function re(t){return Kr[t]||t.toLowerCase()}var ee=/^\s*((prefetch|preload|prerender)\s*)+$/i,se=/^\s*.*((worklet|script|worker|font|fetch)\s*)+$/i;function oe(t,n,i,r,e){var s,u;if(void 0===r&&(r=ki(t)),void 0===e&&(e=Ui(t)),null===r||""===n)return null;if("link"===r&&ee.test(null!==(s=t.getAttribute("rel"))&&void 0!==s?s:"")&&!se.test(null!==(u=t.getAttribute("as"))&&void 0!==u?u:""))return null;var a,c="style"===n?ae(i):i,h=function(t,n,i){var r,e,s,u,a,c,h,f,v,l,d,p,w,g=void 0;(null===(r=null==n?void 0:n.watchKind)||void 0===r?void 0:r.has(_i.Exclude))?g=Yt.Exclude:(null==n?void 0:n.mask)&&(g=Yt.Mask);var m=[null===(u=null===(s=null===(e=Ee.blocklist[Yt.Any])||void 0===e?void 0:e[t])||void 0===s?void 0:s["static"])||void 0===u?void 0:u[i],null===(h=null===(c=null===(a=Ee.blocklist[Yt.Any])||void 0===a?void 0:a["*"])||void 0===c?void 0:c["static"])||void 0===h?void 0:h[i],g?null===(l=null===(v=null===(f=Ee.blocklist[g])||void 0===f?void 0:f[t])||void 0===v?void 0:v["static"])||void 0===l?void 0:l[i]:void 0,g?null===(w=null===(p=null===(d=Ee.blocklist[g])||void 0===d?void 0:d["*"])||void 0===p?void 0:p["static"])||void 0===w?void 0:w[i]:void 0];return Ee.hasPrefix&&m.push(ke(Yt.Any,t,i),ke(Yt.Any,"*",i),g?ke(g,t,i):void 0,g?ke(g,"*",i):void 0),function(t){var n=t.filter(function(t){return void 0!==t});if(0!==n.length)return o.mathMin.apply(o,n)}(m)}(r,e,n);if(void 0===h&&!e)return null;switch(h){case void 0:return c;case tn.Erase:return null;case tn.MaskText:return Ci(c);case tn.ScrubCss:return a=function(t,n,i){return""+t+Se+i},c.replace(pi,function(t){for(var n=[],i=1;i-1)return f.substring(v)}return f;default:return(0,Ir.nt)(h);}}var ue={},ae=function(t,n){void 0===n&&(n=window);try{var i=n.location,r=""+i.origin+i.pathname+i.search,e=ue[r];return e?e.lastIndex=0:(e=new RegExp((s=r,($r.test(s)?s.replace(zr,"\\$&"):s)+"/?(#)"),"g"),ue[r]=e),t.replace(e,"https://fs-currenturl.invalid$1")}catch(n){return Ut("cleanCSS",n),t}var s},ce=/^data:/i;function he(t,n){if(ce.test(t))return t;switch(n.source){case"dom":switch(i=n.type){case"frame":case"iframe":return we(t);default:return fe(t);}case"event":switch(i=n.type){case Ot.AJAX_REQUEST:case Ot.NAVIGATE:return fe(t);case Ot.SET_FRAME_BASE:return we(t);default:return(0,Ir.nt)(i);}case"log":return we(t);case"page":var i;switch(i=n.type){case"base":return we(t);case"referrer":case"url":return fe(t);default:return(0,Ir.nt)(i);}case"perfEntry":switch(n.type){case"frame":case"iframe":case"navigation":case"other":return we(t);default:return fe(t);}default:return(0,Ir.nt)(n);}}function fe(t){return ge(de,t)}var ve=cn.DefaultOrgSettings.MaxUrlLength,le=Rr(cn.DefaultOrgSettings.UrlPrivacyConfig),de=Rr(cn.DefaultOrgSettings.UrlPrivacyConfig);function pe(t,n){le=Rr(cn.DefaultOrgSettings.UrlPrivacyConfig.concat(t)),de=Rr(t),ve=n||cn.DefaultOrgSettings.MaxUrlLength}function we(t){return ge(le,t)}function ge(t,n){return function(t,n,i){void 0===i&&(i=Lr);for(var r={Hash:[],Host:[],Path:[],QueryParam:[],Query:[]},e=0,s=t;e").replace(ye,function(t){return he(t,{source:"log",type:"debug"})})}var Ee,Se="https://fs-excluded.invalid";function xe(t){var n,i,r,e,s,o,u,a,c,h,f,v,l,d,p,w;try{for(var g=(Ee={blocklist:{},hasPrefix:!1}).blocklist,m=(null!==(r=null==t?void 0:t.length)&&void 0!==r?r:0)>0?t:cn.DefaultOrgSettings.AttributeBlocklist,y={},b=0,E=m;b-1;var n}var Te="#polyfillshadow";function Ce(t){var n;return(null===(n=t.childNodes)||void 0===n?void 0:n.length)>0}function Pe(t,n){Oe(t.childNodes,n)}function je(t,n){Oe(t.childNodes,n,!0)}function Oe(t,n,i){void 0===i&&(i=!1);for(var r=i?t.length-1:0,e=i?-1:t.length;r!==e;){var s=t[r];s&&"frag"in s&&!St(s)&&Array.isArray(s.frag)?s.frag.length&&Oe(s.childNodes,n,i):n(s),i?--r:++r}}var Me={INPUT:!0,TEXTAREA:!0,NOSCRIPT:!0},Ke=function(){function t(t,n,i){this.Xt=t,this.Jt=n,this.Zt=i,Mi={},Ki=1}return t.prototype.tokenizeNode=function(t,n,i,r,e,s,o){var u=this,a=Ui(n),c=Ui(i),h=[];return function(n){var i=Ki;try{return u.Yt(t,a,c,r,h,e,s,o),!0}catch(t){return Ki=i,!1}}()||(h=[]),h},t.prototype.Yt=function(t,n,i,r,s,o,u,a){for(var c,h,f=[{parentMirror:n,nextMirror:i,node:r}],v=function(t,n){return function(i){i&&t.push({parentMirror:n,nextMirror:null,node:i})}};f.length;){var l=f.pop();if(l)if("string"!=typeof l){var d=l.node,p=ki(d),w=this.tn(t,p,l,s,o,u);if(null!=w&&!(null===(c=w.watchKind)||void 0===c?void 0:c.has(_i.Exclude))){var g=1===d.nodeType?d.shadowRoot:null,m=w.shadowRootType===Te&&window.HTMLSlotElement&&"slot"===p&&d.assignedNodes();if(g||m||Ce(d))if(null===(h=w.watchKind)||void 0===h?void 0:h.has(_i.Defer))a(w.node,Ai.Deferred);else{if(f.push("]"),je(d,v(f,w)),g)f.push({parentMirror:w,nextMirror:null,node:g});else if(m&&m.length>0){for(var y=[],b=!1,E=0,S=m;E1e3)return null;if(!i||1!=i.nodeType)return null;var r=i;if(getComputedStyle(r).display.indexOf("inline")<0)return r;i=i.parentNode}},n}(Ze),ts=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,e.__extends)(n,t),n.prototype.observe=function(t){var n=this;if(t&&1==t.nodeType){var i=t;this.Tn(Ui(t)),this._t.measurer.requestMeasureTask(ii.Medium,function(){n.addEntry(i)})}},n.prototype.unobserveSubtree=function(t){var n=Ui(t);n&&this.Cn(n)},n.prototype.nodeChanged=function(t){var n=this,i=this.Pn(t);this._t.measurer.requestMeasureTask(ii.Medium,function(){for(var t=0,r=i;t0||this.Hn.length>0){var r={},s={};for(var o in this.Gn(t,i,s,r),s){var u=o.split("\t");i.push({Kind:Ot.MUT_ATTR,Args:[parseInt(u[0],10),u[1],s[o]],When:t})}for(var o in r)i.push({Kind:Ot.MUT_TEXT,Args:[parseInt(o,10),r[o]],When:t})}var a=this.Rn;this.Rn=[];for(var c=0;c0&&(i.push({Kind:Ot.DEFERRED_RESOLVED,Args:(0,e.__spreadArray)([],this.Ln),When:t}),this.Ln=[]),this.Nn.length>0){for(var f=0,v=this.Nn;f0&&this.Un.push(es(l))}this.Nn=[]}return i},t.prototype.recordingIsDetached=function(){return!!this.Wn&&this.Wn!=this.Dn.document},t.prototype.$n=function(t,n){if(!this.Kn&&this.Wn){window;var i=this.Xt.allWatchedElements(this.Wn);this.Zn(i,t,n,null,this.Wn,null),this.Jt.nodeChanged(this.Wn),this.qn&&this.Xn(this.Wn),this.Kn=!0,this.Yn(),window}},t.prototype.Yn=function(){var t=this;this.zn=mt(Element.prototype,"attachShadow",!0),this.zn&&this.zn.before(function(n){n.that.shadowRoot||t.Rn.push(n.that)})},t.prototype.Xn=function(t){var n;try{null===(n=this.qn)||void 0===n||n.observe(t,{childList:!0,attributes:!0,characterData:!0,subtree:!0,attributeOldValue:!0,characterDataOldValue:!0})}catch(t){}},t.prototype.Gn=function(t,n,i,r){for(var e,s,o,u,a=this,c={},h={},f=function(i){if(Ui(i)){a.ti(t,n,Ui(i));var r=Ui(i.parentNode);r&&(h[r.id]=r.node)}},v=0;v0)for(var m=0;m0){h[g]=l.target;var y=!(null==(T=l.target)?void 0:T.shadowRoot)||Ie(T.shadowRoot)?null:Ui(T.shadowRoot);y&&(h[y.id]=y.node)}break;case"characterData":Hi(l.target)||l.oldValue!=l.target.textContent&&(r[g]=ie(l.target));break;case"attributes":var b=ki(j=l.target);if("link"===b&&"rel"===l.attributeName&&ee.test(null!==(o=l.oldValue)&&void 0!==o?o:"")){f(j);break}var E,S=Li(j),x=this.Xt.isWatched(j);if($e(x)>$e(S)){f(j);break}De.needsToObserve(S,x)&&(this.Jt.observe(j),(null==x?void 0:x.has(_i.Watch))&&(null===(u=this.Zt)||void 0===u||u.observe(j)),(E=Ui(j))&&(E.watchKind=De.combineKindsPreservePrivacy(S,x)));var k=(void 0===(I=l.attributeNamespace)&&(I=""),(null===I?"":{"http://www.w3.org/1999/xlink":"xlink:","http://www.w3.org/XML/1998/namespace":"xml:","http://www.w3.org/2000/xmlns/":"xmlns:"}[I]||"")+(l.attributeName||"")),_=re(k);if("dialog"===b&&"open"===k)break;if(j.hasAttribute(k)){var A=l.target.getAttribute(k);l.oldValue!=A&&(A=oe(l.target,_,A||"",b),this.Mn(b,l.target,((e={})[_]=A||"",e)),null!==A&&(i[g+"\t"+_]=A))}else i[g+"\t"+_]=null;}}catch(t){}for(var I,T,C=0,P=this.Hn;C0&&i.push({Kind:Ot.MUT_SHADOW,Args:[s,u],When:n},{Kind:Ot.TIMING,Args:[[Nt.Internal,Kt.Serialization,Ht.NodeEncoding,n,a]],When:n})},t.prototype.Zn=function(t,n,i,r,e,s){var o=Di(r)||-1,u=Di(s)||-1,a=-1===o&&-1===u,c=p();window;var h=this.ei(t,r,e,s);window;var f=p()-c;h.length>0&&i.push({Kind:Ot.MUT_INSERT,Args:[o,u,h],When:n},{Kind:Ot.TIMING,Args:[[Nt.Internal,Kt.Serialization,a?Ht.DomSnapshot:Ht.NodeEncoding,n,f]],When:n})},t.prototype.ei=function(t,n,i,r){var e=this;if(n&&Hi(n))return[];for(var s=[],o=this.Bn.tokenizeNode(t,n,r,i,function(t){if(1==t.nodeType){var n=t;if(n.shadowRoot&&e.Xn(n.shadowRoot),"SLOT"===t.nodeName){var i=Ui(t);(null==i?void 0:i.shadowRootType)===Te&&t.addEventListener("slotchange",Tt.wrap(function(n){var i;e.Hn.push(null!==(i=n.target)&&void 0!==i?i:t)}))}}e.jn(t,s)},this.Mn,function(t,n){switch(n){case Ai.Immediate:e.refreshElement(t);break;case Ai.Deferred:e.Nn.push(t);}}),u=0,a=s;u0){var e=n[n.length-1];if(e.Kind==Ot.MUT_REMOVE)return void e.Args.push(r)}n.push({Kind:Ot.MUT_REMOVE,Args:[r],When:t})},t.prototype.setUpIEWorkarounds=function(){var n=this;if(mr){var i=Object.getOwnPropertyDescriptor(Node.prototype,"textContent"),r=i&&i.set;if(!i||!r)throw new Error("Missing textContent setter -- not safe to record mutations.");Object.defineProperty(Element.prototype,"textContent",(0,e.__assign)((0,e.__assign)({},i),{set:function(t){try{for(var n=void 0;n=this.firstChild;)this.removeChild(n);if(null===t||""==t)return;var i=(this.ownerDocument||document).createTextNode(t);this.appendChild(i)}catch(n){r&&r.call(this,t)}}}))}this.si=new tr(t.ThrottleMax,t.ThrottleInterval,function(){return new Yi(function(){n.Fn=!0,n.tearDownIEWorkarounds()}).start()});var s=this.si.guard(function(t){var n=t.cssText;t.cssText=n});this.si.open(),this.oi=mt(CSSStyleDeclaration.prototype,"setProperty"),this.oi&&this.oi.afterSync(function(t){s(t.that)}),this.ui=mt(CSSStyleDeclaration.prototype,"removeProperty"),this.ui&&this.ui.afterSync(function(t){s(t.that)})},t.prototype.tearDownIEWorkarounds=function(){this.si&&this.si.close(),this.oi&&this.oi.disable(),this.ui&&this.ui.disable()},t.prototype.updateConsent=function(){var t=this;this.Wn&&Pe(this.Wn,function(n){return t.refreshElement(n)})},t.prototype.refreshElement=function(t){Di(t)&&this.Hn.push(t)},t.ThrottleMax=1024,t.ThrottleInterval=1e4,t}();function os(t){for(var n=new WeakMap,i=t;i;i=i.parentNode){if(n.has(i))return null;if(n.set(i,!0),11===i.nodeType)break}if(!i)return null;var r=Ui(i);return(null==r?void 0:r.shadowRootType)===Te&&(null==r?void 0:r.parent)?[r.parent.id,r.parent.node]:null}var us="navigation",as="resource",cs="paint",hs="measure",fs="mark",vs="layout-shift",ls="first-input",ds="largest-contentful-paint",ps="longtask",ws=function(){function t(t,n,i,r){var e=this;this._t=t,this.At=n,this.ai=r,this.ci=!1,this.hi=!1,this.fi=!1,this.vi=!1,this.li=!1,this.di=!1,this.pi=!1,this.wi=cn.DefaultOrgSettings.MaxPerfMarksPerPage,this.gi=0,this.mi=!1,this.yi=!1,this.bi=!1,this.Ei=!1,this.Si=0,this.xi=!1,this.qn=null,this.ki=[],this._i=new Yn(function(t){e.Ai=function(){t({timeRemaining:function(){return Number.POSITIVE_INFINITY},didTimeout:!1}),e.Ai=void 0}}),this.Ii=!1;var s=window.performance;s&&(this.fi=!0,s.timing&&(this.vi=!0),s.memory&&(this.di=!0),s.timeOrigin&&(this.pi=!0),"function"==typeof s.getEntries&&(this.li=!0),this.mi=gs(window,vs),this.yi=gs(window,ls),this.bi=gs(window,ds),this.Ei=gs(window,ps),this.T=i.createChild())}return t.prototype.initialize=function(t){var n=t.resourceUploader,i=t.recTimings,r=t.recImgs,e=t.maxPerfMarksPerPage;this.Ti=n,this.hi=i,this.ci=r,this.wi=e||cn.DefaultOrgSettings.MaxPerfMarksPerPage},t.prototype.start=function(){var t=this;this.gi=0;var n=window.performance;n&&(this._t.recording.inFrame||this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.Performance,this.vi,zt.PerformanceEntries,this.li,zt.PerformanceMemory,this.di,zt.PerformanceObserver,!!window.PerformanceObserver,zt.PerformanceTimeOrigin,this.pi,zt.LayoutShift,this.mi,zt.FirstInput,this.yi,zt.LargestContentfulPaint,this.bi,zt.LongTask,this.Ei]}),this.Xn(),!this.qn&&n.addEventListener&&n.removeEventListener&&this.T&&this.T.add(n,"resourcetimingbufferfull",!0,function(){t.At.enqueue({Kind:Ot.RESOURCE_TIMING_BUFFER_FULL,Args:[]})}),this.Ci(),this.Pi())},t.prototype.ji=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(t){switch(t.label){case 0:if(!this.fi||!this.li||0==this.ki.length)return[2];if(this.Ii)return[2];this.Ii=!0,t.label=1;case 1:return t.trys.push([1,,3,4]),[4,this.Oi()];case 2:return t.sent(),[3,4];case 3:return this.Ii=!1,this.ki=[],[7];case 4:return[2];}})})},t.prototype.Mi=function(){return this.Ai?Yn.race([this._i,si(250,1e3)]):this._i},t.prototype.Oi=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var t,n,i,r,s,o,u,a;return(0,e.__generator)(this,function(e){switch(e.label){case 0:t=0,n=0,i=this.ki,e.label=1;case 1:if(!(nt?[4,this.Mi()]:[3,4]):[3,6];case 3:a=e.sent(),t=p()+Math.max(a.timeRemaining(),15),e.label=4;case 4:this.Ki(u),e.label=5;case 5:return s++,[3,2];case 6:return n++,[3,1];case 7:return[2];}})})},t.prototype.onLoad=function(){this.xi||(this.xi=!0,this.vi&&(this.Ri(performance.timing),this.ji()))},t.prototype.tick=function(){this.Ci()},t.prototype.stop=function(){var t;this.T&&this.T.clear(),this.Ti=void 0;var n=[];this.qn?(this.qn.takeRecords&&(n=this.qn.takeRecords()),this.qn.disconnect()):window.performance&&window.performance.getEntries&&(n=window.performance.getEntries()),n.length>300&&(n=n.slice(0,300),this.At.enqueue({Kind:Ot.RESOURCE_TIMING_BUFFER_FULL,Args:[]})),this.Ci(),null===(t=this.Ai)||void 0===t||t.call(this),this.ki.push(n),this.ji()},t.prototype.Xn=function(){var t=this;if(!this.qn&&this.li&&window.PerformanceObserver){this.ki.push(performance.getEntries()),this.ji(),this.qn=new window.PerformanceObserver(function(n){var i=n.getEntries();t.ki.push(i),t.ji()});var n=[us,as,hs,fs];window.PerformancePaintTiming&&n.push(cs),this.mi&&n.push(vs),this.yi&&n.push(ls),this.bi&&n.push(ds),this.Ei&&n.push(ps),this.qn.observe({entryTypes:n})}},t.prototype.Ci=function(){if(this.di&&!this._t.recording.inFrame){var t=performance.memory;if(t){var n=t.usedJSHeapSize-this.Si;(0==this.Si||o.mathAbs(n/this.Si)>.2)&&(this.Hi(Qt.Memory,t,Vt.Memory),this.Si=t.usedJSHeapSize)}}},t.prototype.Pi=function(){var t={timeOrigin:d.timeOrigin};this.Hi(Qt.TimeOrigin,t,Vt.TimeOrigin)},t.prototype.Ki=function(t){switch(t.entryType){case us:this.Ni(t);break;case as:this.Li(t);break;case cs:this.Ui(t);break;case hs:this.Fi(t);break;case fs:this.Di(t);break;case vs:this.Bi(t);break;case ls:this.Wi(t);break;case ds:this.qi(t);break;case ps:this.Qi(t);}},t.prototype.Ri=function(t){this.Hi(Qt.Timing,t,Vt.Timing)},t.prototype.Ni=function(t){this.Hi(Qt.Navigation,t,Vt.Navigation,{name:us})},t.prototype.Li=function(t){if(this.hi){var n=t.initiatorType;(this.ci||"img"!==n&&"image"!==n)&&this.Hi(Qt.Resource,t,Vt.Resource,{name:n})}},t.prototype.Ui=function(t){this.Hi(Qt.Paint,t,Vt.Measure)},t.prototype.Di=function(t){this.Hi(Qt.Mark,t,Vt.Measure)},t.prototype.Fi=function(t){this.Hi(Qt.Measure,t,Vt.Measure)},t.prototype.Bi=function(t){this.Hi(Qt.LayoutShift,t,Vt.LayoutShift)},t.prototype.Wi=function(t){this.Hi(Qt.FirstInput,t,Vt.FirstInput)},t.prototype.qi=function(t){this.Hi(Qt.LargestContentfulPaint,t,Vt.LargestContentfulPaint)},t.prototype.Qi=function(t){this.Hi(Qt.LongTask,t,Vt.Measure)},t.prototype.Hi=function(t,n,i,r){if(void 0===r&&(r={}),!this.atLimit(t)){for(var e=[t],s=0,o=i;s=this.wi)return!0;this.gi++;}return!1},t}();function gs(t,n){var i,r;return(null!==(r=null===(i=t.PerformanceObserver)||void 0===i?void 0:i.supportedEntryTypes)&&void 0!==r?r:[]).indexOf(n)>-1}function ms(t){var n=0,i={id:n++,edges:{}};return t.split("\n").forEach(function(t){var r=t.trim();if(""!=r){if(0==r.indexOf("/")||r.lastIndexOf("/")==r.length-1)throw new Error("Leading and trailing slashes are not supported");var e=i,s=r.split("/");s.forEach(function(t,i){var r=t.trim();if(""===r)throw new Error("Empty elements are not allowed");if("**"!=r&&"*"!=r&&-1!=r.indexOf("*"))throw new Error("Embedded wildcards are not supported");var o=null;r in e.edges&&(o=e.edges[r]),o||(o={id:n++,edges:{}},e.edges[r]=o),i==s.length-1&&(o.term=!0),e=o})}}),i}var ys=ms("**");function bs(t,n,i){if(!js(i)){try{for(var r=[],e=0,s=i;e=n&&(v?e=void 0:(e="_fs_trimmed_values",v=!0)),f[f.length-1]--,e&&e!==cn.BlockedFieldValue&&s?f.push(o.objectKeys(e).length):c.pop();f[f.length-1]<=0;)f.pop(),c.pop();for(var u=0,a=r;u0&&l!==f.length-1)throw new Error("Property matcher depth out of sync")}return e})}catch(t){Tt.sendToBugsnag(t,"error")}return"[error serializing "+t.constructor.name+"]"}}var Es=function(){function t(t){this.zi=1;var n=[t];t.edges["**"]&&n.push(t.edges["**"]),this.$i=[n]}return t.prototype.Gi=function(){if(this.$i.length<=0)return[];var t=this.$i.length-1,n=this.$i[t];return"number"==typeof n?this.$i[t-1]:n},t.prototype.depth=function(){return this.zi},t.prototype.isRedacted=function(t){var n=this.Gi();return 0===n.length||t&&!n.some(function(t){return t.term})},t.prototype.push=function(t){var n;this.zi++;var i=this.Gi(),r=[];function e(n){n.edges["**"]&&(r.push(n.edges["**"],Ss(n)),e(n.edges["**"])),n.edges["*"]&&r.push(n.edges["*"]),n.edges[t]&&r.push(n.edges[t])}for(var s=0,o=i;s0&&this.zi--;var t=this.$i[this.$i.length-1];"number"==typeof t&&t>1?this.$i[this.$i.length-1]--:this.$i.pop()},t}();function Ss(t){var n=t.edges["**"];if(!n)throw new Error("Node must have double-wildcard edge.");return ot(t.edges,1)?{id:-n.id,edges:{"**":n}}:t}var xs,ks,_s,As=function(){function t(t){this.Xi=t,this.Ji=null}return t.prototype.disable=function(){this.Ji&&(this.Ji.disable(),this.Ji=null)},t.prototype.enable=function(t){var n,i=this,r=T(t),s=null===(n=null==r?void 0:r._w)||void 0===n?void 0:n.fetch;(s||t.fetch)&&(this.Ji=mt(s?r._w:t,"fetch"),this.Ji&&this.Ji.afterSync(function(t){var n=t.result;t.result=(0,e.__awaiter)(i,void 0,void 0,function(){return(0,e.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.Zi(n,t.args[0],t.args[1])];case 1:case 2:return i.sent(),[3,3];case 3:return[2,n];}})})}))},t.prototype.Zi=function(t,n,i){return(0,e.__awaiter)(this,void 0,Yn,function(){var r,s,o,u,a,c;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return r="GET",s="",a=!1,"string"==typeof n?s=n:"url"in n?(s=n.url,r=n.method,o=n.body,u=n.headers,a=!!n.signal):s=""+n,s?(i&&(r=i.method||r,u=Ds(i.headers),o=i.body||o,a=!!i.signal||a),c=this.Yi(t),a&&s.search(/\/(graphql|gql)/i)>-1?[4,Yn.race([c,ni(5e3)])]:[3,2]):[2];case 1:e.sent(),e.label=2;case 2:return this.Xi.startRequest(r,s,{body:function(){return o},headers:u},c),[2];}})})},t.prototype.Yi=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n,i,r,s;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return[4,t];case 1:if(n=e.sent(),i=n.headers,r=(i.get("content-type")||"default").split(";")[0],!(["default","text/plain","text/json","application/json"].indexOf(r)>-1))return[2,{status:n.status,data:{headers:i,body:null}}];s=null,e.label=2;case 2:return e.trys.push([2,4,,5]),[4,n.clone().text()];case 3:return s=e.sent(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2,{status:n.status,data:{headers:i,body:s}}];}})})},t}(),Is=function(){function t(t){this.Xi=t,this.tr=new WeakMap}return t.prototype.disable=function(){this.nr&&(this.nr.disable(),this.nr=null),this.ir&&(this.ir.disable(),this.ir=null),this.rr&&(this.rr.disable(),this.rr=null)},t.prototype.er=function(t){var n=this.tr.get(t);if(n)return n;var i={};return this.tr.set(t,i),i},t.prototype.enable=function(t){var n,i,r,s,o=this,u=T(t),a=(null===(n=null==u?void 0:u._w)||void 0===n?void 0:n.XMLHttpRequest)||t.XMLHttpRequest;if(a){var c=a.prototype;this.nr=null===(i=mt(c,"open"))||void 0===i?void 0:i.before(function(t){var n=o.er(t.that);n.method=t.args[0],n.url=t.args[1]}),this.rr=null===(r=mt(c,"setRequestHeader"))||void 0===r?void 0:r.before(function(t){var n=t.that,i=t.args[0],r=t.args[1],e=o.er(n);e.headers||(e.headers=[]),e.headers.push([i,r])}),this.ir=null===(s=mt(c,"send"))||void 0===s?void 0:s.before(function(t){var n=t.that,i=t.args[0],r=o.er(n),s=r.url,u=r.method,a=r.headers;void 0!==s&&void 0!==u&&(o.tr["delete"](n),o.Xi.startRequest(u,s,{headers:Ds(a),body:i},function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n;return(0,e.__generator)(this,function(i){switch(i.label){case 0:return[4,new Yn(function(n){t.addEventListener("readystatechange",function(){t.readyState===XMLHttpRequest.DONE&&n()}),t.addEventListener("load",n),t.addEventListener("error",n)})];case 1:return i.sent(),n=function(t){if(t)return{forEach:function(n){for(var i,r=/([^:]*):\s+(.*)(?:\r\n|$)/g;i=r.exec(t);)n(i[2],i[1])}}}(t.getAllResponseHeaders()),[2,{status:t.status,data:{headers:n,body:function(){return"text"===t.responseType?t.responseText:t.response}}}];}})})}(n)))})}},t}(),Ts=/^data:/i,Cs=function(){function t(t,n){this._t=t,this.At=n,this.sr=!1,this.ur=new Ps(t,n),this.ar=new Is(this.ur),this.cr=new As(this.ur)}return t.prototype.isEnabled=function(){return this.sr},t.prototype.start=function(t){t.AjaxWatcher&&(this.sr||(this.sr=!0,this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.Ajax,!0]}),this.ar.enable(this._t.window),this.cr.enable(this._t.window)))},t.prototype.stop=function(){this.sr&&(this.sr=!1,this.ar.disable(),this.cr.disable())},t.prototype.tick=function(){this.ur.tick()},t.prototype.setWatches=function(t){this.ur.setWatches(t)},t.prototype.initialize=function(t){this.ur.initialize(t)},t}(),Ps=function(){function t(t,n){this._t=t,this.At=n,this.hr=[],this.vr={},this.lr={},this.dr=[],this.pr=0;var i=cn.DefaultOrgSettings;this.initialize({requests:i.HttpRequestHeadersAllowlist,responses:i.HttpResponseHeadersAllowlist,maxAjaxPayloadLength:i.MaxAjaxPayloadLength})}return t.prototype.wr=function(t){for(var n=!1,i=!1,r=[],e=[],s=0,o=this.hr;s-1}function Os(t,n,i){return[t.length,Ns(t,n,i)]}function Ms(t,n,i){var r=void 0;return js(n)||(r=bs(t,i,n)),[Hs(t),r]}function Ks(t,n){var i=t.byteLength,r=void 0;return js(n)||(r="[ArrayBuffer]"),[i,r]}function Rs(t,n,i){return(0,e.__awaiter)(this,void 0,Yn,function(){var r,s,o,u,a;return(0,e.__generator)(this,function(e){switch(e.label){case 0:if(s=(r=t).size,js(n))return[2,[s,void 0]];switch(r.type){case"application/json":case"application/vnd.api+json":case"text/plain":return[3,1];}return[3,4];case 1:return e.trys.push([1,3,,4]),[4,r.text()["catch"](function(t){Tt.sendToBugsnag(t,"warning")})];case 2:return(o=e.sent())&&(u=Ns(o,n,i))?[2,[s,u]]:[3,4];case 3:return a=e.sent(),Tt.sendToBugsnag(a,"warning"),[3,4];case 4:return[2,[s,"[Blob]"]];}})})}function Hs(t){try{return o.jsonStringify(t).length}catch(t){}return 0}function Ns(t,n,i){if(!js(n))try{return bs(o.jsonParse(t),i,n)}catch(r){return n.length>0&&n.every(function(t){return!0===t})?t.slice(0,i):void 0}}function Ls(t,n){switch(t){default:case Zt.Elide:return!1;case Zt.Record:return!0;case Zt.Allowlist:try{return ms(n)}catch(t){return!1}}}function Us(t,n,i,r){var s;return(0,e.__awaiter)(this,void 0,Yn,function(){var o,u,a,c,h,f,v;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return o="",null===(s=r.headers)||void 0===s||s.forEach(function(n,i){var r=i.toLowerCase(),e=t[r];o+=r+(e?": "+n:"")+"\r\n"}),"function"!=typeof(u=null==r?void 0:r.body)?[3,2]:[4,u()];case 1:return a=e.sent(),[3,3];case 2:a=u,e.label=3;case 3:return[4,Fs(n,a,i)];case 4:return c=e.sent(),h=c[0],f=c[1],v=0!==h||f?qt.NotEmpty:qt.Unknown,[2,{headers:o,text:f,size:h,legibility:v}];}})})}function Fs(t,n,i){return void 0===i&&(i=cn.DefaultOrgSettings.MaxAjaxPayloadLength),(0,e.__awaiter)(this,void 0,Yn,function(){var r;return(0,e.__generator)(this,function(e){if(null==n)return[2,[0,void 0]];switch(typeof n){default:return[2,[-1,js(t)?void 0:"[unknown]"]];case"string":return[2,Os(n,t,i)];case"object":switch(r=n.constructor){case Object:default:return[2,Ms(n,t,i)];case Blob:return[2,Rs(n,t,i)];case ArrayBuffer:return[2,Ks(n,t)];case Document:case FormData:case URLSearchParams:case ReadableStream:return[2,[-1,js(t)?void 0:""+r.name]];}}return[2]})})}function Ds(t){return t?tt(t)?{forEach:function(n){for(var i=0,r=t;i-1){if(n.unshift(e),r instanceof CSSStyleSheet)break;i=r}else Tt.sendToBugsnag("Could not find intermediate rule in parent","warning")}return n},t.prototype.Wr=function(t,n){for(var i=0;i=t?(this.oe-=t,[!0,0]):[!1,(t-this.oe)/this.ne]},t}())(2,2e5),ho=new Set(["measureText","getImageData","getError","getTransform","isContextLost","isEnabled","isFramebuffer","isProgram","isRenderbuffer","isShader","isTexture"]),fo=new Set(["fillText"]),vo=function(){function t(t,n,i,r){this.At=n,this.Ti=i,this.ai=r,this.ue=dn.CaptureCanvasOps,this.ae=[],this.ce=[],this.he=new WeakMap,this.fe=new WeakMap,this.ve=new Set,this.le=0,this.de=new WeakMap,this.pe=!1,this.we=new WeakMap,this.ge=new Set,this.me=new WeakMap,this.ye=1,this.be=new WeakMap,this.Ee=1,this.Se=0,this.xe=!1}return t.prototype.start=function(t){var n,i=this;if(t.CanvasWatcherMode&&(this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.CanvasWatcherEnabled,!0]}),this.pe=!0,this.ue=null!==(n=t.CanvasWatcherMode)&&void 0!==n?n:dn.CaptureCanvasOps,this.Ji("2d",CanvasRenderingContext2D),this.Ji("webgl",WebGLRenderingContext),this.ue===dn.ScreenshotCanvas)){if(!HTMLCanvasElement.prototype.toDataURL)return;this.le=setInterval(function(){return i.screenshotConnectedCanvases()},1e3)}},t.prototype.ke=function(t,n){return"object"!=typeof n?[void 0,0]:(this.be.has(n)||this.be.set(n,[t,this.Ee++]),this.be.get(n))},t.prototype.Ji=function(t,n){var i=this;if(n)for(var r=n.prototype,e=function(e){if(ho.has(e))return"continue";var o=Object.getOwnPropertyDescriptor(r,e);if("function"==typeof(null==o?void 0:o.value)){var u=mt(r,e);u&&(u.afterSync(function(n){return i._e(t,e,n.that,n.args,n.result)}),s.ae.push(u))}else"function"==typeof(null==o?void 0:o.set)&&s.ce.push(yt(n,e,s.Ae(t,e)))},s=this,o=0,u=Object.keys(r);o0){var o=n;if(!o){var u=t instanceof HTMLCanvasElement?Ui(t):void 0,a=t instanceof HTMLCanvasElement&&St(t);o=null!==(r=null==u?void 0:u.mask)&&void 0!==r?r:a}this.Pe(t,e,s,o)}return e}},t.prototype.je=function(t,n,i,r,e,s,o){var u;switch(typeof r){case"string":return e?Ci(r):r;case"number":case"boolean":case"bigint":return r;case"undefined":return{undef:!0};case"object":if(!r)return r;try{o.set(r,!0)}catch(t){}var a=null===(u=Object.getPrototypeOf(r))||void 0===u?void 0:u.constructor,c=(null==a?void 0:a.name)||function(t){var n;if(t){var i=t.toString(),r=po.exec(i);return r||(r=wo.exec(i)),null===(n=null==r?void 0:r[1])||void 0===n?void 0:n.trim()}}(a),h={ctor:c};if(r instanceof Node&&(l=Di(r)))return h.id=l,h;switch(c){case"Array":return this.Se+=r.length,this.Oe(t,n,i,r,e,s,o);case"CanvasGradient":return h;case"HTMLImageElement":var f=he(r.src,{source:"dom",type:"canvas"});return this.ai.record(f),h.src=f,h;case"HTMLCanvasElement":var v=r,l=this.flush(v,e);return h.srcId=l,h;}if(function(t){var n;return!!(null===(n=Object.prototype.toString.call(t))||void 0===n?void 0:n.match(lo))}(r))return this.be.has(r)?this.Me(r,h,e):(h.typedArray="["+r.toString()+"]",this.Se+=r.length,h);if("object"==typeof r&&this.be.has(r))return this.Me(r,h,e);if(r instanceof WebGLBuffer||r instanceof WebGLTexture){var d=void 0;switch(s){case"bindTexture":d=this.Ke(t,"createTexture",n,i,r);break;case"bindBuffer":d=this.Ke(t,"createBuffer",n,i,r);}if(void 0!==d)return this.Me(r,h,e)}var p=r;for(var w in h.obj={},p){try{switch(typeof p[w]){case"function":continue;case"object":if(p[w]&&o.has(p[w]))continue;}}catch(t){continue}++this.Se,h.obj[w]=this.je(t,n,i,p[w],e,s,o)}return h;default:return null;}},t.prototype.Me=function(t,n,i){var r=this.be.get(t),e=r[0],s=r[1];return this.flush(e,i),n.ref=s,delete n.ctor,n},t.prototype.Ke=function(t,n,i,r,e){var s=this.ke(i,e),o=(s[0],s[1]);return this.Re(r,[[t,ln.Function,n,[],o]]),o},t.prototype.Oe=function(t,n,i,r,e,s,o){var u=this;return void 0===o&&(o=new WeakMap),this.Se+=r.length+1,r.map(function(r){return u.je(t,n,i,r,e,s,o)})},t.prototype.Pe=function(t,n,i,r){var e=this;if(void 0===r&&(r=!1),!this.xe){var s=i.map(function(i){var s=i[0],o=i[1],u=i[2],a=i[3],c=i[4];return[s,o,u,e.Oe(s,t,n,a,r&&fo.has(u),u),c]});if(!this.he.has(t)&&(this.he.set(t,!0),i.some(function(t){return"2d"===t[0]}))){var o=this.He(t);if(o.length>0)return o.push.apply(o,s),void this.Re(n,o)}this.Re(n,s)}},t.prototype.Re=function(t,n){if(!this.xe){var i=co.hasCapacityFor(this.Se),r=i[0];i[1],this.Se=0,r?this.At.enqueue({Kind:Ot.CANVAS,Args:[t,n]}):this.xe=!0}},t.prototype.He=function(t){var n=t.getContext("2d");if(!n)return[];var i=[];if((n instanceof CanvasRenderingContext2D||n instanceof OffscreenCanvasRenderingContext2D)&&"function"==typeof n.getTransform){var r=n.getTransform();if(!r.isIdentity){var e=r.a,s=r.b,o=r.c,u=r.d,a=r.e,c=r.f;i.push(["2d",ln.Function,"transform",[e,s,o,u,a,c],-1])}}return i},t.prototype.Ne=function(t,n){t instanceof HTMLCanvasElement&&(this.ue===dn.ScreenshotCanvas?(this.fe.set(t,!0),this.ve.add(t)):(this.ge.add(t),this.Ie(t,n)))},t.prototype._e=function(t,n,i,r,e){for(var s=[],o=0;o))/m,mo=/^(eval@)?(\[native code\])?$/;function yo(t){if(!t||"string"!=typeof t.stack)return[];var n=t;return n.stack.match(go)?n.stack.split("\n").filter(function(t){return!!t.match(go)}).map(function(t){var n=t;n.indexOf("(eval ")>-1&&(n=n.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var i=n.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/\(native code\)/,"").split(/\s+/).slice(1),r=Eo(i.pop());return bo(i.join(" "),["eval",""].indexOf(r[0])>-1?"":r[0],r[1],r[2])}):n.stack.split("\n").filter(function(t){return!t.match(mo)}).map(function(t){var n=t;if(n.indexOf(" > eval")>-1&&(n=n.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===n.indexOf("@")&&-1===n.indexOf(":"))return[n,"",-1,-1];var i=n.split("@"),r=Eo(i.pop());return bo(i.join("@"),r[0],r[1],r[2])})}function bo(t,n,i,r){return[t||"",n||"",parseInt(i||"-1",10),parseInt(r||"-1",10)]}function Eo(t){if(!t||-1===t.indexOf(":"))return["","",""];var n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return n?[n[1]||"",n[2]||"",n[3]||""]:["","",""]}var So,xo,ko=["log","info","warn","error","debug","_fs_debug","assert","trace"],_o=ko.filter(function(t){return!/debug/.test(t)}),Ao=function(t,n,i){void 0===i&&(i=!0);var r=Qi(t,n);return i?be(r):r},Io=function(){function t(t,n,i){this.At=n,this.sr=!1,this.Fe=!1,this.De=0,this.Dt=[],this.Be=cn.DefaultOrgSettings.MaxConsoleLogPerPage,this.Dn=t.window,this.T=i.createChild()}return t.prototype.initializeMaxLogsPerPage=function(t){this.Be=t||cn.DefaultOrgSettings.MaxConsoleLogPerPage},t.prototype.We=function(){return"\"[received more than "+this.Be+" messages]\""},t.prototype.start=function(t){var n=this;if(t.ConsoleWatcher&&(this.T.add(this.Dn,"error",!0,function(t){return n.addError(t)}),this.T.add(this.Dn,"unhandledrejection",!0,function(t){n.addError({error:t.reason,message:"Uncaught (in promise)",filename:"",lineno:0,colno:0})},!0),!this.sr))if(this.sr=!0,this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.Console,!0]}),this.Dn.console)for(var i=function(t){var i=mt(r.Dn.console,t);if(!i)return"continue";"assert"===t?i.before(function(i){var r=i.args;r[0]||n.qe(t,Array.prototype.slice.apply(r,[1]))}):i.before(function(i){var r=i.args;return n.qe(t,r)}),r.Dt.push(i)},r=this,e=0,s=_o;e5e5)return!1;var i=Ws(Bs(t));return!!i&&(!!("style"===ki(t)&&i.length>0&&Xs.test(n))||function(t){var n;try{if((null===(n=t.classList)||void 0===n?void 0:n.contains("fs-css-in-js"))||t.hasAttribute("data-fela-type")||t.hasAttribute("data-aphrodite"))return!0}catch(t){Tt.sendToBugsnag(t,"error")}return!1}(t))}(s)&&(null==n||n.push(function(){u.snapshotEl(s),"link"===ki(s)&&i.T.add(s,"load",!1,function(){u.snapshotEl(s)})}));break;case"CANVAS":this._t.measurer.requestMeasureTask(ii.Low,function(){return i.us[So.Canvas].flush(t)});break;default:t.nodeName&&"#"!==t.nodeName[0]&&t.nodeName.indexOf("-")>-1&&this.us[So.CustomElement].onCustomNodeVisited(t);}if("scrollLeft"in t&&"scrollTop"in t){var a=t;this._t.measurer.requestMeasureTask(ii.Low,function(){0==a.scrollLeft&&0==a.scrollTop||i.Ps(a)})}null==n||n.push(function(){i._t.measurer.requestMeasureTask(ii.Low,function(){i.us[So.Animation].snapshot(t)})})},t.prototype.On=function(t){var n,i=t.node,r=ki(t.node);if("iframe"===r)this.$e(t.node);else if("function"==typeof i.getElementsByTagName)for(var e=null!==(n=i.getElementsByTagName("iframe"))&&void 0!==n?n:[],s=0;s-1&&s.push(i.href),("img"===t||"source"===t)&&(e=i.srcset)&&null==e.match(/^\s*$/))for(var c=0,h=e.split(",");c0)return i[0]}}return t.target}function Mo(t){var n;return!!(null!==(n=t._fs_trust_event)&&void 0!==n&&n||t.isTrusted)}var Ko,Ro=function(){function t(t,n){this.Vr=t,this.Gs=n,this.Xs=[],this.Js=0}return t.prototype.add=function(t){this.Xs.length>0&&this.Xs[this.Xs.length-1].When===t.When&&this.Xs.pop(),0===this.Xs.length?(this.Vr.push(t),this.Js=t.When):t.When>this.Js&&(this.Js=t.When),this.Xs.push(t)},t.prototype.finish=function(t,n){void 0===n&&(n=[]);var i=this.Xs.length;if(i<=1)return!1;for(var r=[],s=this.Xs[0].When,o=this.Xs[i-1].When,u=o-s!=0?o-s:1,a=0;a0&&this.Zs--,Lo(this.Wn.prev)},t.prototype.shift=function(){return this.Zs>0&&this.Zs--,Lo(this.Wn.next)},t}();function No(t,n){var i=t.next;n.next=i,n.prev=t,t.next=i.prev=n}function Lo(t){var n=t.prev,i=t.next;return n.next=i,i.prev=n,t.value}!function(t){t[t.rageWindowMillis=2e3]="rageWindowMillis",t[t.defaultRageThreshold=5]="defaultRageThreshold",t[t.rageThresholdIfPageChanges=8]="rageThresholdIfPageChanges",t[t.thresholdChangeQuiescenceMillis=2e3]="thresholdChangeQuiescenceMillis"}(Ko||(Ko={}));var Uo=function(){function t(t,n){var i,r;void 0===n&&(n=w),this._t=t,this.Ys=n,this.no=new Ho,this.io=Ko.defaultRageThreshold,this.ro=-1,this.eo=new WeakMap;var e=t.recording.pageResponse();if(!e)throw new Error("Attempt to construct EasyBake before rec/page response is set.");for(var s=[".fs-ignore-rage-clicks",".fs-ignore-rage-clicks *"],o=0,u=null!==(r=null===(i=e.BehaviorSignalSettings)||void 0===i?void 0:i.ElementBlocks)&&void 0!==r?r:[];o-1&&(s.push(a.Selector),s.push(a.Selector+" *"))}var c=s.join(", ");Be(c)?this.so=[c]:this.so=s}return t.prototype.oo=function(t){var n=this.eo.get(t);if(void 0!==n)return n;for(var i=0,r=this.so;i=this.io){var a=this._t.recording.getCurrentSessionURL,c={eventStartTimeStamp:this.no.first(),eventEndTimeStamp:i,eventReplayUrlAtStart:a(),eventReplayUrlAtCurrentTime:a(!0)};this.dispatchRageClickEvent(r,c),this.io=Ko.defaultRageThreshold,this.no=new Ho}}}}}},t.prototype.dispatchRageClickEvent=function(t,n){var i,r="fullstory/rageclick";try{i=new CustomEvent(r,{detail:n,bubbles:!0,cancelable:!0})}catch(t){(i=document.createEvent("customevent")).initCustomEvent(r,!0,!0,n)}o.setWindowTimeout(window,Tt.wrap(function(){t.dispatchEvent(i)}),0)},t}(),Fo=function(){function t(t){this._t=t,this.uo=this._t.time.wallTime(),this.ao=!1}return t.prototype.getLastUserAcitivityTS=function(){return this.uo},t.prototype.getMsSinceLastUserAcivity=function(){return o.mathFloor(this._t.time.wallTime()-this.uo)},t.prototype.resetUserActivity=function(){this.uo=this._t.time.wallTime()},t.prototype.isHibernating=function(){return this.ao},t.prototype.setHibernating=function(){this.ao=!0},t}(),Do=function(){function t(t,n,i,r){void 0===r&&(r=Yi),this._t=t,this.co=n,this.At=i,this.ho=!1,this.fo=!1,this.vo=cn.HeartbeatInitial,this.lo=cn.PageInactivityTimeout,this.heartbeatTimeout=new r(this["do"].bind(this)),this.hibernationTimeout=new r(this.po.bind(this),this.lo)}return t.prototype.getUserActivityModel=function(){return this.co},t.prototype.manualHibernateCheck=function(){this.co.isHibernating()||this.co.getMsSinceLastUserAcivity()>=cn.PageInactivityTimeout+5e3&&this.po()},t.prototype.scanEvents=function(t){if(!this.ho){this.manualHibernateCheck();for(var n=!1,i=0,r=t;icn.HeartbeatMax&&(this.vo=cn.HeartbeatMax),this.heartbeatTimeout.start(this.vo)},t.prototype.po=function(){if(!this.co.isHibernating()){var t=!1;this.co.getMsSinceLastUserAcivity()<=2*cn.PageInactivityTimeout?this.At.enqueue({Kind:Ot.UNLOAD,Args:[Wt.Hibernation]}):t=!0;try{this.ho=!0,this.co.setHibernating(),this.shutdown(),this.At.onHibernate(t)}finally{this.ho=!1}}},t.prototype.wo=function(){this.fo||(this.fo=!0,this._t.recording.splitPage(Wt.Hibernation))},t}(),Bo=function(){function t(t,n,i,r,e,s){void 0===r&&(r=function(){return[]}),void 0===e&&(e=Zi),void 0===s&&(s=Yi),this._t=t,this.mo=n,this.yo=r,this.bo=e,this.Eo=0,this.So=[],this.xo=!1,this.ko=!1,this._o=0,this.Ao=-1,this.Io=!1,this.Qt=[],this.To=new this.bo(cn.CurveSamplingInterval),this.Co=new this.bo(cn.MutationProcessingInterval),i&&(this.Po=new Do(this._t,i,this,s))}return t.prototype.startPipeline=function(t){var n;return(0,e.__awaiter)(this,void 0,Yn,function(){var i,r=this;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return this.ko||this.xo?[2]:(this.xo=!0,t.frameId&&(this.Eo=t.frameId),t.parentIds&&(this.So=t.parentIds),i=!0,[4,ei()]);case 1:return e.sent(),this.processEvents(),[4,ei()];case 2:return e.sent(),window,this.Co.start(function(){window,r.processEvents(),window}),this.To.start(function(){window,r.processEvents(i),window}),null===(n=this.Po)||void 0===n||n.start(),this.mo.startPipeline(t),window,[2];}})})},t.prototype.enableEasyBake=function(){this.jo=new Uo(this._t)},t.prototype.enqueueSimultaneousEventsIn=function(t){if(0===this._o){var n=this._t.time.now();this.Ao=n>this.Ao?n:this.Ao}try{return this._o++,t(this.Ao)}finally{this._o--,this._o<0&&(this._o=0)}},t.prototype.enqueue=function(t){var n=this._o>0?this.Ao:this._t.time.now();this.Oo(n,t),Ji.checkForBrokenSchedulers()},t.prototype.Oo=function(t,n){var i;if(!this.ko){var r=t;r0){var n=t;n.When=this.Qt[0].When,this.Qt.unshift(n)}else this.enqueue(t)},t.prototype.addUnload=function(t){this.Io||(this.Io=!0,this.enqueue({Kind:Ot.UNLOAD,Args:[t]}),this.singSwanSong(t))},t.prototype.shutdown=function(t){this.addUnload(t),this.Mo(),this.ko=!0,this.Ko()},t.prototype.Mo=function(){this.processEvents(),this.mo.flush()},t.prototype.singSwanSong=function(t){this.ko||(window,this.Mo(),t===Wt.Hidden&&this.Io||this.mo.singSwanSong(),window)},t.prototype.rebaseIframe=function(t,n){for(var i=Math.max(0,n),r=this._t.time.startTime(),e=function(n){var e=r+n-t;return e>=i?e:i},s=0,o=this.Qt;s0){var f=h[h.length-1].Args[2];f&&(h[0].Args[9]=f)}}for(var v in s)s[l=parseInt(v,10)].finish(Ot.SCROLL_LAYOUT_CURVE,[l]);for(var v in o)o[l=parseInt(v,10)].finish(Ot.SCROLL_VISUAL_OFFSET_CURVE,[l]);for(var v in e){var l;e[l=parseInt(v,10)].finish(Ot.TOUCHMOVE_CURVE,[l])}return n&&n.finish(Ot.RESIZE_VISUAL_CURVE),i}(n);t||(i=i.concat(this.yo())),this.Ro(i),this.sendEvents(this._t.recording.pageSignature(),i)}},t.prototype.sendEvents=function(t,n){var i;0!=n.length&&(null===(i=this.Po)||void 0===i||i.scanEvents(n),this.mo.enqueueEvents(t,n))},t.prototype.onHibernate=function(t){t||this.Mo(),this.mo.singSwanSong(),this.mo.stopPipeline()},t.prototype.Ro=function(t){if(this.Eo)for(var n=this.So,i=n&&n.length>0,r=0;r>>0).toString(16)).slice(-8);return t},t}();function qo(t){var n=new Wo(1);return n.writeAscii(t),n.sumAsHex()}function Qo(t){var n=new Uint8Array(t);return Vo(String.fromCharCode.apply(null,n))}function Vo(t){var n;return(null!==(n=window.btoa)&&void 0!==n?n:zo)(t).replace(/\+/g,"-").replace(/\//g,"_")}function zo(t){for(var n=String(t),i=[],r=0,e=0,s=0,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.charAt(0|s)||(o="=",s%1);i.push(o.charAt(63&r>>8-s%1*8))){if((e=n.charCodeAt(s+=3/4))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|e}return i.join("")}function $o(t,n,i,r){return void 0===r&&(r=new Wo),(0,e.__awaiter)(this,void 0,Yn,function(){var s,o,u,a;return(0,e.__generator)(this,function(e){switch(e.label){case 0:s=t.now(),o=i.byteLength,u=0,e.label=1;case 1:return u25?[4,n(100)]:[3,3]:[3,5];case 2:e.sent(),s=t.now(),e.label=3;case 3:a=new Uint8Array(i,u,Math.min(o-u,1e4)),r.write(a),e.label=4;case 4:return u+=1e4,[3,1];case 5:return[2,{hash:r.sum(),hasher:r}];}})})}var Go=6e6,Xo="resource-uploader",Jo=function(){function t(t,n,i,r,e){void 0===r&&(r=window.FormData),void 0===e&&(e=Yi),this._t=t,this.At=n,this.Ho=i,this.No=r,this.Lo=e,this.pe={},this.Uo={},this.Fo=!1,this.Do=[]}return t.prototype.init=function(){this.No&&this.Bo()["catch"](function(t){Tt.sendToBugsnag(t,"error")})},t.prototype.Bo=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var t,n,i,r,s,o,u,a,c,h,f,v,l,d,p,w,g,m,y,b,E,S,x,k,_;return(0,e.__generator)(this,function(e){switch(e.label){case 0:t=this._t.options.orgId,e.label=1;case 1:return[4,this.Wo()];case 2:for(n=e.sent(),i={fsnv:{},sha1:{}},r={},s=0,o=n;sGo){var r=he(t,{source:"log",type:"bugsnag"});return Tt.sendToBugsnag("Size of blob resource exceeds limit","warning",{url:r,MaxResourceSizeBytes:Go}),void i(null)}(function(t){var n=ti(),i=n.resolve,r=n.promise,e=new FileReader;return e.readAsArrayBuffer(t),e.onload=function(){i(e.result)},e.onerror=function(t){Tt.sendToBugsnag(t,"error"),i(null)},r})(n).then(function(t){i(t?{buffer:t,blob:n,contentType:n.type}:null)})},e.send(),r)}function Yo(t,n){var i,r;return(0,e.__awaiter)(this,void 0,Yn,function(){var s;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return s=t.window,(null===(r=null===(i=s.crypto)||void 0===i?void 0:i.subtle)||void 0===r?void 0:r.digest)?[4,s.crypto.subtle.digest({name:"sha-1"},n)]:[3,2];case 1:return[2,{hash:Qo(e.sent()),algorithm:"sha1"}];case 2:return[4,$o(t.time,ni,n)];case 3:return[2,{hash:e.sent().hash,algorithm:"fsnv"}];}})})}var tu=/^data:([^;,]*)(;?charset=[^;]+)?(?:;base64)?$/i,nu="Could not parse data url",iu=function(t,n,i){this.name="ProtocolError",this.message=n,this.status=t,this.data=i};function ru(t){return t>=400&&502!==t||202==t||206==t}var eu=function(){function t(t){this.Vo=0,this.zo=t.options.scheme,this.$o=t.options.cdnHost,this._t=t}return t.prototype.page=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(n){switch(n.label){case 0:return[4,uu(this.zo,vu(this._t),"/rec/page",vt(t))];case 1:return[2,pt(n.sent().text)];}})})},t.prototype.settings=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n;return(0,e.__generator)(this,function(i){return n=t.previewMode||t.fallback?vu(this._t):this.$o,[2,fu(this.zo,n,t)]})})},t.prototype.bundle=function(t){var n;return(0,e.__awaiter)(this,void 0,Yn,function(){var i,r,s,o;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return[4,ei()];case 1:return e.sent(),window,i=vt(t.bundle),this.Vo+=i.length,this.Vo,window,i.length>2e6?[4,ei()]:[3,3];case 2:e.sent(),e.label=3;case 3:return window,r=ou(t.bundle.Seq,t),[4,uu(this.zo,null!==(n=t.recHost)&&void 0!==n?n:vu(this._t),r,i)];case 4:return s=e.sent().text,o=pt(s),window,[2,[this.Vo,o]];}})})},t.prototype.bundleBeacon=function(t){var n;return hu(this.zo,null!==(n=t.recHost)&&void 0!==n?n:vu(this._t),t)},t.prototype.exponentialBackoffMs=function(t,n){var i=o.mathMin(cn.BackoffMax,5e3*o.mathPow(2,t));return n?i+.25*o.mathRandom()*i:i},t}(),su=function(){function t(t){this.zo=t.options.scheme,this._t=t}return t.prototype.uploadResource=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(n){switch(n.label){case 0:return[4,uu(this.zo,vu(this._t),"/rec/uploadResource",t)];case 1:return[2,n.sent().text];}})})},t.prototype.queryResources=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(n){switch(n.label){case 0:return[4,uu(this.zo,vu(this._t),"/rec/queryResources",vt(t))];case 1:return[2,pt(n.sent().text)];}})})},t}();function ou(t,n){var i="/rec/bundle"+("v2"===n.version?"/v2":"")+"?OrgId="+n.orgId+"&UserId="+n.userId+"&SessionId="+n.sessionId+"&PageId="+n.pageId+"&Seq="+t;return null!=n.serverPageStart&&(i+="&PageStart="+n.serverPageStart),null!=n.serverBundleTime&&(i+="&PrevBundleTime="+n.serverBundleTime),null!=n.lastUserActivity&&(i+="&LastActivity="+n.lastUserActivity),n.isNewSession&&(i+="&IsNewSession=true"),null!=n.deltaT&&(i+="&DeltaT="+n.deltaT),i}function uu(t,n,i,r){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(e){return[2,cu("POST",t,n,lu(i),!0,r)]})})}function au(t,n,i){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(r){return[2,cu("GET",t,n,lu(i),!1)]})})}function cu(t,n,i,r,s,o){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(e){return[2,new Yn(function(e,u){var a="//"+i+r,c=!1,h=new XMLHttpRequest,f=("withCredentials"in h);jt(f,"XHR missing CORS support"),f&&(h.onreadystatechange=function(){if(4==h.readyState){if(c)return;c=!0;try{var t={text:h.responseText};if(200==h.status)return void e(t);var n=void 0;try{n=pt(t.text)}catch(t){}u(new iu(h.status,t.text,n))}catch(t){Tt.sendToBugsnag(t,"error"),u(t)}}},h.open(t,n+a,!0),h.withCredentials=s,o&&"function"!=typeof o.append&&h.setRequestHeader("Content-Type","text/plain"),h.send(o))})]})})}function hu(t,n,i){if("function"==typeof navigator.sendBeacon){var r=t+"//"+n+ou(i.bundle.Seq,i)+"&SkipResponseBody=true",e=vt(i.bundle);try{return navigator.sendBeacon.bind(navigator)(r,e)}catch(t){}}return!1}function fu(t,n,i){var r;return(0,e.__awaiter)(this,void 0,Yn,function(){var s,o;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return s=null!==(r=i.version)&&void 0!==r?r:"v1",o=i.previewMode?"?previewMode=true":"",[4,au(t,n,"/s/settings/"+i.orgId+"/"+s+"/web"+o)];case 1:return[2,pt(e.sent().text)];}})})}function vu(t){var n,i=null===(n=t.recording.pageResponse())||void 0===n?void 0:n.GCLBSubdomain,r=t.options.recHost;return i&&K(r)?r.replace(/^rs\./,i+"."):r}function lu(t){if(!window.Zone)return t;var n="?";return t.indexOf(n)>-1&&(n="&"),""+t+n+"ngsw-bypass=true"}var du,pu=function(){function t(t,n,i){void 0===i&&(i=new wu),this._t=t,this.Vr=n,this.Go=i}return t.prototype.initialize=function(t){var n;if(t){this.Xo(t);var i=null===(n=this._t.window.location)||void 0===n?void 0:n.href;this.onNavigate(i)}},t.prototype.onNavigate=function(t){return!!this.Go.matches(t)&&(this.Vr.enqueue({Kind:Ot.KEEP_URL,Args:[this.Jo(t)]}),!0)},t.prototype.onClick=function(t){var n;return!!(null===(n=null==t?void 0:t.watchKind)||void 0===n?void 0:n.has(_i.Keep))&&(this.Vr.enqueue({Kind:Ot.KEEP_ELEMENT,Args:[t.id]}),!0)},t.prototype.urlMatches=function(t){return this.Go.matches(t)},t.prototype.Xo=function(t){this.Go.setRules(t)},t.prototype.Jo=function(t){return he(t,{source:"page",type:"base"})},t}(),wu=function(){function t(){this.Zo=null}return t.prototype.setRules=function(t){var n=t.map(function(t){return t.Regex}).filter(this.Yo);n.length>0&&(this.Zo=this.tu(n))},t.prototype.matches=function(t){return!!this.Zo&&this.Zo.test(t)},t.prototype.Yo=function(t){try{return new RegExp(t),!0}catch(n){return Tt.sendToBugsnag("Browser rejected UrlKeep.Regex","error",{expr:t,error:n.toString()}),!1}},t.prototype.tu=function(t){try{return new RegExp("("+t.join(")|(")+")","i")}catch(n){return Tt.sendToBugsnag("Browser rejected joining UrlKeep.Regexs","error",{exprs:t,error:n.toString()}),null}},t}(),gu=function(t){var n=(void 0===t?{}:t).wnd,i=void 0===n?window:n;!function(t,n,i,r,e,s,o,u){var a,c;function h(t){var n,i=[];function r(){n&&(i.forEach(function(t){var i;try{i=t[n[0]]&&t[n[0]](n[1])}catch(n){return void(t[3]&&t[3](n))}i&&i.then?i.then(t[2],t[3]):t[2]&&t[2](i)}),i.length=0)}function e(t){return function(i){n||(n=[t,i],r())}}return t(e(0),e(1)),{then:function(t,n){return h(function(e,s){i.push([t,n,e,s]),r()})}}}(!(i in t)||(t.console&&t.console.log&&t.console.log("FullStory namespace conflict. Please set window[\"_fs_namespace\"]."),0))&&(u=t[i]=function(){var t=function(t,i,r){function e(e,s){n(t,i,r,e,s)}var s=/Async$/;return s.test(t)?(t=t.replace(s,""),"function"==typeof Promise?new Promise(e):h(e)):n(t,i,r)};function n(n,i,r,e,s){return t._api?t._api(n,i,r,e,s):(t.q&&t.q.push([n,i,r,e,s]),null)}return t.q=[],t}(),function(){function t(){}function n(t,n,i){u("setProperties",{type:t,properties:n},i)}function i(t,i){n("user",t,i)}function r(t,n,r){i({uid:t},r),n&&i(n,r)}u.identify=r,u.setUserVars=i,u.identifyAccount=t,u.clearUserCookie=t,u.setVars=n,u.event=function(t,n,i){u("trackEvent",{name:t,properties:n},i)},u.anonymize=function(){r(!1)},u.shutdown=function(){u("shutdown")},u.restart=function(){u("restart")},u.log=function(t,n){u("log",{level:t,msg:n})},u.consent=function(t){u("setIdentity",{consent:!arguments.length||t})}}(),a="fetch",c="XMLHttpRequest",u._w={},u._w[c]=t[c],u._w[a]=t[a],t[a]&&(t[a]=function(){return u._w[a].apply(this,arguments)}),u._v="2.0.0")}(i,i.document,i._fs_namespace,0,0,i._fs_script)};function mu(t,n){if(t&&t.postMessage)try{t.postMessage(function(t){var n;return vt(((n={}).__fs=t,n))}(n),"*")}catch(t){Ut("postMessage",t)}}function yu(t){try{var n=pt(t);if("__fs"in n)return n.__fs}catch(t){}return[du.Unknown]}function bu(t,n,i,r){var e=W(t);if(!e)return!1;try{e.send(n,i,r)}catch(t){e.send(n,i)}return!0}!function(t){t.EndPreviewMode="EndPreviewMode",t.EvtBundle="EvtBundle",t.GreetFrame="GreetFrame",t.InitFrameMobile="InitFrameMobile",t.RequestFrameId="RequestFrameId",t.RestartFrame="RestartFrame",t.SetConsent="SetConsent",t.SetFrameId="SetFrameId",t.ShutdownFrame="ShutdownFrame",t.Unknown="Unknown"}(du||(du={}));var Eu=new RegExp(/^\s+$/),Su=/^fb\d{18}$/,xu=function(t){var n=t.frame,i=t.orgId,r=t.scheme,e=t.script,s=t.recHost,u=t.cdnHost,a=t.appHost,c=t.namespace,h=(t.desc,t.snippetVersion);try{if(function(t){return t.id==t.name&&Su.test(t.id)}(n))return Rt.BlocklistedFrame;if(function(t){return!(t.contentDocument&&t.contentWindow&&t.contentWindow.location)||function(t){return!!t.src&&"about:blank"!=t.src&&t.src.indexOf("javascript:")<0}(t)&&t.src!=t.contentWindow.location.href&&"loading"==t.contentDocument.readyState}(n))return Rt.PartiallyLoaded;var f=n.contentWindow,v=n.contentDocument;if(!f||!v)return Rt.MissingWindowOrDocument;if(!v.head)return Rt.MissingDocumentHead;if(!v.body||0===v.body.childNodes.length)return Rt.MissingBodyOrChildren;for(var l=!1,d=v.body.childNodes,p=0;p0&&(null!==(s=null===(e=null===(r=t.OrgSettings)||void 0===r?void 0:r.UrlPrivacyConfig)||void 0===e?void 0:e.length)&&void 0!==s?s:0)>0&&(null!==(a=null===(u=null===(o=t.OrgSettings)||void 0===o?void 0:o.AttributeBlocklist)||void 0===u?void 0:u.length)&&void 0!==a?a:0)>0;return c||Tt.sendToBugsnag("Invalid page response","error",{rsp:t}),c},t.prototype.handleResponse=function(t,n){var i,r,e,s,o=t.Flags,u=o.AjaxWatcher,a=o.ClientSideRageClick,c=o.GetCurrentSession,h=o.ResourceUploading,f=o.UseClientSideId;this.ku=t,this.Pu=t.UserIntId,this.ju=t.SessionIntId,this.Ou=t.PageIntId,this.Mu=t.PageStart,this.pu=c?_u.Enabled:_u.Disabled,this.cu=t.OrgSettings,pe(null!==(i=this.cu.UrlPrivacyConfig)&&void 0!==i?i:cn.DefaultOrgSettings.UrlPrivacyConfig,this.cu.MaxUrlLength);var v=null!==(r=this.cu.AttributeBlocklist)&&void 0!==r?r:[];(null===(s=null===(e=this._u)||void 0===e?void 0:e.privacy)||void 0===s?void 0:s.attributeBlocklist)&&(this._u.privacy.attributeBlocklist.length,v.push.apply(v,this._u.privacy.attributeBlocklist.map(Ae))),xe(v),this.yu.consoleWatcher().initializeMaxLogsPerPage(this.cu.MaxConsoleLogPerPage),this.yu.ajaxWatcher().initialize({requests:this.cu.HttpRequestHeadersAllowlist,responses:this.cu.HttpResponseHeadersAllowlist,maxAjaxPayloadLength:this.cu.MaxAjaxPayloadLength}),this.yu.perfWatcher().initialize({resourceUploader:this.yu.getResourceUploader(),recTimings:!!this.cu.RecordPerformanceResourceTiming,recImgs:!!this.cu.RecordPerformanceResourceImg,maxPerfMarksPerPage:this.cu.MaxPerfMarksPerPage}),this.Xt.initialize({canvasWatcherMode:t.Flags.CanvasWatcherMode,blocks:t.ElementBlocks,deferreds:t.ElementDeferreds,keeps:t.ElementKeeps,watches:t.ElementWatches}),this.Ve.initialize(t.UrlKeeps),this.Xt.initializeConsent(null!=n?n:!!t.Consented),"number"==typeof t.BundleUploadInterval&&(this.fu=t.BundleUploadInterval),h&&this.enableResourceUploading(),u&&t.AjaxWatches&&this.yu.ajaxWatcher().setWatches(t.AjaxWatches),a&&this.At.enableEasyBake(),f&&(this.hu=!0),this.yu.start(t.Flags)},t.prototype.fullyStarted=function(){this.Au&&this.Au()},t.prototype.enableResourceUploading=function(){this.wu=!0,this.yu.initResourceUploading()},t.prototype.flushPendingChildFrameInits=function(){if(this.du.length>0){for(var t=0;t0&&this.At.sendEvents(e,i);break;case du.RequestFrameId:if(!t)return;var s=this.Nu(t);void 0===s||(this.mu[s]=!1,this.Lu(t,s));case du.Unknown:}},t.prototype.Nu=function(t){for(var n=0,i=this.vu;n2e6))try{localStorage._fs_swan_song=i}catch(t){}},t.prototype.sing=function(){try{var t=this.purge();if(void 0===t)return;if(!(t.Bundles&&t.UserId&&t.SessionId&&t.PageId))return;t.OrgId||(t.OrgId=this.Uu.getOrgId()),t.Bundles.length>0&&(t.Bundles.length,this.Du(t))}catch(t){}},t.prototype.purge=function(){try{if("_fs_swan_song"in localStorage){var t=localStorage._fs_swan_song;return delete localStorage._fs_swan_song,pt(t)}}catch(t){}},t.prototype.Du=function(t,n){return void 0===n&&(n=0),(0,e.__awaiter)(this,void 0,Yn,function(){var i,r,s,o;return(0,e.__generator)(this,function(u){switch(u.label){case 0:if(i=null,!tt(t.Bundles)||0===t.Bundles.length||void 0===t.Bundles[0])return[2];1==t.Bundles.length&&(i=this._t.time.wallTime()-(t.LastBundleTime||0)),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.Ho.bundle({bundle:t.Bundles[0],deltaT:i,isNewSession:t.IsNewSession,orgId:t.OrgId,pageId:t.PageId,recHost:t.RecHost,serverBundleTime:t.ServerBundleTime,serverPageStart:t.ServerPageStart,sessionId:t.SessionId,userId:t.UserId,version:t.Version})];case 2:return r=u.sent(),s=r[1],t.Bundles[0].Evts.length,t.Bundles[0].Seq,t.Bundles.shift(),t.Bundles.length>0&&this.Du((0,e.__assign)((0,e.__assign)({},t),{ServerBundleTime:s.BundleTime})),[3,4];case 3:return(o=u.sent())instanceof iu&&ru(o.status)?[2]:(this.Bu=new this.Fu(this.Du,this.Ho.exponentialBackoffMs(n,!0),this,t,n+1).start(),[3,4]);case 4:return[2];}})})},t}(),ju=function(){function t(){}return t.prototype.encode=function(t){return t},t}(),Ou=function(){function t(){this.dict={idx:-1,map:{}},this.nodeCount=1,this.startIdx=0}return t.prototype.encode=function(n){if(0==n.length)return[];var i,r,e=n[0],s=Object.prototype.hasOwnProperty.call(this.dict.map,e)?this.dict.map[e]:void 0,o=[],u=1;function a(){s?u>1?o.push([s.idx,u]):o.push(s.idx):o.push(e)}for(i=1;ithis._t.recording.bundleUploadInterval()?[4,this.aa()]:[3,4]):[2];case 3:e.sent(),e.label=4;case 4:return[3,6];case 5:if((r=e.sent())instanceof iu){if(ru(r.status))return 206==r.status?Tt.sendToBugsnag("Failed to send bundle, probably because of its large size","error"):r.status>=500&&Tt.sendToBugsnag("Failed to send bundle, recording outage likely","error"),this.ea&&this.ea(),[2]}else Tt.sendToBugsnag("Failed to send bundle, unknown err","error",{err:r});return this.qu=!0,this.Vu=this.$u+this.Ho.exponentialBackoffMs(this.Qu++,!1),[3,6];case 6:return[2];}})})},t.prototype.va=function(t){var n,i;return(0,e.__awaiter)(this,void 0,Yn,function(){var r,s,o,u;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return this.Ou?(window,r=this.co.getMsSinceLastUserAcivity(),[4,this.Ho.bundle({bundle:t,deltaT:null,lastUserActivity:r,orgId:this.Uu.getOrgId(),pageId:this.Ou,serverBundleTime:this.Zu,serverPageStart:this.Mu,isNewSession:this.Gu,sessionId:null!==(n=this.Uu.getSessionId())&&void 0!==n?n:"",userId:this.Uu.getUserId(),version:this._t.recording.bundleApiVersion()})]):[2];case 1:return s=e.sent(),o=s[0],u=s[1],null===(i=this._t.recording.observer)||void 0===i||i.onBundleSent(o),o>this.Ju&&this.zu>16&&this._t.recording.splitPage(Wt.Size),window,[2,u];}})})},t.prototype.fa=function(t){if(0===t.Evts.length)return t;for(var n=[],i=0,r=t.Evts;i0},t.prototype.hasActiveEvents=function(){return this.da},t.prototype.pushEvent=function(t){Mu[t.Kind]||(this.da=!0),this.pa.When<0&&(this.pa.When=t.When),this.pa.Evts.push(t)},t}();function Hu(t,n){void 0===t&&(t=[]),void 0===n&&(n=0);for(var i="",r=0,e=t;r-1},t.prototype.ba=function(){return this.Dn.document.location.search.indexOf("_fs_preview=false")>-1},t.prototype.ya=function(){return!!this.wa.getValue(this.ga)},t}();function Uu(t){var n,i,r;return{Kind:Ot.CAPTURE_SOURCE,Args:[t.type,t.entrypoint,"dom",null===(i=null===(n=t.source)||void 0===n?void 0:n.integration)||void 0===i?void 0:i.slice(0,1024),!!(null===(r=t.source)||void 0===r?void 0:r.userInitiated)]}}function Fu(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n,i,r,s;return(0,e.__generator)(this,function(e){if(n=function(t){return"msCrypto"in t?t.msCrypto:t.crypto}(t),"function"==typeof(null==n?void 0:n.randomUUID))return[2,n.randomUUID()];for(i=new Uint8Array(16),n.getRandomValues(i),i[6]=15&i[6]|64,i[8]=63&i[8]|128,r=[],s=0;s=864e5)return Wu;var c=null!==(n=this.Sa.getLastUserActivityTimeMS())&&void 0!==n?n:u;return o.mathAbs(s-c)>=qu||(null!==(i=this.Sa.getPageCount())&&void 0!==i?i:0)>=250?Wu:e},t.prototype.start=function(){this.lastUserActivityTimeout.start(3e5)},t.prototype.stop=function(){this.lastUserActivityTimeout.stop()},t.prototype.ka=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var t;return(0,e.__generator)(this,function(n){return(t=this.Sa.getUserId())&&Bu(t)?[2,t]:[2,Fu(this._t.window)]})})},t.prototype.xa=function(){var t=this.co.getLastUserAcitivityTS();t!==this.lastUserActivityTS&&(this.lastUserActivityTS=t,this.Sa.setLastUserActivityTimeMS(t),this.start())},t}(),Vu=function(t){function n(n,i,r,e,s,o,u){void 0===r&&(r=!0),void 0===e&&(e=new Fo(n)),void 0===s&&(s=new Ku(n,i,e,r)),void 0===o&&(o=Zi),void 0===u&&(u=xu);var a,c=t.call(this,n,o,e,s,u)||this;return c.Ho=i,c.mo=s,c._a=!1,c.ko=!1,c.Aa=!1,s.onShutdown(function(){return c.shutdown(Wt.SettingsBlocked)}),c.Mt=c.Dn.document,c.Eo=0,c.Uu=n.recording.identity,c.Ia=new Lu(c.xu,c.Dn,c.Uu.getClientStore()),c.pu=_u.NoInfoYet,c.Ta=new Qu(n,e,c.Uu),a=function(t){if(c.yu.stop(Wt.Api),t){var n=c.Mt.getElementById(t);n&&c.Ca&&n.setAttribute("_fs_embed_token",c.Ca)}},c.Dn._fs_shutdown=a,c}return(0,e.__extends)(n,t),n.prototype.onDomLoad=function(){var n=this;t.prototype.onDomLoad.call(this),this._a=!0,this.Pa(function(){n.fireFsReady(n.ko)})},n.prototype.ja=function(){var t=R(this.Dn,"_fs_replay_flags");if(/[?&]_fs_force_session=true(&|#|$)/.test(location.search)&&(t+=",forceSession",this.Dn.history)){var n=location.search.replace(/(^\?|&)_fs_force_session=true(&|$)/,function(t,n,i){return i?n:""});this.Dn.history.replaceState({},"",this.Dn.location.href.replace(location.search,n))}return t},n.prototype.start=function(n,i,r){var s,o,u;return(0,e.__awaiter)(this,void 0,Yn,function(){var a,c,h,f,v,l,d,p,w,g,m,y,b,E,S,x,k,_,A,I,T,C,P,j=this;return(0,e.__generator)(this,function(e){switch(e.label){case 0:t.prototype.start.call(this,n,i,r),a=this.ja(),c=yi(this.Mt),h=c[0],f=c[1],O=this.Dn,M=0,K=0,v=null==O.screen?[M,K]:(M=parseInt(String(O.screen.width),10),K=parseInt(String(O.screen.height),10),[M=isNaN(M)?0:M,K=isNaN(K)?0:K]),l=v[0],d=v[1],p="",n||(p=this.Uu.getUserId()),w=null!==(u=null===(o=null===(s=this._t)||void 0===s?void 0:s.recording)||void 0===o?void 0:o.preroll)&&void 0!==u?u:-1,g=function(){return he(Mr(j.Dn),{source:"page",type:"base"})},m=function(){return he(j.Dn.location.href,{source:"page",type:"url"})},y=function(){return""===j.Mt.referrer?"":he(j.Mt.referrer,{source:"page",type:"referrer"})},b=function(t){var n,i="_fs_tab_id";try{var r=t.sessionStorage.getItem(i);if(r)return r;var e=Math.floor(1e17*Math.random()).toString(16);return t.sessionStorage.setItem(i,e),null!==(n=t.sessionStorage.getItem(i))&&void 0!==n?n:void 0}catch(t){return}}(this.Dn),E={OrgId:this.xu,UserId:p,Url:m(),Base:g(),Width:h,Height:f,ScreenWidth:l,ScreenHeight:d,SnippetVersion:V(this.Dn),Referrer:y(),Preroll:w,Doctype:dt(this.Mt),CompiledVersion:"11aa377d19",CompiledTimestamp:1678707725,AppId:this.Uu.getAppId(),TabId:b,PreviewMode:this.Ia.isPreviewMode()||void 0},a&&(E.ReplayFlags=a),e.label=1;case 1:return e.trys.push([1,5,,6]),S=this.Oa,[4,this.Ho.page(E)];case 2:return[4,S.apply(this,[e.sent()])];case 3:return P=e.sent(),this.isSafeResponse(P)?this.gu?[2]:(window,this.handleResponse(P),window,this.Ma(P.CookieDomain,P.UserIntId,P.SessionIntId,P.PageIntId,P.EmbedToken),P.Flags.UseStatelessConsent||this.Uu.getConsentStore().setConsentState(!!P.Consented),this.Ka(),P.PreviewMode&&this.Ra(),x=function(t){return R(t,"_fs_pagestart","function")}(this.Dn),x&&x(),this.At.enqueueFirst(this.yu.getNavigateEvent(this.Dn.location.href,Ot.ENTRY_NAVIGATE)),k=!!P.Consented,this.At.enqueueFirst({Kind:Ot.SYS_REPORTCONSENT,Args:[k,Bt.Document]}),_=dt(this.Mt),A=m(),I=y(),T=g(),this.At.enqueueFirst({Kind:Ot.SET_FRAME_BASE,Args:[he(Mr(this.Dn),{source:"event",type:Ot.SET_FRAME_BASE}),_,A,I]}),this.mo.setPageData({Kind:Ot.PAGE_DATA,Args:[A,T,h,f,l,d,V(this.Dn),I,_,w,p,P.PageStart,Et(this.Dn),this.Dn.navigator.userAgent,b,!!P.IsNewSession]}),this.At.enqueue({Kind:Ot.SCRIPT_COMPILED_VERSION,Args:["11aa377d19"]}),this.At.enqueue(Uu({type:"default"})),this.yu.addVisibilityChangeEvent(),this.addInitEvent(),[4,this.At.startPipeline({pageId:P.PageIntId,serverPageStart:P.PageStart,isNewSession:!!P.IsNewSession})]):[2,this.Ha()];case 4:return e.sent(),this.enqueueDocumentProperties(this.Mt),this.fullyStarted(),[3,6];case 5:return(C=e.sent())instanceof iu&&(P=C.data)&&P.user_id&&P.cookie_domain&&P.reason_code===en.ReasonBlockedTrafficRamping&&p!==P.user_id&&this.Ma(P.cookie_domain,P.user_id,"","",""),this.Ha(),[3,6];case 6:return[2];}var O,M,K})})},n.prototype.Ka=function(){var t=this;this.Aa=!0,this.Pa(function(){t.fireFsReady(t.ko)})},n.prototype.Ma=function(t,n,i,r,e){var s=this.Uu;s.setIds(this.Dn,t,n,i),this.Ca=e,this.Ia.write(),s.getUserId(),s.getSessionId()},n.prototype.Pa=function(t){var n,i;if(this._a&&this.Aa)if(null===(i=null===(n=this.ku)||void 0===n?void 0:n.Flags)||void 0===i?void 0:i.FetchIntegrations){var r=this.Mt.createElement("script");r.addEventListener("load",t),r.addEventListener("error",t),r.async=!0,r.src=this.zo+"//"+this.Eu+"/rec/integrations?OrgId="+this.xu,this.Mt.head.appendChild(r)}else t()},n.prototype.Ra=function(){var t="FullStory-preview-script";if(!this.Mt.getElementById(t)){var n=this.Mt.createElement("script");n.id=t,n.async=!0,n.src=this.zo+"//"+this.Su+"/s/fspreview.js",this.Mt.head.appendChild(n)}},n.prototype.Ha=function(){this.Iu&&this.Iu(),this.shutdown(Wt.SettingsBlocked),this.ko=!0,this.fireFsReady(this.ko)},n.prototype.Oa=function(t){var n;return(0,e.__awaiter)(this,void 0,Yn,function(){var i,r,s,o,u;return(0,e.__generator)(this,function(a){switch(a.label){case 0:return(i=(0,e.__assign)({},t)).Flags.UseStaticSettings?(r=this.Ia.isPreviewMode(),[4,this.Ho.settings({orgId:this.xu,previewMode:r,fallback:!1})["catch"](function(t){Tt.sendToBugsnag("Edge Rec settings error","error",{err:t})})]):[3,4];case 1:return(s=a.sent())?[3,3]:[4,this.Ho.settings({orgId:this.xu,previewMode:r,fallback:!0})["catch"](function(t){Tt.sendToBugsnag("Rs Rec settings error","error",{err:t})})];case 2:s=a.sent(),a.label=3;case 3:s&&(i=(0,e.__assign)((0,e.__assign)({},i),s)),a.label=4;case 4:return i.Flags.UseClientSideId?(this.Uu.setCookieDomain(this.Dn,i.CookieDomain),Bu(o=null!==(n=t.UserUUID)&&void 0!==n?n:"")&&this.Uu.setUserId(o),[4,this.Ta.createUserSessionPage()]):[3,6];case 5:u=a.sent(),this.Ta.start(),i=(0,e.__assign)((0,e.__assign)({},i),{UserIntId:u.userId,SessionIntId:u.sessionId,PageIntId:u.pageId,IsNewSession:u.isNewSession,PageStart:p()}),a.label=6;case 6:return i.Flags.UseStatelessConsent&&(i=(0,e.__assign)((0,e.__assign)({},i),{Consented:this.Uu.getConsentStore().getConsentState()})),[2,i];}})})},n.prototype.onMessageReceived=function(n,i){t.prototype.onMessageReceived.call(this,n,i),(null==n?void 0:n.parent)==this.Dn&&i[0]===du.EndPreviewMode&&this.Ia.clear()},n}(Cu),zu=function(){function t(t,n){void 0===n&&(n=new $u(t)),this.Dn=t,this.Na=n}return t.prototype.enqueueEvents=function(t,n){var i=null!=t?t:void 0;this.Na.postMessage(this.Dn.parent,[du.EvtBundle,n,i],i)},t.prototype.startPipeline=function(){},t.prototype.stopPipeline=function(){},t.prototype.flush=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(t){return[2]})})},t.prototype.singSwanSong=function(){},t.prototype.onShutdown=function(t){},t.prototype.setPageData=function(t){},t}(),$u=function(){function t(t){this.Dn=t}return t.prototype.postMessage=function(t,n,i){switch(n[0]){case du.EvtBundle:bu(this.Dn,n[0],vt(n[1]),i)||mu(t,n);break;case du.RequestFrameId:bu(this.Dn,n[0],"[]",i)||mu(t,n);break;default:n[0];}},t}(),Gu=function(t){function n(n,i,r,e,s){void 0===i&&(i=new $u(n.window)),void 0===r&&(r=new zu(n.window,i)),void 0===e&&(e=Zi),void 0===s&&(s=xu);var o=t.call(this,n,e,void 0,r,s)||this;return o.Na=i,o}return(0,e.__extends)(n,t),n.prototype.start=function(n,i,r){var e=this;t.prototype.start.call(this,n,i,r),this.La(),this.T.add(this.Dn,"load",!1,function(){e.yu.recordingIsDetached()&&e._t.recording.splitPage(Wt.FsShutdownFrame)}),this.yu.addVisibilityChangeEvent()},n.prototype.onMessageReceived=function(n,i){if(t.prototype.onMessageReceived.call(this,n,i),n===this.Dn.parent||n===this.Dn)switch(i[0]){case du.GreetFrame:this.La(i[1]);break;case du.SetFrameId:try{var r=i[1];if(!r)return void he(location.href,{source:"log",type:"debug"});this.Ua({frameId:r,parentIds:i[2],outerStartTime:i[3],scheme:i[4],script:i[5],appHost:i[6],orgId:i[7],initConfig:i[8],pageRsp:i[9],consentOverride:i[10],minimumWhen:i[11]})}catch(t){vt(i)}break;case du.SetConsent:this.setConsent(i[1]);break;case du.InitFrameMobile:try{var e=JSON.parse(i[1]),s=e.StartTime;if(i.length>2&&i[2]){var o=i[2];Object.prototype.hasOwnProperty.call(o,"ProtocolVersion")&&o.ProtocolVersion>=20180723&&Object.prototype.hasOwnProperty.call(o,"OuterStartTime")&&(s=o.OuterStartTime)}var u=e.Host;this.Ua({frameId:0,parentIds:[],outerStartTime:s,scheme:"https:",script:G(u),appHost:$(u),orgId:e.OrgId,initConfig:void 0,pageRsp:e.PageResponse,consentOverride:this.Xt.getConsent()})}catch(t){vt(i)}}},n.prototype.La=function(t){this.Eo&&this.Eo===t||0!=this.Eo&&this.Dn.parent&&this.Na.postMessage(this.Dn.parent,[du.RequestFrameId])},n.prototype.Ua=function(t){var n,i,r=this;if(this.Eo)this.Eo!==t.frameId?(this.Eo,t.frameId,this._t.recording.splitPage(Wt.FsShutdownFrame)):this.Eo;else if(he(location.href,{source:"log",type:"debug"}),t.frameId,this.zo=t.scheme,this.bu=t.script,this.Su=t.appHost,this.xu=t.orgId,this._u=t.initConfig,this.Eo=t.frameId,this.So=t.parentIds,t.pageRsp&&this.isSafeResponse(t.pageRsp)){if(!this.gu){var e=null!==(n=t.consentOverride)&&void 0!==n?n:!!t.pageRsp.Consented;this.handleResponse(t.pageRsp,e),this.fireFsReady(),this.At.enqueueFirst({Kind:Ot.SYS_REPORTCONSENT,Args:[e,Bt.Document]}),this.At.enqueueFirst({Kind:Ot.SET_FRAME_BASE,Args:[he(Mr(this.Dn),{source:"event",type:Ot.SET_FRAME_BASE}),dt(this.Dn.document)]}),this.At.enqueue({Kind:Ot.SCRIPT_COMPILED_VERSION,Args:["11aa377d19"]}),this.At.enqueue(Uu({type:"default"})),this.addInitEvent(),this.At.rebaseIframe(t.outerStartTime,null!==(i=t.minimumWhen)&&void 0!==i?i:0),this._t.time.setStartTime(t.outerStartTime),this.Ou&&this.At.startPipeline({pageId:this.Ou,serverPageStart:t.pageRsp.PageStart,isNewSession:!!t.pageRsp.IsNewSession,frameId:t.frameId,parentIds:t.parentIds}).then(function(){r.flushPendingChildFrameInits(),r.enqueueDocumentProperties(r.Dn.document),r.fullyStarted()})}}else this.shutdown(Wt.FsShutdownFrame)},n}(Cu),Xu=function(){function t(t,n,i){void 0===n&&(n=function(){}),void 0===i&&(i=!1),this.Mt=t,this.Fa=n,this.Da=i,this._cookies={},this._cookies=k(this.Mt)}return t.prototype.setDomain=function(t){this.Ba=t},t.prototype.getValue=function(t,n){var i=this._cookies[t];if(!i)try{i=localStorage[null!=n?n:t]}catch(t){}return i},t.prototype.setValue=function(t,n,i,r){if(null!=this.Ba&&!this.Da){var e=[];this._setCookie(t,n,i,e),this.Wa(null!=r?r:t,n,e,t),e.length>0&&this.Fa(e)}},t.prototype.setCookie=function(t,n,i){this._setCookie(t,n,i,[])},Object.defineProperty(t.prototype,"cookies",{get:function(){return this._cookies},enumerable:!1,configurable:!0}),t.prototype.clearCookie=function(t,n){if(this._cookies[t]&&(this.Mt.cookie=Ju(this.Ba,t,"","Thu, 01 Jan 1970 00:00:01 GMT"),delete this._cookies[t]),n)try{delete localStorage[n]}catch(t){}},t.prototype._setCookie=function(t,n,i,r){try{this.Mt.cookie=Ju(this.Ba,t,n,i),-1===this.Mt.cookie.indexOf(n)&&r.push([t,"cookie"])}finally{this._cookies=k(this.Mt)}},t.prototype.Wa=function(t,n,i,r){try{localStorage[t]=n,localStorage[t]!==n&&i.push([null!=r?r:t,"localStorage"])}catch(n){i.push([null!=r?r:t,"localStorage",String(n)])}},t}();function Ju(t,n,i,r){var e=n+"="+i;return e+="; domain="+function(t){return t?"."+encodeURIComponent(t):""}(t),e+="; Expires="+r+"; path=/; SameSite=Strict","https:"===location.protocol&&(e+="; Secure"),e}var Zu,Yu="fs_cid",ta=function(){function t(t){this.Sa=t,this.qa=1;var n=this.Sa.getValue(Yu,wn);this.Qa=function(t){var n={consent:Dt.RevokeConsent};if(!t)return n;var i=t.split(".");return i.length<1?n:(i[0],"1"===i[1]?{consent:Dt.GrantConsent}:n)}(n)}return t.prototype.getConsentState=function(){return this.Qa.consent},t.prototype.setConsentState=function(t){if(this.Qa.consent=t,t!==Dt.RevokeConsent){var n=this.Va(),i=this.za();this.Sa.setValue(Yu,n,i,wn)}else this.Sa.clearCookie(Yu,wn)},t.prototype.Va=function(){return[this.qa,this.Qa.consent===Dt.GrantConsent?1:0].join(".")},t.prototype.za=function(){return new Date(1e3*S()).toUTCString()},t}(),na="fs_lua",ia=function(){function t(t){this.qa=1,this.Sa=t;var n=this.Sa.getValue(na,gn);this.Qa=function(t){var n={lastUserActivityTime:void 0};if(!t)return n;var i=t.split(".");return i.length<1?n:(i[0],{lastUserActivityTime:_(i[1])})}(n)}return t.prototype.getLastUserActivityTimeMS=function(){return this.Qa.lastUserActivityTime},t.prototype.setLastUserActivityTimeMS=function(t){this.Qa.lastUserActivityTime=t;var n=this.Va(),i=this.za();this.Sa.setValue(na,n,i,gn)},t.prototype.Va=function(){var t;return[this.qa,null!==(t=this.Qa.lastUserActivityTime)&&void 0!==t?t:""].join(".")},t.prototype.za=function(){return new Date(p()+qu).toUTCString()},t}(),ra="fs_uid",ea=function(){function t(t,n,i,r){void 0===n&&(n=document),void 0===i&&(i=function(){}),void 0===r&&(r=!1),this.$a=void 0,this.wa=new Xu(n,i,r),this.Ga=new ta(this.wa),this.Xa=new ia(this.wa),this.Qa=this.Ja(t)}return t.prototype.Ja=function(t){var n=x(this.wa.getValue(ra,pn));return n&&n.orgId==t?n:{expirationAbsTimeSeconds:S(),orgId:t,userId:"",sessionId:"",appKeyHash:""}},t.prototype.getConsentStore=function(){return this.Ga},t.prototype.clear=function(){this.Xa.setLastUserActivityTimeMS(void 0),this.Qa.sessionStartTime=this.Qa.pageCount=void 0,this.Qa.userId=this.Qa.sessionId=this.Qa.appKeyHash=this.$a="",this.Qa.expirationAbsTimeSeconds=S(),this.Za()},t.prototype.create=function(t){this.Xa.setLastUserActivityTimeMS(t.lastUserActivityTime),this.Qa=(0,e.__assign)((0,e.__assign)({},this.Qa),t),this.Za()},t.prototype.getOrgId=function(){return this.Qa.orgId},t.prototype.getUserId=function(){return this.Qa.userId},t.prototype.setUserId=function(t){this.Qa.userId=t,this.Za()},t.prototype.getSessionId=function(){return this.Qa.sessionId},t.prototype.getAppKeyHash=function(){return this.Qa.appKeyHash},t.prototype.getCookies=function(){return this.wa.cookies},t.prototype.setAppId=function(t){this.$a=t,this.Qa.appKeyHash=qo(t),this.Za()},t.prototype.getAppId=function(){return this.$a},t.prototype.setSessionStartTimeMS=function(t){this.Qa.sessionStartTime=t,this.Za()},t.prototype.getSessionStartTimeMS=function(){return this.Qa.sessionStartTime},t.prototype.setLastUserActivityTimeMS=function(t){this.Xa.setLastUserActivityTimeMS(t)},t.prototype.getLastUserActivityTimeMS=function(){return this.Xa.getLastUserActivityTimeMS()},t.prototype.setPageCount=function(t){this.Qa.pageCount=t,this.Za()},t.prototype.getPageCount=function(){return this.Qa.pageCount},t.prototype.getClientStore=function(){return this.wa},t.prototype.setCookie=function(t,n,i){void 0===i&&(i=new Date(p()+6048e5).toUTCString()),this.wa.setCookie(t,n,i)},t.prototype.setCookieDomain=function(t,n){var i=n;(C(i)||i.match(/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/g))&&(i="");var r=function(t){return R(t,"_fs_cookie_domain")}(t);"string"==typeof r&&(i=r),this.wa.setDomain(i)},t.prototype.setIds=function(t,n,i,r){this.setCookieDomain(t,n),this.Qa.userId=i,this.Qa.sessionId=r,this.Za()},t.prototype.clearAppId=function(){return!!this.Qa.appKeyHash&&(this.$a="",this.Qa.appKeyHash="",this.Za(),!0)},t.prototype.encode=function(){var t,n,i,r=[this.Qa.userId,null!==(t=this.Qa.sessionId)&&void 0!==t?t:"",""+(null!==(n=this.Qa.sessionStartTime)&&void 0!==n?n:""),"",""+(null!==(i=this.Qa.pageCount)&&void 0!==i?i:"")].join(":"),e=["",this.Qa.orgId,r];return this.Qa.appKeyHash&&e.push(encodeURIComponent(this.Qa.appKeyHash)),e.push("/"+this.Qa.expirationAbsTimeSeconds),e.join("#")},t.prototype.Za=function(){var t=this.encode(),n=new Date(1e3*this.Qa.expirationAbsTimeSeconds).toUTCString();this.wa.setValue(ra,t,n,pn)},t}(),sa=((Zu={})[Xt.Document]={assetMapId:"str",releaseDatetime:"date",releaseVersion:"str"},Zu[Xt.Event]={},Zu[Xt.Page]={pageName:"str",releaseVersion:"str",releaseDatetime:"str"},Zu[Xt.User]={uid:"str",displayName:"str",email:"str"},Zu),oa={str:ua,bool:aa,real:ca,"int":ha,date:fa,strs:va(ua),bools:va(aa),reals:va(ca),ints:va(ha),dates:va(fa),objs:va(la),obj:la};function ua(t){return"string"==typeof t}function aa(t){return"boolean"==typeof t}function ca(t){return"number"==typeof t}function ha(t){return"number"==typeof t&&t-o.mathFloor(t)==0}function fa(t){return!(!t||(t.constructor===Date?isNaN(t):"number"!=typeof t&&"string"!=typeof t||isNaN(new Date(t))))}function va(t){return function(n){if(!(n instanceof Array))return!1;for(var i=0;i=0)return[void 0,Jt.FsId];var e=qo(r),s=void 0;return n&&n.Qa.appKeyHash&&n.Qa.appKeyHash!==e&&n.Qa.appKeyHash!==r&&(n.Qa.appKeyHash,s=Jt.NewUid),[r,s]}(f,this.Uu),l=v[0],d=v[1];if(!l)return Jt.FsId,{events:r};a.properties.uid=l,this.Uu.setAppId(l),d===Jt.NewUid&&(i=!0)}}Ea(t.source,"setVars",e),e(this.nc(s,wa(s,a.properties),u));break;default:(0,Ir.nt)(s,"Unsupported");}}catch(n){t.operation,n.message}return{events:r,reidentify:i}},t.prototype.nc=function(t,n,i,r){var e=vt(n.PayloadToSend),s=!!i&&"fs"!==i;switch(t){case Xt.Event:return{When:0,Kind:Ot.SYS_CUSTOM,Args:s?[r,e,i]:[r,e]};case Xt.Document:case Xt.Page:case Xt.User:return{When:0,Kind:Ot.SYS_SETVAR,Args:s?[t,e,i]:[t,e]};default:(0,Ir.nt)(t,"Unsupported");}},t.prototype.ic=function(t,n){var i=t.PayloadToSend;if(i&&"object"==typeof i){var r=0,e={};for(var s in i)if(!(s in this.Ya)){var o=i[s];this.Ya[s]={value:o,apiSource:n},e[s]=o,r++}if(0!==r)return{PayloadToSend:e,ValidationErrors:t.ValidationErrors}}},t}();function wa(t,n){var i=1500;return ga(function(){return--i},t,n)}var ga=function(t,n,i){var r,e,s={PayloadToSend:{},ValidationErrors:[]},u=function(i){var r=ga(t,n,i);return s.ValidationErrors=s.ValidationErrors.concat(r.ValidationErrors),r.PayloadToSend};for(var a in i)if(o.objectHasOwnProp(i,a)){if(t()<=0)break;var c=i[a],h=ya(n,a,c,s.ValidationErrors);if(h){var f=h.name;if("obj"!==h.type){if("objs"!==h.type)s.PayloadToSend[f]=ma(h.type,h.value);else{n!=Xt.Event&&s.ValidationErrors.push({Type:"vartype",FieldName:f,ValueType:"Array (unsupported)"});for(var v=[],l=0;l0&&(s.PayloadToSend[f]=v)}}else{var d=u(h.value),p=(e="_obj").length>(r=a).length||r.substring(r.length-e.length)!=e?f.substring(0,f.length-"_obj".length):f;s.PayloadToSend[p]=d}}else s.PayloadToSend[a]=ma("str",c)}return s};function ma(t,n){var i=n;return"str"==t&&"string"==typeof i&&(i=i.trim()),null==i||"date"!=t&&i.constructor!=Date||(i=function(t){var n=t.constructor===Date?t:new Date(t);try{return n.toISOString()}catch(t){return null}}(i)),i}function ya(t,n,i,r){var e=n,s=e,u=typeof i;if("undefined"===u)return r.push({Type:"vartype",FieldName:e,ValueType:u+" (unsupported)"}),null;var a=sa[t];if(o.objectHasOwnProp(a,e))return{name:e,type:a[e],value:i};var c=e.lastIndexOf("_");if(-1==c||!ba(e.substring(c+1))){var h=function(t){for(var n in oa)if(oa[n](t))return n;return null}(i);if(null==h)return i?r.push({Type:"vartype",FieldName:e}):r.push({Type:"vartype",FieldName:e,ValueType:"null (unsupported)"}),null;c=e.length,e=e+"_"+h}var f=e.substring(0,c),v=e.substring(c+1);if("object"===u&&!i)return r.push({Type:"vartype",FieldName:s,ValueType:"null (unsupported)"}),null;if(!da.test(f)){f=f.replace(/[^a-zA-Z0-9_]/g,"").replace(/^[0-9]+/,""),/[0-9]/.test(f[0])&&(f=f.substring(1)),r.push({Type:"varname",FieldName:s});var l=f+"_"+v;if(da.source,""==f)return null;e=l}return ba(v)?function(t,n){return oa[t](n)}(v,i)?{name:e,type:v,value:i}:(vt(i),"number"===u?u=i%1==0?"integer":"real":"object"==u&&null!=i&&i.constructor==Date&&(u=isNaN(i)?"invalid date":"date"),r.push({Type:"vartype",FieldName:s,ValueType:u}),null):(r.push({Type:"varname",FieldName:s}),null)}function ba(t){return!!oa[t]}function Ea(t,n,i){var r=Uu({source:t,type:"api",entrypoint:n});r&&i({When:0,Kind:r.Kind,Args:r.Args})}function Sa(t,n){return(0,e.__awaiter)(this,void 0,Yn,function(){var i,s,o,a,c;return(0,e.__generator)(this,function(h){switch(h.label){case 0:if(h.trys.push([0,2,,3]),gr||yr||function(t){return!!R(t,"_fs_use_polyfilled_apis","boolean")}(t))return[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})];if(!t.document||n.status!==r.Unknown)return[2,n];if(i=function(t,n){var i=n.functions,s={},o=(0,e.__assign)({},n.helpers);if(o.functionToString=function(t,n){var i,r,e=null===(i=t["__core-js_shared__"])||void 0===i?void 0:i.inspectSource;if(e){var s=function(){return e(this)};if(ka(s,2))return s}var o=null===(r=t["__core-js_shared__"])||void 0===r?void 0:r["native-function-to-string"];if(ka(o))return o;var u=n.__zone_symbol__OriginalDelegate;return ka(u)?u:ka(n)?n:void 0}(t,o.functionToString),!o.functionToString)return n;var u=!1;for(var a in i)if(i[a]){if(s[a]=Ia(o.functionToString,i[a]),s[a]||(s[a]=Ta(o.functionToString,o,a)),!s[a])return n;s[a]!==i[a]&&(u=!0)}else s[a]=void 0;return{status:r.Clean,functions:u?s:i,helpers:o,errors:[]}}(t,n),i.status===r.Clean)return[2,i];(s=t.document.createElement("iframe")).id="FullStory-iframe",s.className="fs-hide",s.style.display="none",o=t.document.body||t.document.head||t.document.documentElement||t.document;try{o.appendChild(s)}catch(t){return[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})]}return s.contentWindow?(a=u(s.contentWindow,r.Clean),s.parentNode&&s.parentNode.removeChild(s),a.status===r.UnrecoverableFailure?[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})]:[4,xa(a,n)]):[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})];case 1:return[2,h.sent()];case 2:return c=h.sent(),Tt.sendToBugsnag(c,"error"),[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})];case 3:return[2];}})})}function xa(t,n){var i,s=new Yn(function(t){return i=t});return setTimeout(function(){try{t.functions.jsonParse("[]").push(0)}catch(t){i((0,e.__assign)((0,e.__assign)({},n),{status:r.Clean}))}i(t)}),s}function ka(t,n){var i;if(void 0===n&&(n=0),!t)return!1;try{t.call(function(){})}catch(t){return!1}var r=function(t){try{return void t.call(null)}catch(t){return(t.stack||"").replace(/__fs_nomangle_check_stack(.|\n)*$/,"")}},e=void 0;0!==n&&"number"==typeof Error.stackTraceLimit&&(e=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY);var s=[function(){throw new Error("")},t],o=function __fs_nomangle_check_stack(){return s.map(r)}(),u=o[0],a=o[1];if(void 0!==e&&(Error.stackTraceLimit=e),!u||!a)return!1;for(var c="\n".charCodeAt(0),h=u.length>a.length?a.length:u.length,f=1,v=f;v=0}var Aa=["__zone_symbol__OriginalDelegate","nr@original"];function Ia(t,n){if(n){for(var i=0,r=Aa;i0&&this.lc[t].some(function(t){return!t.disconnected})},t.prototype.takeRecords=function(t){var n,i=null!==(n=this.lc[t.type])&&void 0!==n?n:[];if(0!==i.length)for(var r=0,e=i;r-1,!!ja.userAgent.match("CriOS")||"Google Inc."===Oa&&!Ma&&!Ka),Fa=/Firefox/.test(window.navigator.userAgent);function Da(t){if(!Fa)return!1;var n=window.navigator.userAgent.match(/Firefox\/(\d+)/);return!(!n||!n[1])&&parseInt(n[1],10)0||null===H){n="Init config rejected: "+R.unrecoverable.join(",\n"),k(t,new Error(n));break}R.recoverable.length>0&&(n="Init config partially rejected: "+R.recoverable.join(",\n")),a=H,x(t);break;default:(0,Ir.nt)(t,"invalid operation");}}catch(n){Tt.sendToBugsnag(n,"error"),k(t,n)}},A=0,I=p;A=0;u--)(e=t[u])&&(o=(s<3?e(o):s>3?e(n,i,o):e(n,i))||o);return s>3&&o&&Object.defineProperty(n,i,o),o}function a(t,n){return function(i,r){n(i,r,t)}}function c(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)}function h(t,n,i,r){return new(i||(i=Promise))(function(e,s){function o(t){try{a(r.next(t))}catch(t){s(t)}}function u(t){try{a(r["throw"](t))}catch(t){s(t)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i(function(t){t(n)})).then(o,u)}a((r=r.apply(t,n||[])).next())})}function f(t,n){var i,r,e,s,o={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return s={next:u(0),"throw":u(1),"return":u(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(s){return function(u){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(e=2&s[0]?r["return"]:s[0]?r["throw"]||((e=r["return"])&&e.call(r),0):r.next)&&!(e=e.call(r,s[1])).done)return e;switch(r=0,e&&(s=[2&s[0],e.value]),s[0]){case 0:case 1:e=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((e=(e=o.trys).length>0&&e[e.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!e||s[1]>e[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(t,n){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var r,e,s=i.call(t),o=[];try{for(;(void 0===n||n-->0)&&!(r=s.next()).done;)o.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(i=s["return"])&&i.call(s)}finally{if(e)throw e.error}}return o}function w(){for(var t=[],n=0;n1||u(t,n)})})}function u(t,n){try{(i=e[t](n)).value instanceof y?Promise.resolve(i.value.v).then(a,c):h(s[0][2],i)}catch(t){h(s[0][3],t)}var i}function a(t){u("next",t)}function c(t){u("throw",t)}function h(t,n){t(n),s.shift(),s.length&&u(s[0][0],s[0][1])}}function E(t){var n,i;return n={},r("next"),r("throw",function(t){throw t}),r("return"),n[Symbol.iterator]=function(){return this},n;function r(r,e){n[r]=t[r]?function(n){return(i=!i)?{value:y(t[r](n)),done:"return"===r}:e?e(n):n}:e}}function S(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=t[Symbol.asyncIterator];return i?i.call(t):(t=d(t),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=t[i]&&function(n){return new Promise(function(r,e){!function(t,n,i,r){Promise.resolve(r).then(function(n){t({value:n,done:i})},n)}(r,e,(n=t[i](n)).done,n.value)})}}}function x(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t}var k=Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t["default"]=n};function _(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&v(n,t,i);return k(n,t),n}function A(t){return t&&t.__esModule?t:{"default":t}}function I(t,n,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:n.get(t)}function T(t,n,i,r,e){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!e)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?t!==n||!e:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?e.call(t,i):e?e.value=i:n.set(t,i),i}function C(t,n){if(null===n||"object"!=typeof n&&"function"!=typeof n)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?n===t:t.has(n)}}},n={};function i(r){var e=n[r];if(void 0!==e)return e.exports;var s=n[r]={exports:{}};return t[r](s,s.exports,i),s.exports}i.d=function(t,n){for(var r in n)i.o(n,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(248)}(); +!function(){"use strict";var t={248:function(t,n,i){var r,e=i(940);function s(t){}!function(t){t[t.Unknown=0]="Unknown",t[t.Clean=1]="Clean",t[t.UnrecoverableFailure=2]="UnrecoverableFailure"}(r||(r={}));var o=new(function(){function t(t){this.rebuildFromSnapshot(t)}return t.prototype.rebuildFromSnapshot=function(t){var n=this.snapshot;if(this.snapshot=t,!n||n.functions!==t.functions){var i=t.functions;this.arrayIsArray=i.arrayIsArray,this.clearWindowInterval=a(i.clearWindowInterval),this.clearWindowTimeout=a(i.clearWindowTimeout),this.dateGetTime=a(i.dateGetTime),this.dateNow=i.dateNow,this.docFragQuerySelectorAll=a(i.docFragQuerySelectorAll),this.docQuerySelectorAll=a(i.docQuerySelectorAll),this.elMatches=a(i.elMatches),this.elQuerySelectorAll=a(i.elQuerySelectorAll),this.jsonParse=i.jsonParse,this.jsonStringify=i.jsonStringify,this.matchMedia=c(i.matchMedia),this.mathAbs=i.mathAbs,this.mathFloor=i.mathFloor,this.mathMax=i.mathMax,this.mathMin=i.mathMin,this.mathPow=i.mathPow,this.mathRandom=i.mathRandom,this.mathRound=i.mathRound,this.objectHasOwnProp=a(i.objectHasOwnProp),this.objectKeys=i.objectKeys,this.objectValues=i.objectValues||null,this.requestWindowAnimationFrame=c(i.requestWindowAnimationFrame),this.requestWindowIdleCallback=c(i.requestWindowIdleCallback),this.setWindowInterval=a(i.setWindowInterval),this.setWindowTimeout=a(i.setWindowTimeout)}},t}())(u(window));function u(t,n){void 0===n&&(n=r.Unknown);var i=n,e=[],s=function(t){return i=r.UnrecoverableFailure,e.push("Snapshot failed: "+t),function(){throw new Error("Invoked failed snapshot")}},o=function(t){try{return t()}catch(t){return s(t.message)}},u=function(t){try{return t()||s("snapshot not found")}catch(t){return s(t.message)}},a={arrayIsArray:o(function(){return t.Array.isArray}),clearWindowInterval:o(function(){return t.clearInterval}),clearWindowTimeout:o(function(){return t.clearTimeout}),dateGetTime:o(function(){return t.Date.prototype.getTime}),dateNow:o(function(){return t.Date.now}),docFragQuerySelectorAll:u(function(){var n;return null===(n=t.DocumentFragment)||void 0===n?void 0:n.prototype.querySelectorAll}),docQuerySelectorAll:u(function(){var n;return null!==(n=t.Document.prototype.querySelectorAll)&&void 0!==n?n:t.document.querySelectorAll}),elMatches:u(function(){return v(t,h)}),elQuerySelectorAll:u(function(){return v(t,f)}),jsonParse:o(function(){return t.JSON.parse}),jsonStringify:o(function(){return t.JSON.stringify}),matchMedia:o(function(){return t.matchMedia}),mathAbs:o(function(){return t.Math.abs}),mathFloor:o(function(){return t.Math.floor}),mathMax:o(function(){return t.Math.max}),mathMin:o(function(){return t.Math.min}),mathPow:o(function(){return t.Math.pow}),mathRandom:o(function(){return t.Math.random}),mathRound:o(function(){return t.Math.round}),objectHasOwnProp:o(function(){return t.Object.prototype.hasOwnProperty}),objectKeys:o(function(){return t.Object.keys}),objectValues:o(function(){return t.Object.values}),requestWindowAnimationFrame:o(function(){return t.requestAnimationFrame}),requestWindowIdleCallback:o(function(){return t.requestIdleCallback}),setWindowInterval:o(function(){return t.setInterval}),setWindowTimeout:o(function(){return t.setTimeout})},c={functionToString:o(function(){return t.Function.prototype.toString}),objectToString:o(function(){return t.Object.prototype.toString})};return{status:i,functions:a,helpers:c,errors:e}}function a(t){return function(n){for(var i=[],r=1;r=0){var s=e.split("/"),o=s[0],u=s[1];i[r]=o,n=u;break}}var a=function(t){var n=parseInt(null!=t?t:"",10),i=E(),r=S();return isNaN(n)?r:n<=i?void 0:n>r?r:n}(n);if(!a)return null;i[0];var c=i[1],h=i[2],f=i[3],v="";f&&(v=decodeURIComponent(f),(y.indexOf(v)>=0||b.indexOf(v)>=0)&&(v=""));var l=(null!=h?h:"").split(":"),d=l[0],p=l[1],w=l[2];return l[3],{appKeyHash:v,expirationAbsTimeSeconds:a,userId:d,orgId:c,pageCount:_(l[4]),sessionId:null!=p?p:"",sessionStartTime:_(w)}}function k(t){var n={};try{for(var i=t.cookie.split(";"),r=0;r1))return s}}(t);if(!i||!K(n))return n;var r="";return 0===n.indexOf("www.")&&(n=n.slice(4),r="www."),0===n.indexOf(i+".")&&(n=n.slice((i+".").length)),""+r+i+"."+n}}function $(t){return t?C(function(t){var n=t,i=n.indexOf(":");return i>=0&&(n=n.slice(0,i)),n}(t))?t:0==t.indexOf("www.")?"app."+t.slice(4):"app."+t:t}function G(t){var n=j(t);if(n)return n+"/s/fs.js"}function X(t,n){return function(){for(var i=[],r=0;rn)return!1;return i==n}function ot(t,n){var i=0;for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&++i>n)return!0;return!1}function ut(t){var n=t.nextSibling;return n&&t.parentNode&&n===t.parentNode.firstChild?null:n}function at(t){var n=t.previousSibling;return n&&t.parentNode&&n===t.parentNode.lastChild?null:n}function ct(t){return function(){for(var n=this,i=[],r=0;r"}function pt(t){return o.jsonParse(t)}var wt=function(){function t(t,n,i){void 0===i&&(i=!1),this.i=t,this.u=n,this.l=i,this.g=J,this.m=J,this.S=J,this.k=!1}return t.prototype.before=function(t){return this.g=ft(t),this},t.prototype.afterSync=function(t){return this.m=ft(t),this},t.prototype.afterAsync=function(t){return this.S=ft(function(n){o.setWindowTimeout(window,X(function(){t(n)}),0)}),this},t.prototype.disable=function(){if(this.k=!1,this._){var t=this._,n=t.override,i=t["native"];this.i[this.u]===n&&(this.i[this.u]=i,this._=void 0)}},t.prototype.enable=function(){if(this.k=!0,this._)return!0;this._=this.A();try{this.i[this.u]=this._.override}catch(t){return!1}return!0},t.prototype.getTarget=function(){return this.i},t.prototype.A=function(){var t=this,n=this,i=this.i[this.u],r=function(){for(var t=[],r=0;r\n";var i=[];try{for(var r=arguments.callee.caller.caller;r&&i.length<10;){var e=kt.test(r.toString())&&RegExp.$1||xt;i.push(e),r=r.caller}}catch(t){t.toString()}n=i.join("\n")}return t+n}function It(){try{return window.self!==window.top}catch(t){return!0}}var Tt=function(){function t(){}return t.wrap=function(n,i){return void 0===i&&(i="error"),X(n,function(n){return t.sendToBugsnag(n,i)})},t.I=15,t.sendToBugsnag=function(n,i,r){if(!(t.I<=0)){t.I--;var e=n;"string"==typeof e&&(e=new Error(e));var s=k(document).fs_uid,o=s?x(s):void 0;o&&o.orgId!=F(window)&&(o=void 0);var u=new Date(1678707725e3).toISOString(),a={projectRoot:window.location.origin,deviceTime:p(),inIframe:It(),CompiledVersion:"11aa377d19",CompiledTimestamp:1678707725,CompiledTime:u,orgId:F(window),"userId:sessionId":o?o.userId+":"+o.sessionId:"NA",context:document.location&&document.location.pathname,message:e.message,name:"Recording Error",releaseStage:"production "+u,severity:i,language:Et(window),stacktrace:_t(e)||At()},c=function(t,n,i){var r=encodeURIComponent(n)+"="+encodeURIComponent(i);t.push(r)},h=[];for(var f in a)c(h,f,a[f]||"");if(r)for(var f in r)c(h,"aux_"+f,Ct(r[f]));new Image().src="https://"+L(window)+"/rec/except?"+h.join("&")}},t}();function Ct(t){try{var n=typeof t+": "+vt(t);return"function"==typeof t.toString&&(n+=" (toString: "+t.toString()+")"),n}catch(t){return"failed to serialize \""+(null==t?void 0:t.message)+"\""}}var Pt={};function jt(t,n,i){if(void 0===i&&(i=1),t)return!0;if(Pt[n]=Pt[n]||0,Pt[n]++,Pt[n]>i)return!1;var r=new Error("Assertion failed: "+n);return Tt.sendToBugsnag(r,"error"),t}var Ot,Mt,Kt,Rt,Ht,Nt,Lt={};function Ut(t,n,i){var r;Lt[t]=null!==(r=Lt[t])&&void 0!==r?r:0,Lt[t]++,Lt[t]>1||Tt.sendToBugsnag(n,"error",i)}!function(t){t.MUT_INSERT=2,t.MUT_REMOVE=3,t.MUT_ATTR=4,t.MUT_TEXT=6,t.MOUSEMOVE=8,t.MOUSEMOVE_CURVE=9,t.SCROLL_LAYOUT=10,t.SCROLL_LAYOUT_CURVE=11,t.MOUSEDOWN=12,t.MOUSEUP=13,t.CLICK=16,t.FOCUS=17,t.VALUECHANGE=18,t.RESIZE_LAYOUT=19,t.DOMLOADED=20,t.LOAD=21,t.PLACEHOLDER_SIZE=22,t.UNLOAD=23,t.BLUR=24,t.SET_FRAME_BASE=25,t.TOUCHSTART=32,t.TOUCHEND=33,t.TOUCHCANCEL=34,t.TOUCHMOVE=35,t.TOUCHMOVE_CURVE=36,t.NAVIGATE=37,t.PLAY=38,t.PAUSE=39,t.RESIZE_VISUAL=40,t.RESIZE_VISUAL_CURVE=41,t.RESIZE_DOCUMENT_CONTENT=42,t.RESIZE_SCROLLABLE_ELEMENT_CONTENT=43,t.LOG=48,t.ERROR=49,t.DBL_CLICK=50,t.FORM_SUBMIT=51,t.WINDOW_FOCUS=52,t.WINDOW_BLUR=53,t.HEARTBEAT=54,t.WATCHED_ELEM=56,t.PERF_ENTRY=57,t.REC_FEAT_SUPPORTED=58,t.SELECT=59,t.CSSRULE_INSERT=60,t.CSSRULE_DELETE=61,t.FAIL_THROTTLED=62,t.AJAX_REQUEST=63,t.SCROLL_VISUAL_OFFSET=64,t.SCROLL_VISUAL_OFFSET_CURVE=65,t.MEDIA_QUERY_CHANGE=66,t.RESOURCE_TIMING_BUFFER_FULL=67,t.MUT_SHADOW=68,t.DISABLE_STYLESHEET=69,t.FULLSCREEN=70,t.FULLSCREEN_ERROR=71,t.ADOPTED_STYLESHEETS=72,t.CUSTOM_ELEMENT_DEFINED=73,t.MODAL_OPEN=74,t.MODAL_CLOSE=75,t.SLOW_INTERACTION=76,t.LONG_FRAME=77,t.TIMING=78,t.STORAGE_WRITE_FAILURE=79,t.DOCUMENT_PROPERTIES=80,t.ENTRY_NAVIGATE=81,t.STATS=82,t.VIEWPORT_INTERSECTION=83,t.COPY=84,t.PASTE=85,t.URL_SALT=86,t.URL_ID=87,t.FRAME_STATUS=88,t.SCRIPT_COMPILED_VERSION=89,t.RESET_CSS_SHEET=90,t.ANIMATION_CREATED=91,t.ANIMATION_METHOD_CALLED=92,t.ANIMATION_PROPERTY_SET=93,t.DOCUMENT_TIMELINE_CREATED=94,t.KEYFRAME_EFFECT_CREATED=95,t.KEYFRAME_EFFECT_METHOD_CALLED=96,t.KEYFRAME_EFFECT_PROPERTY_SET=97,t.CAPTURE_SOURCE=98,t.PAGE_DATA=99,t.VISIBILITY_STATE=100,t.DIALOG=101,t.CSSRULE_UPDATE=102,t.CANVAS=103,t.CANVAS_DETACHED_DIMENSION=104,t.INIT_API=105,t.DEFERRED_RESOLVED=106,t.KEEP_ELEMENT=2e3,t.KEEP_URL=2001,t.KEEP_BOUNCE=2002,t.SYS_SETVAR=8193,t.SYS_RESOURCEHASH=8195,t.SYS_SETCONSENT=8196,t.SYS_CUSTOM=8197,t.SYS_REPORTCONSENT=8198,t.SYS_LETHE_MOBILE_BUNDLE_SEQ=8199}(Ot||(Ot={})),function(t){t.Animation=0,t.CSSAnimation=1,t.CSSTransition=2}(Mt||(Mt={})),function(t){t.Unknown=0,t.Serialization=1}(Kt||(Kt={})),function(t){t.Unknown=0,t.Successful=1,t.BlocklistedFrame=2,t.PartiallyLoaded=3,t.MissingWindowOrDocument=4,t.MissingDocumentHead=5,t.MissingBodyOrChildren=6,t.AlreadyDefined=7,t.NoNonScriptElement=8,t.Exception=9}(Rt||(Rt={})),function(t){t.Unknown=0,t.DomSnapshot=1,t.NodeEncoding=2,t.LzEncoding=3}(Ht||(Ht={})),function(t){t.Internal=0,t.Public=1}(Nt||(Nt={}));var Ft,Dt,Bt,Wt,qt,Qt,Vt,zt,$t,Gt,Xt,Jt,Zt,Yt,tn,nn,rn,en,sn,on,un,an,cn,hn=["print","alert","confirm"];function fn(t){switch(t){case Ot.MOUSEDOWN:case Ot.MOUSEMOVE:case Ot.MOUSEMOVE_CURVE:case Ot.MOUSEUP:case Ot.TOUCHSTART:case Ot.TOUCHEND:case Ot.TOUCHMOVE:case Ot.TOUCHMOVE_CURVE:case Ot.TOUCHCANCEL:case Ot.CLICK:case Ot.SCROLL_LAYOUT:case Ot.SCROLL_LAYOUT_CURVE:case Ot.SCROLL_VISUAL_OFFSET:case Ot.SCROLL_VISUAL_OFFSET_CURVE:case Ot.NAVIGATE:return!0;}return!1}!function(t){t[t.Index=1]="Index",t[t.Cached=2]="Cached"}(Ft||(Ft={})),function(t){t.GrantConsent=!0,t.RevokeConsent=!1}(Dt||(Dt={})),function(t){t.Page=0,t.Document=1}(Bt||(Bt={})),function(t){t.Unknown=0,t.Api=1,t.FsShutdownFrame=2,t.Hibernation=3,t.Reidentify=4,t.SettingsBlocked=5,t.Size=6,t.Unload=7,t.Hidden=8}(Wt||(Wt={})),function(t){t.Unknown=0,t.NotEmpty=1,t.EmptyBody=2}(qt||(qt={})),function(t){t.Timing=0,t.Navigation=1,t.Resource=2,t.Paint=3,t.Mark=4,t.Measure=5,t.Memory=6,t.TimeOrigin=7,t.LayoutShift=8,t.FirstInput=9,t.LargestContentfulPaint=10,t.LongTask=11}(Qt||(Qt={})),function(t){t.Timing=["navigationStart","unloadEventStart","unloadEventEnd","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","domLoading","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd"],t.Navigation=["name","startTime","duration","initiatorType","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","unloadEventStart","unloadEventEnd","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd","type","redirectCount","decodedBodySize","encodedBodySize","transferSize"],t.Resource=["name","startTime","duration","initiatorType","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","decodedBodySize","encodedBodySize","transferSize"],t.Measure=["name","startTime","duration"],t.Memory=["jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize"],t.TimeOrigin=["timeOrigin"],t.LayoutShift=["startTime","value","hadRecentInput"],t.FirstInput=["name","startTime","duration","processingStart"],t.LargestContentfulPaint=["name","startTime","duration","renderTime","loadTime","size"]}(Vt||(Vt={})),function(t){t.Performance=0,t.PerformanceEntries=1,t.PerformanceMemory=2,t.Console=3,t.Ajax=4,t.PerformanceObserver=5,t.PerformanceTimeOrigin=7,t.WebAnimation=8,t.LayoutShift=9,t.FirstInput=10,t.LargestContentfulPaint=11,t.LongTask=12,t.HTMLDialogElement=13,t.CaptureOnStartEnabled=14,t.CanvasWatcherEnabled=15}(zt||(zt={})),function(t){t.Node=1,t.Sheet=2}($t||($t={})),function(t){t.StyleSheetHooks=0,t.SetPropertyHooks=1}(Gt||(Gt={})),function(t){t.Document="document",t.Event="evt",t.Page="page",t.User="user"}(Xt||(Xt={})),function(t){t.FsId="fsidentity",t.NewUid="newuid"}(Jt||(Jt={})),function(t){t.Elide=0,t.Record=1,t.Allowlist=2}(Zt||(Zt={})),function(t){t.Any=0,t.Exclude=1,t.Mask=2}(Yt||(Yt={})),function(t){t.Erase=0,t.MaskText=1,t.ScrubUrl=2,t.ScrubCss=3}(tn||(tn={})),function(t){t.Static=0,t.Prefix=1}(nn||(nn={})),function(t){t.SignalInvalid=0,t.SignalDeadClick=1,t.SignalRageClick=2}(rn||(rn={})),function(t){t.ReasonNoSuchOrg=1,t.ReasonOrgDisabled=2,t.ReasonOrgOverQuota=3,t.ReasonBlockedDomain=4,t.ReasonBlockedIp=5,t.ReasonBlockedUserAgent=6,t.ReasonBlockedGeo=7,t.ReasonBlockedTrafficRamping=8,t.ReasonInvalidURL=9,t.ReasonUserOptOut=10,t.ReasonInvalidRecScript=11,t.ReasonDeletingUser=12,t.ReasonNativeHookFailure=13}(en||(en={})),function(t){t.Unset=0,t.Exclude=1,t.Mask=2,t.Unmask=3,t.Watch=4,t.Keep=5,t.Defer=6}(sn||(sn={})),function(t){t.Unset=0,t.Click=1}(on||(on={})),function(t){t[t.Page=1]="Page",t[t.Bundle=2]="Bundle"}(un||(un={})),function(t){t[t.Error=3]="Error",t[t.Page=4]="Page",t[t.Bundle=5]="Bundle",t[t.Settings=6]="Settings"}(an||(an={})),function(t){t.MaxPerfMarksPerPage=16384,t.MaxLogsPerPage=1024,t.MaxUrlLength=2048,t.MutationProcessingInterval=250,t.CurveSamplingInterval=142,t.DefaultBundleUploadInterval=5e3,t.HeartbeatInitial=4e3,t.HeartbeatMax=256200,t.PageInactivityTimeout=18e5,t.BackoffMax=3e5,t.ScrollSampleInterval=t.MutationProcessingInterval/5,t.InactivityThreshold=4e3,t.MaxAjaxPayloadLength=16384,t.DefaultOrgSettings={MaxPerfMarksPerPage:t.MaxPerfMarksPerPage,MaxConsoleLogPerPage:t.MaxLogsPerPage,MaxAjaxPayloadLength:t.MaxAjaxPayloadLength,MaxUrlLength:t.MaxUrlLength,RecordPerformanceResourceImg:!0,RecordPerformanceResourceTiming:!0,HttpRequestHeadersAllowlist:[],HttpResponseHeadersAllowlist:[],UrlPrivacyConfig:[{Exclude:{Hash:[{Expression:"#.*"}],QueryParam:[{Expression:"(=)(.*)"}]}}],AttributeBlocklist:[{Target:Yt.Any,Tag:"*",Name:"",Type:nn.Prefix,Action:tn.Erase}]},t.DefaultStatsSettings={MaxPayloadLength:8192,MaxEventTypeLength:1024},t.BlockedFieldValue="__fs__redacted"}(cn||(cn={}));var vn,ln,dn,pn="_fs_uid",wn="_fs_cid",gn="_fs_lua";function mn(t,n,i,r){void 0!==i&&("function"==typeof t.addEventListener?t.addEventListener(n,i,r):"function"==typeof t.addListener&&t.addListener(i))}function yn(t,n,i,r){void 0!==i&&("function"==typeof t.removeEventListener?t.removeEventListener(n,i,r):"function"==typeof t.removeListener&&t.removeListener(i))}!function(t){t[t.Shutdown=1]="Shutdown",t[t.Starting=2]="Starting",t[t.Started=3]="Started"}(vn||(vn={})),function(t){t.Set=0,t.Function=1}(ln||(ln={})),function(t){t[t.Disabled=0]="Disabled",t[t.CaptureCanvasOps=1]="CaptureCanvasOps",t[t.ScreenshotCanvas=2]="ScreenshotCanvas"}(dn||(dn={}));var bn=function(){function t(){var t=this;this.T=[],this.C=[],this.P=!0,this.j=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t.P={capture:!0,passive:!0},t.j={capture:!1,passive:!0}}});window.addEventListener("test",J,n)}catch(t){}}return t.prototype.add=function(t,n,i,r,e){return void 0===e&&(e=!1),this.addCustom(t,n,i,r,e)},t.prototype.addCustom=function(t,n,i,r,e){void 0===e&&(e=!1);var s={target:t,type:n,fn:Tt.wrap(function(t){(e||!1!==t.isTrusted||"message"==n||t._fs_trust_event)&&r(t)}),options:i?this.P:this.j,index:this.T.length};return this.T.push(s),mn(t,n,s.fn,s.options),s},t.prototype.remove=function(t){t.target&&(yn(t.target,t.type,t.fn,t.options),t.target=null,t.fn=void 0)},t.prototype.clear=function(){for(var t=0;ti){n.Z||(n.Z=!0,Tt.sendToBugsnag("Out of time for remaining measurement tasks.","warning",{totalRunningTimeMs:a-t}));break t}}n.G=null}finally{n.X=!1,n.wnd}}}),this.wnd=t}return t.create=function(t){return t.ResizeObserver?new ai(t,t.ResizeObserver):new ci(t)},t.prototype.requestMeasureTask=function(t,n){var i,r=this;if(this.J>16)Tt.sendToBugsnag("Too much synchronous recursion in requestMeasureTask","error");else{var e=this.X?this.J:0,s=Tt.wrap(function(){var t=r.J;r.J=e+1;try{n()}finally{r.J=t}});this.G?this.G[t].push(s):(this.G=((i={})[ii.Essential]=[],i[ii.High]=[],i[ii.Medium]=[],i[ii.Low]=[],i[t]=[s],i),this.schedule())}},t.prototype.performMeasurementsNow=function(){this.performMeasurements()},t}(),ai=function(t){function n(n,i){var r=t.call(this,n)||this;return r.Y=i,r}return(0,e.__extends)(n,t),n.prototype.schedule=function(){var t=this,n=this.Y,i=this.wnd.document,r=i.documentElement||i.body||i.head,e=new n(function(){e.unobserve(r),t.performMeasurements()});e.observe(r)},n}(ui),ci=function(t){function n(n){return t.call(this,n)||this}return(0,e.__extends)(n,t),n.prototype.schedule=function(){(0,e.__awaiter)(void 0,void 0,Yn,function(){var t;return(0,e.__generator)(this,function(n){switch(n.label){case 0:return(t=o.requestWindowAnimationFrame)?[4,new Yn(function(n){return t(window,n)})]:[3,2];case 1:n.sent(),n.label=2;case 2:return[4,ei()];case 3:return n.sent(),[2];}})}).then(this.performMeasurements)},n}(ui);function hi(t,n){return n&&t.pageLeft==n.pageLeft&&t.pageTop==n.pageTop}function fi(t,n){return n&&t.width==n.width&&t.height==n.height}function vi(t){return{pageLeft:t.pageLeft,pageTop:t.pageTop,width:t.width,height:t.height}}var li=[["@import\\s+\"","\""],["@import\\s+'","'"]].concat([["url\\(\\s*\"","\"\\s*\\)"],["url\\(\\s*'","'\\s*\\)"],["url\\(\\s*","\\s*\\)"]]),di=".*?"+/(?:[^\\](?:\\\\)*)/.source,pi=new RegExp(li.map(function(t){var n=t[0],i=t[1];return"("+n+")("+di+")("+i+")"}).join("|"),"g"),wi=/url\(["']?(.+?)["']?\)/g,gi=/^\s*\/\//;function mi(t){return"BackCompat"==t.compatMode}function yi(t){return t&&t.body&&t.documentElement?mi(t)?[t.body.clientWidth,t.body.clientHeight]:[t.documentElement.clientWidth,t.documentElement.clientHeight]:[0,0]}var bi=function(){function t(t,n){var i,r,e,s;this.hasKnownPosition=!1,this.pageLeft=0,this.pageTop=0,this.width=0,this.height=0,this.clientWidth=0,this.clientHeight=0;var o=t.document;if(o&&o.documentElement&&o.body){i=yi(o),this.clientWidth=i[0],this.clientHeight=i[1];var u=t.visualViewport;if(u){this.hasKnownPosition=!0,this.pageTop=u.pageTop-u.offsetTop,this.pageLeft=u.pageLeft-u.offsetLeft,0==this.pageTop&&(this.pageTop=0),0==this.pageLeft&&(this.pageLeft=0);var a=null!==(e=xi(t,"innerWidth"))&&void 0!==e?e:0,c=null!==(s=xi(t,"innerHeight"))&&void 0!==s?s:0;if(a>0&&c>0)return this.width=a,void(this.height=c)}if(void 0!==n&&this.clientWidth==n.clientWidth&&this.clientHeight==n.clientHeight&&n.width>0&&n.height>0)return this.width=n.width,void(this.height=n.height);r=this.tt(t),this.width=r[0],this.height=r[1]}}return t.prototype.tt=function(t){var n=this.it(t,"width",this.clientWidth,this.clientWidth+128);void 0===n&&(n=xi(t,"innerWidth")),void 0===n&&(n=this.clientWidth);var i=this.it(t,"height",this.clientHeight,this.clientHeight+128);return void 0===i&&(i=xi(t,"innerHeight")),void 0===i&&(i=this.clientHeight),[n,i]},t.prototype.it=function(t,n,i,r){if(o.matchMedia){var e=i,s=r,u=o.matchMedia(t,"(min-"+n+": "+e+"px)");if(null!=u){if(u.matches&&o.matchMedia(t,"(max-"+n+": "+e+"px)").matches)return e;for(;e<=s;){var a=o.mathFloor((e+s)/2);if(o.matchMedia(t,"(min-"+n+": "+a+"px)").matches){if(o.matchMedia(t,"(max-"+n+": "+a+"px)").matches)return a;e=a+1}else s=a-1}}}},t}();function Ei(t,n){return new bi(t,n)}var Si=function(t,n){this.offsetLeft=0,this.offsetTop=0,this.pageLeft=0,this.pageTop=0,this.width=0,this.height=0,this.scale=0;var i=t.document;if(i.body){"pageXOffset"in t?(this.pageLeft=t.pageXOffset,this.pageTop=t.pageYOffset):i.scrollingElement?(this.pageLeft=i.scrollingElement.scrollLeft,this.pageTop=i.scrollingElement.scrollTop):mi(i)?(this.pageLeft=i.body.scrollLeft,this.pageTop=i.body.scrollTop):i.documentElement&&(i.documentElement.scrollLeft>0||i.documentElement.scrollTop>0)?(this.pageLeft=i.documentElement.scrollLeft,this.pageTop=i.documentElement.scrollTop):(this.pageLeft=i.body.scrollLeft||0,this.pageTop=i.body.scrollTop||0),this.offsetLeft=this.pageLeft-n.pageLeft,this.offsetTop=this.pageTop-n.pageTop;var r=0,e=0;try{r=t.innerWidth,e=t.innerHeight}catch(t){return}if(0!=r&&0!=e){this.scale=n.width/r,this.scale<1&&(this.scale=1);var s=n.width-n.clientWidth,o=n.height-n.clientHeight;this.width=r-s/this.scale,this.height=e-o/this.scale}}};function xi(t,n){try{return t[n]}catch(t){return}}function ki(t){var n=t;return n.tagName?"object"==typeof n.tagName?"form":n.tagName.toLowerCase():null}var _i,Ai,Ii=new RegExp("[^\\s]"),Ti=new RegExp("[\\s]*$");function Ci(t){var n=Ii.exec(t);if(!n)return t;for(var i=n.index,r=(n=Ti.exec(t))?t.length-n.index:0,e="\uFFFF",s=t.slice(i,t.length-r).split(/\r\n?|\n/g),o=0;o0&&n.length<1e4;){var i=n.pop();delete Mi[i.id],i.node._fs==i.id&&(i.node._fs=0),i.id=0,i.next&&n.push(i.next),i.child&&n.push(i.child)}jt(n.length<1e4,"clearIds is fast")}function Qi(t,n){void 0===n&&(n=1024);try{var i={tokens:[],opath:[],cyclic:Vi(t,n/4)};return $i(t,n,0,i),i.tokens.join("")}catch(t){return lt(t)}}function Vi(t,n){var i=0;try{o.jsonStringify(t,function(t,r){if(i++>n)throw"break";if("object"==typeof r)return r})}catch(t){return"break"!=t}return!1}var zi=function(t,n,i){return void 0===i&&(i="..."),t.length<=n?t:t.length<=i.length||n<=i.length?t.substring(0,n):t.substring(0,n-i.length)+i};function $i(t,n,i,r){if(n<1)return 0;var e=function(t){switch(!0){case function(t){return!(!t||t.constructor!=Date)}(t):return n=t,isNaN(n)?"Invalid Date":n.toUTCString();case function(t){return"object"==typeof Node?t instanceof Node:t&&"object"==typeof t&&t.nodeType>0&&"string"==typeof t.nodeName}(t):return function(t){return t.toString()}(t);case void 0===t:return"undefined";case"object"!=typeof t||null==t:return t;case t instanceof Error:return[t.toString(),t.stack].filter(Boolean).join(",");}var n}(t);if(void 0!==e){var s=function(t,n){var i=o.jsonStringify(t);return i&&"\""==i[0]?zi(i,n,"...\""):i}(e,n);return"string"==typeof s&&s.length<=n?(r.tokens.push(s),s.length):0}if(r.cyclic){r.opath.splice(i);var u=r.opath.lastIndexOf(t);if(u>-1){var a="";return a="\""+zi(a,n-2)+"\"",r.tokens.push(a),a.length}r.opath.push(t)}var c=n,h=function(t){return c>=t.length&&(c-=t.length,r.tokens.push(t),!0)},f=function(t){var n=r.tokens.length-1;","===r.tokens[n]?r.tokens[n]=t:h(t)};if(c<2)return 0;if(tt(t)){h("[");for(var v=0;v0;v++){var l=$i(t[v],c-1,i+1,r);if(c-=l,0==l&&!h("null"))break;h(",")}f("]")}else{h("{");var d=nt(t);for(v=0;v0;v++){var p=d[v],w=t[p];if(!h("\""+p+"\":"))break;if(0==(l=$i(w,c-1,i+1,r))){r.tokens.pop();break}c-=l,h(",")}f("}")}return n==1/0?1:n-c}var Gi,Xi,Ji=function(){function t(){var n=this;this.rt=Tt.wrap(function(){n.unregister(),n.et&&n.et()}),this.st=0,this.ot=t.ut++}return t.ct=function(){t.checkedAlready=!1,t.ht=0},t.checkForBrokenSchedulers=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var n,i;return(0,e.__generator)(this,function(r){switch(r.label){case 0:return!o.requestWindowAnimationFrame||t.checkedAlready||(n=p())-t.ht<100?[2,!1]:(t.ht=n,t.checkedAlready=!0,[4,new Yn(function(t){return o.requestWindowAnimationFrame(window,t)})]);case 1:return r.sent(),i=[],rt(t.ft,function(t){var r=t.vt(n);r&&i.push(r)}),[4,Yn.all(i)];case 2:return r.sent(),o.requestWindowAnimationFrame(window,Tt.wrap(function(){t.checkedAlready=!1})),[2,!0];}})})},t.stopAll=function(){rt(this.ft,function(t){return t.stop()})},t.prototype.setTick=function(t){this.et=t},t.prototype.stop=function(){this.cancel(),delete t.ft[this.ot]},t.prototype.register=function(n){this.st=p()+100+1.5*n,t.ft[this.ot]=this},t.prototype.timerIsRunning=function(){return null!=t.ft[this.ot]},t.prototype.unregister=function(){delete t.ft[this.ot]},t.prototype.vt=function(t){if(t>this.st)return Yn.resolve().then(this.rt)["catch"](function(){})},t.ft={},t.ut=0,t.checkedAlready=!1,t.ht=0,t}(),Zi=function(t){function n(n){var i=t.call(this)||this;return i.lt=n,i.dt=-1,i}return(0,e.__extends)(n,t),n.prototype.start=function(t){var n=this;-1==this.dt&&(this.setTick(function(){t(),n.register(n.lt)}),this.dt=o.setWindowInterval(window,this.rt,this.lt),this.register(this.lt))},n.prototype.cancel=function(){-1!=this.dt&&(o.clearWindowInterval(window,this.dt),this.dt=-1,this.setTick(function(){}))},n}(Ji),Yi=function(t){function n(n,i,r){void 0===i&&(i=0);for(var e=[],s=3;sn&&(this.St=t-n,this.St>1e3&&this.kt("timekeeper set with future ts"))},t.prototype.kt=function(t){Qi({msg:t,skew:this.St,startTime:this.xt,wallTime:this.wallTime()},1024)},t}(),ir=function(){function t(t,n){this._t=t,this.At=n,this.It=!1,this.Tt={},this.Ct={},this.Pt={},this.jt=!1,this.Ot=!1,Gi=this,this.Mt=t.window.document}return t.prototype.start=function(){var t;(t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"))&&t.set&&(rr||(yt(HTMLInputElement,"value",ar),yt(HTMLInputElement,"checked",ar),yt(HTMLSelectElement,"value",ar),yt(HTMLTextAreaElement,"value",ar),yt(HTMLSelectElement,"selectedIndex",ar),yt(HTMLOptionElement,"selected",ar),rr=!0),1)||(this.It=!0)},t.prototype.hookInstance=function(t){if("input"===ki(t))switch(t.type){case"checkbox":case"radio":bt(t,"checked",ar);break;default:bt(t,"value",ar);}},t.prototype.addInput=function(t){if(t){var n=Bi(t);if(n){"input"===ki(t)&&this.Kt(t);var i=!1;if(function(t){switch(t.type){case"checkbox":case"radio":return t.checked!=t.hasAttribute("checked");default:return(t.value||"")!=function(t){if("select"!=ki(t))return t.getAttribute("value")||"";var n=t,i=n.querySelector("option[selected]")||n.querySelector("option");return i&&i.value||""}(t);}}(t)&&(this.Rt(t),i=!0),this.It&&(this.Tt[n]={elem:t}),!i)if(hr(t)){var r=or(t);t.checked&&(this.Pt[r]=n)}else this.Ct[n]=cr(t)}}},t.prototype.Kt=function(t){if(this.jt)this.Ot&&this.hookInstance(t);else{var n="checkbox"===t.type||"radio"===t.type?"checked":"value",i=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,n),r=Object.getOwnPropertyDescriptor(t,n);i&&r&&i!==r&&(this.Ot=!0,this.hookInstance(t)),this.jt=!0}},t.prototype.diffValue=function(t,n){void 0===n&&(n=cr(t));var i=Bi(t);if(!t||!i)return!1;if(hr(t)){var r=or(t);return this.Pt[r]===i!=("true"===n)}return this.Ct[i]!==n},t.prototype.onChange=function(t,n,i){void 0===i&&(i=cr(t));var r=Bi(t);t&&r&&(n||this.diffValue(t,i))&&this.Rt(t,n)},t.prototype.onKeyboardChange=function(t){var n,i=function(t){for(var n=t.activeElement;n&&n.shadowRoot;){var i=n.shadowRoot.activeElement;if(!i)return n;n=i}return n}(this.Mt);i&&("value"in(n=i)||"checked"in n)&&!Hi(i)&&this.diffValue(i)&&this.Rt(i,t)},t.prototype.tick=function(){for(var t in this.Tt){var n=this.Tt[t],i=n.elem;if(Bi(i))try{delete this.Tt[t];var r=cr(i);if(this.diffValue(i,r))this.Rt(i);else if(n.noFsIdInOption){var e=i;Array.prototype.slice.call(e.options).every(function(t){return Bi(t)})&&(n.noFsIdInOption=!1,this.Rt(i))}}finally{this.It&&(this.Tt[t]=n)}else delete this.Tt[t],delete this.Ct[t],hr(i)&&delete this.Pt[or(i)]}},t.prototype.stop=function(){Gi=void 0},t.prototype.Rt=function(t,n){var i=this;void 0===n&&(n=!1);var r=Bi(t);if(t&&r&&!this.Ht(r,t)){var e=cr(t);if(hr(t)){var s=or(t);"false"===e&&this.Pt[s]===r?delete this.Pt[s]:"true"===e&&(this.Pt[s]=r)}else this.Ct[r]=e;this._t.measurer.requestMeasureTask(ii.Medium,function(){var s=t.getBoundingClientRect(),o=s.width>0&&s.height>0,u=Ni(t)?Ci(e):e;i.At.enqueue({Kind:Ot.VALUECHANGE,Args:[r,u,n,o]})})}},t.prototype.Ht=function(t,n){if(this.Tt[t])return!0;if("select"!==ki(n))return!1;for(var i=n.options,r=0;r-1||wr.indexOf("Trident/")>-1,mr=(gr&&wr.indexOf("Trident/5"),gr&&wr.indexOf("Trident/6"),gr&&wr.indexOf("rv:11")>-1),yr=wr.indexOf("Edge/")>-1,br=(wr.indexOf("CriOS"),wr.indexOf("Snapchat")>-1),Er=/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);function Sr(){var t=window.navigator.userAgent.match(/Version\/(\d+)/);return t&&t[1]?parseInt(t[1],10):-1}function xr(t){if(!Er)return!1;var n=Sr();return n>=0&&n===t}function kr(t){if(!Er)return!1;var n=Sr();return n>=0&&nne?(Tt.sendToBugsnag("Ignoring huge text node","warning",{length:s}),""):t.parentNode&&"style"==ki(t.parentNode)?r:e.mask?Ci(r):r}function re(t){return Kr[t]||t.toLowerCase()}var ee=/^\s*((prefetch|preload|prerender)\s*)+$/i,se=/^\s*.*((worklet|script|worker|font|fetch)\s*)+$/i;function oe(t,n,i,r,e){var s,u;if(void 0===r&&(r=ki(t)),void 0===e&&(e=Ui(t)),null===r||""===n)return null;if("link"===r&&ee.test(null!==(s=t.getAttribute("rel"))&&void 0!==s?s:"")&&!se.test(null!==(u=t.getAttribute("as"))&&void 0!==u?u:""))return null;var a,c="style"===n?ae(i):i,h=function(t,n,i){var r,e,s,u,a,c,h,f,v,l,d,p,w,g=void 0;(null===(r=null==n?void 0:n.watchKind)||void 0===r?void 0:r.has(_i.Exclude))?g=Yt.Exclude:(null==n?void 0:n.mask)&&(g=Yt.Mask);var m=[null===(u=null===(s=null===(e=Ee.blocklist[Yt.Any])||void 0===e?void 0:e[t])||void 0===s?void 0:s["static"])||void 0===u?void 0:u[i],null===(h=null===(c=null===(a=Ee.blocklist[Yt.Any])||void 0===a?void 0:a["*"])||void 0===c?void 0:c["static"])||void 0===h?void 0:h[i],g?null===(l=null===(v=null===(f=Ee.blocklist[g])||void 0===f?void 0:f[t])||void 0===v?void 0:v["static"])||void 0===l?void 0:l[i]:void 0,g?null===(w=null===(p=null===(d=Ee.blocklist[g])||void 0===d?void 0:d["*"])||void 0===p?void 0:p["static"])||void 0===w?void 0:w[i]:void 0];return Ee.hasPrefix&&m.push(ke(Yt.Any,t,i),ke(Yt.Any,"*",i),g?ke(g,t,i):void 0,g?ke(g,"*",i):void 0),function(t){var n=t.filter(function(t){return void 0!==t});if(0!==n.length)return o.mathMin.apply(o,n)}(m)}(r,e,n);if(void 0===h&&!e)return null;switch(h){case void 0:return c;case tn.Erase:return null;case tn.MaskText:return Ci(c);case tn.ScrubCss:return a=function(t,n,i){return""+t+Se+i},c.replace(pi,function(t){for(var n=[],i=1;i-1)return f.substring(v)}return f;default:return(0,Ir.nt)(h);}}var ue={},ae=function(t,n){void 0===n&&(n=window);try{var i=n.location,r=""+i.origin+i.pathname+i.search,e=ue[r];return e?e.lastIndex=0:(e=new RegExp((s=r,($r.test(s)?s.replace(zr,"\\$&"):s)+"/?(#)"),"g"),ue[r]=e),t.replace(e,"https://fs-currenturl.invalid$1")}catch(n){return Ut("cleanCSS",n),t}var s},ce=/^data:/i;function he(t,n){if(ce.test(t))return t;switch(n.source){case"dom":switch(i=n.type){case"frame":case"iframe":return we(t);default:return fe(t);}case"event":switch(i=n.type){case Ot.AJAX_REQUEST:case Ot.NAVIGATE:return fe(t);case Ot.SET_FRAME_BASE:return we(t);default:return(0,Ir.nt)(i);}case"log":return we(t);case"page":var i;switch(i=n.type){case"base":return we(t);case"referrer":case"url":return fe(t);default:return(0,Ir.nt)(i);}case"perfEntry":switch(n.type){case"frame":case"iframe":case"navigation":case"other":return we(t);default:return fe(t);}default:return(0,Ir.nt)(n);}}function fe(t){return ge(de,t)}var ve=cn.DefaultOrgSettings.MaxUrlLength,le=Rr(cn.DefaultOrgSettings.UrlPrivacyConfig),de=Rr(cn.DefaultOrgSettings.UrlPrivacyConfig);function pe(t,n){le=Rr(cn.DefaultOrgSettings.UrlPrivacyConfig.concat(t)),de=Rr(t),ve=n||cn.DefaultOrgSettings.MaxUrlLength}function we(t){return ge(le,t)}function ge(t,n){return function(t,n,i){void 0===i&&(i=Lr);for(var r={Hash:[],Host:[],Path:[],QueryParam:[],Query:[]},e=0,s=t;e").replace(ye,function(t){return he(t,{source:"log",type:"debug"})})}var Ee,Se="https://fs-excluded.invalid";function xe(t){var n,i,r,e,s,o,u,a,c,h,f,v,l,d,p,w;try{for(var g=(Ee={blocklist:{},hasPrefix:!1}).blocklist,m=(null!==(r=null==t?void 0:t.length)&&void 0!==r?r:0)>0?t:cn.DefaultOrgSettings.AttributeBlocklist,y={},b=0,E=m;b-1;var n}var Te="#polyfillshadow";function Ce(t){var n;return(null===(n=t.childNodes)||void 0===n?void 0:n.length)>0}function Pe(t,n){Oe(t.childNodes,n)}function je(t,n){Oe(t.childNodes,n,!0)}function Oe(t,n,i){void 0===i&&(i=!1);for(var r=i?t.length-1:0,e=i?-1:t.length;r!==e;){var s=t[r];s&&"frag"in s&&!St(s)&&Array.isArray(s.frag)?s.frag.length&&Oe(s.childNodes,n,i):n(s),i?--r:++r}}var Me={INPUT:!0,TEXTAREA:!0,NOSCRIPT:!0},Ke=function(){function t(t,n,i){this.Xt=t,this.Jt=n,this.Zt=i,Mi={},Ki=1}return t.prototype.tokenizeNode=function(t,n,i,r,e,s,o){var u=this,a=Ui(n),c=Ui(i),h=[];return function(n){var i=Ki;try{return u.Yt(t,a,c,r,h,e,s,o),!0}catch(t){return Ki=i,!1}}()||(h=[]),h},t.prototype.Yt=function(t,n,i,r,s,o,u,a){for(var c,h,f=[{parentMirror:n,nextMirror:i,node:r}],v=function(t,n){return function(i){i&&t.push({parentMirror:n,nextMirror:null,node:i})}};f.length;){var l=f.pop();if(l)if("string"!=typeof l){var d=l.node,p=ki(d),w=this.tn(t,p,l,s,o,u);if(null!=w&&!(null===(c=w.watchKind)||void 0===c?void 0:c.has(_i.Exclude))){var g=1===d.nodeType?d.shadowRoot:null,m=w.shadowRootType===Te&&window.HTMLSlotElement&&"slot"===p&&d.assignedNodes();if(g||m||Ce(d))if(null===(h=w.watchKind)||void 0===h?void 0:h.has(_i.Defer))a(w.node,Ai.Deferred);else{if(f.push("]"),je(d,v(f,w)),g)f.push({parentMirror:w,nextMirror:null,node:g});else if(m&&m.length>0){for(var y=[],b=!1,E=0,S=m;E1e3)return null;if(!i||1!=i.nodeType)return null;var r=i;if(getComputedStyle(r).display.indexOf("inline")<0)return r;i=i.parentNode}},n}(Ze),ts=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,e.__extends)(n,t),n.prototype.observe=function(t){var n=this;if(t&&1==t.nodeType){var i=t;this.Tn(Ui(t)),this._t.measurer.requestMeasureTask(ii.Medium,function(){n.addEntry(i)})}},n.prototype.unobserveSubtree=function(t){var n=Ui(t);n&&this.Cn(n)},n.prototype.nodeChanged=function(t){var n=this,i=this.Pn(t);this._t.measurer.requestMeasureTask(ii.Medium,function(){for(var t=0,r=i;t0||this.Hn.length>0){var r={},s={};for(var o in (this.Gn(t,i,s,r), s)){var u=o.split("\t");i.push({Kind:Ot.MUT_ATTR,Args:[parseInt(u[0],10),u[1],s[o]],When:t})}for(var o in r)i.push({Kind:Ot.MUT_TEXT,Args:[parseInt(o,10),r[o]],When:t})}var a=this.Rn;this.Rn=[];for(var c=0;c0&&(i.push({Kind:Ot.DEFERRED_RESOLVED,Args:(0,e.__spreadArray)([],this.Ln),When:t}),this.Ln=[]),this.Nn.length>0){for(var f=0,v=this.Nn;f0&&this.Un.push(es(l))}this.Nn=[]}return i},t.prototype.recordingIsDetached=function(){return!!this.Wn&&this.Wn!=this.Dn.document},t.prototype.$n=function(t,n){if(!this.Kn&&this.Wn){window;var i=this.Xt.allWatchedElements(this.Wn);this.Zn(i,t,n,null,this.Wn,null),this.Jt.nodeChanged(this.Wn),this.qn&&this.Xn(this.Wn),this.Kn=!0,this.Yn(),window}},t.prototype.Yn=function(){var t=this;this.zn=mt(Element.prototype,"attachShadow",!0),this.zn&&this.zn.before(function(n){n.that.shadowRoot||t.Rn.push(n.that)})},t.prototype.Xn=function(t){var n;try{null===(n=this.qn)||void 0===n||n.observe(t,{childList:!0,attributes:!0,characterData:!0,subtree:!0,attributeOldValue:!0,characterDataOldValue:!0})}catch(t){}},t.prototype.Gn=function(t,n,i,r){for(var e,s,o,u,a=this,c={},h={},f=function(i){if(Ui(i)){a.ti(t,n,Ui(i));var r=Ui(i.parentNode);r&&(h[r.id]=r.node)}},v=0;v0)for(var m=0;m0){h[g]=l.target;var y=!(null==(T=l.target)?void 0:T.shadowRoot)||Ie(T.shadowRoot)?null:Ui(T.shadowRoot);y&&(h[y.id]=y.node)}break;case"characterData":Hi(l.target)||l.oldValue!=l.target.textContent&&(r[g]=ie(l.target));break;case"attributes":var b=ki(j=l.target);if("link"===b&&"rel"===l.attributeName&&ee.test(null!==(o=l.oldValue)&&void 0!==o?o:"")){f(j);break}var E,S=Li(j),x=this.Xt.isWatched(j);if($e(x)>$e(S)){f(j);break}De.needsToObserve(S,x)&&(this.Jt.observe(j),(null==x?void 0:x.has(_i.Watch))&&(null===(u=this.Zt)||void 0===u||u.observe(j)),(E=Ui(j))&&(E.watchKind=De.combineKindsPreservePrivacy(S,x)));var k=(void 0===(I=l.attributeNamespace)&&(I=""),(null===I?"":{"http://www.w3.org/1999/xlink":"xlink:","http://www.w3.org/XML/1998/namespace":"xml:","http://www.w3.org/2000/xmlns/":"xmlns:"}[I]||"")+(l.attributeName||"")),_=re(k);if("dialog"===b&&"open"===k)break;if(j.hasAttribute(k)){var A=l.target.getAttribute(k);l.oldValue!=A&&(A=oe(l.target,_,A||"",b),this.Mn(b,l.target,((e={})[_]=A||"",e)),null!==A&&(i[g+"\t"+_]=A))}else i[g+"\t"+_]=null;}}catch(t){}for(var I,T,C=0,P=this.Hn;C0&&i.push({Kind:Ot.MUT_SHADOW,Args:[s,u],When:n},{Kind:Ot.TIMING,Args:[[Nt.Internal,Kt.Serialization,Ht.NodeEncoding,n,a]],When:n})},t.prototype.Zn=function(t,n,i,r,e,s){var o=Di(r)||-1,u=Di(s)||-1,a=-1===o&&-1===u,c=p();window;var h=this.ei(t,r,e,s);window;var f=p()-c;h.length>0&&i.push({Kind:Ot.MUT_INSERT,Args:[o,u,h],When:n},{Kind:Ot.TIMING,Args:[[Nt.Internal,Kt.Serialization,a?Ht.DomSnapshot:Ht.NodeEncoding,n,f]],When:n})},t.prototype.ei=function(t,n,i,r){var e=this;if(n&&Hi(n))return[];for(var s=[],o=this.Bn.tokenizeNode(t,n,r,i,function(t){if(1==t.nodeType){var n=t;if(n.shadowRoot&&e.Xn(n.shadowRoot),"SLOT"===t.nodeName){var i=Ui(t);(null==i?void 0:i.shadowRootType)===Te&&t.addEventListener("slotchange",Tt.wrap(function(n){var i;e.Hn.push(null!==(i=n.target)&&void 0!==i?i:t)}))}}e.jn(t,s)},this.Mn,function(t,n){switch(n){case Ai.Immediate:e.refreshElement(t);break;case Ai.Deferred:e.Nn.push(t);}}),u=0,a=s;u0){var e=n[n.length-1];if(e.Kind==Ot.MUT_REMOVE)return void e.Args.push(r)}n.push({Kind:Ot.MUT_REMOVE,Args:[r],When:t})},t.prototype.setUpIEWorkarounds=function(){var n=this;if(mr){var i=Object.getOwnPropertyDescriptor(Node.prototype,"textContent"),r=i&&i.set;if(!i||!r)throw new Error("Missing textContent setter -- not safe to record mutations.");Object.defineProperty(Element.prototype,"textContent",(0,e.__assign)((0,e.__assign)({},i),{set:function(t){try{for(var n=void 0;n=this.firstChild;)this.removeChild(n);if(null===t||""==t)return;var i=(this.ownerDocument||document).createTextNode(t);this.appendChild(i)}catch(n){r&&r.call(this,t)}}}))}this.si=new tr(t.ThrottleMax,t.ThrottleInterval,function(){return new Yi(function(){n.Fn=!0,n.tearDownIEWorkarounds()}).start()});var s=this.si.guard(function(t){var n=t.cssText;t.cssText=n});this.si.open(),this.oi=mt(CSSStyleDeclaration.prototype,"setProperty"),this.oi&&this.oi.afterSync(function(t){s(t.that)}),this.ui=mt(CSSStyleDeclaration.prototype,"removeProperty"),this.ui&&this.ui.afterSync(function(t){s(t.that)})},t.prototype.tearDownIEWorkarounds=function(){this.si&&this.si.close(),this.oi&&this.oi.disable(),this.ui&&this.ui.disable()},t.prototype.updateConsent=function(){var t=this;this.Wn&&Pe(this.Wn,function(n){return t.refreshElement(n)})},t.prototype.refreshElement=function(t){Di(t)&&this.Hn.push(t)},t.ThrottleMax=1024,t.ThrottleInterval=1e4,t;}();function os(t){for(var n=new WeakMap,i=t;i;i=i.parentNode){if(n.has(i))return null;if(n.set(i,!0),11===i.nodeType)break}if(!i)return null;var r=Ui(i);return(null==r?void 0:r.shadowRootType)===Te&&(null==r?void 0:r.parent)?[r.parent.id,r.parent.node]:null}var us="navigation",as="resource",cs="paint",hs="measure",fs="mark",vs="layout-shift",ls="first-input",ds="largest-contentful-paint",ps="longtask",ws=function(){function t(t,n,i,r){var e=this;this._t=t,this.At=n,this.ai=r,this.ci=!1,this.hi=!1,this.fi=!1,this.vi=!1,this.li=!1,this.di=!1,this.pi=!1,this.wi=cn.DefaultOrgSettings.MaxPerfMarksPerPage,this.gi=0,this.mi=!1,this.yi=!1,this.bi=!1,this.Ei=!1,this.Si=0,this.xi=!1,this.qn=null,this.ki=[],this._i=new Yn(function(t){e.Ai=function(){t({timeRemaining:function(){return Number.POSITIVE_INFINITY},didTimeout:!1}),e.Ai=void 0}}),this.Ii=!1;var s=window.performance;s&&(this.fi=!0,s.timing&&(this.vi=!0),s.memory&&(this.di=!0),s.timeOrigin&&(this.pi=!0),"function"==typeof s.getEntries&&(this.li=!0),this.mi=gs(window,vs),this.yi=gs(window,ls),this.bi=gs(window,ds),this.Ei=gs(window,ps),this.T=i.createChild())}return t.prototype.initialize=function(t){var n=t.resourceUploader,i=t.recTimings,r=t.recImgs,e=t.maxPerfMarksPerPage;this.Ti=n,this.hi=i,this.ci=r,this.wi=e||cn.DefaultOrgSettings.MaxPerfMarksPerPage},t.prototype.start=function(){var t=this;this.gi=0;var n=window.performance;n&&(this._t.recording.inFrame||this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.Performance,this.vi,zt.PerformanceEntries,this.li,zt.PerformanceMemory,this.di,zt.PerformanceObserver,!!window.PerformanceObserver,zt.PerformanceTimeOrigin,this.pi,zt.LayoutShift,this.mi,zt.FirstInput,this.yi,zt.LargestContentfulPaint,this.bi,zt.LongTask,this.Ei]}),this.Xn(),!this.qn&&n.addEventListener&&n.removeEventListener&&this.T&&this.T.add(n,"resourcetimingbufferfull",!0,function(){t.At.enqueue({Kind:Ot.RESOURCE_TIMING_BUFFER_FULL,Args:[]})}),this.Ci(),this.Pi())},t.prototype.ji=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(t){switch(t.label){case 0:if(!this.fi||!this.li||0==this.ki.length)return[2];if(this.Ii)return[2];this.Ii=!0,t.label=1;case 1:return t.trys.push([1,,3,4]),[4,this.Oi()];case 2:return t.sent(),[3,4];case 3:return this.Ii=!1,this.ki=[],[7];case 4:return[2];}})})},t.prototype.Mi=function(){return this.Ai?Yn.race([this._i,si(250,1e3)]):this._i},t.prototype.Oi=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var t,n,i,r,s,o,u,a;return(0,e.__generator)(this,function(e){switch(e.label){case 0:t=0,n=0,i=this.ki,e.label=1;case 1:if(!(nt?[4,this.Mi()]:[3,4]):[3,6];case 3:a=e.sent(),t=p()+Math.max(a.timeRemaining(),15),e.label=4;case 4:this.Ki(u),e.label=5;case 5:return s++,[3,2];case 6:return n++,[3,1];case 7:return[2];}})})},t.prototype.onLoad=function(){this.xi||(this.xi=!0,this.vi&&(this.Ri(performance.timing),this.ji()))},t.prototype.tick=function(){this.Ci()},t.prototype.stop=function(){var t;this.T&&this.T.clear(),this.Ti=void 0;var n=[];this.qn?(this.qn.takeRecords&&(n=this.qn.takeRecords()),this.qn.disconnect()):window.performance&&window.performance.getEntries&&(n=window.performance.getEntries()),n.length>300&&(n=n.slice(0,300),this.At.enqueue({Kind:Ot.RESOURCE_TIMING_BUFFER_FULL,Args:[]})),this.Ci(),null===(t=this.Ai)||void 0===t||t.call(this),this.ki.push(n),this.ji()},t.prototype.Xn=function(){var t=this;if(!this.qn&&this.li&&window.PerformanceObserver){this.ki.push(performance.getEntries()),this.ji(),this.qn=new window.PerformanceObserver(function(n){var i=n.getEntries();t.ki.push(i),t.ji()});var n=[us,as,hs,fs];window.PerformancePaintTiming&&n.push(cs),this.mi&&n.push(vs),this.yi&&n.push(ls),this.bi&&n.push(ds),this.Ei&&n.push(ps),this.qn.observe({entryTypes:n})}},t.prototype.Ci=function(){if(this.di&&!this._t.recording.inFrame){var t=performance.memory;if(t){var n=t.usedJSHeapSize-this.Si;(0==this.Si||o.mathAbs(n/this.Si)>.2)&&(this.Hi(Qt.Memory,t,Vt.Memory),this.Si=t.usedJSHeapSize)}}},t.prototype.Pi=function(){var t={timeOrigin:d.timeOrigin};this.Hi(Qt.TimeOrigin,t,Vt.TimeOrigin)},t.prototype.Ki=function(t){switch(t.entryType){case us:this.Ni(t);break;case as:this.Li(t);break;case cs:this.Ui(t);break;case hs:this.Fi(t);break;case fs:this.Di(t);break;case vs:this.Bi(t);break;case ls:this.Wi(t);break;case ds:this.qi(t);break;case ps:this.Qi(t);}},t.prototype.Ri=function(t){this.Hi(Qt.Timing,t,Vt.Timing)},t.prototype.Ni=function(t){this.Hi(Qt.Navigation,t,Vt.Navigation,{name:us})},t.prototype.Li=function(t){if(this.hi){var n=t.initiatorType;(this.ci||"img"!==n&&"image"!==n)&&this.Hi(Qt.Resource,t,Vt.Resource,{name:n})}},t.prototype.Ui=function(t){this.Hi(Qt.Paint,t,Vt.Measure)},t.prototype.Di=function(t){this.Hi(Qt.Mark,t,Vt.Measure)},t.prototype.Fi=function(t){this.Hi(Qt.Measure,t,Vt.Measure)},t.prototype.Bi=function(t){this.Hi(Qt.LayoutShift,t,Vt.LayoutShift)},t.prototype.Wi=function(t){this.Hi(Qt.FirstInput,t,Vt.FirstInput)},t.prototype.qi=function(t){this.Hi(Qt.LargestContentfulPaint,t,Vt.LargestContentfulPaint)},t.prototype.Qi=function(t){this.Hi(Qt.LongTask,t,Vt.Measure)},t.prototype.Hi=function(t,n,i,r){if(void 0===r&&(r={}),!this.atLimit(t)){for(var e=[t],s=0,o=i;s=this.wi)return!0;this.gi++;}return!1},t}();function gs(t,n){var i,r;return(null!==(r=null===(i=t.PerformanceObserver)||void 0===i?void 0:i.supportedEntryTypes)&&void 0!==r?r:[]).indexOf(n)>-1}function ms(t){var n=0,i={id:n++,edges:{}};return t.split("\n").forEach(function(t){var r=t.trim();if(""!=r){if(0==r.indexOf("/")||r.lastIndexOf("/")==r.length-1)throw new Error("Leading and trailing slashes are not supported");var e=i,s=r.split("/");s.forEach(function(t,i){var r=t.trim();if(""===r)throw new Error("Empty elements are not allowed");if("**"!=r&&"*"!=r&&-1!=r.indexOf("*"))throw new Error("Embedded wildcards are not supported");var o=null;r in e.edges&&(o=e.edges[r]),o||(o={id:n++,edges:{}},e.edges[r]=o),i==s.length-1&&(o.term=!0),e=o})}}),i}var ys=ms("**");function bs(t,n,i){if(!js(i)){try{for(var r=[],e=0,s=i;e=n&&(v?e=void 0:(e="_fs_trimmed_values",v=!0)),f[f.length-1]--,e&&e!==cn.BlockedFieldValue&&s?f.push(o.objectKeys(e).length):c.pop();f[f.length-1]<=0;)f.pop(),c.pop();for(var u=0,a=r;u0&&l!==f.length-1)throw new Error("Property matcher depth out of sync")}return e})}catch(t){Tt.sendToBugsnag(t,"error")}return"[error serializing "+t.constructor.name+"]"}}var Es=function(){function t(t){this.zi=1;var n=[t];t.edges["**"]&&n.push(t.edges["**"]),this.$i=[n]}return t.prototype.Gi=function(){if(this.$i.length<=0)return[];var t=this.$i.length-1,n=this.$i[t];return"number"==typeof n?this.$i[t-1]:n},t.prototype.depth=function(){return this.zi},t.prototype.isRedacted=function(t){var n=this.Gi();return 0===n.length||t&&!n.some(function(t){return t.term})},t.prototype.push=function(t){var n;this.zi++;var i=this.Gi(),r=[];function e(n){n.edges["**"]&&(r.push(n.edges["**"],Ss(n)),e(n.edges["**"])),n.edges["*"]&&r.push(n.edges["*"]),n.edges[t]&&r.push(n.edges[t])}for(var s=0,o=i;s0&&this.zi--;var t=this.$i[this.$i.length-1];"number"==typeof t&&t>1?this.$i[this.$i.length-1]--:this.$i.pop()},t}();function Ss(t){var n=t.edges["**"];if(!n)throw new Error("Node must have double-wildcard edge.");return ot(t.edges,1)?{id:-n.id,edges:{"**":n}}:t}var xs,ks,_s,As=function(){function t(t){this.Xi=t,this.Ji=null}return t.prototype.disable=function(){this.Ji&&(this.Ji.disable(),this.Ji=null)},t.prototype.enable=function(t){var n,i=this,r=T(t),s=null===(n=null==r?void 0:r._w)||void 0===n?void 0:n.fetch;(s||t.fetch)&&(this.Ji=mt(s?r._w:t,"fetch"),this.Ji&&this.Ji.afterSync(function(t){var n=t.result;t.result=(0,e.__awaiter)(i,void 0,void 0,function(){return(0,e.__generator)(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.Zi(n,t.args[0],t.args[1])];case 1:case 2:return i.sent(),[3,3];case 3:return[2,n];}})})}))},t.prototype.Zi=function(t,n,i){return (0,e.__awaiter)(this,void 0,Yn,function(){var r,s,o,u,a,c;return (0,e.__generator)(this,function(e){switch(e.label){case 0:return r="GET",s="",a=!1,"string"==typeof n?s=n:"url"in n?(s=n.url,r=n.method,o=n.body,u=n.headers,a=!!n.signal):s=""+n,s?(i&&(r=i.method||r,u=Ds(i.headers),o=i.body||o,a=!!i.signal||a),c=this.Yi(t),a&&s.search(/\/(graphql|gql)/i)>-1?[4,Yn.race([c,ni(5e3)])]:[3,2]):[2];case 1:e.sent(),e.label=2;case 2:return this.Xi.startRequest(r,s,{body:function(){return o},headers:u},c),[2];}});});},t.prototype.Yi=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n,i,r,s;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return[4,t];case 1:if(n=e.sent(),i=n.headers,r=(i.get("content-type")||"default").split(";")[0],!(["default","text/plain","text/json","application/json"].indexOf(r)>-1))return[2,{status:n.status,data:{headers:i,body:null}}];s=null,e.label=2;case 2:return e.trys.push([2,4,,5]),[4,n.clone().text()];case 3:return s=e.sent(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2,{status:n.status,data:{headers:i,body:s}}];}})})},t;}(),Is=function(){function t(t){this.Xi=t,this.tr=new WeakMap}return t.prototype.disable=function(){this.nr&&(this.nr.disable(),this.nr=null),this.ir&&(this.ir.disable(),this.ir=null),this.rr&&(this.rr.disable(),this.rr=null)},t.prototype.er=function(t){var n=this.tr.get(t);if(n)return n;var i={};return this.tr.set(t,i),i},t.prototype.enable=function(t){var n,i,r,s,o=this,u=T(t),a=(null===(n=null==u?void 0:u._w)||void 0===n?void 0:n.XMLHttpRequest)||t.XMLHttpRequest;if(a){var c=a.prototype;this.nr=null===(i=mt(c,"open"))||void 0===i?void 0:i.before(function(t){var n=o.er(t.that);n.method=t.args[0],n.url=t.args[1]}),this.rr=null===(r=mt(c,"setRequestHeader"))||void 0===r?void 0:r.before(function(t){var n=t.that,i=t.args[0],r=t.args[1],e=o.er(n);e.headers||(e.headers=[]),e.headers.push([i,r])}),this.ir=null===(s=mt(c,"send"))||void 0===s?void 0:s.before(function(t){var n=t.that,i=t.args[0],r=o.er(n),s=r.url,u=r.method,a=r.headers;void 0!==s&&void 0!==u&&(o.tr["delete"](n),o.Xi.startRequest(u,s,{headers:Ds(a),body:i},function(t){return (0,e.__awaiter)(this,void 0,Yn,function(){var n;return (0,e.__generator)(this,function(i){switch(i.label){case 0:return[4,new Yn(function(n){t.addEventListener("readystatechange",function(){t.readyState===XMLHttpRequest.DONE&&n()}),t.addEventListener("load",n),t.addEventListener("error",n)})];case 1:return i.sent(),n=function(t){if(t)return {forEach:function(n){for(var i,r=/([^:]*):\s+(.*)(?:\r\n|$)/g;i=r.exec(t);)n(i[2],i[1])}};}(t.getAllResponseHeaders()),[2,{status:t.status,data:{headers:n,body:function(){return"text"===t.responseType?t.responseText:t.response}}}];}});});}(n)))})}},t;}(),Ts=/^data:/i,Cs=function(){function t(t,n){this._t=t,this.At=n,this.sr=!1,this.ur=new Ps(t,n),this.ar=new Is(this.ur),this.cr=new As(this.ur)}return t.prototype.isEnabled=function(){return this.sr},t.prototype.start=function(t){t.AjaxWatcher&&(this.sr||(this.sr=!0,this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.Ajax,!0]}),this.ar.enable(this._t.window),this.cr.enable(this._t.window)))},t.prototype.stop=function(){this.sr&&(this.sr=!1,this.ar.disable(),this.cr.disable())},t.prototype.tick=function(){this.ur.tick()},t.prototype.setWatches=function(t){this.ur.setWatches(t)},t.prototype.initialize=function(t){this.ur.initialize(t)},t}(),Ps=function(){function t(t,n){this._t=t,this.At=n,this.hr=[],this.vr={},this.lr={},this.dr=[],this.pr=0;var i=cn.DefaultOrgSettings;this.initialize({requests:i.HttpRequestHeadersAllowlist,responses:i.HttpResponseHeadersAllowlist,maxAjaxPayloadLength:i.MaxAjaxPayloadLength})}return t.prototype.wr=function(t){for(var n=!1,i=!1,r=[],e=[],s=0,o=this.hr;s-1}function Os(t,n,i){return[t.length,Ns(t,n,i)]}function Ms(t,n,i){var r=void 0;return js(n)||(r=bs(t,i,n)),[Hs(t),r]}function Ks(t,n){var i=t.byteLength,r=void 0;return js(n)||(r="[ArrayBuffer]"),[i,r]}function Rs(t,n,i){return(0,e.__awaiter)(this,void 0,Yn,function(){var r,s,o,u,a;return(0,e.__generator)(this,function(e){switch(e.label){case 0:if(s=(r=t).size,js(n))return[2,[s,void 0]];switch(r.type){case"application/json":case"application/vnd.api+json":case"text/plain":return[3,1];}return[3,4];case 1:return e.trys.push([1,3,,4]),[4,r.text()["catch"](function(t){Tt.sendToBugsnag(t,"warning")})];case 2:return(o=e.sent())&&(u=Ns(o,n,i))?[2,[s,u]]:[3,4];case 3:return a=e.sent(),Tt.sendToBugsnag(a,"warning"),[3,4];case 4:return[2,[s,"[Blob]"]];}})})}function Hs(t){try{return o.jsonStringify(t).length}catch(t){}return 0}function Ns(t,n,i){if(!js(n))try{return bs(o.jsonParse(t),i,n)}catch(r){return n.length>0&&n.every(function(t){return!0===t})?t.slice(0,i):void 0}}function Ls(t,n){switch(t){default:case Zt.Elide:return!1;case Zt.Record:return!0;case Zt.Allowlist:try{return ms(n)}catch(t){return!1}}}function Us(t,n,i,r){var s;return(0,e.__awaiter)(this,void 0,Yn,function(){var o,u,a,c,h,f,v;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return o="",null===(s=r.headers)||void 0===s||s.forEach(function(n,i){var r=i.toLowerCase(),e=t[r];o+=r+(e?": "+n:"")+"\r\n"}),"function"!=typeof(u=null==r?void 0:r.body)?[3,2]:[4,u()];case 1:return a=e.sent(),[3,3];case 2:a=u,e.label=3;case 3:return[4,Fs(n,a,i)];case 4:return c=e.sent(),h=c[0],f=c[1],v=0!==h||f?qt.NotEmpty:qt.Unknown,[2,{headers:o,text:f,size:h,legibility:v}];}})})}function Fs(t,n,i){return void 0===i&&(i=cn.DefaultOrgSettings.MaxAjaxPayloadLength),(0,e.__awaiter)(this,void 0,Yn,function(){var r;return(0,e.__generator)(this,function(e){if(null==n)return[2,[0,void 0]];switch(typeof n){default:return[2,[-1,js(t)?void 0:"[unknown]"]];case"string":return[2,Os(n,t,i)];case"object":switch(r=n.constructor){case Object:default:return[2,Ms(n,t,i)];case Blob:return[2,Rs(n,t,i)];case ArrayBuffer:return[2,Ks(n,t)];case Document:case FormData:case URLSearchParams:case ReadableStream:return[2,[-1,js(t)?void 0:""+r.name]];}}return[2]})})}function Ds(t){return t?tt(t)?{forEach:function(n){for(var i=0,r=t;i-1){if(n.unshift(e),r instanceof CSSStyleSheet)break;i=r}else Tt.sendToBugsnag("Could not find intermediate rule in parent","warning")}return n},t.prototype.Wr=function(t,n){for(var i=0;i=t?(this.oe-=t,[!0,0]):[!1,(t-this.oe)/this.ne]},t}())(2,2e5),ho=new Set(["measureText","getImageData","getError","getTransform","isContextLost","isEnabled","isFramebuffer","isProgram","isRenderbuffer","isShader","isTexture"]),fo=new Set(["fillText"]),vo=function(){function t(t,n,i,r){this.At=n,this.Ti=i,this.ai=r,this.ue=dn.CaptureCanvasOps,this.ae=[],this.ce=[],this.he=new WeakMap,this.fe=new WeakMap,this.ve=new Set,this.le=0,this.de=new WeakMap,this.pe=!1,this.we=new WeakMap,this.ge=new Set,this.me=new WeakMap,this.ye=1,this.be=new WeakMap,this.Ee=1,this.Se=0,this.xe=!1}return t.prototype.start=function(t){var n,i=this;if(t.CanvasWatcherMode&&(this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.CanvasWatcherEnabled,!0]}),this.pe=!0,this.ue=null!==(n=t.CanvasWatcherMode)&&void 0!==n?n:dn.CaptureCanvasOps,this.Ji("2d",CanvasRenderingContext2D),this.Ji("webgl",WebGLRenderingContext),this.ue===dn.ScreenshotCanvas)){if(!HTMLCanvasElement.prototype.toDataURL)return;this.le=setInterval(function(){return i.screenshotConnectedCanvases()},1e3)}},t.prototype.ke=function(t,n){return"object"!=typeof n?[void 0,0]:(this.be.has(n)||this.be.set(n,[t,this.Ee++]),this.be.get(n))},t.prototype.Ji=function(t,n){var i=this;if(n)for(var r=n.prototype,e=function(e){if(ho.has(e))return"continue";var o=Object.getOwnPropertyDescriptor(r,e);if("function"==typeof(null==o?void 0:o.value)){var u=mt(r,e);u&&(u.afterSync(function(n){return i._e(t,e,n.that,n.args,n.result)}),s.ae.push(u))}else"function"==typeof(null==o?void 0:o.set)&&s.ce.push(yt(n,e,s.Ae(t,e)))},s=this,o=0,u=Object.keys(r);o0){var o=n;if(!o){var u=t instanceof HTMLCanvasElement?Ui(t):void 0,a=t instanceof HTMLCanvasElement&&St(t);o=null!==(r=null==u?void 0:u.mask)&&void 0!==r?r:a}this.Pe(t,e,s,o)}return e}},t.prototype.je=function(t,n,i,r,e,s,o){var u;switch(typeof r){case"string":return e?Ci(r):r;case"number":case"boolean":case"bigint":return r;case"undefined":return{undef:!0};case"object":if(!r)return r;try{o.set(r,!0)}catch(t){}var a=null===(u=Object.getPrototypeOf(r))||void 0===u?void 0:u.constructor,c=(null==a?void 0:a.name)||function(t){var n;if(t){var i=t.toString(),r=po.exec(i);return r||(r=wo.exec(i)),null===(n=null==r?void 0:r[1])||void 0===n?void 0:n.trim()}}(a),h={ctor:c};if(r instanceof Node&&(l=Di(r)))return h.id=l,h;switch(c){case"Array":return this.Se+=r.length,this.Oe(t,n,i,r,e,s,o);case"CanvasGradient":return h;case"HTMLImageElement":var f=he(r.src,{source:"dom",type:"canvas"});return this.ai.record(f),h.src=f,h;case"HTMLCanvasElement":var v=r,l=this.flush(v,e);return h.srcId=l,h;}if(function(t){var n;return!!(null===(n=Object.prototype.toString.call(t))||void 0===n?void 0:n.match(lo))}(r))return this.be.has(r)?this.Me(r,h,e):(h.typedArray="["+r.toString()+"]",this.Se+=r.length,h);if("object"==typeof r&&this.be.has(r))return this.Me(r,h,e);if(r instanceof WebGLBuffer||r instanceof WebGLTexture){var d=void 0;switch(s){case"bindTexture":d=this.Ke(t,"createTexture",n,i,r);break;case"bindBuffer":d=this.Ke(t,"createBuffer",n,i,r);}if(void 0!==d)return this.Me(r,h,e)}var p=r;for(var w in (h.obj={}, p)){try{switch(typeof p[w]){case"function":continue;case"object":if(p[w]&&o.has(p[w]))continue;}}catch(t){continue}++this.Se,h.obj[w]=this.je(t,n,i,p[w],e,s,o)}return h;default:return null;}},t.prototype.Me=function(t,n,i){var r=this.be.get(t),e=r[0],s=r[1];return this.flush(e,i),n.ref=s,delete n.ctor,n},t.prototype.Ke=function(t,n,i,r,e){var s=this.ke(i,e),o=(s[0],s[1]);return this.Re(r,[[t,ln.Function,n,[],o]]),o},t.prototype.Oe=function(t,n,i,r,e,s,o){var u=this;return void 0===o&&(o=new WeakMap),this.Se+=r.length+1,r.map(function(r){return u.je(t,n,i,r,e,s,o)})},t.prototype.Pe=function(t,n,i,r){var e=this;if(void 0===r&&(r=!1),!this.xe){var s=i.map(function(i){var s=i[0],o=i[1],u=i[2],a=i[3],c=i[4];return[s,o,u,e.Oe(s,t,n,a,r&&fo.has(u),u),c]});if(!this.he.has(t)&&(this.he.set(t,!0),i.some(function(t){return"2d"===t[0]}))){var o=this.He(t);if(o.length>0)return o.push.apply(o,s),void this.Re(n,o)}this.Re(n,s)}},t.prototype.Re=function(t,n){if(!this.xe){var i=co.hasCapacityFor(this.Se),r=i[0];i[1],this.Se=0,r?this.At.enqueue({Kind:Ot.CANVAS,Args:[t,n]}):this.xe=!0}},t.prototype.He=function(t){var n=t.getContext("2d");if(!n)return[];var i=[];if((n instanceof CanvasRenderingContext2D||n instanceof OffscreenCanvasRenderingContext2D)&&"function"==typeof n.getTransform){var r=n.getTransform();if(!r.isIdentity){var e=r.a,s=r.b,o=r.c,u=r.d,a=r.e,c=r.f;i.push(["2d",ln.Function,"transform",[e,s,o,u,a,c],-1])}}return i},t.prototype.Ne=function(t,n){t instanceof HTMLCanvasElement&&(this.ue===dn.ScreenshotCanvas?(this.fe.set(t,!0),this.ve.add(t)):(this.ge.add(t),this.Ie(t,n)))},t.prototype._e=function(t,n,i,r,e){for(var s=[],o=0;o))/m,mo=/^(eval@)?(\[native code\])?$/;function yo(t){if(!t||"string"!=typeof t.stack)return[];var n=t;return n.stack.match(go)?n.stack.split("\n").filter(function(t){return!!t.match(go)}).map(function(t){var n=t;n.indexOf("(eval ")>-1&&(n=n.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var i=n.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/\(native code\)/,"").split(/\s+/).slice(1),r=Eo(i.pop());return bo(i.join(" "),["eval",""].indexOf(r[0])>-1?"":r[0],r[1],r[2])}):n.stack.split("\n").filter(function(t){return!t.match(mo)}).map(function(t){var n=t;if(n.indexOf(" > eval")>-1&&(n=n.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===n.indexOf("@")&&-1===n.indexOf(":"))return[n,"",-1,-1];var i=n.split("@"),r=Eo(i.pop());return bo(i.join("@"),r[0],r[1],r[2])});}function bo(t,n,i,r){return[t||"",n||"",parseInt(i||"-1",10),parseInt(r||"-1",10)]}function Eo(t){if(!t||-1===t.indexOf(":"))return["","",""];var n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(t.replace(/[()]/g,""));return n?[n[1]||"",n[2]||"",n[3]||""]:["","",""]}var So,xo,ko=["log","info","warn","error","debug","_fs_debug","assert","trace"],_o=ko.filter(function(t){return !/debug/.test(t);}),Ao=function(t,n,i){void 0===i&&(i=!0);var r=Qi(t,n);return i?be(r):r},Io=function(){function t(t,n,i){this.At=n,this.sr=!1,this.Fe=!1,this.De=0,this.Dt=[],this.Be=cn.DefaultOrgSettings.MaxConsoleLogPerPage,this.Dn=t.window,this.T=i.createChild()}return t.prototype.initializeMaxLogsPerPage=function(t){this.Be=t||cn.DefaultOrgSettings.MaxConsoleLogPerPage},t.prototype.We=function(){return"\"[received more than "+this.Be+" messages]\""},t.prototype.start=function(t){var n=this;if(t.ConsoleWatcher&&(this.T.add(this.Dn,"error",!0,function(t){return n.addError(t)}),this.T.add(this.Dn,"unhandledrejection",!0,function(t){n.addError({error:t.reason,message:"Uncaught (in promise)",filename:"",lineno:0,colno:0})},!0),!this.sr))if(this.sr=!0,this.At.enqueue({Kind:Ot.REC_FEAT_SUPPORTED,Args:[zt.Console,!0]}),this.Dn.console)for(var i=function(t){var i=mt(r.Dn.console,t);if(!i)return"continue";"assert"===t?i.before(function(i){var r=i.args;r[0]||n.qe(t,Array.prototype.slice.apply(r,[1]))}):i.before(function(i){var r=i.args;return n.qe(t,r)}),r.Dt.push(i)},r=this,e=0,s=_o;e5e5)return!1;var i=Ws(Bs(t));return!!i&&(!!("style"===ki(t)&&i.length>0&&Xs.test(n))||function(t){var n;try{if((null===(n=t.classList)||void 0===n?void 0:n.contains("fs-css-in-js"))||t.hasAttribute("data-fela-type")||t.hasAttribute("data-aphrodite"))return!0}catch(t){Tt.sendToBugsnag(t,"error")}return!1}(t))}(s)&&(null==n||n.push(function(){u.snapshotEl(s),"link"===ki(s)&&i.T.add(s,"load",!1,function(){u.snapshotEl(s)})}));break;case"CANVAS":this._t.measurer.requestMeasureTask(ii.Low,function(){return i.us[So.Canvas].flush(t)});break;default:t.nodeName&&"#"!==t.nodeName[0]&&t.nodeName.indexOf("-")>-1&&this.us[So.CustomElement].onCustomNodeVisited(t);}if("scrollLeft"in t&&"scrollTop"in t){var a=t;this._t.measurer.requestMeasureTask(ii.Low,function(){0==a.scrollLeft&&0==a.scrollTop||i.Ps(a)})}null==n||n.push(function(){i._t.measurer.requestMeasureTask(ii.Low,function(){i.us[So.Animation].snapshot(t)})})},t.prototype.On=function(t){var n,i=t.node,r=ki(t.node);if("iframe"===r)this.$e(t.node);else if("function"==typeof i.getElementsByTagName)for(var e=null!==(n=i.getElementsByTagName("iframe"))&&void 0!==n?n:[],s=0;s-1&&s.push(i.href),("img"===t||"source"===t)&&(e=i.srcset)&&null==e.match(/^\s*$/))for(var c=0,h=e.split(",");c0)return i[0]}}return t.target}function Mo(t){var n;return!!(null!==(n=t._fs_trust_event)&&void 0!==n&&n||t.isTrusted)}var Ko,Ro=function(){function t(t,n){this.Vr=t,this.Gs=n,this.Xs=[],this.Js=0}return t.prototype.add=function(t){this.Xs.length>0&&this.Xs[this.Xs.length-1].When===t.When&&this.Xs.pop(),0===this.Xs.length?(this.Vr.push(t),this.Js=t.When):t.When>this.Js&&(this.Js=t.When),this.Xs.push(t)},t.prototype.finish=function(t,n){void 0===n&&(n=[]);var i=this.Xs.length;if(i<=1)return!1;for(var r=[],s=this.Xs[0].When,o=this.Xs[i-1].When,u=o-s!=0?o-s:1,a=0;a0&&this.Zs--,Lo(this.Wn.prev)},t.prototype.shift=function(){return this.Zs>0&&this.Zs--,Lo(this.Wn.next)},t}();function No(t,n){var i=t.next;n.next=i,n.prev=t,t.next=i.prev=n}function Lo(t){var n=t.prev,i=t.next;return n.next=i,i.prev=n,t.value}!function(t){t[t.rageWindowMillis=2e3]="rageWindowMillis",t[t.defaultRageThreshold=5]="defaultRageThreshold",t[t.rageThresholdIfPageChanges=8]="rageThresholdIfPageChanges",t[t.thresholdChangeQuiescenceMillis=2e3]="thresholdChangeQuiescenceMillis"}(Ko||(Ko={}));var Uo=function(){function t(t,n){var i,r;void 0===n&&(n=w),this._t=t,this.Ys=n,this.no=new Ho,this.io=Ko.defaultRageThreshold,this.ro=-1,this.eo=new WeakMap;var e=t.recording.pageResponse();if(!e)throw new Error("Attempt to construct EasyBake before rec/page response is set.");for(var s=[".fs-ignore-rage-clicks",".fs-ignore-rage-clicks *"],o=0,u=null!==(r=null===(i=e.BehaviorSignalSettings)||void 0===i?void 0:i.ElementBlocks)&&void 0!==r?r:[];o-1&&(s.push(a.Selector),s.push(a.Selector+" *"))}var c=s.join(", ");Be(c)?this.so=[c]:this.so=s}return t.prototype.oo=function(t){var n=this.eo.get(t);if(void 0!==n)return n;for(var i=0,r=this.so;i=this.io){var a=this._t.recording.getCurrentSessionURL,c={eventStartTimeStamp:this.no.first(),eventEndTimeStamp:i,eventReplayUrlAtStart:a(),eventReplayUrlAtCurrentTime:a(!0)};this.dispatchRageClickEvent(r,c),this.io=Ko.defaultRageThreshold,this.no=new Ho}}}}}},t.prototype.dispatchRageClickEvent=function(t,n){var i,r="fullstory/rageclick";try{i=new CustomEvent(r,{detail:n,bubbles:!0,cancelable:!0})}catch(t){(i=document.createEvent("customevent")).initCustomEvent(r,!0,!0,n)}o.setWindowTimeout(window,Tt.wrap(function(){t.dispatchEvent(i)}),0)},t}(),Fo=function(){function t(t){this._t=t,this.uo=this._t.time.wallTime(),this.ao=!1}return t.prototype.getLastUserAcitivityTS=function(){return this.uo},t.prototype.getMsSinceLastUserAcivity=function(){return o.mathFloor(this._t.time.wallTime()-this.uo)},t.prototype.resetUserActivity=function(){this.uo=this._t.time.wallTime()},t.prototype.isHibernating=function(){return this.ao},t.prototype.setHibernating=function(){this.ao=!0},t}(),Do=function(){function t(t,n,i,r){void 0===r&&(r=Yi),this._t=t,this.co=n,this.At=i,this.ho=!1,this.fo=!1,this.vo=cn.HeartbeatInitial,this.lo=cn.PageInactivityTimeout,this.heartbeatTimeout=new r(this["do"].bind(this)),this.hibernationTimeout=new r(this.po.bind(this),this.lo)}return t.prototype.getUserActivityModel=function(){return this.co},t.prototype.manualHibernateCheck=function(){this.co.isHibernating()||this.co.getMsSinceLastUserAcivity()>=cn.PageInactivityTimeout+5e3&&this.po()},t.prototype.scanEvents=function(t){if(!this.ho){this.manualHibernateCheck();for(var n=!1,i=0,r=t;icn.HeartbeatMax&&(this.vo=cn.HeartbeatMax),this.heartbeatTimeout.start(this.vo)},t.prototype.po=function(){if(!this.co.isHibernating()){var t=!1;this.co.getMsSinceLastUserAcivity()<=2*cn.PageInactivityTimeout?this.At.enqueue({Kind:Ot.UNLOAD,Args:[Wt.Hibernation]}):t=!0;try{this.ho=!0,this.co.setHibernating(),this.shutdown(),this.At.onHibernate(t)}finally{this.ho=!1}}},t.prototype.wo=function(){this.fo||(this.fo=!0,this._t.recording.splitPage(Wt.Hibernation))},t}(),Bo=function(){function t(t,n,i,r,e,s){void 0===r&&(r=function(){return[]}),void 0===e&&(e=Zi),void 0===s&&(s=Yi),this._t=t,this.mo=n,this.yo=r,this.bo=e,this.Eo=0,this.So=[],this.xo=!1,this.ko=!1,this._o=0,this.Ao=-1,this.Io=!1,this.Qt=[],this.To=new this.bo(cn.CurveSamplingInterval),this.Co=new this.bo(cn.MutationProcessingInterval),i&&(this.Po=new Do(this._t,i,this,s))}return t.prototype.startPipeline=function(t){var n;return(0,e.__awaiter)(this,void 0,Yn,function(){var i,r=this;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return this.ko||this.xo?[2]:(this.xo=!0,t.frameId&&(this.Eo=t.frameId),t.parentIds&&(this.So=t.parentIds),i=!0,[4,ei()]);case 1:return e.sent(),this.processEvents(),[4,ei()];case 2:return e.sent(),window,this.Co.start(function(){window,r.processEvents(),window}),this.To.start(function(){window,r.processEvents(i),window}),null===(n=this.Po)||void 0===n||n.start(),this.mo.startPipeline(t),window,[2];}})})},t.prototype.enableEasyBake=function(){this.jo=new Uo(this._t)},t.prototype.enqueueSimultaneousEventsIn=function(t){if(0===this._o){var n=this._t.time.now();this.Ao=n>this.Ao?n:this.Ao}try{return this._o++,t(this.Ao)}finally{this._o--,this._o<0&&(this._o=0)}},t.prototype.enqueue=function(t){var n=this._o>0?this.Ao:this._t.time.now();this.Oo(n,t),Ji.checkForBrokenSchedulers()},t.prototype.Oo=function(t,n){var i;if(!this.ko){var r=t;r0){var n=t;n.When=this.Qt[0].When,this.Qt.unshift(n)}else this.enqueue(t)},t.prototype.addUnload=function(t){this.Io||(this.Io=!0,this.enqueue({Kind:Ot.UNLOAD,Args:[t]}),this.singSwanSong(t))},t.prototype.shutdown=function(t){this.addUnload(t),this.Mo(),this.ko=!0,this.Ko()},t.prototype.Mo=function(){this.processEvents(),this.mo.flush()},t.prototype.singSwanSong=function(t){this.ko||(window,this.Mo(),t===Wt.Hidden&&this.Io||this.mo.singSwanSong(),window)},t.prototype.rebaseIframe=function(t,n){for(var i=Math.max(0,n),r=this._t.time.startTime(),e=function(n){var e=r+n-t;return e>=i?e:i},s=0,o=this.Qt;s0){var f=h[h.length-1].Args[2];f&&(h[0].Args[9]=f)}}for(var v in s)s[l=parseInt(v,10)].finish(Ot.SCROLL_LAYOUT_CURVE,[l]);for(var v in o)o[l=parseInt(v,10)].finish(Ot.SCROLL_VISUAL_OFFSET_CURVE,[l]);for(var v in e){var l;e[l=parseInt(v,10)].finish(Ot.TOUCHMOVE_CURVE,[l])}return n&&n.finish(Ot.RESIZE_VISUAL_CURVE),i}(n);t||(i=i.concat(this.yo())),this.Ro(i),this.sendEvents(this._t.recording.pageSignature(),i)}},t.prototype.sendEvents=function(t,n){var i;0!=n.length&&(null===(i=this.Po)||void 0===i||i.scanEvents(n),this.mo.enqueueEvents(t,n))},t.prototype.onHibernate=function(t){t||this.Mo(),this.mo.singSwanSong(),this.mo.stopPipeline()},t.prototype.Ro=function(t){if(this.Eo)for(var n=this.So,i=n&&n.length>0,r=0;r>>0).toString(16)).slice(-8);return t},t;}();function qo(t){var n=new Wo(1);return n.writeAscii(t),n.sumAsHex()}function Qo(t){var n=new Uint8Array(t);return Vo(String.fromCharCode.apply(null,n))}function Vo(t){var n;return (null!==(n=window.btoa)&&void 0!==n?n:zo)(t).replace(/\+/g,"-").replace(/\//g,"_");}function zo(t){for(var n=String(t),i=[],r=0,e=0,s=0,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.charAt(0|s)||(o="=",s%1);i.push(o.charAt(63&r>>8-s%1*8))){if((e=n.charCodeAt(s+=3/4))>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|e}return i.join("")}function $o(t,n,i,r){return void 0===r&&(r=new Wo),(0,e.__awaiter)(this,void 0,Yn,function(){var s,o,u,a;return(0,e.__generator)(this,function(e){switch(e.label){case 0:s=t.now(),o=i.byteLength,u=0,e.label=1;case 1:return u25?[4,n(100)]:[3,3]:[3,5];case 2:e.sent(),s=t.now(),e.label=3;case 3:a=new Uint8Array(i,u,Math.min(o-u,1e4)),r.write(a),e.label=4;case 4:return u+=1e4,[3,1];case 5:return[2,{hash:r.sum(),hasher:r}];}})})}var Go=6e6,Xo="resource-uploader",Jo=function(){function t(t,n,i,r,e){void 0===r&&(r=window.FormData),void 0===e&&(e=Yi),this._t=t,this.At=n,this.Ho=i,this.No=r,this.Lo=e,this.pe={},this.Uo={},this.Fo=!1,this.Do=[]}return t.prototype.init=function(){this.No&&this.Bo()["catch"](function(t){Tt.sendToBugsnag(t,"error")})},t.prototype.Bo=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var t,n,i,r,s,o,u,a,c,h,f,v,l,d,p,w,g,m,y,b,E,S,x,k,_;return(0,e.__generator)(this,function(e){switch(e.label){case 0:t=this._t.options.orgId,e.label=1;case 1:return[4,this.Wo()];case 2:for(n=e.sent(),i={fsnv:{},sha1:{}},r={},s=0,o=n;sGo){var r=he(t,{source:"log",type:"bugsnag"});return Tt.sendToBugsnag("Size of blob resource exceeds limit","warning",{url:r,MaxResourceSizeBytes:Go}),void i(null)}(function(t){var n=ti(),i=n.resolve,r=n.promise,e=new FileReader;return e.readAsArrayBuffer(t),e.onload=function(){i(e.result)},e.onerror=function(t){Tt.sendToBugsnag(t,"error"),i(null)},r})(n).then(function(t){i(t?{buffer:t,blob:n,contentType:n.type}:null)})},e.send(),r)}function Yo(t,n){var i,r;return(0,e.__awaiter)(this,void 0,Yn,function(){var s;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return s=t.window,(null===(r=null===(i=s.crypto)||void 0===i?void 0:i.subtle)||void 0===r?void 0:r.digest)?[4,s.crypto.subtle.digest({name:"sha-1"},n)]:[3,2];case 1:return[2,{hash:Qo(e.sent()),algorithm:"sha1"}];case 2:return[4,$o(t.time,ni,n)];case 3:return[2,{hash:e.sent().hash,algorithm:"fsnv"}];}})})}var tu=/^data:([^;,]*)(;?charset=[^;]+)?(?:;base64)?$/i,nu="Could not parse data url",iu=function(t,n,i){this.name="ProtocolError",this.message=n,this.status=t,this.data=i};function ru(t){return t>=400&&502!==t||202==t||206==t}var eu=function(){function t(t){this.Vo=0,this.zo=t.options.scheme,this.$o=t.options.cdnHost,this._t=t}return t.prototype.page=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(n){switch(n.label){case 0:return[4,uu(this.zo,vu(this._t),"/rec/page",vt(t))];case 1:return[2,pt(n.sent().text)];}})})},t.prototype.settings=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n;return(0,e.__generator)(this,function(i){return n=t.previewMode||t.fallback?vu(this._t):this.$o,[2,fu(this.zo,n,t)]})})},t.prototype.bundle=function(t){var n;return(0,e.__awaiter)(this,void 0,Yn,function(){var i,r,s,o;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return[4,ei()];case 1:return e.sent(),window,i=vt(t.bundle),this.Vo+=i.length,this.Vo,window,i.length>2e6?[4,ei()]:[3,3];case 2:e.sent(),e.label=3;case 3:return window,r=ou(t.bundle.Seq,t),[4,uu(this.zo,null!==(n=t.recHost)&&void 0!==n?n:vu(this._t),r,i)];case 4:return s=e.sent().text,o=pt(s),window,[2,[this.Vo,o]];}})})},t.prototype.bundleBeacon=function(t){var n;return hu(this.zo,null!==(n=t.recHost)&&void 0!==n?n:vu(this._t),t)},t.prototype.exponentialBackoffMs=function(t,n){var i=o.mathMin(cn.BackoffMax,5e3*o.mathPow(2,t));return n?i+.25*o.mathRandom()*i:i},t}(),su=function(){function t(t){this.zo=t.options.scheme,this._t=t}return t.prototype.uploadResource=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(n){switch(n.label){case 0:return[4,uu(this.zo,vu(this._t),"/rec/uploadResource",t)];case 1:return[2,n.sent().text];}})})},t.prototype.queryResources=function(t){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(n){switch(n.label){case 0:return[4,uu(this.zo,vu(this._t),"/rec/queryResources",vt(t))];case 1:return[2,pt(n.sent().text)];}})})},t}();function ou(t,n){var i="/rec/bundle"+("v2"===n.version?"/v2":"")+"?OrgId="+n.orgId+"&UserId="+n.userId+"&SessionId="+n.sessionId+"&PageId="+n.pageId+"&Seq="+t;return null!=n.serverPageStart&&(i+="&PageStart="+n.serverPageStart),null!=n.serverBundleTime&&(i+="&PrevBundleTime="+n.serverBundleTime),null!=n.lastUserActivity&&(i+="&LastActivity="+n.lastUserActivity),n.isNewSession&&(i+="&IsNewSession=true"),null!=n.deltaT&&(i+="&DeltaT="+n.deltaT),i}function uu(t,n,i,r){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(e){return[2,cu("POST",t,n,lu(i),!0,r)]})})}function au(t,n,i){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(r){return[2,cu("GET",t,n,lu(i),!1)]})})}function cu(t,n,i,r,s,o){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(e){return[2,new Yn(function(e,u){var a="//"+i+r,c=!1,h=new XMLHttpRequest,f=("withCredentials"in h);jt(f,"XHR missing CORS support"),f&&(h.onreadystatechange=function(){if(4==h.readyState){if(c)return;c=!0;try{var t={text:h.responseText};if(200==h.status)return void e(t);var n=void 0;try{n=pt(t.text)}catch(t){}u(new iu(h.status,t.text,n))}catch(t){Tt.sendToBugsnag(t,"error"),u(t)}}},h.open(t,n+a,!0),h.withCredentials=s,o&&"function"!=typeof o.append&&h.setRequestHeader("Content-Type","text/plain"),h.send(o))})]})})}function hu(t,n,i){if("function"==typeof navigator.sendBeacon){var r=t+"//"+n+ou(i.bundle.Seq,i)+"&SkipResponseBody=true",e=vt(i.bundle);try{return navigator.sendBeacon.bind(navigator)(r,e)}catch(t){}}return!1}function fu(t,n,i){var r;return(0,e.__awaiter)(this,void 0,Yn,function(){var s,o;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return s=null!==(r=i.version)&&void 0!==r?r:"v1",o=i.previewMode?"?previewMode=true":"",[4,au(t,n,"/s/settings/"+i.orgId+"/"+s+"/web"+o)];case 1:return[2,pt(e.sent().text)];}})})}function vu(t){var n,i=null===(n=t.recording.pageResponse())||void 0===n?void 0:n.GCLBSubdomain,r=t.options.recHost;return i&&K(r)?r.replace(/^rs\./,i+"."):r;}function lu(t){if(!window.Zone)return t;var n="?";return t.indexOf(n)>-1&&(n="&"),""+t+n+"ngsw-bypass=true"}var du,pu=function(){function t(t,n,i){void 0===i&&(i=new wu),this._t=t,this.Vr=n,this.Go=i}return t.prototype.initialize=function(t){var n;if(t){this.Xo(t);var i=null===(n=this._t.window.location)||void 0===n?void 0:n.href;this.onNavigate(i)}},t.prototype.onNavigate=function(t){return!!this.Go.matches(t)&&(this.Vr.enqueue({Kind:Ot.KEEP_URL,Args:[this.Jo(t)]}),!0)},t.prototype.onClick=function(t){var n;return!!(null===(n=null==t?void 0:t.watchKind)||void 0===n?void 0:n.has(_i.Keep))&&(this.Vr.enqueue({Kind:Ot.KEEP_ELEMENT,Args:[t.id]}),!0)},t.prototype.urlMatches=function(t){return this.Go.matches(t)},t.prototype.Xo=function(t){this.Go.setRules(t)},t.prototype.Jo=function(t){return he(t,{source:"page",type:"base"})},t}(),wu=function(){function t(){this.Zo=null}return t.prototype.setRules=function(t){var n=t.map(function(t){return t.Regex}).filter(this.Yo);n.length>0&&(this.Zo=this.tu(n))},t.prototype.matches=function(t){return!!this.Zo&&this.Zo.test(t)},t.prototype.Yo=function(t){try{return new RegExp(t),!0}catch(n){return Tt.sendToBugsnag("Browser rejected UrlKeep.Regex","error",{expr:t,error:n.toString()}),!1}},t.prototype.tu=function(t){try{return new RegExp("("+t.join(")|(")+")","i")}catch(n){return Tt.sendToBugsnag("Browser rejected joining UrlKeep.Regexs","error",{exprs:t,error:n.toString()}),null}},t}(),gu=function(t){var n=(void 0===t?{}:t).wnd,i=void 0===n?window:n;!function(t,n,i,r,e,s,o,u){var a,c;function h(t){var n,i=[];function r(){n&&(i.forEach(function(t){var i;try{i=t[n[0]]&&t[n[0]](n[1])}catch(n){return void(t[3]&&t[3](n))}i&&i.then?i.then(t[2],t[3]):t[2]&&t[2](i)}),i.length=0)}function e(t){return function(i){n||(n=[t,i],r())}}return t(e(0),e(1)),{then:function(t,n){return h(function(e,s){i.push([t,n,e,s]),r()})}}}(!(i in t)||(t.console&&t.console.log&&t.console.log("FullStory namespace conflict. Please set window[\"_fs_namespace\"]."),0))&&(u=t[i]=function(){var t=function(t,i,r){function e(e,s){n(t,i,r,e,s)}var s=/Async$/;return s.test(t)?(t=t.replace(s,""),"function"==typeof Promise?new Promise(e):h(e)):n(t,i,r)};function n(n,i,r,e,s){return t._api?t._api(n,i,r,e,s):(t.q&&t.q.push([n,i,r,e,s]),null)}return t.q=[],t}(),function(){function t(){}function n(t,n,i){u("setProperties",{type:t,properties:n},i)}function i(t,i){n("user",t,i)}function r(t,n,r){i({uid:t},r),n&&i(n,r)}u.identify=r,u.setUserVars=i,u.identifyAccount=t,u.clearUserCookie=t,u.setVars=n,u.event=function(t,n,i){u("trackEvent",{name:t,properties:n},i)},u.anonymize=function(){r(!1)},u.shutdown=function(){u("shutdown")},u.restart=function(){u("restart")},u.log=function(t,n){u("log",{level:t,msg:n})},u.consent=function(t){u("setIdentity",{consent:!arguments.length||t})}}(),a="fetch",c="XMLHttpRequest",u._w={},u._w[c]=t[c],u._w[a]=t[a],t[a]&&(t[a]=function(){return u._w[a].apply(this,arguments)}),u._v="2.0.0")}(i,i.document,i._fs_namespace,0,0,i._fs_script)};function mu(t,n){if(t&&t.postMessage)try{t.postMessage(function(t){var n;return vt(((n={}).__fs=t,n))}(n),"*")}catch(t){Ut("postMessage",t)}}function yu(t){try{var n=pt(t);if("__fs"in n)return n.__fs}catch(t){}return[du.Unknown]}function bu(t,n,i,r){var e=W(t);if(!e)return!1;try{e.send(n,i,r)}catch(t){e.send(n,i)}return!0}!function(t){t.EndPreviewMode="EndPreviewMode",t.EvtBundle="EvtBundle",t.GreetFrame="GreetFrame",t.InitFrameMobile="InitFrameMobile",t.RequestFrameId="RequestFrameId",t.RestartFrame="RestartFrame",t.SetConsent="SetConsent",t.SetFrameId="SetFrameId",t.ShutdownFrame="ShutdownFrame",t.Unknown="Unknown"}(du||(du={}));var Eu=new RegExp(/^\s+$/),Su=/^fb\d{18}$/,xu=function(t){var n=t.frame,i=t.orgId,r=t.scheme,e=t.script,s=t.recHost,u=t.cdnHost,a=t.appHost,c=t.namespace,h=(t.desc,t.snippetVersion);try{if(function(t){return t.id==t.name&&Su.test(t.id)}(n))return Rt.BlocklistedFrame;if(function(t){return!(t.contentDocument&&t.contentWindow&&t.contentWindow.location)||function(t){return!!t.src&&"about:blank"!=t.src&&t.src.indexOf("javascript:")<0}(t)&&t.src!=t.contentWindow.location.href&&"loading"==t.contentDocument.readyState}(n))return Rt.PartiallyLoaded;var f=n.contentWindow,v=n.contentDocument;if(!f||!v)return Rt.MissingWindowOrDocument;if(!v.head)return Rt.MissingDocumentHead;if(!v.body||0===v.body.childNodes.length)return Rt.MissingBodyOrChildren;for(var l=!1,d=v.body.childNodes,p=0;p0&&(null!==(s=null===(e=null===(r=t.OrgSettings)||void 0===r?void 0:r.UrlPrivacyConfig)||void 0===e?void 0:e.length)&&void 0!==s?s:0)>0&&(null!==(a=null===(u=null===(o=t.OrgSettings)||void 0===o?void 0:o.AttributeBlocklist)||void 0===u?void 0:u.length)&&void 0!==a?a:0)>0;return c||Tt.sendToBugsnag("Invalid page response","error",{rsp:t}),c},t.prototype.handleResponse=function(t,n){var i,r,e,s,o=t.Flags,u=o.AjaxWatcher,a=o.ClientSideRageClick,c=o.GetCurrentSession,h=o.ResourceUploading,f=o.UseClientSideId;this.ku=t,this.Pu=t.UserIntId,this.ju=t.SessionIntId,this.Ou=t.PageIntId,this.Mu=t.PageStart,this.pu=c?_u.Enabled:_u.Disabled,this.cu=t.OrgSettings,pe(null!==(i=this.cu.UrlPrivacyConfig)&&void 0!==i?i:cn.DefaultOrgSettings.UrlPrivacyConfig,this.cu.MaxUrlLength);var v=null!==(r=this.cu.AttributeBlocklist)&&void 0!==r?r:[];(null===(s=null===(e=this._u)||void 0===e?void 0:e.privacy)||void 0===s?void 0:s.attributeBlocklist)&&(this._u.privacy.attributeBlocklist.length,v.push.apply(v,this._u.privacy.attributeBlocklist.map(Ae))),xe(v),this.yu.consoleWatcher().initializeMaxLogsPerPage(this.cu.MaxConsoleLogPerPage),this.yu.ajaxWatcher().initialize({requests:this.cu.HttpRequestHeadersAllowlist,responses:this.cu.HttpResponseHeadersAllowlist,maxAjaxPayloadLength:this.cu.MaxAjaxPayloadLength}),this.yu.perfWatcher().initialize({resourceUploader:this.yu.getResourceUploader(),recTimings:!!this.cu.RecordPerformanceResourceTiming,recImgs:!!this.cu.RecordPerformanceResourceImg,maxPerfMarksPerPage:this.cu.MaxPerfMarksPerPage}),this.Xt.initialize({canvasWatcherMode:t.Flags.CanvasWatcherMode,blocks:t.ElementBlocks,deferreds:t.ElementDeferreds,keeps:t.ElementKeeps,watches:t.ElementWatches}),this.Ve.initialize(t.UrlKeeps),this.Xt.initializeConsent(null!=n?n:!!t.Consented),"number"==typeof t.BundleUploadInterval&&(this.fu=t.BundleUploadInterval),h&&this.enableResourceUploading(),u&&t.AjaxWatches&&this.yu.ajaxWatcher().setWatches(t.AjaxWatches),a&&this.At.enableEasyBake(),f&&(this.hu=!0),this.yu.start(t.Flags)},t.prototype.fullyStarted=function(){this.Au&&this.Au()},t.prototype.enableResourceUploading=function(){this.wu=!0,this.yu.initResourceUploading()},t.prototype.flushPendingChildFrameInits=function(){if(this.du.length>0){for(var t=0;t0&&this.At.sendEvents(e,i);break;case du.RequestFrameId:if(!t)return;var s=this.Nu(t);void 0===s||(this.mu[s]=!1,this.Lu(t,s));case du.Unknown:}},t.prototype.Nu=function(t){for(var n=0,i=this.vu;n2e6))try{localStorage._fs_swan_song=i}catch(t){}},t.prototype.sing=function(){try{var t=this.purge();if(void 0===t)return;if(!(t.Bundles&&t.UserId&&t.SessionId&&t.PageId))return;t.OrgId||(t.OrgId=this.Uu.getOrgId()),t.Bundles.length>0&&(t.Bundles.length,this.Du(t))}catch(t){}},t.prototype.purge=function(){try{if("_fs_swan_song"in localStorage){var t=localStorage._fs_swan_song;return delete localStorage._fs_swan_song,pt(t)}}catch(t){}},t.prototype.Du=function(t,n){return void 0===n&&(n=0),(0,e.__awaiter)(this,void 0,Yn,function(){var i,r,s,o;return(0,e.__generator)(this,function(u){switch(u.label){case 0:if(i=null,!tt(t.Bundles)||0===t.Bundles.length||void 0===t.Bundles[0])return[2];1==t.Bundles.length&&(i=this._t.time.wallTime()-(t.LastBundleTime||0)),u.label=1;case 1:return u.trys.push([1,3,,4]),[4,this.Ho.bundle({bundle:t.Bundles[0],deltaT:i,isNewSession:t.IsNewSession,orgId:t.OrgId,pageId:t.PageId,recHost:t.RecHost,serverBundleTime:t.ServerBundleTime,serverPageStart:t.ServerPageStart,sessionId:t.SessionId,userId:t.UserId,version:t.Version})];case 2:return r=u.sent(),s=r[1],t.Bundles[0].Evts.length,t.Bundles[0].Seq,t.Bundles.shift(),t.Bundles.length>0&&this.Du((0,e.__assign)((0,e.__assign)({},t),{ServerBundleTime:s.BundleTime})),[3,4];case 3:return(o=u.sent())instanceof iu&&ru(o.status)?[2]:(this.Bu=new this.Fu(this.Du,this.Ho.exponentialBackoffMs(n,!0),this,t,n+1).start(),[3,4]);case 4:return[2];}})})},t}(),ju=function(){function t(){}return t.prototype.encode=function(t){return t},t}(),Ou=function(){function t(){this.dict={idx:-1,map:{}},this.nodeCount=1,this.startIdx=0}return t.prototype.encode=function(n){if(0==n.length)return[];var i,r,e=n[0],s=Object.prototype.hasOwnProperty.call(this.dict.map,e)?this.dict.map[e]:void 0,o=[],u=1;function a(){s?u>1?o.push([s.idx,u]):o.push(s.idx):o.push(e)}for(i=1;ithis._t.recording.bundleUploadInterval()?[4,this.aa()]:[3,4]):[2];case 3:e.sent(),e.label=4;case 4:return[3,6];case 5:if((r=e.sent())instanceof iu){if(ru(r.status))return 206==r.status?Tt.sendToBugsnag("Failed to send bundle, probably because of its large size","error"):r.status>=500&&Tt.sendToBugsnag("Failed to send bundle, recording outage likely","error"),this.ea&&this.ea(),[2]}else Tt.sendToBugsnag("Failed to send bundle, unknown err","error",{err:r});return this.qu=!0,this.Vu=this.$u+this.Ho.exponentialBackoffMs(this.Qu++,!1),[3,6];case 6:return[2];}})})},t.prototype.va=function(t){var n,i;return(0,e.__awaiter)(this,void 0,Yn,function(){var r,s,o,u;return(0,e.__generator)(this,function(e){switch(e.label){case 0:return this.Ou?(window,r=this.co.getMsSinceLastUserAcivity(),[4,this.Ho.bundle({bundle:t,deltaT:null,lastUserActivity:r,orgId:this.Uu.getOrgId(),pageId:this.Ou,serverBundleTime:this.Zu,serverPageStart:this.Mu,isNewSession:this.Gu,sessionId:null!==(n=this.Uu.getSessionId())&&void 0!==n?n:"",userId:this.Uu.getUserId(),version:this._t.recording.bundleApiVersion()})]):[2];case 1:return s=e.sent(),o=s[0],u=s[1],null===(i=this._t.recording.observer)||void 0===i||i.onBundleSent(o),o>this.Ju&&this.zu>16&&this._t.recording.splitPage(Wt.Size),window,[2,u];}})})},t.prototype.fa=function(t){if(0===t.Evts.length)return t;for(var n=[],i=0,r=t.Evts;i0},t.prototype.hasActiveEvents=function(){return this.da},t.prototype.pushEvent=function(t){Mu[t.Kind]||(this.da=!0),this.pa.When<0&&(this.pa.When=t.When),this.pa.Evts.push(t)},t}();function Hu(t,n){void 0===t&&(t=[]),void 0===n&&(n=0);for(var i="",r=0,e=t;r-1},t.prototype.ba=function(){return this.Dn.document.location.search.indexOf("_fs_preview=false")>-1},t.prototype.ya=function(){return!!this.wa.getValue(this.ga)},t}();function Uu(t){var n,i,r;return{Kind:Ot.CAPTURE_SOURCE,Args:[t.type,t.entrypoint,"dom",null===(i=null===(n=t.source)||void 0===n?void 0:n.integration)||void 0===i?void 0:i.slice(0,1024),!!(null===(r=t.source)||void 0===r?void 0:r.userInitiated)]}}function Fu(t){return(0,e.__awaiter)(this,void 0,Yn,function(){var n,i,r,s;return(0,e.__generator)(this,function(e){if(n=function(t){return"msCrypto"in t?t.msCrypto:t.crypto}(t),"function"==typeof(null==n?void 0:n.randomUUID))return[2,n.randomUUID()];for(i=new Uint8Array(16),n.getRandomValues(i),i[6]=15&i[6]|64,i[8]=63&i[8]|128,r=[],s=0;s=864e5)return Wu;var c=null!==(n=this.Sa.getLastUserActivityTimeMS())&&void 0!==n?n:u;return o.mathAbs(s-c)>=qu||(null!==(i=this.Sa.getPageCount())&&void 0!==i?i:0)>=250?Wu:e},t.prototype.start=function(){this.lastUserActivityTimeout.start(3e5)},t.prototype.stop=function(){this.lastUserActivityTimeout.stop()},t.prototype.ka=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){var t;return(0,e.__generator)(this,function(n){return(t=this.Sa.getUserId())&&Bu(t)?[2,t]:[2,Fu(this._t.window)]})})},t.prototype.xa=function(){var t=this.co.getLastUserAcitivityTS();t!==this.lastUserActivityTS&&(this.lastUserActivityTS=t,this.Sa.setLastUserActivityTimeMS(t),this.start())},t}(),Vu=function(t){function n(n,i,r,e,s,o,u){void 0===r&&(r=!0),void 0===e&&(e=new Fo(n)),void 0===s&&(s=new Ku(n,i,e,r)),void 0===o&&(o=Zi),void 0===u&&(u=xu);var a,c=t.call(this,n,o,e,s,u)||this;return c.Ho=i,c.mo=s,c._a=!1,c.ko=!1,c.Aa=!1,s.onShutdown(function(){return c.shutdown(Wt.SettingsBlocked)}),c.Mt=c.Dn.document,c.Eo=0,c.Uu=n.recording.identity,c.Ia=new Lu(c.xu,c.Dn,c.Uu.getClientStore()),c.pu=_u.NoInfoYet,c.Ta=new Qu(n,e,c.Uu),a=function(t){if(c.yu.stop(Wt.Api),t){var n=c.Mt.getElementById(t);n&&c.Ca&&n.setAttribute("_fs_embed_token",c.Ca)}},c.Dn._fs_shutdown=a,c}return (0,e.__extends)(n,t),n.prototype.onDomLoad=function(){var n=this;t.prototype.onDomLoad.call(this),this._a=!0,this.Pa(function(){n.fireFsReady(n.ko)})},n.prototype.ja=function(){var t=R(this.Dn,"_fs_replay_flags");if(/[?&]_fs_force_session=true(&|#|$)/.test(location.search)&&(t+=",forceSession",this.Dn.history)){var n=location.search.replace(/(^\?|&)_fs_force_session=true(&|$)/,function(t,n,i){return i?n:""});this.Dn.history.replaceState({},"",this.Dn.location.href.replace(location.search,n))}return t},n.prototype.start=function(n,i,r){var s,o,u;return(0,e.__awaiter)(this,void 0,Yn,function(){var a,c,h,f,v,l,d,p,w,g,m,y,b,E,S,x,k,_,A,I,T,C,P,j=this;return(0,e.__generator)(this,function(e){switch(e.label){case 0:t.prototype.start.call(this,n,i,r),a=this.ja(),c=yi(this.Mt),h=c[0],f=c[1],O=this.Dn,M=0,K=0,v=null==O.screen?[M,K]:(M=parseInt(String(O.screen.width),10),K=parseInt(String(O.screen.height),10),[M=isNaN(M)?0:M,K=isNaN(K)?0:K]),l=v[0],d=v[1],p="",n||(p=this.Uu.getUserId()),w=null!==(u=null===(o=null===(s=this._t)||void 0===s?void 0:s.recording)||void 0===o?void 0:o.preroll)&&void 0!==u?u:-1,g=function(){return he(Mr(j.Dn),{source:"page",type:"base"})},m=function(){return he(j.Dn.location.href,{source:"page",type:"url"})},y=function(){return""===j.Mt.referrer?"":he(j.Mt.referrer,{source:"page",type:"referrer"})},b=function(t){var n,i="_fs_tab_id";try{var r=t.sessionStorage.getItem(i);if(r)return r;var e=Math.floor(1e17*Math.random()).toString(16);return t.sessionStorage.setItem(i,e),null!==(n=t.sessionStorage.getItem(i))&&void 0!==n?n:void 0}catch(t){return}}(this.Dn),E={OrgId:this.xu,UserId:p,Url:m(),Base:g(),Width:h,Height:f,ScreenWidth:l,ScreenHeight:d,SnippetVersion:V(this.Dn),Referrer:y(),Preroll:w,Doctype:dt(this.Mt),CompiledVersion:"11aa377d19",CompiledTimestamp:1678707725,AppId:this.Uu.getAppId(),TabId:b,PreviewMode:this.Ia.isPreviewMode()||void 0},a&&(E.ReplayFlags=a),e.label=1;case 1:return e.trys.push([1,5,,6]),S=this.Oa,[4,this.Ho.page(E)];case 2:return[4,S.apply(this,[e.sent()])];case 3:return P=e.sent(),this.isSafeResponse(P)?this.gu?[2]:(window,this.handleResponse(P),window,this.Ma(P.CookieDomain,P.UserIntId,P.SessionIntId,P.PageIntId,P.EmbedToken),P.Flags.UseStatelessConsent||this.Uu.getConsentStore().setConsentState(!!P.Consented),this.Ka(),P.PreviewMode&&this.Ra(),x=function(t){return R(t,"_fs_pagestart","function")}(this.Dn),x&&x(),this.At.enqueueFirst(this.yu.getNavigateEvent(this.Dn.location.href,Ot.ENTRY_NAVIGATE)),k=!!P.Consented,this.At.enqueueFirst({Kind:Ot.SYS_REPORTCONSENT,Args:[k,Bt.Document]}),_=dt(this.Mt),A=m(),I=y(),T=g(),this.At.enqueueFirst({Kind:Ot.SET_FRAME_BASE,Args:[he(Mr(this.Dn),{source:"event",type:Ot.SET_FRAME_BASE}),_,A,I]}),this.mo.setPageData({Kind:Ot.PAGE_DATA,Args:[A,T,h,f,l,d,V(this.Dn),I,_,w,p,P.PageStart,Et(this.Dn),this.Dn.navigator.userAgent,b,!!P.IsNewSession]}),this.At.enqueue({Kind:Ot.SCRIPT_COMPILED_VERSION,Args:["11aa377d19"]}),this.At.enqueue(Uu({type:"default"})),this.yu.addVisibilityChangeEvent(),this.addInitEvent(),[4,this.At.startPipeline({pageId:P.PageIntId,serverPageStart:P.PageStart,isNewSession:!!P.IsNewSession})]):[2,this.Ha()];case 4:return e.sent(),this.enqueueDocumentProperties(this.Mt),this.fullyStarted(),[3,6];case 5:return(C=e.sent())instanceof iu&&(P=C.data)&&P.user_id&&P.cookie_domain&&P.reason_code===en.ReasonBlockedTrafficRamping&&p!==P.user_id&&this.Ma(P.cookie_domain,P.user_id,"","",""),this.Ha(),[3,6];case 6:return[2];}var O,M,K})})},n.prototype.Ka=function(){var t=this;this.Aa=!0,this.Pa(function(){t.fireFsReady(t.ko)})},n.prototype.Ma=function(t,n,i,r,e){var s=this.Uu;s.setIds(this.Dn,t,n,i),this.Ca=e,this.Ia.write(),s.getUserId(),s.getSessionId()},n.prototype.Pa=function(t){var n,i;if(this._a&&this.Aa)if(null===(i=null===(n=this.ku)||void 0===n?void 0:n.Flags)||void 0===i?void 0:i.FetchIntegrations){var r=this.Mt.createElement("script");r.addEventListener("load",t),r.addEventListener("error",t),r.async=!0,r.src=this.zo+"//"+this.Eu+"/rec/integrations?OrgId="+this.xu,this.Mt.head.appendChild(r)}else t()},n.prototype.Ra=function(){var t="FullStory-preview-script";if(!this.Mt.getElementById(t)){var n=this.Mt.createElement("script");n.id=t,n.async=!0,n.src=this.zo+"//"+this.Su+"/s/fspreview.js",this.Mt.head.appendChild(n)}},n.prototype.Ha=function(){this.Iu&&this.Iu(),this.shutdown(Wt.SettingsBlocked),this.ko=!0,this.fireFsReady(this.ko)},n.prototype.Oa=function(t){var n;return(0,e.__awaiter)(this,void 0,Yn,function(){var i,r,s,o,u;return(0,e.__generator)(this,function(a){switch(a.label){case 0:return(i=(0,e.__assign)({},t)).Flags.UseStaticSettings?(r=this.Ia.isPreviewMode(),[4,this.Ho.settings({orgId:this.xu,previewMode:r,fallback:!1})["catch"](function(t){Tt.sendToBugsnag("Edge Rec settings error","error",{err:t})})]):[3,4];case 1:return(s=a.sent())?[3,3]:[4,this.Ho.settings({orgId:this.xu,previewMode:r,fallback:!0})["catch"](function(t){Tt.sendToBugsnag("Rs Rec settings error","error",{err:t})})];case 2:s=a.sent(),a.label=3;case 3:s&&(i=(0,e.__assign)((0,e.__assign)({},i),s)),a.label=4;case 4:return i.Flags.UseClientSideId?(this.Uu.setCookieDomain(this.Dn,i.CookieDomain),Bu(o=null!==(n=t.UserUUID)&&void 0!==n?n:"")&&this.Uu.setUserId(o),[4,this.Ta.createUserSessionPage()]):[3,6];case 5:u=a.sent(),this.Ta.start(),i=(0,e.__assign)((0,e.__assign)({},i),{UserIntId:u.userId,SessionIntId:u.sessionId,PageIntId:u.pageId,IsNewSession:u.isNewSession,PageStart:p()}),a.label=6;case 6:return i.Flags.UseStatelessConsent&&(i=(0,e.__assign)((0,e.__assign)({},i),{Consented:this.Uu.getConsentStore().getConsentState()})),[2,i];}})})},n.prototype.onMessageReceived=function(n,i){t.prototype.onMessageReceived.call(this,n,i),(null==n?void 0:n.parent)==this.Dn&&i[0]===du.EndPreviewMode&&this.Ia.clear()},n;}(Cu),zu=function(){function t(t,n){void 0===n&&(n=new $u(t)),this.Dn=t,this.Na=n}return t.prototype.enqueueEvents=function(t,n){var i=null!=t?t:void 0;this.Na.postMessage(this.Dn.parent,[du.EvtBundle,n,i],i)},t.prototype.startPipeline=function(){},t.prototype.stopPipeline=function(){},t.prototype.flush=function(){return(0,e.__awaiter)(this,void 0,Yn,function(){return(0,e.__generator)(this,function(t){return[2]})})},t.prototype.singSwanSong=function(){},t.prototype.onShutdown=function(t){},t.prototype.setPageData=function(t){},t}(),$u=function(){function t(t){this.Dn=t}return t.prototype.postMessage=function(t,n,i){switch(n[0]){case du.EvtBundle:bu(this.Dn,n[0],vt(n[1]),i)||mu(t,n);break;case du.RequestFrameId:bu(this.Dn,n[0],"[]",i)||mu(t,n);break;default:n[0];}},t}(),Gu=function(t){function n(n,i,r,e,s){void 0===i&&(i=new $u(n.window)),void 0===r&&(r=new zu(n.window,i)),void 0===e&&(e=Zi),void 0===s&&(s=xu);var o=t.call(this,n,e,void 0,r,s)||this;return o.Na=i,o}return(0,e.__extends)(n,t),n.prototype.start=function(n,i,r){var e=this;t.prototype.start.call(this,n,i,r),this.La(),this.T.add(this.Dn,"load",!1,function(){e.yu.recordingIsDetached()&&e._t.recording.splitPage(Wt.FsShutdownFrame)}),this.yu.addVisibilityChangeEvent()},n.prototype.onMessageReceived=function(n,i){if(t.prototype.onMessageReceived.call(this,n,i),n===this.Dn.parent||n===this.Dn)switch(i[0]){case du.GreetFrame:this.La(i[1]);break;case du.SetFrameId:try{var r=i[1];if(!r)return void he(location.href,{source:"log",type:"debug"});this.Ua({frameId:r,parentIds:i[2],outerStartTime:i[3],scheme:i[4],script:i[5],appHost:i[6],orgId:i[7],initConfig:i[8],pageRsp:i[9],consentOverride:i[10],minimumWhen:i[11]})}catch(t){vt(i)}break;case du.SetConsent:this.setConsent(i[1]);break;case du.InitFrameMobile:try{var e=JSON.parse(i[1]),s=e.StartTime;if(i.length>2&&i[2]){var o=i[2];Object.prototype.hasOwnProperty.call(o,"ProtocolVersion")&&o.ProtocolVersion>=20180723&&Object.prototype.hasOwnProperty.call(o,"OuterStartTime")&&(s=o.OuterStartTime)}var u=e.Host;this.Ua({frameId:0,parentIds:[],outerStartTime:s,scheme:"https:",script:G(u),appHost:$(u),orgId:e.OrgId,initConfig:void 0,pageRsp:e.PageResponse,consentOverride:this.Xt.getConsent()})}catch(t){vt(i)}}},n.prototype.La=function(t){this.Eo&&this.Eo===t||0!=this.Eo&&this.Dn.parent&&this.Na.postMessage(this.Dn.parent,[du.RequestFrameId])},n.prototype.Ua=function(t){var n,i,r=this;if(this.Eo)this.Eo!==t.frameId?(this.Eo,t.frameId,this._t.recording.splitPage(Wt.FsShutdownFrame)):this.Eo;else if(he(location.href,{source:"log",type:"debug"}),t.frameId,this.zo=t.scheme,this.bu=t.script,this.Su=t.appHost,this.xu=t.orgId,this._u=t.initConfig,this.Eo=t.frameId,this.So=t.parentIds,t.pageRsp&&this.isSafeResponse(t.pageRsp)){if(!this.gu){var e=null!==(n=t.consentOverride)&&void 0!==n?n:!!t.pageRsp.Consented;this.handleResponse(t.pageRsp,e),this.fireFsReady(),this.At.enqueueFirst({Kind:Ot.SYS_REPORTCONSENT,Args:[e,Bt.Document]}),this.At.enqueueFirst({Kind:Ot.SET_FRAME_BASE,Args:[he(Mr(this.Dn),{source:"event",type:Ot.SET_FRAME_BASE}),dt(this.Dn.document)]}),this.At.enqueue({Kind:Ot.SCRIPT_COMPILED_VERSION,Args:["11aa377d19"]}),this.At.enqueue(Uu({type:"default"})),this.addInitEvent(),this.At.rebaseIframe(t.outerStartTime,null!==(i=t.minimumWhen)&&void 0!==i?i:0),this._t.time.setStartTime(t.outerStartTime),this.Ou&&this.At.startPipeline({pageId:this.Ou,serverPageStart:t.pageRsp.PageStart,isNewSession:!!t.pageRsp.IsNewSession,frameId:t.frameId,parentIds:t.parentIds}).then(function(){r.flushPendingChildFrameInits(),r.enqueueDocumentProperties(r.Dn.document),r.fullyStarted()})}}else this.shutdown(Wt.FsShutdownFrame)},n}(Cu),Xu=function(){function t(t,n,i){void 0===n&&(n=function(){}),void 0===i&&(i=!1),this.Mt=t,this.Fa=n,this.Da=i,this._cookies={},this._cookies=k(this.Mt)}return t.prototype.setDomain=function(t){this.Ba=t},t.prototype.getValue=function(t,n){var i=this._cookies[t];if(!i)try{i=localStorage[null!=n?n:t]}catch(t){}return i},t.prototype.setValue=function(t,n,i,r){if(null!=this.Ba&&!this.Da){var e=[];this._setCookie(t,n,i,e),this.Wa(null!=r?r:t,n,e,t),e.length>0&&this.Fa(e)}},t.prototype.setCookie=function(t,n,i){this._setCookie(t,n,i,[])},Object.defineProperty(t.prototype,"cookies",{get:function(){return this._cookies},enumerable:!1,configurable:!0}),t.prototype.clearCookie=function(t,n){if(this._cookies[t]&&(this.Mt.cookie=Ju(this.Ba,t,"","Thu, 01 Jan 1970 00:00:01 GMT"),delete this._cookies[t]),n)try{delete localStorage[n]}catch(t){}},t.prototype._setCookie=function(t,n,i,r){try{this.Mt.cookie=Ju(this.Ba,t,n,i),-1===this.Mt.cookie.indexOf(n)&&r.push([t,"cookie"])}finally{this._cookies=k(this.Mt)}},t.prototype.Wa=function(t,n,i,r){try{localStorage[t]=n,localStorage[t]!==n&&i.push([null!=r?r:t,"localStorage"])}catch(n){i.push([null!=r?r:t,"localStorage",String(n)])}},t}();function Ju(t,n,i,r){var e=n+"="+i;return e+="; domain="+function(t){return t?"."+encodeURIComponent(t):""}(t),e+="; Expires="+r+"; path=/; SameSite=Strict","https:"===location.protocol&&(e+="; Secure"),e}var Zu,Yu="fs_cid",ta=function(){function t(t){this.Sa=t,this.qa=1;var n=this.Sa.getValue(Yu,wn);this.Qa=function(t){var n={consent:Dt.RevokeConsent};if(!t)return n;var i=t.split(".");return i.length<1?n:(i[0],"1"===i[1]?{consent:Dt.GrantConsent}:n)}(n)}return t.prototype.getConsentState=function(){return this.Qa.consent},t.prototype.setConsentState=function(t){if(this.Qa.consent=t,t!==Dt.RevokeConsent){var n=this.Va(),i=this.za();this.Sa.setValue(Yu,n,i,wn)}else this.Sa.clearCookie(Yu,wn)},t.prototype.Va=function(){return[this.qa,this.Qa.consent===Dt.GrantConsent?1:0].join(".")},t.prototype.za=function(){return new Date(1e3*S()).toUTCString()},t}(),na="fs_lua",ia=function(){function t(t){this.qa=1,this.Sa=t;var n=this.Sa.getValue(na,gn);this.Qa=function(t){var n={lastUserActivityTime:void 0};if(!t)return n;var i=t.split(".");return i.length<1?n:(i[0],{lastUserActivityTime:_(i[1])})}(n)}return t.prototype.getLastUserActivityTimeMS=function(){return this.Qa.lastUserActivityTime},t.prototype.setLastUserActivityTimeMS=function(t){this.Qa.lastUserActivityTime=t;var n=this.Va(),i=this.za();this.Sa.setValue(na,n,i,gn)},t.prototype.Va=function(){var t;return[this.qa,null!==(t=this.Qa.lastUserActivityTime)&&void 0!==t?t:""].join(".")},t.prototype.za=function(){return new Date(p()+qu).toUTCString()},t}(),ra="fs_uid",ea=function(){function t(t,n,i,r){void 0===n&&(n=document),void 0===i&&(i=function(){}),void 0===r&&(r=!1),this.$a=void 0,this.wa=new Xu(n,i,r),this.Ga=new ta(this.wa),this.Xa=new ia(this.wa),this.Qa=this.Ja(t)}return t.prototype.Ja=function(t){var n=x(this.wa.getValue(ra,pn));return n&&n.orgId==t?n:{expirationAbsTimeSeconds:S(),orgId:t,userId:"",sessionId:"",appKeyHash:""}},t.prototype.getConsentStore=function(){return this.Ga},t.prototype.clear=function(){this.Xa.setLastUserActivityTimeMS(void 0),this.Qa.sessionStartTime=this.Qa.pageCount=void 0,this.Qa.userId=this.Qa.sessionId=this.Qa.appKeyHash=this.$a="",this.Qa.expirationAbsTimeSeconds=S(),this.Za()},t.prototype.create=function(t){this.Xa.setLastUserActivityTimeMS(t.lastUserActivityTime),this.Qa=(0,e.__assign)((0,e.__assign)({},this.Qa),t),this.Za()},t.prototype.getOrgId=function(){return this.Qa.orgId},t.prototype.getUserId=function(){return this.Qa.userId},t.prototype.setUserId=function(t){this.Qa.userId=t,this.Za()},t.prototype.getSessionId=function(){return this.Qa.sessionId},t.prototype.getAppKeyHash=function(){return this.Qa.appKeyHash},t.prototype.getCookies=function(){return this.wa.cookies},t.prototype.setAppId=function(t){this.$a=t,this.Qa.appKeyHash=qo(t),this.Za()},t.prototype.getAppId=function(){return this.$a},t.prototype.setSessionStartTimeMS=function(t){this.Qa.sessionStartTime=t,this.Za()},t.prototype.getSessionStartTimeMS=function(){return this.Qa.sessionStartTime},t.prototype.setLastUserActivityTimeMS=function(t){this.Xa.setLastUserActivityTimeMS(t)},t.prototype.getLastUserActivityTimeMS=function(){return this.Xa.getLastUserActivityTimeMS()},t.prototype.setPageCount=function(t){this.Qa.pageCount=t,this.Za()},t.prototype.getPageCount=function(){return this.Qa.pageCount},t.prototype.getClientStore=function(){return this.wa},t.prototype.setCookie=function(t,n,i){void 0===i&&(i=new Date(p()+6048e5).toUTCString()),this.wa.setCookie(t,n,i)},t.prototype.setCookieDomain=function(t,n){var i=n;(C(i)||i.match(/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/g))&&(i="");var r=function(t){return R(t,"_fs_cookie_domain")}(t);"string"==typeof r&&(i=r),this.wa.setDomain(i)},t.prototype.setIds=function(t,n,i,r){this.setCookieDomain(t,n),this.Qa.userId=i,this.Qa.sessionId=r,this.Za()},t.prototype.clearAppId=function(){return!!this.Qa.appKeyHash&&(this.$a="",this.Qa.appKeyHash="",this.Za(),!0)},t.prototype.encode=function(){var t,n,i,r=[this.Qa.userId,null!==(t=this.Qa.sessionId)&&void 0!==t?t:"",""+(null!==(n=this.Qa.sessionStartTime)&&void 0!==n?n:""),"",""+(null!==(i=this.Qa.pageCount)&&void 0!==i?i:"")].join(":"),e=["",this.Qa.orgId,r];return this.Qa.appKeyHash&&e.push(encodeURIComponent(this.Qa.appKeyHash)),e.push("/"+this.Qa.expirationAbsTimeSeconds),e.join("#")},t.prototype.Za=function(){var t=this.encode(),n=new Date(1e3*this.Qa.expirationAbsTimeSeconds).toUTCString();this.wa.setValue(ra,t,n,pn)},t;}(),sa=((Zu={})[Xt.Document]={assetMapId:"str",releaseDatetime:"date",releaseVersion:"str"},Zu[Xt.Event]={},Zu[Xt.Page]={pageName:"str",releaseVersion:"str",releaseDatetime:"str"},Zu[Xt.User]={uid:"str",displayName:"str",email:"str"},Zu),oa={str:ua,bool:aa,real:ca,"int":ha,date:fa,strs:va(ua),bools:va(aa),reals:va(ca),ints:va(ha),dates:va(fa),objs:va(la),obj:la};function ua(t){return"string"==typeof t}function aa(t){return"boolean"==typeof t}function ca(t){return"number"==typeof t}function ha(t){return"number"==typeof t&&t-o.mathFloor(t)==0}function fa(t){return!(!t||(t.constructor===Date?isNaN(t):"number"!=typeof t&&"string"!=typeof t||isNaN(new Date(t))))}function va(t){return function(n){if(!(n instanceof Array))return!1;for(var i=0;i=0)return[void 0,Jt.FsId];var e=qo(r),s=void 0;return n&&n.Qa.appKeyHash&&n.Qa.appKeyHash!==e&&n.Qa.appKeyHash!==r&&(n.Qa.appKeyHash,s=Jt.NewUid),[r,s]}(f,this.Uu),l=v[0],d=v[1];if(!l)return Jt.FsId,{events:r};a.properties.uid=l,this.Uu.setAppId(l),d===Jt.NewUid&&(i=!0)}}Ea(t.source,"setVars",e),e(this.nc(s,wa(s,a.properties),u));break;default:(0,Ir.nt)(s,"Unsupported");}}catch(n){t.operation,n.message}return{events:r,reidentify:i}},t.prototype.nc=function(t,n,i,r){var e=vt(n.PayloadToSend),s=!!i&&"fs"!==i;switch(t){case Xt.Event:return{When:0,Kind:Ot.SYS_CUSTOM,Args:s?[r,e,i]:[r,e]};case Xt.Document:case Xt.Page:case Xt.User:return{When:0,Kind:Ot.SYS_SETVAR,Args:s?[t,e,i]:[t,e]};default:(0,Ir.nt)(t,"Unsupported");}},t.prototype.ic=function(t,n){var i=t.PayloadToSend;if(i&&"object"==typeof i){var r=0,e={};for(var s in i)if(!(s in this.Ya)){var o=i[s];this.Ya[s]={value:o,apiSource:n},e[s]=o,r++}if(0!==r)return{PayloadToSend:e,ValidationErrors:t.ValidationErrors}}},t;}();function wa(t,n){var i=1500;return ga(function(){return--i},t,n)}var ga=function(t,n,i){var r,e,s={PayloadToSend:{},ValidationErrors:[]},u=function(i){var r=ga(t,n,i);return s.ValidationErrors=s.ValidationErrors.concat(r.ValidationErrors),r.PayloadToSend};for(var a in i)if(o.objectHasOwnProp(i,a)){if(t()<=0)break;var c=i[a],h=ya(n,a,c,s.ValidationErrors);if(h){var f=h.name;if("obj"!==h.type){if("objs"!==h.type)s.PayloadToSend[f]=ma(h.type,h.value);else{n!=Xt.Event&&s.ValidationErrors.push({Type:"vartype",FieldName:f,ValueType:"Array (unsupported)"});for(var v=[],l=0;l0&&(s.PayloadToSend[f]=v)}}else{var d=u(h.value),p=(e="_obj").length>(r=a).length||r.substring(r.length-e.length)!=e?f.substring(0,f.length-"_obj".length):f;s.PayloadToSend[p]=d}}else s.PayloadToSend[a]=ma("str",c)}return s};function ma(t,n){var i=n;return"str"==t&&"string"==typeof i&&(i=i.trim()),null==i||"date"!=t&&i.constructor!=Date||(i=function(t){var n=t.constructor===Date?t:new Date(t);try{return n.toISOString()}catch(t){return null}}(i)),i}function ya(t,n,i,r){var e=n,s=e,u=typeof i;if("undefined"===u)return r.push({Type:"vartype",FieldName:e,ValueType:u+" (unsupported)"}),null;var a=sa[t];if(o.objectHasOwnProp(a,e))return{name:e,type:a[e],value:i};var c=e.lastIndexOf("_");if(-1==c||!ba(e.substring(c+1))){var h=function(t){for(var n in oa)if(oa[n](t))return n;return null}(i);if(null==h)return i?r.push({Type:"vartype",FieldName:e}):r.push({Type:"vartype",FieldName:e,ValueType:"null (unsupported)"}),null;c=e.length,e=e+"_"+h}var f=e.substring(0,c),v=e.substring(c+1);if("object"===u&&!i)return r.push({Type:"vartype",FieldName:s,ValueType:"null (unsupported)"}),null;if(!da.test(f)){f=f.replace(/[^a-zA-Z0-9_]/g,"").replace(/^[0-9]+/,""),/[0-9]/.test(f[0])&&(f=f.substring(1)),r.push({Type:"varname",FieldName:s});var l=f+"_"+v;if(da.source,""==f)return null;e=l}return ba(v)?function(t,n){return oa[t](n)}(v,i)?{name:e,type:v,value:i}:(vt(i),"number"===u?u=i%1==0?"integer":"real":"object"==u&&null!=i&&i.constructor==Date&&(u=isNaN(i)?"invalid date":"date"),r.push({Type:"vartype",FieldName:s,ValueType:u}),null):(r.push({Type:"varname",FieldName:s}),null)}function ba(t){return!!oa[t]}function Ea(t,n,i){var r=Uu({source:t,type:"api",entrypoint:n});r&&i({When:0,Kind:r.Kind,Args:r.Args})}function Sa(t,n){return(0,e.__awaiter)(this,void 0,Yn,function(){var i,s,o,a,c;return(0,e.__generator)(this,function(h){switch(h.label){case 0:if(h.trys.push([0,2,,3]),gr||yr||function(t){return!!R(t,"_fs_use_polyfilled_apis","boolean")}(t))return[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})];if(!t.document||n.status!==r.Unknown)return[2,n];if(i=function(t,n){var i=n.functions,s={},o=(0,e.__assign)({},n.helpers);if(o.functionToString=function(t,n){var i,r,e=null===(i=t["__core-js_shared__"])||void 0===i?void 0:i.inspectSource;if(e){var s=function(){return e(this)};if(ka(s,2))return s}var o=null===(r=t["__core-js_shared__"])||void 0===r?void 0:r["native-function-to-string"];if(ka(o))return o;var u=n.__zone_symbol__OriginalDelegate;return ka(u)?u:ka(n)?n:void 0}(t,o.functionToString),!o.functionToString)return n;var u=!1;for(var a in i)if(i[a]){if(s[a]=Ia(o.functionToString,i[a]),s[a]||(s[a]=Ta(o.functionToString,o,a)),!s[a])return n;s[a]!==i[a]&&(u=!0)}else s[a]=void 0;return{status:r.Clean,functions:u?s:i,helpers:o,errors:[]}}(t,n),i.status===r.Clean)return[2,i];(s=t.document.createElement("iframe")).id="FullStory-iframe",s.className="fs-hide",s.style.display="none",o=t.document.body||t.document.head||t.document.documentElement||t.document;try{o.appendChild(s)}catch(t){return[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})]}return s.contentWindow?(a=u(s.contentWindow,r.Clean),s.parentNode&&s.parentNode.removeChild(s),a.status===r.UnrecoverableFailure?[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})]:[4,xa(a,n)]):[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})];case 1:return[2,h.sent()];case 2:return c=h.sent(),Tt.sendToBugsnag(c,"error"),[2,(0,e.__assign)((0,e.__assign)({},n),{status:r.Clean})];case 3:return[2];}})})}function xa(t,n){var i,s=new Yn(function(t){return i=t});return setTimeout(function(){try{t.functions.jsonParse("[]").push(0)}catch(t){i((0,e.__assign)((0,e.__assign)({},n),{status:r.Clean}))}i(t)}),s}function ka(t,n){var i;if(void 0===n&&(n=0),!t)return!1;try{t.call(function(){})}catch(t){return!1}var r=function(t){try{return void t.call(null)}catch(t){return (t.stack||"").replace(/__fs_nomangle_check_stack(.|\n)*$/,"");}},e=void 0;0!==n&&"number"==typeof Error.stackTraceLimit&&(e=Error.stackTraceLimit,Error.stackTraceLimit=Number.POSITIVE_INFINITY);var s=[function(){throw new Error("")},t],o=function __fs_nomangle_check_stack(){return s.map(r)}(),u=o[0],a=o[1];if(void 0!==e&&(Error.stackTraceLimit=e),!u||!a)return!1;for(var c="\n".charCodeAt(0),h=u.length>a.length?a.length:u.length,f=1,v=f;v=0}var Aa=["__zone_symbol__OriginalDelegate","nr@original"];function Ia(t,n){if(n){for(var i=0,r=Aa;i0&&this.lc[t].some(function(t){return!t.disconnected})},t.prototype.takeRecords=function(t){var n,i=null!==(n=this.lc[t.type])&&void 0!==n?n:[];if(0!==i.length)for(var r=0,e=i;r-1,!!ja.userAgent.match("CriOS")||"Google Inc."===Oa&&!Ma&&!Ka),Fa=/Firefox/.test(window.navigator.userAgent);function Da(t){if(!Fa)return!1;var n=window.navigator.userAgent.match(/Firefox\/(\d+)/);return!(!n||!n[1])&&parseInt(n[1],10)0||null===H){n="Init config rejected: "+R.unrecoverable.join(",\n"),k(t,new Error(n));break}R.recoverable.length>0&&(n="Init config partially rejected: "+R.recoverable.join(",\n")),a=H,x(t);break;default:(0,Ir.nt)(t,"invalid operation");}}catch(n){Tt.sendToBugsnag(n,"error"),k(t,n)}},A=0,I=p;A=0;u--)(e=t[u])&&(o=(s<3?e(o):s>3?e(n,i,o):e(n,i))||o);return s>3&&o&&Object.defineProperty(n,i,o),o}function a(t,n){return function(i,r){n(i,r,t)}}function c(t,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,n)}function h(t,n,i,r){return new(i||(i=Promise))(function(e,s){function o(t){try{a(r.next(t))}catch(t){s(t)}}function u(t){try{a(r["throw"](t))}catch(t){s(t)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i(function(t){t(n)})).then(o,u)}a((r=r.apply(t,n||[])).next())})}function f(t,n){var i,r,e,s,o={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return s={next:u(0),"throw":u(1),"return":u(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function u(s){return function(u){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(e=2&s[0]?r["return"]:s[0]?r["throw"]||((e=r["return"])&&e.call(r),0):r.next)&&!(e=e.call(r,s[1])).done)return e;switch(r=0,e&&(s=[2&s[0],e.value]),s[0]){case 0:case 1:e=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((e=(e=o.trys).length>0&&e[e.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!e||s[1]>e[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function p(t,n){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var r,e,s=i.call(t),o=[];try{for(;(void 0===n||n-->0)&&!(r=s.next()).done;)o.push(r.value)}catch(t){e={error:t}}finally{try{r&&!r.done&&(i=s["return"])&&i.call(s)}finally{if(e)throw e.error}}return o}function w(){for(var t=[],n=0;n1||u(t,n)})})}function u(t,n){try{(i=e[t](n)).value instanceof y?Promise.resolve(i.value.v).then(a,c):h(s[0][2],i)}catch(t){h(s[0][3],t)}var i}function a(t){u("next",t)}function c(t){u("throw",t)}function h(t,n){t(n),s.shift(),s.length&&u(s[0][0],s[0][1])}}function E(t){var n,i;return n={},r("next"),r("throw",function(t){throw t}),r("return"),n[Symbol.iterator]=function(){return this},n;function r(r,e){n[r]=t[r]?function(n){return(i=!i)?{value:y(t[r](n)),done:"return"===r}:e?e(n):n}:e}}function S(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=t[Symbol.asyncIterator];return i?i.call(t):(t=d(t),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(i){n[i]=t[i]&&function(n){return new Promise(function(r,e){!function(t,n,i,r){Promise.resolve(r).then(function(n){t({value:n,done:i})},n)}(r,e,(n=t[i](n)).done,n.value)})}}}function x(t,n){return Object.defineProperty?Object.defineProperty(t,"raw",{value:n}):t.raw=n,t}var k=Object.create?function(t,n){Object.defineProperty(t,"default",{enumerable:!0,value:n})}:function(t,n){t["default"]=n};function _(t){if(t&&t.__esModule)return t;var n={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&v(n,t,i);return k(n,t),n}function A(t){return t&&t.__esModule?t:{"default":t}}function I(t,n,i,r){if("a"===i&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?t!==n||!r:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?r:"a"===i?r.call(t):r?r.value:n.get(t)}function T(t,n,i,r,e){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!e)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?t!==n||!e:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?e.call(t,i):e?e.value=i:n.set(t,i),i}function C(t,n){if(null===n||"object"!=typeof n&&"function"!=typeof n)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?n===t:t.has(n)}}},n={};function i(r){var e=n[r];if(void 0!==e)return e.exports;var s=n[r]={exports:{}};return t[r](s,s.exports,i),s.exports}i.d=function(t,n){for(var r in n)i.o(n,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(248)}(); diff --git a/x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts b/x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts index 09d7e08826c0f..26ec9095cf3d5 100644 --- a/x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts +++ b/x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @@ -20,6 +20,7 @@ const configSchema = schema.object({ eventTypesAllowlist: schema.arrayOf(schema.string(), { defaultValue: [ 'Loaded Kibana', // Sent once per page refresh (potentially, once per session) + 'observability_onboarding_feedback', // Sent once per feedback click, only clickable once 'Hosts View Query Submitted', // Worst-case scenario 1 every 2 seconds 'Host Entry Clicked', // Worst-case scenario once per second - AT RISK, 'Host Flyout Filter Removed', // Worst-case scenario once per second - AT RISK, diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form_agentless.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form_agentless.tsx index 4e849197854ba..c730153a96254 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form_agentless.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form_agentless.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { EuiButton, EuiCallOut, EuiLink, EuiSpacer, EuiText } from '@elastic/eui'; +import { EuiAccordion, EuiButton, EuiCallOut, EuiLink, EuiSpacer, EuiText } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import semverCompare from 'semver/functions/compare'; import semverValid from 'semver/functions/valid'; @@ -68,7 +68,7 @@ Utilize AWS CloudFormation (a built-in AWS tool) or a series of manual steps to ), }} /> - +
    {isOrganization ? ( @@ -251,8 +251,16 @@ export const AwsCredentialsFormAgentless = ({ {awsCredentialsType === DEFAULT_AGENTLESS_AWS_CREDENTIALS_TYPE && showCloudCredentialsButton && ( <> - + Steps to Generate AWS Account Credentials} + paddingSize="l" + > + + + - +
    1. @@ -102,7 +110,7 @@ const GoogleCloudShellCredentialsGuide = (props: {
    2. Launch Google Cloud Shell, }} @@ -206,11 +214,19 @@ export const GcpCredentialsFormAgentless = ({ )} {showCloudCredentialsButton && ( <> - + Steps to Generate GCP Account Credentials} + paddingSize="l" + > + + + { - return policyTemplate.hasOwnProperty('inputs'); + return Object.hasOwn(policyTemplate, 'inputs'); }; export const getVulnMgmtCloudFormationDefaultValue = (packageInfo: PackageInfo): string => { diff --git a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_actions_providers/follower_index_pause_provider.js b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_actions_providers/follower_index_pause_provider.js index ea67df7b4fb6d..7211c6e1425a2 100644 --- a/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_actions_providers/follower_index_pause_provider.js +++ b/x-pack/plugins/cross_cluster_replication/public/app/components/follower_index_actions_providers/follower_index_pause_provider.js @@ -107,7 +107,6 @@ class FollowerIndexPauseProviderUi extends PureComponent { )}

      )} - {!isSingle && (

      diff --git a/x-pack/plugins/data_quality/common/url_schema/common.ts b/x-pack/plugins/data_quality/common/url_schema/common.ts index cf7998f4a1a54..d184fbffe475e 100644 --- a/x-pack/plugins/data_quality/common/url_schema/common.ts +++ b/x-pack/plugins/data_quality/common/url_schema/common.ts @@ -5,4 +5,50 @@ * 2.0. */ +import * as rt from 'io-ts'; + export const DATA_QUALITY_URL_STATE_KEY = 'pageState'; + +export const directionRT = rt.keyof({ + asc: null, + desc: null, +}); + +export const sortRT = rt.strict({ + field: rt.string, + direction: directionRT, +}); + +export const tableRT = rt.exact( + rt.partial({ + page: rt.number, + rowsPerPage: rt.number, + sort: sortRT, + }) +); + +export const timeRangeRT = rt.strict({ + from: rt.string, + to: rt.string, + refresh: rt.strict({ + pause: rt.boolean, + value: rt.number, + }), +}); + +export const degradedFieldRT = rt.exact( + rt.partial({ + table: tableRT, + }) +); + +export const dataStreamRT = new rt.Type( + 'dataStreamRT', + (input: unknown): input is string => + typeof input === 'string' && (input.match(/-/g) || []).length === 2, + (input, context) => + typeof input === 'string' && (input.match(/-/g) || []).length === 2 + ? rt.success(input) + : rt.failure(input, context), + rt.identity +); diff --git a/x-pack/plugins/data_quality/common/url_schema/dataset_quality_detils_url_schema_v1.ts b/x-pack/plugins/data_quality/common/url_schema/dataset_quality_detils_url_schema_v1.ts new file mode 100644 index 0000000000000..cc92663ff31e9 --- /dev/null +++ b/x-pack/plugins/data_quality/common/url_schema/dataset_quality_detils_url_schema_v1.ts @@ -0,0 +1,25 @@ +/* + * 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'; +import { dataStreamRT, degradedFieldRT, timeRangeRT } from './common'; + +export const urlSchemaRT = rt.exact( + rt.intersection([ + rt.type({ + dataStream: dataStreamRT, + }), + rt.partial({ + v: rt.literal(1), + timeRange: timeRangeRT, + breakdownField: rt.string, + degradedFields: degradedFieldRT, + }), + ]) +); + +export type UrlSchema = rt.TypeOf; diff --git a/x-pack/plugins/data_quality/common/url_schema/url_schema_v1.ts b/x-pack/plugins/data_quality/common/url_schema/dataset_quality_url_schema_v1.ts similarity index 73% rename from x-pack/plugins/data_quality/common/url_schema/url_schema_v1.ts rename to x-pack/plugins/data_quality/common/url_schema/dataset_quality_url_schema_v1.ts index 076e1b641b7e2..78c4faeca8cd8 100644 --- a/x-pack/plugins/data_quality/common/url_schema/url_schema_v1.ts +++ b/x-pack/plugins/data_quality/common/url_schema/dataset_quality_url_schema_v1.ts @@ -6,24 +6,7 @@ */ import * as rt from 'io-ts'; - -export const directionRT = rt.keyof({ - asc: null, - desc: null, -}); - -export const sortRT = rt.strict({ - field: rt.string, - direction: directionRT, -}); - -export const tableRT = rt.exact( - rt.partial({ - page: rt.number, - rowsPerPage: rt.number, - sort: sortRT, - }) -); +import { degradedFieldRT, tableRT, timeRangeRT } from './common'; const integrationRT = rt.strict({ name: rt.string, @@ -46,21 +29,6 @@ const datasetRT = rt.intersection([ ), ]); -const timeRangeRT = rt.strict({ - from: rt.string, - to: rt.string, - refresh: rt.strict({ - pause: rt.boolean, - value: rt.number, - }), -}); - -const degradedFieldRT = rt.exact( - rt.partial({ - table: tableRT, - }) -); - export const flyoutRT = rt.exact( rt.partial({ dataset: datasetRT, diff --git a/x-pack/plugins/data_quality/common/url_schema/index.ts b/x-pack/plugins/data_quality/common/url_schema/index.ts index d3b092e0b0ac8..0af03b6d503f5 100644 --- a/x-pack/plugins/data_quality/common/url_schema/index.ts +++ b/x-pack/plugins/data_quality/common/url_schema/index.ts @@ -6,4 +6,5 @@ */ export { DATA_QUALITY_URL_STATE_KEY } from './common'; -export * as datasetQualityUrlSchemaV1 from './url_schema_v1'; +export * as datasetQualityUrlSchemaV1 from './dataset_quality_url_schema_v1'; +export * as datasetQualityDetailsUrlSchemaV1 from './dataset_quality_detils_url_schema_v1'; diff --git a/x-pack/plugins/data_quality/public/application.tsx b/x-pack/plugins/data_quality/public/application.tsx index 1c54e1d6003a8..de4c6ba524a08 100644 --- a/x-pack/plugins/data_quality/public/application.tsx +++ b/x-pack/plugins/data_quality/public/application.tsx @@ -16,7 +16,7 @@ import { useExecutionContext } from '@kbn/kibana-react-plugin/public'; import { KbnUrlStateStorageFromRouterProvider } from './utils/kbn_url_state_context'; import { useKibanaContextForPluginProvider } from './utils/use_kibana'; import { AppPluginStartDependencies, DataQualityPluginStart } from './types'; -import { DatasetQualityRoute } from './routes'; +import { DatasetQualityRoute, DatasetQualityDetailsRoute } from './routes'; import { PLUGIN_ID } from '../common'; export const renderApp = ( @@ -55,6 +55,7 @@ const AppWithExecutionContext = ({ } /> + } /> diff --git a/x-pack/plugins/data_quality/public/routes/dataset_quality/context.tsx b/x-pack/plugins/data_quality/public/routes/dataset_quality/context.tsx index 8c80ea91daedd..ddd3227fa1a2b 100644 --- a/x-pack/plugins/data_quality/public/routes/dataset_quality/context.tsx +++ b/x-pack/plugins/data_quality/public/routes/dataset_quality/context.tsx @@ -7,7 +7,7 @@ import { IToasts } from '@kbn/core-notifications-browser'; import { DatasetQualityPluginStart } from '@kbn/dataset-quality-plugin/public'; -import { DatasetQualityController } from '@kbn/dataset-quality-plugin/public/controller'; +import { DatasetQualityController } from '@kbn/dataset-quality-plugin/public/controller/dataset_quality'; import { IKbnUrlStateStorage } from '@kbn/kibana-utils-plugin/public'; import React, { createContext, useContext, useEffect, useState } from 'react'; import { diff --git a/x-pack/plugins/data_quality/public/routes/dataset_quality/index.tsx b/x-pack/plugins/data_quality/public/routes/dataset_quality/index.tsx index 346c72cfdefb3..7ef7c17669e3d 100644 --- a/x-pack/plugins/data_quality/public/routes/dataset_quality/index.tsx +++ b/x-pack/plugins/data_quality/public/routes/dataset_quality/index.tsx @@ -6,7 +6,7 @@ */ import { EuiEmptyPrompt, EuiLoadingLogo } from '@elastic/eui'; -import { DatasetQualityController } from '@kbn/dataset-quality-plugin/public/controller'; +import type { DatasetQualityController } from '@kbn/dataset-quality-plugin/public/controller/dataset_quality'; import React from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { PLUGIN_NAME } from '../../../common'; @@ -21,7 +21,7 @@ export const DatasetQualityRoute = () => { services: { chrome, datasetQuality, notifications, appParams }, } = useKibanaContextForPlugin(); - useBreadcrumbs(PLUGIN_NAME, appParams, chrome); + useBreadcrumbs([{ text: PLUGIN_NAME }], appParams, chrome); return ( ({}); + +interface ContextProps { + children: JSX.Element; + urlStateStorageContainer: IKbnUrlStateStorage; + toastsService: IToasts; + datasetQuality: DatasetQualityPluginStart; +} + +export function DatasetQualityDetailsContextProvider({ + children, + urlStateStorageContainer, + toastsService, + datasetQuality, +}: ContextProps) { + const [controller, setController] = useState(); + const history = useHistory(); + const { + services: { + chrome, + appParams, + application: { navigateToApp }, + }, + } = useKibanaContextForPlugin(); + const rootBreadCrumb = useMemo( + () => ({ + text: PLUGIN_NAME, + onClick: () => navigateToApp('management', { path: `/data/${PLUGIN_ID}` }), + }), + [navigateToApp] + ); + const [breadcrumbs, setBreadcrumbs] = useState([rootBreadCrumb]); + + useEffect(() => { + async function getDatasetQualityDetailsController() { + const initialState = getDatasetQualityDetailsStateFromUrl({ + urlStateStorageContainer, + toastsService, + }); + + // state initialization is under progress + if (initialState === undefined) { + return; + } + + // state initialized but empty + if (initialState === null) { + history.push('/'); + return; + } + + const datasetQualityDetailsController = + await datasetQuality.createDatasetQualityDetailsController({ + initialState, + }); + datasetQualityDetailsController.service.start(); + + setController(datasetQualityDetailsController); + + const datasetQualityStateSubscription = datasetQualityDetailsController.state$.subscribe( + (state) => { + updateUrlFromDatasetQualityDetailsState({ + urlStateStorageContainer, + datasetQualityDetailsState: state, + }); + const breadcrumbValue = getBreadcrumbValue(state.dataStream, state.integration); + setBreadcrumbs([rootBreadCrumb, { text: breadcrumbValue }]); + } + ); + + return () => { + datasetQualityDetailsController.service.stop(); + datasetQualityStateSubscription.unsubscribe(); + }; + } + + getDatasetQualityDetailsController(); + }, [datasetQuality, history, rootBreadCrumb, toastsService, urlStateStorageContainer]); + + useBreadcrumbs(breadcrumbs, appParams, chrome); + + return ( + + {children} + + ); +} + +export const useDatasetQualityDetailsContext = () => { + const context = useContext(DatasetQualityDetailsContext); + if (context === undefined) { + throw new Error( + 'useDatasetQualityDetailContext must be used within a ' + ); + } + return context; +}; diff --git a/x-pack/plugins/data_quality/public/routes/dataset_quality_details/index.tsx b/x-pack/plugins/data_quality/public/routes/dataset_quality_details/index.tsx new file mode 100644 index 0000000000000..956f379523522 --- /dev/null +++ b/x-pack/plugins/data_quality/public/routes/dataset_quality_details/index.tsx @@ -0,0 +1,65 @@ +/* + * 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 { EuiEmptyPrompt, EuiLoadingLogo } from '@elastic/eui'; +import type { DatasetQualityDetailsController } from '@kbn/dataset-quality-plugin/public/controller/dataset_quality_details'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { useKbnUrlStateStorageFromRouterContext } from '../../utils/kbn_url_state_context'; +import { useKibanaContextForPlugin } from '../../utils/use_kibana'; +import { DatasetQualityDetailsContextProvider, useDatasetQualityDetailsContext } from './context'; + +export const DatasetQualityDetailsRoute = () => { + const urlStateStorageContainer = useKbnUrlStateStorageFromRouterContext(); + const { + services: { datasetQuality, notifications }, + } = useKibanaContextForPlugin(); + + return ( + + + + ); +}; + +const ConnectedContent = React.memo(() => { + const { controller } = useDatasetQualityDetailsContext(); + + return controller ? ( + + ) : ( + <> + } + title={ + + } + /> + + ); +}); + +const InitializedContent = React.memo( + ({ + datasetQualityDetailsController, + }: { + datasetQualityDetailsController: DatasetQualityDetailsController; + }) => { + const { + services: { datasetQuality }, + } = useKibanaContextForPlugin(); + + return ; + } +); diff --git a/x-pack/plugins/data_quality/public/routes/dataset_quality_details/url_schema_v1.ts b/x-pack/plugins/data_quality/public/routes/dataset_quality_details/url_schema_v1.ts new file mode 100644 index 0000000000000..b97d1bb9100eb --- /dev/null +++ b/x-pack/plugins/data_quality/public/routes/dataset_quality_details/url_schema_v1.ts @@ -0,0 +1,44 @@ +/* + * 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 { DatasetQualityDetailsPublicStateUpdate } from '@kbn/dataset-quality-plugin/public/controller/dataset_quality_details'; +import * as rt from 'io-ts'; +import { deepCompactObject } from '../../../common/utils/deep_compact_object'; +import { datasetQualityDetailsUrlSchemaV1 } from '../../../common/url_schema'; + +export const getStateFromUrlValue = ( + urlValue: datasetQualityDetailsUrlSchemaV1.UrlSchema +): DatasetQualityDetailsPublicStateUpdate => + deepCompactObject({ + dataStream: urlValue.dataStream, + timeRange: urlValue.timeRange, + degradedFields: urlValue.degradedFields, + }); + +export const getUrlValueFromState = ( + state: DatasetQualityDetailsPublicStateUpdate +): datasetQualityDetailsUrlSchemaV1.UrlSchema => + deepCompactObject({ + dataStream: state.dataStream, + timeRange: state.timeRange, + degradedFields: state.degradedFields, + v: 1, + }); + +const stateFromUrlSchemaRT = new rt.Type< + DatasetQualityDetailsPublicStateUpdate, + datasetQualityDetailsUrlSchemaV1.UrlSchema, + datasetQualityDetailsUrlSchemaV1.UrlSchema +>( + 'stateFromUrlSchemaRT', + rt.never.is, + (urlSchema, _context) => rt.success(getStateFromUrlValue(urlSchema)), + getUrlValueFromState +); + +export const stateFromUntrustedUrlRT = + datasetQualityDetailsUrlSchemaV1.urlSchemaRT.pipe(stateFromUrlSchemaRT); diff --git a/x-pack/plugins/data_quality/public/routes/dataset_quality_details/url_state_storage_service.ts b/x-pack/plugins/data_quality/public/routes/dataset_quality_details/url_state_storage_service.ts new file mode 100644 index 0000000000000..1a71ee6cc33ed --- /dev/null +++ b/x-pack/plugins/data_quality/public/routes/dataset_quality_details/url_state_storage_service.ts @@ -0,0 +1,62 @@ +/* + * 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 { IToasts } from '@kbn/core-notifications-browser'; +import { DatasetQualityDetailsPublicState } from '@kbn/dataset-quality-plugin/public/controller/dataset_quality_details'; +import { createPlainError, formatErrors } from '@kbn/io-ts-utils'; +import { IKbnUrlStateStorage, withNotifyOnErrors } from '@kbn/kibana-utils-plugin/public'; +import * as Either from 'fp-ts/lib/Either'; +import { DatasetQualityDetailsPublicStateUpdate } from '@kbn/dataset-quality-plugin/public/controller/dataset_quality_details'; +import * as rt from 'io-ts'; +import { DATA_QUALITY_URL_STATE_KEY } from '../../../common/url_schema'; +import * as urlSchemaV1 from './url_schema_v1'; + +export const updateUrlFromDatasetQualityDetailsState = ({ + urlStateStorageContainer, + datasetQualityDetailsState, +}: { + urlStateStorageContainer: IKbnUrlStateStorage; + datasetQualityDetailsState?: DatasetQualityDetailsPublicState; +}) => { + if (!datasetQualityDetailsState) { + return; + } + + const encodedUrlStateValues = urlSchemaV1.stateFromUntrustedUrlRT.encode( + datasetQualityDetailsState + ); + + urlStateStorageContainer.set(DATA_QUALITY_URL_STATE_KEY, encodedUrlStateValues, { + replace: true, + }); +}; + +/* + * This function is used to get the dataset quality details state from the URL. + * It will return `null` if the URL state is not present or `undefined` if the URL state is present but invalid. + */ +export const getDatasetQualityDetailsStateFromUrl = ({ + toastsService, + urlStateStorageContainer, +}: { + toastsService: IToasts; + urlStateStorageContainer: IKbnUrlStateStorage; +}): DatasetQualityDetailsPublicStateUpdate | undefined | null => { + const urlStateValues = + urlStateStorageContainer.get(DATA_QUALITY_URL_STATE_KEY) ?? undefined; + + const stateValuesE = rt + .union([rt.undefined, urlSchemaV1.stateFromUntrustedUrlRT]) + .decode(urlStateValues); + + if (Either.isLeft(stateValuesE)) { + withNotifyOnErrors(toastsService).onGetError(createPlainError(formatErrors(stateValuesE.left))); + return undefined; + } else { + return stateValuesE.right ?? null; + } +}; diff --git a/x-pack/plugins/data_quality/public/routes/index.tsx b/x-pack/plugins/data_quality/public/routes/index.tsx index 1a8591d0d3c86..eb8f99aa65ebf 100644 --- a/x-pack/plugins/data_quality/public/routes/index.tsx +++ b/x-pack/plugins/data_quality/public/routes/index.tsx @@ -6,3 +6,4 @@ */ export * from './dataset_quality'; +export * from './dataset_quality_details'; diff --git a/x-pack/plugins/data_quality/public/utils/use_breadcrumbs.tsx b/x-pack/plugins/data_quality/public/utils/use_breadcrumbs.tsx index 3bf83bcf03352..b4e6144f3fbac 100644 --- a/x-pack/plugins/data_quality/public/utils/use_breadcrumbs.tsx +++ b/x-pack/plugins/data_quality/public/utils/use_breadcrumbs.tsx @@ -5,21 +5,31 @@ * 2.0. */ -import type { ChromeStart } from '@kbn/core-chrome-browser'; +import type { ChromeBreadcrumb, ChromeStart } from '@kbn/core-chrome-browser'; -import { ManagementAppMountParams } from '@kbn/management-plugin/public'; import { useEffect } from 'react'; +import { ManagementAppMountParams } from '@kbn/management-plugin/public'; +import { Integration } from '@kbn/dataset-quality-plugin/common/data_streams_stats/integration'; +import { indexNameToDataStreamParts } from '@kbn/dataset-quality-plugin/common'; export const useBreadcrumbs = ( - breadcrumb: string, + breadcrumbs: ChromeBreadcrumb[], params: ManagementAppMountParams, chromeService: ChromeStart ) => { const { docTitle } = chromeService; + const isMultiple = breadcrumbs.length > 1; + + const docTitleValue = isMultiple ? breadcrumbs[breadcrumbs.length - 1].text : breadcrumbs[0].text; - docTitle.change(breadcrumb); + docTitle.change(docTitleValue as string); useEffect(() => { - params.setBreadcrumbs([{ text: breadcrumb }]); - }, [breadcrumb, params]); + params.setBreadcrumbs(breadcrumbs); + }, [breadcrumbs, params]); +}; + +export const getBreadcrumbValue = (dataStream: string, integration?: Integration) => { + const { dataset } = indexNameToDataStreamParts(dataStream); + return integration?.datasets?.[dataset] || dataset; }; diff --git a/x-pack/plugins/data_visualizer/common/types/field_vis_config.ts b/x-pack/plugins/data_visualizer/common/types/field_vis_config.ts index 8d46ca6c2d3c1..73b228ff454ef 100644 --- a/x-pack/plugins/data_visualizer/common/types/field_vis_config.ts +++ b/x-pack/plugins/data_visualizer/common/types/field_vis_config.ts @@ -54,11 +54,11 @@ export interface FileBasedUnknownFieldVisConfig { export function isFileBasedFieldVisConfig( field: FieldVisConfig | FileBasedFieldVisConfig ): field is FileBasedFieldVisConfig { - return !field.hasOwnProperty('existsInDocs'); + return !Object.hasOwn(field, 'existsInDocs'); } export function isIndexBasedFieldVisConfig( field: FieldVisConfig | FileBasedFieldVisConfig ): field is FieldVisConfig { - return field.hasOwnProperty('existsInDocs'); + return Object.hasOwn(field, 'existsInDocs'); } diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/combined_fields/combined_fields_form.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/combined_fields/combined_fields_form.tsx index 6f9f481a70a50..8676be744cb53 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/combined_fields/combined_fields_form.tsx +++ b/x-pack/plugins/data_visualizer/public/application/common/components/combined_fields/combined_fields_form.tsx @@ -145,7 +145,7 @@ export class CombinedFieldsForm extends Component { } const mappings = this.parseMappings(); - return mappings.properties.hasOwnProperty(name); + return Object.hasOwn(mappings.properties, name); }; render() { diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx index 2f3dabec566c1..259b45d4e297b 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx +++ b/x-pack/plugins/data_visualizer/public/application/common/components/results_links/results_links.tsx @@ -180,7 +180,7 @@ export const ResultsLinks: FC = ({ fieldStats && typeof fieldStats === 'object' && timeFieldName !== undefined && - fieldStats.hasOwnProperty(timeFieldName) && + Object.hasOwn(fieldStats, timeFieldName) && fieldStats[timeFieldName].earliest !== undefined && fieldStats[timeFieldName].latest !== undefined ) { diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/utils/utils.ts b/x-pack/plugins/data_visualizer/public/application/common/components/utils/utils.ts index f8d299f9e0ec7..0aca4f9260b7d 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/utils/utils.ts +++ b/x-pack/plugins/data_visualizer/public/application/common/components/utils/utils.ts @@ -58,7 +58,7 @@ export function readFile(file: File) { export function createUrlOverrides(overrides: InputOverrides, originalSettings: InputOverrides) { const formattedOverrides: InputOverrides = {}; for (const o in overrideDefaults) { - if (overrideDefaults.hasOwnProperty(o)) { + if (Object.hasOwn(overrideDefaults, o)) { let value = overrides[o]; if ( (Array.isArray(value) && isEqual(value, originalSettings[o])) || diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts index 6e3f4ae33fa3f..6cfa569fdeafd 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/use_overall_stats.ts @@ -354,7 +354,7 @@ export function useOverallStats { nonAggregatableFields.forEach((field, fieldIdx) => { - if (doc.hasOwnProperty(field)) { + if (Object.hasOwn(doc, field)) { nonAggregatableFieldsCount[fieldIdx] += 1; nonAggregatableFieldsUniqueCount[fieldIdx].add(doc[field]!); } diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx index 9412f08172c48..745e03da10d09 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/index_data_visualizer.tsx @@ -229,7 +229,7 @@ const DataVisualizerStateContextProvider: FC> { return ( isPopulatedObject(arg, ['rawResponse']) && - (arg.rawResponse as estypes.SearchResponse).hasOwnProperty('hits') + Object.hasOwn(arg.rawResponse as estypes.SearchResponse, 'hits') ); } @@ -179,8 +179,8 @@ export const processAggregatableFieldsExistResponse = ( }); } else { if ( - datafeedConfig?.script_fields?.hasOwnProperty(field) || - datafeedConfig?.runtime_mappings?.hasOwnProperty(field) + Object.hasOwn(datafeedConfig?.script_fields ?? {}, field) || + Object.hasOwn(datafeedConfig?.runtime_mappings ?? {}, field) ) { const cardinality = get(aggregations, [ ...aggsPath, diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts index 0e0efb057706c..87235a7d14570 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/utils/saved_search_utils.ts @@ -110,7 +110,7 @@ export function getEsQueryFromSavedSearch({ if (Array.isArray(savedQuery.bool.filter) && timeField !== undefined) { savedQuery.bool.filter = savedQuery.bool.filter.filter( (c: QueryDslQueryContainer) => - !(c.hasOwnProperty('range') && c.range?.hasOwnProperty(timeField)) + !(Object.hasOwn(c, 'range') && Object.hasOwn(c.range ?? {}, timeField)) ); } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/curation/results/utils.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/curation/results/utils.ts index aebc84e41896a..fd5b98a02ff08 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/curation/results/utils.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/curation/results/utils.ts @@ -43,7 +43,7 @@ export const convertToResultFormat = (document: CurationResult): SearchResult => // Convert `key: 'value'` into `key: { raw: 'value' }` const result = Object.entries(document).reduce((acc, [key, value]) => { acc[key] = - isNestedObject(value) || Object.prototype.hasOwnProperty.call(value, 'raw') + isNestedObject(value) || (typeof value === 'object' && Object.hasOwn(value, 'raw')) ? value : { raw: value }; return acc; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curation_suggestion/curation_suggestion_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curation_suggestion/curation_suggestion_logic.ts index 907961c142fb5..a05e952573781 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curation_suggestion/curation_suggestion_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curation_suggestion/curation_suggestion_logic.ts @@ -282,7 +282,7 @@ const updateSuggestion = async ( } ); - if (response.results[0].hasOwnProperty('error')) { + if (Object.hasOwn(response.results[0], 'error')) { throw new Error((response.results[0] as APIResponseError).error); } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_queries_panel/ignored_queries_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_queries_panel/ignored_queries_logic.ts index 3f4e1eb2318e6..5062c933d9f29 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_queries_panel/ignored_queries_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/curations/views/curations_history/components/ignored_queries_panel/ignored_queries_logic.ts @@ -130,7 +130,7 @@ export const IgnoredQueriesLogic = kea(v: T | T[]): T[] => (Array.isArray(v) ? v : [v]); const toString = (v1: T) => String(v1); const normalizeBoostValue = (boost: RawBoost): Boost => { - if (!boost.hasOwnProperty('value')) { + if (!Object.hasOwn(boost, 'value')) { // Can't simply do `return boost` here as TS can't infer the correct type return omit(boost, 'value'); } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.ts index 288600eea8aa0..481baca5e35d4 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result_settings/result_settings_logic.ts @@ -151,7 +151,7 @@ export const ResultSettingsLogic = kea resetAllFields(resultFields), // @ts-expect-error upgrade typescript v5.1.6 updateField: (resultFields, { fieldName, settings }) => - resultFields.hasOwnProperty(fieldName) + Object.hasOwn(resultFields, fieldName) ? { ...resultFields, [fieldName]: settings } : resultFields, }, diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/schema_logic.ts b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/schema_logic.ts index f679e34dec56e..418cfa66471f7 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/schema_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/schema/schema_logic.ts @@ -140,7 +140,7 @@ export const SchemaLogic = kea>({ }, listeners: ({ actions, values }) => ({ addSchemaField: ({ fieldName, fieldType }) => { - if (values.schema.hasOwnProperty(fieldName)) { + if (Object.hasOwn(values.schema, fieldName)) { setErrorMessage(ADD_SCHEMA_ERROR(fieldName)); actions.closeModal(); } else { diff --git a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/docs_explorer/convert_results.ts b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/docs_explorer/convert_results.ts index 96ab127870a34..ff8e67817f86e 100644 --- a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/docs_explorer/convert_results.ts +++ b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/docs_explorer/convert_results.ts @@ -49,7 +49,7 @@ export const getIndex = (result: SearchResult): string => { export const isFieldValue = (value: unknown): value is FieldValue => { if (value === null || typeof value !== 'object') return false; - return value.hasOwnProperty('raw') || value.hasOwnProperty('snippet'); + return Object.hasOwn(value, 'raw') || Object.hasOwn(value, 'snippet'); }; export const flattenObjectPreservingValues = ( diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.ts index ddefe7e1b0d55..864bfa5a34fa2 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/pipelines/pipelines_json_configurations_logic.ts @@ -98,7 +98,7 @@ export const IndexPipelinesConfigurationsLogic = kea< selectedPipeline: [ () => [selectors.selectedPipelineId, selectors.pipelines], (selectedPipelineId: string, pipelines: Record) => { - if (pipelines.hasOwnProperty(selectedPipelineId)) { + if (Object.hasOwn(pipelines, selectedPipelineId)) { return pipelines[selectedPipelineId]; } return undefined; diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/pipelines/is_managed.ts b/x-pack/plugins/enterprise_search/public/applications/shared/pipelines/is_managed.ts index 30cf5ac145c87..a5bb8b23a77c3 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/pipelines/is_managed.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/pipelines/is_managed.ts @@ -17,7 +17,7 @@ interface IngestPipelineWithMetadata extends IngestPipeline { const isIngestPipelineWithMetadata = ( pipeline: IngestPipeline ): pipeline is IngestPipelineWithMetadata => { - return pipeline.hasOwnProperty('_meta'); + return Object.hasOwn(pipeline, '_meta'); }; export const isManagedPipeline = (pipeline: IngestPipeline): boolean => { diff --git a/x-pack/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/get_ml_inference_pipeline_processors.ts b/x-pack/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/get_ml_inference_pipeline_processors.ts index e6abf4ccd5464..33b97bf030954 100644 --- a/x-pack/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/get_ml_inference_pipeline_processors.ts +++ b/x-pack/plugins/enterprise_search/server/lib/indices/pipelines/ml_inference/pipeline_processors/get_ml_inference_pipeline_processors.ts @@ -91,7 +91,7 @@ export const fetchPipelineProcessorInferenceData = async ( // Get the inference processors; there is one per configured field, but they share the same model ID const inferenceProcessors = subProcessors.filter((processor) => - processor.hasOwnProperty('inference') + Object.hasOwn(processor, 'inference') ); const trainedModelName = inferenceProcessors[0]?.inference?.model_id; @@ -153,7 +153,7 @@ export const getMlModelConfigsForModelIds = async ( trainedModelsStats.trained_model_stats.forEach((trainedModelStats) => { const trainedModelName = trainedModelStats.model_id; - if (modelConfigs.hasOwnProperty(trainedModelName)) { + if (Object.hasOwn(modelConfigs, trainedModelName)) { modelConfigs[trainedModelName].modelState = parseModelStateFromStats( trainedModelStats, modelConfigs[trainedModelName].types diff --git a/x-pack/plugins/fields_metadata/server/services/fields_metadata/fields_metadata_client.test.ts b/x-pack/plugins/fields_metadata/server/services/fields_metadata/fields_metadata_client.test.ts index e693725a93d89..93c43fa69e5c8 100644 --- a/x-pack/plugins/fields_metadata/server/services/fields_metadata/fields_metadata_client.test.ts +++ b/x-pack/plugins/fields_metadata/server/services/fields_metadata/fields_metadata_client.test.ts @@ -93,16 +93,16 @@ describe('FieldsMetadataClient class', () => { const timestampField = timestampFieldInstance.toPlain(); - expect(timestampField.hasOwnProperty('dashed_name')).toBeTruthy(); - expect(timestampField.hasOwnProperty('description')).toBeTruthy(); - expect(timestampField.hasOwnProperty('example')).toBeTruthy(); - expect(timestampField.hasOwnProperty('flat_name')).toBeTruthy(); - expect(timestampField.hasOwnProperty('level')).toBeTruthy(); - expect(timestampField.hasOwnProperty('name')).toBeTruthy(); - expect(timestampField.hasOwnProperty('normalize')).toBeTruthy(); - expect(timestampField.hasOwnProperty('required')).toBeTruthy(); - expect(timestampField.hasOwnProperty('short')).toBeTruthy(); - expect(timestampField.hasOwnProperty('type')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'dashed_name')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'description')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'example')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'flat_name')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'level')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'name')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'normalize')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'required')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'short')).toBeTruthy(); + expect(Object.hasOwn(timestampField, 'type')).toBeTruthy(); }); it('should attempt resolving the field from an integration if it does not exist in ECS/Metadata and the integration and dataset params are provided', async () => { @@ -118,14 +118,14 @@ describe('FieldsMetadataClient class', () => { const onePasswordField = onePasswordFieldInstance.toPlain(); - expect(onePasswordField.hasOwnProperty('name')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('type')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('description')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('flat_name')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('source')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('dashed_name')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('normalize')).toBeTruthy(); - expect(onePasswordField.hasOwnProperty('short')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'name')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'type')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'description')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'flat_name')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'source')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'dashed_name')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'normalize')).toBeTruthy(); + expect(Object.hasOwn(onePasswordField, 'short')).toBeTruthy(); }); it('should not resolve the field from an integration if the integration and dataset params are not provided', async () => { @@ -148,7 +148,7 @@ describe('FieldsMetadataClient class', () => { const fields = fieldsDictionaryInstance.toPlain(); - expect(fields.hasOwnProperty('@timestamp')).toBeTruthy(); + expect(Object.hasOwn(fields, '@timestamp')).toBeTruthy(); }); it('should resolve a FieldsMetadataDictionary of matching fields, including integration fields when integration and dataset params are provided', async () => { @@ -162,8 +162,8 @@ describe('FieldsMetadataClient class', () => { const fields = fieldsDictionaryInstance.toPlain(); - expect(fields.hasOwnProperty('@timestamp')).toBeTruthy(); - expect(fields.hasOwnProperty('onepassword.client.platform_version')).toBeTruthy(); + expect(Object.hasOwn(fields, '@timestamp')).toBeTruthy(); + expect(Object.hasOwn(fields, 'onepassword.client.platform_version')).toBeTruthy(); }); it('should resolve a FieldsMetadataDictionary of matching fields, skipping unmatched fields', async () => { @@ -177,9 +177,9 @@ describe('FieldsMetadataClient class', () => { const fields = fieldsDictionaryInstance.toPlain(); - expect(fields.hasOwnProperty('@timestamp')).toBeTruthy(); - expect(fields.hasOwnProperty('onepassword.client.platform_version')).toBeTruthy(); - expect(fields.hasOwnProperty('not-existing-field')).toBeFalsy(); + expect(Object.hasOwn(fields, '@timestamp')).toBeTruthy(); + expect(Object.hasOwn(fields, 'onepassword.client.platform_version')).toBeTruthy(); + expect(Object.hasOwn(fields, 'not-existing-field')).toBeFalsy(); }); }); }); diff --git a/x-pack/plugins/fields_metadata/server/services/fields_metadata/repositories/integration_fields_repository.ts b/x-pack/plugins/fields_metadata/server/services/fields_metadata/repositories/integration_fields_repository.ts index 0f25d9357855e..cf3c2b0454c7d 100644 --- a/x-pack/plugins/fields_metadata/server/services/fields_metadata/repositories/integration_fields_repository.ts +++ b/x-pack/plugins/fields_metadata/server/services/fields_metadata/repositories/integration_fields_repository.ts @@ -82,12 +82,12 @@ export class IntegrationFieldsRepository { } // 2. Dataset is passed but was never fetched before - if (datasetName && !cachedIntegration.hasOwnProperty(datasetName)) { + if (datasetName && !Object.hasOwn(cachedIntegration, datasetName)) { return undefined; } // 3. Dataset is passed and it was previously fetched, should return the field - if (datasetName && cachedIntegration.hasOwnProperty(datasetName)) { + if (datasetName && Object.hasOwn(cachedIntegration, datasetName)) { const targetDataset = cachedIntegration[datasetName]; return targetDataset[fieldName]; } diff --git a/x-pack/plugins/fleet/common/constants/agent_policy.ts b/x-pack/plugins/fleet/common/constants/agent_policy.ts index b6e32f86ac514..b89577ed7c365 100644 --- a/x-pack/plugins/fleet/common/constants/agent_policy.ts +++ b/x-pack/plugins/fleet/common/constants/agent_policy.ts @@ -5,7 +5,9 @@ * 2.0. */ -export const AGENT_POLICY_SAVED_OBJECT_TYPE = 'ingest-agent-policies'; +export const LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE = 'ingest-agent-policies'; +export const AGENT_POLICY_SAVED_OBJECT_TYPE = 'fleet-agent-policies'; + export const AGENT_POLICY_INDEX = '.fleet-policies'; export const agentPolicyStatuses = { Active: 'active', diff --git a/x-pack/plugins/fleet/common/constants/mappings.ts b/x-pack/plugins/fleet/common/constants/mappings.ts index f804dc872e0d1..6499da7f86cc9 100644 --- a/x-pack/plugins/fleet/common/constants/mappings.ts +++ b/x-pack/plugins/fleet/common/constants/mappings.ts @@ -6,7 +6,7 @@ */ /** - * ATTENTION: Mappings for Fleet are defined in the ElasticSearch repo. + * ATTENTION: Mappings for Fleet are defined in the Elasticsearch repo. * * The following mappings declared here closely mirror them * But they are only used to perform validation on the endpoints using ListWithKuery @@ -54,6 +54,7 @@ export const PACKAGE_POLICIES_MAPPINGS = { is_managed: { type: 'boolean' }, policy_id: { type: 'keyword' }, policy_ids: { type: 'keyword' }, + output_id: { type: 'keyword' }, package: { properties: { name: { type: 'keyword' }, diff --git a/x-pack/plugins/fleet/common/constants/output.ts b/x-pack/plugins/fleet/common/constants/output.ts index 8ddb8ed4d2f06..fb01ba991d3d2 100644 --- a/x-pack/plugins/fleet/common/constants/output.ts +++ b/x-pack/plugins/fleet/common/constants/output.ts @@ -29,6 +29,7 @@ export const DEFAULT_OUTPUT: NewOutput = { export const SERVERLESS_DEFAULT_OUTPUT_ID = 'es-default-output'; export const LICENCE_FOR_PER_POLICY_OUTPUT = 'platinum'; +export const LICENCE_FOR_OUTPUT_PER_INTEGRATION = 'enterprise'; /** * Kafka constants diff --git a/x-pack/plugins/fleet/common/constants/package_policy.ts b/x-pack/plugins/fleet/common/constants/package_policy.ts index 1645d1a86efb7..9ff84c65ad22b 100644 --- a/x-pack/plugins/fleet/common/constants/package_policy.ts +++ b/x-pack/plugins/fleet/common/constants/package_policy.ts @@ -5,7 +5,9 @@ * 2.0. */ -export const PACKAGE_POLICY_SAVED_OBJECT_TYPE = 'ingest-package-policies'; +export const LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE = 'ingest-package-policies'; + +export const PACKAGE_POLICY_SAVED_OBJECT_TYPE = 'fleet-package-policies'; export const PACKAGE_POLICY_DEFAULT_INDEX_PRIVILEGES = ['auto_configure', 'create_doc']; @@ -13,3 +15,5 @@ export const inputsFormat = { Simplified: 'simplified', Legacy: 'legacy', } as const; + +export const LICENCE_FOR_MULTIPLE_AGENT_POLICIES = 'enterprise'; diff --git a/x-pack/plugins/fleet/common/constants/routes.ts b/x-pack/plugins/fleet/common/constants/routes.ts index 59ae42239db20..9b5c35c3b3ce2 100644 --- a/x-pack/plugins/fleet/common/constants/routes.ts +++ b/x-pack/plugins/fleet/common/constants/routes.ts @@ -132,6 +132,7 @@ export const APP_API_ROUTES = { HEALTH_CHECK_PATTERN: `${API_ROOT}/health_check`, CHECK_PERMISSIONS_PATTERN: `${API_ROOT}/check-permissions`, GENERATE_SERVICE_TOKEN_PATTERN: `${API_ROOT}/service_tokens`, + AGENT_POLICIES_SPACES: `${INTERNAL_ROOT}/agent_policies_spaces`, // deprecated since 8.0 GENERATE_SERVICE_TOKEN_PATTERN_DEPRECATED: `${API_ROOT}/service-tokens`, }; diff --git a/x-pack/plugins/fleet/common/index.ts b/x-pack/plugins/fleet/common/index.ts index 9b50a140a7e93..5b88793b3e6f2 100644 --- a/x-pack/plugins/fleet/common/index.ts +++ b/x-pack/plugins/fleet/common/index.ts @@ -24,8 +24,9 @@ export { FLEET_ENDPOINT_PACKAGE, // Saved object type AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, PACKAGES_SAVED_OBJECT_TYPE, - PACKAGE_POLICY_SAVED_OBJECT_TYPE, + LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE as PACKAGE_POLICY_SAVED_OBJECT_TYPE, OUTPUT_SAVED_OBJECT_TYPE, PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE, ASSETS_SAVED_OBJECT_TYPE, diff --git a/x-pack/plugins/fleet/common/openapi/bundled.json b/x-pack/plugins/fleet/common/openapi/bundled.json index cf3ee35fca6df..af5420aaad64e 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.json +++ b/x-pack/plugins/fleet/common/openapi/bundled.json @@ -1,6 +1,55 @@ { "openapi": "3.0.0", - "tags": [], + "tags": [ + { + "name": "Data streams" + }, + { + "name": "Elastic Agents" + }, + { + "name": "Elastic Agent actions" + }, + { + "name": "Elastic Agent binary download sources" + }, + { + "name": "Elastic Agent policies" + }, + { + "name": "Elastic Agent status" + }, + { + "name": "Elastic Package Manager (EPM)" + }, + { + "name": "Fleet enrollment API keys" + }, + { + "name": "Fleet internals" + }, + { + "name": "Fleet Server hosts" + }, + { + "name": "Fleet Kubernetes" + }, + { + "name": "Fleet outputs" + }, + { + "name": "Fleet package policies" + }, + { + "name": "Fleet proxies" + }, + { + "name": "Fleet service tokens" + }, + { + "name": "Fleet uninstall tokens" + } + ], "info": { "title": "Fleet", "description": "OpenAPI schema for Fleet API endpoints", @@ -243,7 +292,7 @@ "post": { "summary": "Create service token", "tags": [ - "Service tokens" + "Fleet service tokens" ], "responses": { "200": { @@ -281,7 +330,7 @@ "post": { "summary": "Create service token", "tags": [ - "Service tokens" + "Fleet service tokens" ], "responses": { "200": { @@ -1649,7 +1698,7 @@ "get": { "summary": "Get agent setup info", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -1676,7 +1725,7 @@ "post": { "summary": "Initiate agent setup", "tags": [ - "Agents" + "Elastic Agents" ], "operationId": "setup-agents", "responses": { @@ -1726,7 +1775,7 @@ "get": { "summary": "Get agent status summary", "tags": [ - "Agent status" + "Elastic Agent status" ], "responses": { "200": { @@ -1797,7 +1846,7 @@ "get": { "summary": "Get agent status summary", "tags": [ - "Agent status" + "Elastic Agent status" ], "responses": { "200": { @@ -1888,7 +1937,7 @@ "get": { "summary": "Get incoming agent data", "tags": [ - "Agent status" + "Elastic Agent status" ], "responses": { "200": { @@ -1941,7 +1990,7 @@ "get": { "summary": "List agents", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2002,7 +2051,7 @@ "post": { "summary": "List agents by action ids", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2052,7 +2101,7 @@ "post": { "summary": "Bulk upgrade agents", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2106,7 +2155,7 @@ "get": { "summary": "Get agent action status", "tags": [ - "Agent actions" + "Elastic Agent actions" ], "parameters": [ { @@ -2276,7 +2325,7 @@ "get": { "summary": "Get agent by ID", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2311,7 +2360,7 @@ "put": { "summary": "Update agent by ID", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2367,7 +2416,7 @@ "delete": { "summary": "Delete agent by ID", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2417,7 +2466,7 @@ "post": { "summary": "Create agent action", "tags": [ - "Agent actions" + "Elastic Agent actions" ], "responses": { "200": { @@ -2493,7 +2542,7 @@ "post": { "summary": "Cancel agent action", "tags": [ - "Agent actions" + "Elastic Agent actions" ], "responses": { "200": { @@ -2545,7 +2594,7 @@ "get": { "summary": "Get file uploaded by agent", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2593,7 +2642,7 @@ "delete": { "summary": "Delete file uploaded by agent", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2640,7 +2689,7 @@ "post": { "summary": "Reassign agent", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2685,7 +2734,7 @@ "put": { "summary": "Reassign agent", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2743,7 +2792,7 @@ "post": { "summary": "Unenroll agent", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2820,7 +2869,7 @@ "post": { "summary": "Upgrade agent", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2869,7 +2918,7 @@ "get": { "summary": "List agent uploads", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2906,7 +2955,7 @@ "post": { "summary": "Bulk reassign agents", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -2978,7 +3027,7 @@ "post": { "summary": "Bulk unenroll agents", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -3061,7 +3110,7 @@ "post": { "summary": "Bulk update agent tags", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -3151,7 +3200,7 @@ "get": { "summary": "List agent tags", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -3185,7 +3234,7 @@ "post": { "summary": "Request agent diagnostics", "tags": [ - "Agents" + "Elastic Agents" ], "requestBody": { "content": { @@ -3243,7 +3292,7 @@ "post": { "summary": "Bulk request diagnostics from agents", "tags": [ - "Agents" + "Elastic Agents" ], "responses": { "200": { @@ -3325,7 +3374,7 @@ "get": { "summary": "List agent policies", "tags": [ - "Agent policies" + "Elastic Agent policies" ], "responses": { "200": { @@ -3398,7 +3447,7 @@ "post": { "summary": "Create agent policy", "tags": [ - "Agent policies" + "Elastic Agent policies" ], "responses": { "200": { @@ -3452,7 +3501,7 @@ "get": { "summary": "Get agent policy by ID", "tags": [ - "Agent policies" + "Elastic Agent policies" ], "responses": { "200": { @@ -3484,7 +3533,7 @@ "put": { "summary": "Update agent policy by ID", "tags": [ - "Agent policies" + "Elastic Agent policies" ], "responses": { "200": { @@ -3540,7 +3589,7 @@ "post": { "summary": "Copy agent policy by ID", "tags": [ - "Agent policies" + "Elastic Agent policies" ], "operationId": "agent-policy-copy", "parameters": [ @@ -3598,7 +3647,7 @@ "get": { "summary": "Get full agent policy by ID", "tags": [ - "Agent policies" + "Elastic Agent policies" ], "operationId": "agent-policy-full", "responses": { @@ -3668,7 +3717,7 @@ "get": { "summary": "Download agent policy by ID", "tags": [ - "Agent policies" + "Elastic Agent policies" ], "operationId": "agent-policy-download", "responses": { @@ -3731,7 +3780,7 @@ "post": { "summary": "Bulk get agent policies", "tags": [ - "Agent policies" + "Elastic Agent policies" ], "requestBody": { "content": { @@ -3796,7 +3845,7 @@ "post": { "summary": "Delete agent policy by ID", "tags": [ - "Agent policies" + "Elastic Agent policies" ], "operationId": "delete-agent-policy", "responses": { @@ -3892,7 +3941,7 @@ "get": { "summary": "List enrollment API keys", "tags": [ - "Enrollment API keys" + "Fleet enrollment API keys" ], "responses": { "200": { @@ -3946,7 +3995,7 @@ "post": { "summary": "Create enrollment API key", "tags": [ - "Enrollment API keys" + "Fleet enrollment API keys" ], "responses": { "200": { @@ -3997,7 +4046,7 @@ "get": { "summary": "Get enrollment API key by ID", "tags": [ - "Enrollment API keys" + "Fleet enrollment API keys" ], "responses": { "200": { @@ -4028,7 +4077,7 @@ "delete": { "summary": "Delete enrollment API key by ID", "tags": [ - "Enrollment API keys" + "Fleet enrollment API keys" ], "responses": { "200": { @@ -4069,7 +4118,7 @@ "get": { "summary": "List enrollment API keys", "tags": [ - "Enrollment API keys" + "Fleet enrollment API keys" ], "responses": { "200": { @@ -4122,7 +4171,7 @@ "post": { "summary": "Create enrollment API key", "tags": [ - "Enrollment API keys" + "Fleet enrollment API keys" ], "responses": { "200": { @@ -4172,7 +4221,7 @@ "get": { "summary": "Get enrollment API key by ID", "tags": [ - "Enrollment API keys" + "Fleet enrollment API keys" ], "responses": { "200": { @@ -4202,7 +4251,7 @@ "delete": { "summary": "Delete enrollment API key by ID", "tags": [ - "Enrollment API keys" + "Fleet enrollment API keys" ], "responses": { "200": { @@ -4242,7 +4291,7 @@ "get": { "summary": "List package policies", "tags": [ - "Package policies" + "Fleet package policies" ], "responses": { "200": { @@ -4300,7 +4349,7 @@ "post": { "summary": "Create package policy", "tags": [ - "Package policies" + "Fleet package policies" ], "operationId": "create-package-policy", "responses": { @@ -4353,7 +4402,7 @@ "post": { "summary": "Bulk get package policies", "tags": [ - "Package policies" + "Fleet package policies" ], "requestBody": { "content": { @@ -4418,7 +4467,7 @@ "post": { "summary": "Delete package policy", "tags": [ - "Package policies" + "Fleet package policies" ], "operationId": "post-delete-package-policy", "requestBody": { @@ -4488,7 +4537,7 @@ "post": { "summary": "Upgrade package policy to a newer package version", "tags": [ - "Package policies" + "Fleet package policies" ], "operationId": "upgrade-package-policy", "requestBody": { @@ -4553,7 +4602,7 @@ "post": { "summary": "Dry run package policy upgrade", "tags": [ - "Package policies" + "Fleet package policies" ], "operationId": "upgrade-package-policy-dry-run", "requestBody": { @@ -4627,7 +4676,7 @@ "get": { "summary": "Get package policy by ID", "tags": [ - "Package policies" + "Fleet package policies" ], "responses": { "200": { @@ -4662,7 +4711,7 @@ "put": { "summary": "Update package policy by ID", "tags": [ - "Package policies" + "Fleet package policies" ], "operationId": "update-package-policy", "requestBody": { @@ -4713,7 +4762,7 @@ "delete": { "summary": "Delete package policy by ID", "tags": [ - "Package policies" + "Fleet package policies" ], "operationId": "delete-package-policy", "responses": { @@ -4754,7 +4803,7 @@ "get": { "summary": "List outputs", "tags": [ - "Outputs" + "Fleet outputs" ], "responses": { "200": { @@ -4793,7 +4842,7 @@ "post": { "summary": "Create output", "tags": [ - "Outputs" + "Fleet outputs" ], "responses": { "200": { @@ -4832,7 +4881,7 @@ "get": { "summary": "Get output by ID", "tags": [ - "Outputs" + "Fleet outputs" ], "responses": { "200": { @@ -4869,7 +4918,7 @@ "delete": { "summary": "Delete output by ID", "tags": [ - "Outputs" + "Fleet outputs" ], "operationId": "delete-output", "responses": { @@ -4904,7 +4953,7 @@ "put": { "summary": "Update output by ID", "tags": [ - "Outputs" + "Fleet outputs" ], "operationId": "update-output", "requestBody": { @@ -4947,7 +4996,7 @@ "get": { "summary": "Get latest output health", "tags": [ - "Outputs" + "Fleet outputs" ], "responses": { "200": { @@ -4995,7 +5044,7 @@ "post": { "summary": "Generate Logstash API key", "tags": [ - "Outputs" + "Fleet outputs" ], "responses": { "200": { @@ -5029,7 +5078,7 @@ "get": { "summary": "List agent binary download sources", "tags": [ - "Agent binary download sources" + "Elastic Agent binary download sources" ], "responses": { "200": { @@ -5068,7 +5117,7 @@ "post": { "summary": "Create agent binary download source", "tags": [ - "Agent binary download sources" + "Elastic Agent binary download sources" ], "responses": { "200": { @@ -5125,7 +5174,7 @@ "get": { "summary": "Get agent binary download source by ID", "tags": [ - "Agent binary download sources" + "Elastic Agent binary download sources" ], "responses": { "200": { @@ -5165,7 +5214,7 @@ "delete": { "summary": "Delete agent binary download source by ID", "tags": [ - "Agent binary download sources" + "Elastic Agent binary download sources" ], "operationId": "delete-download-source", "responses": { @@ -5200,7 +5249,7 @@ "put": { "summary": "Update agent binary download source by ID", "tags": [ - "Agent binary download sources" + "Elastic Agent binary download sources" ], "operationId": "update-download-source", "requestBody": { @@ -5510,7 +5559,7 @@ "get": { "summary": "List proxies", "tags": [ - "Proxies" + "Fleet proxies" ], "responses": { "200": { @@ -5549,7 +5598,7 @@ "post": { "summary": "Create proxy", "tags": [ - "Proxies" + "Fleet proxies" ], "responses": { "200": { @@ -5614,7 +5663,7 @@ "get": { "summary": "Get proxy by ID", "tags": [ - "Proxies" + "Fleet proxies" ], "responses": { "200": { @@ -5654,7 +5703,7 @@ "delete": { "summary": "Delete proxy by ID", "tags": [ - "Proxies" + "Fleet proxies" ], "operationId": "delete-fleet-proxies", "responses": { @@ -5689,7 +5738,7 @@ "put": { "summary": "Update proxy by ID", "tags": [ - "Proxies" + "Fleet proxies" ], "operationId": "update-fleet-proxies", "requestBody": { @@ -5755,7 +5804,7 @@ "get": { "summary": "Get full K8s agent manifest", "tags": [ - "Kubernetes" + "Fleet Kubernetes" ], "responses": { "200": { @@ -5810,7 +5859,7 @@ "get": { "summary": "List metadata for latest uninstall tokens per agent policy", "tags": [ - "Uninstall tokens" + "Fleet uninstall tokens" ], "responses": { "200": { @@ -5898,7 +5947,7 @@ "get": { "summary": "Get one decrypted uninstall token by its ID", "tags": [ - "Uninstall tokens" + "Fleet uninstall tokens" ], "responses": { "200": { @@ -7054,7 +7103,7 @@ }, "agent_status": { "type": "string", - "title": "Agent status", + "title": "Elastic Agent status", "enum": [ "offline", "error", @@ -7484,8 +7533,7 @@ "type": "string" }, "output_id": { - "type": "string", - "deprecated": true + "type": "string" }, "inputs": { "type": "array", diff --git a/x-pack/plugins/fleet/common/openapi/bundled.yaml b/x-pack/plugins/fleet/common/openapi/bundled.yaml index ad592b9ea1847..9bb1027ef35c3 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.yaml +++ b/x-pack/plugins/fleet/common/openapi/bundled.yaml @@ -1,5 +1,21 @@ openapi: 3.0.0 -tags: [] +tags: + - name: Data streams + - name: Elastic Agents + - name: Elastic Agent actions + - name: Elastic Agent binary download sources + - name: Elastic Agent policies + - name: Elastic Agent status + - name: Elastic Package Manager (EPM) + - name: Fleet enrollment API keys + - name: Fleet internals + - name: Fleet Server hosts + - name: Fleet Kubernetes + - name: Fleet outputs + - name: Fleet package policies + - name: Fleet proxies + - name: Fleet service tokens + - name: Fleet uninstall tokens info: title: Fleet description: OpenAPI schema for Fleet API endpoints @@ -155,7 +171,7 @@ paths: post: summary: Create service token tags: - - Service tokens + - Fleet service tokens responses: '200': description: OK @@ -178,7 +194,7 @@ paths: post: summary: Create service token tags: - - Service tokens + - Fleet service tokens responses: '200': description: OK @@ -1044,7 +1060,7 @@ paths: get: summary: Get agent setup info tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1060,7 +1076,7 @@ paths: post: summary: Initiate agent setup tags: - - Agents + - Elastic Agents operationId: setup-agents responses: '200': @@ -1090,7 +1106,7 @@ paths: get: summary: Get agent status summary tags: - - Agent status + - Elastic Agent status responses: '200': description: OK @@ -1138,7 +1154,7 @@ paths: get: summary: Get agent status summary tags: - - Agent status + - Elastic Agent status responses: '200': description: OK @@ -1200,7 +1216,7 @@ paths: get: summary: Get incoming agent data tags: - - Agent status + - Elastic Agent status responses: '200': description: OK @@ -1233,7 +1249,7 @@ paths: get: summary: List agents tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1263,7 +1279,7 @@ paths: post: summary: List agents by action ids tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1293,7 +1309,7 @@ paths: post: summary: Bulk upgrade agents tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1327,7 +1343,7 @@ paths: get: summary: Get agent action status tags: - - Agent actions + - Elastic Agent actions parameters: - $ref: '#/components/parameters/page_size' - $ref: '#/components/parameters/page_index' @@ -1448,7 +1464,7 @@ paths: get: summary: Get agent by ID tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1469,7 +1485,7 @@ paths: put: summary: Update agent by ID tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1503,7 +1519,7 @@ paths: delete: summary: Delete agent by ID tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1533,7 +1549,7 @@ paths: post: summary: Create agent action tags: - - Agent actions + - Elastic Agent actions responses: '200': description: OK @@ -1579,7 +1595,7 @@ paths: post: summary: Cancel agent action tags: - - Agent actions + - Elastic Agent actions responses: '200': description: OK @@ -1610,7 +1626,7 @@ paths: get: summary: Get file uploaded by agent tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1640,7 +1656,7 @@ paths: delete: summary: Delete file uploaded by agent tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1669,7 +1685,7 @@ paths: post: summary: Reassign agent tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1696,7 +1712,7 @@ paths: put: summary: Reassign agent tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1731,7 +1747,7 @@ paths: post: summary: Unenroll agent tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1777,7 +1793,7 @@ paths: post: summary: Upgrade agent tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1806,7 +1822,7 @@ paths: get: summary: List agent uploads tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1829,7 +1845,7 @@ paths: post: summary: Bulk reassign agents tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1872,7 +1888,7 @@ paths: post: summary: Bulk unenroll agents tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1925,7 +1941,7 @@ paths: post: summary: Bulk update agent tags tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -1979,7 +1995,7 @@ paths: get: summary: List agent tags tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -2000,7 +2016,7 @@ paths: post: summary: Request agent diagnostics tags: - - Agents + - Elastic Agents requestBody: content: application/json: @@ -2033,7 +2049,7 @@ paths: post: summary: Bulk request diagnostics from agents tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -2080,7 +2096,7 @@ paths: get: summary: List agent policies tags: - - Agent policies + - Elastic Agent policies responses: '200': description: OK @@ -2131,7 +2147,7 @@ paths: post: summary: Create agent policy tags: - - Agent policies + - Elastic Agent policies responses: '200': description: OK @@ -2163,7 +2179,7 @@ paths: get: summary: Get agent policy by ID tags: - - Agent policies + - Elastic Agent policies responses: '200': description: OK @@ -2184,7 +2200,7 @@ paths: put: summary: Update agent policy by ID tags: - - Agent policies + - Elastic Agent policies responses: '200': description: OK @@ -2217,7 +2233,7 @@ paths: post: summary: Copy agent policy by ID tags: - - Agent policies + - Elastic Agent policies operationId: agent-policy-copy parameters: - $ref: '#/components/parameters/kbn_xsrf' @@ -2252,7 +2268,7 @@ paths: get: summary: Get full agent policy by ID tags: - - Agent policies + - Elastic Agent policies operationId: agent-policy-full responses: '200': @@ -2293,7 +2309,7 @@ paths: get: summary: Download agent policy by ID tags: - - Agent policies + - Elastic Agent policies operationId: agent-policy-download responses: '200': @@ -2332,7 +2348,7 @@ paths: post: summary: Bulk get agent policies tags: - - Agent policies + - Elastic Agent policies requestBody: content: application/json: @@ -2374,7 +2390,7 @@ paths: post: summary: Delete agent policy by ID tags: - - Agent policies + - Elastic Agent policies operationId: delete-agent-policy responses: '200': @@ -2436,7 +2452,7 @@ paths: get: summary: List enrollment API keys tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK @@ -2473,7 +2489,7 @@ paths: post: summary: Create enrollment API key tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK @@ -2504,7 +2520,7 @@ paths: get: summary: Get enrollment API key by ID tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK @@ -2524,7 +2540,7 @@ paths: delete: summary: Delete enrollment API key by ID tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK @@ -2549,7 +2565,7 @@ paths: get: summary: List enrollment API keys tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK @@ -2585,7 +2601,7 @@ paths: post: summary: Create enrollment API key tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK @@ -2615,7 +2631,7 @@ paths: get: summary: Get enrollment API key by ID tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK @@ -2634,7 +2650,7 @@ paths: delete: summary: Delete enrollment API key by ID tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK @@ -2658,7 +2674,7 @@ paths: get: summary: List package policies tags: - - Package policies + - Fleet package policies responses: '200': description: OK @@ -2692,7 +2708,7 @@ paths: post: summary: Create package policy tags: - - Package policies + - Fleet package policies operationId: create-package-policy responses: '200': @@ -2725,7 +2741,7 @@ paths: post: summary: Bulk get package policies tags: - - Package policies + - Fleet package policies requestBody: content: application/json: @@ -2765,7 +2781,7 @@ paths: post: summary: Delete package policy tags: - - Package policies + - Fleet package policies operationId: post-delete-package-policy requestBody: content: @@ -2808,7 +2824,7 @@ paths: post: summary: Upgrade package policy to a newer package version tags: - - Package policies + - Fleet package policies operationId: upgrade-package-policy requestBody: content: @@ -2849,7 +2865,7 @@ paths: post: summary: Dry run package policy upgrade tags: - - Package policies + - Fleet package policies operationId: upgrade-package-policy-dry-run requestBody: content: @@ -2895,7 +2911,7 @@ paths: get: summary: Get package policy by ID tags: - - Package policies + - Fleet package policies responses: '200': description: OK @@ -2916,7 +2932,7 @@ paths: put: summary: Update package policy by ID tags: - - Package policies + - Fleet package policies operationId: update-package-policy requestBody: content: @@ -2946,7 +2962,7 @@ paths: delete: summary: Delete package policy by ID tags: - - Package policies + - Fleet package policies operationId: delete-package-policy responses: '200': @@ -2971,7 +2987,7 @@ paths: get: summary: List outputs tags: - - Outputs + - Fleet outputs responses: '200': description: OK @@ -2996,7 +3012,7 @@ paths: post: summary: Create output tags: - - Outputs + - Fleet outputs responses: '200': description: OK @@ -3020,7 +3036,7 @@ paths: get: summary: Get output by ID tags: - - Outputs + - Fleet outputs responses: '200': description: OK @@ -3043,7 +3059,7 @@ paths: delete: summary: Delete output by ID tags: - - Outputs + - Fleet outputs operationId: delete-output responses: '200': @@ -3064,7 +3080,7 @@ paths: put: summary: Update output by ID tags: - - Outputs + - Fleet outputs operationId: update-output requestBody: content: @@ -3089,7 +3105,7 @@ paths: get: summary: Get latest output health tags: - - Outputs + - Fleet outputs responses: '200': description: OK @@ -3120,7 +3136,7 @@ paths: post: summary: Generate Logstash API key tags: - - Outputs + - Fleet outputs responses: '200': description: OK @@ -3140,7 +3156,7 @@ paths: get: summary: List agent binary download sources tags: - - Agent binary download sources + - Elastic Agent binary download sources responses: '200': description: OK @@ -3165,7 +3181,7 @@ paths: post: summary: Create agent binary download source tags: - - Agent binary download sources + - Elastic Agent binary download sources responses: '200': description: OK @@ -3201,7 +3217,7 @@ paths: get: summary: Get agent binary download source by ID tags: - - Agent binary download sources + - Elastic Agent binary download sources responses: '200': description: OK @@ -3226,7 +3242,7 @@ paths: delete: summary: Delete agent binary download source by ID tags: - - Agent binary download sources + - Elastic Agent binary download sources operationId: delete-download-source responses: '200': @@ -3247,7 +3263,7 @@ paths: put: summary: Update agent binary download source by ID tags: - - Agent binary download sources + - Elastic Agent binary download sources operationId: update-download-source requestBody: content: @@ -3444,7 +3460,7 @@ paths: get: summary: List proxies tags: - - Proxies + - Fleet proxies responses: '200': description: OK @@ -3469,7 +3485,7 @@ paths: post: summary: Create proxy tags: - - Proxies + - Fleet proxies responses: '200': description: OK @@ -3510,7 +3526,7 @@ paths: get: summary: Get proxy by ID tags: - - Proxies + - Fleet proxies responses: '200': description: OK @@ -3535,7 +3551,7 @@ paths: delete: summary: Delete proxy by ID tags: - - Proxies + - Fleet proxies operationId: delete-fleet-proxies responses: '200': @@ -3556,7 +3572,7 @@ paths: put: summary: Update proxy by ID tags: - - Proxies + - Fleet proxies operationId: update-fleet-proxies requestBody: content: @@ -3596,7 +3612,7 @@ paths: get: summary: Get full K8s agent manifest tags: - - Kubernetes + - Fleet Kubernetes responses: '200': description: OK @@ -3630,7 +3646,7 @@ paths: get: summary: List metadata for latest uninstall tokens per agent policy tags: - - Uninstall tokens + - Fleet uninstall tokens responses: '200': description: OK @@ -3688,7 +3704,7 @@ paths: get: summary: Get one decrypted uninstall token by its ID tags: - - Uninstall tokens + - Fleet uninstall tokens responses: '200': description: OK @@ -4504,7 +4520,7 @@ components: type: object agent_status: type: string - title: Agent status + title: Elastic Agent status enum: - offline - error @@ -4804,7 +4820,6 @@ components: type: string output_id: type: string - deprecated: true inputs: type: array items: diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/agent_status.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_status.yaml index da6df3a1b776d..14eacb2162b04 100644 --- a/x-pack/plugins/fleet/common/openapi/components/schemas/agent_status.yaml +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_status.yaml @@ -1,5 +1,5 @@ type: string -title: Agent status +title: Elastic Agent status enum: - offline - error diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/new_package_policy.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/new_package_policy.yaml index 29a09174385ec..956f51a8016f5 100644 --- a/x-pack/plugins/fleet/common/openapi/components/schemas/new_package_policy.yaml +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/new_package_policy.yaml @@ -22,7 +22,6 @@ properties: type: string output_id: type: string - deprecated: true inputs: type: array items: diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/update_package_policy.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/update_package_policy.yaml index 795d92ff1d4a7..f06a2c9ea49f3 100644 --- a/x-pack/plugins/fleet/common/openapi/components/schemas/update_package_policy.yaml +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/update_package_policy.yaml @@ -23,8 +23,6 @@ properties: type: string output_id: type: string - description: Not supported output can be set at the agent policy level only - deprecated: true inputs: type: array items: diff --git a/x-pack/plugins/fleet/common/openapi/entrypoint.yaml b/x-pack/plugins/fleet/common/openapi/entrypoint.yaml index 04203cc5d2e6b..2de74e31a9a35 100644 --- a/x-pack/plugins/fleet/common/openapi/entrypoint.yaml +++ b/x-pack/plugins/fleet/common/openapi/entrypoint.yaml @@ -1,5 +1,21 @@ openapi: 3.0.0 -tags: [] +tags: + - name: Data streams + - name: Elastic Agents + - name: Elastic Agent actions + - name: Elastic Agent binary download sources + - name: Elastic Agent policies + - name: Elastic Agent status + - name: Elastic Package Manager (EPM) + - name: Fleet enrollment API keys + - name: Fleet internals + - name: Fleet Server hosts + - name: Fleet Kubernetes + - name: Fleet outputs + - name: Fleet package policies + - name: Fleet proxies + - name: Fleet service tokens + - name: Fleet uninstall tokens info: title: Fleet description: OpenAPI schema for Fleet API endpoints @@ -183,7 +199,6 @@ paths: $ref: paths/uninstall_tokens.yaml /uninstall_tokens/{uninstallTokenId}: $ref: paths/uninstall_tokens@{uninstall_token_id}.yaml - components: securitySchemes: basicAuth: diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_download_sources.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_download_sources.yaml index 89a69c9adfdaf..8b6857727a0d7 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_download_sources.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_download_sources.yaml @@ -1,7 +1,7 @@ get: summary: List agent binary download sources tags: - - Agent binary download sources + - Elastic Agent binary download sources responses: '200': description: OK @@ -26,7 +26,7 @@ get: post: summary: Create agent binary download source tags: - - Agent binary download sources + - Elastic Agent binary download sources responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_download_sources@{source_id}.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_download_sources@{source_id}.yaml index afb7771283e59..1c10656883686 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_download_sources@{source_id}.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_download_sources@{source_id}.yaml @@ -1,7 +1,7 @@ get: summary: Get agent binary download source by ID tags: - - Agent binary download sources + - Elastic Agent binary download sources responses: '200': description: OK @@ -26,7 +26,7 @@ parameters: delete: summary: Delete agent binary download source by ID tags: - - Agent binary download sources + - Elastic Agent binary download sources operationId: delete-download-source responses: '200': @@ -47,7 +47,7 @@ delete: put: summary: Update agent binary download source by ID tags: - - Agent binary download sources + - Elastic Agent binary download sources operationId: update-download-source requestBody: content: diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_policies.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_policies.yaml index cbf29f3859519..542ded8b91c18 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_policies.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_policies.yaml @@ -1,7 +1,7 @@ get: summary: List agent policies tags: - - Agent policies + - Elastic Agent policies responses: '200': description: OK @@ -47,7 +47,7 @@ get: post: summary: Create agent policy tags: - - Agent policies + - Elastic Agent policies responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_policies@_bulk_get.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_policies@_bulk_get.yaml index ace09ef721677..b0846dc695ad7 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_policies@_bulk_get.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_policies@_bulk_get.yaml @@ -1,7 +1,7 @@ post: summary: Bulk get agent policies tags: - - Agent policies + - Elastic Agent policies requestBody: content: application/json: diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_policies@delete.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_policies@delete.yaml index 284eaad198c0f..6a4ae2488c3e4 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_policies@delete.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_policies@delete.yaml @@ -1,7 +1,7 @@ post: summary: Delete agent policy by ID tags: - - Agent policies + - Elastic Agent policies operationId: delete-agent-policy responses: '200': diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}.yaml index 55d644ab0aab2..e6e73779691ed 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}.yaml @@ -7,7 +7,7 @@ parameters: get: summary: Get agent policy by ID tags: - - Agent policies + - Elastic Agent policies responses: '200': description: OK @@ -28,7 +28,7 @@ get: put: summary: Update agent policy by ID tags: - - Agent policies + - Elastic Agent policies responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}@copy.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}@copy.yaml index dab79eef58dff..63df499c4bf2a 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}@copy.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}@copy.yaml @@ -7,7 +7,7 @@ parameters: post: summary: Copy agent policy by ID tags: - - Agent policies + - Elastic Agent policies operationId: agent-policy-copy parameters: - $ref: ../components/headers/kbn_xsrf.yaml diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}@download.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}@download.yaml index 1748950fdaf09..69cc96d572be9 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}@download.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}@download.yaml @@ -1,7 +1,7 @@ get: summary: Download agent policy by ID tags: - - Agent policies + - Elastic Agent policies operationId: agent-policy-download responses: '200': diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}@full.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}@full.yaml index dc5a1b996b2e4..ea3f6ac5923a6 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}@full.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_policies@{agent_policy_id}@full.yaml @@ -1,7 +1,7 @@ get: summary: Get full agent policy by ID tags: - - Agent policies + - Elastic Agent policies operationId: agent-policy-full responses: '200': diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_status.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_status.yaml index d382989e15289..eecff760d035a 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_status.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_status.yaml @@ -1,7 +1,7 @@ get: summary: Get agent status summary tags: - - Agent status + - Elastic Agent status responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_status@data.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_status@data.yaml index 7e90097c3b4dd..ebf255fa22394 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_status@data.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_status@data.yaml @@ -1,7 +1,7 @@ get: summary: Get incoming agent data tags: - - Agent status + - Elastic Agent status responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_status_deprecated.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_status_deprecated.yaml index fe44311fa9801..8ebc02a06d3d5 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_status_deprecated.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_status_deprecated.yaml @@ -1,7 +1,7 @@ get: summary: Get agent status summary tags: - - Agent status + - Elastic Agent status responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agent_tags.yaml b/x-pack/plugins/fleet/common/openapi/paths/agent_tags.yaml index 85a6f6c7ab30a..5961e0a3e0974 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agent_tags.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agent_tags.yaml @@ -1,7 +1,7 @@ get: summary: List agent tags tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents.yaml index 0bad4c2de354f..224c15b2ec5d0 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents.yaml @@ -1,7 +1,7 @@ get: summary: List agents tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -31,7 +31,7 @@ get: post: summary: List agents by action ids tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@action_status.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@action_status.yaml index c0e81da8331d5..c55d924564cf3 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@action_status.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@action_status.yaml @@ -1,7 +1,7 @@ get: summary: Get agent action status tags: - - Agent actions + - Elastic Agent actions parameters: - $ref: ../components/parameters/page_size.yaml - $ref: ../components/parameters/page_index.yaml diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_reassign.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_reassign.yaml index b93b2bd6b9a08..7876e51ea341c 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_reassign.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_reassign.yaml @@ -1,7 +1,7 @@ post: summary: Bulk reassign agents tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_request_diagnostics.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_request_diagnostics.yaml index 2ef2d1c1ff5d5..8d8e03539650d 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_request_diagnostics.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_request_diagnostics.yaml @@ -1,7 +1,7 @@ post: summary: Bulk request diagnostics from agents tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_unenroll.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_unenroll.yaml index a765e4868442b..b0e40b1f70408 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_unenroll.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_unenroll.yaml @@ -1,7 +1,7 @@ post: summary: Bulk unenroll agents tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_update_tags.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_update_tags.yaml index ff4c6597b6be0..075068d1faa41 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_update_tags.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_update_tags.yaml @@ -1,7 +1,7 @@ post: summary: Bulk update agent tags tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_upgrade.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_upgrade.yaml index ccb55c7c62b17..5bb61e7f841b9 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_upgrade.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@bulk_upgrade.yaml @@ -1,7 +1,7 @@ post: summary: Bulk upgrade agents tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@current_upgrades.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@current_upgrades.yaml index 36ae723527f9b..bae7b2ababf08 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@current_upgrades.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@current_upgrades.yaml @@ -1,7 +1,7 @@ get: summary: List current bulk upgrade operations tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@files@{file_id}.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@files@{file_id}.yaml index 4507cb8ce456d..85448279111aa 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@files@{file_id}.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@files@{file_id}.yaml @@ -7,7 +7,7 @@ parameters: delete: summary: Delete file uploaded by agent tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@files@{file_id}@{file_name}.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@files@{file_id}@{file_name}.yaml index 15f6dd8a421d1..057fae5672007 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@files@{file_id}@{file_name}.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@files@{file_id}@{file_name}.yaml @@ -12,7 +12,7 @@ parameters: get: summary: Get file uploaded by agent tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@setup.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@setup.yaml index 214f3a8e68240..1a623eb9cf3c3 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@setup.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@setup.yaml @@ -1,7 +1,7 @@ get: summary: Get agent setup info tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -17,7 +17,7 @@ get: post: summary: Initiate agent setup tags: - - Agents + - Elastic Agents operationId: setup-agents responses: '200': diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}.yaml index 93242e5912a17..108ea113c8e5e 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}.yaml @@ -7,7 +7,7 @@ parameters: get: summary: Get agent by ID tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -28,7 +28,7 @@ get: put: summary: Update agent by ID tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -62,7 +62,7 @@ put: delete: summary: Delete agent by ID tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@actions.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@actions.yaml index cd327e453b9a7..4443bb4573985 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@actions.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@actions.yaml @@ -7,7 +7,7 @@ parameters: post: summary: Create agent action tags: - - Agent actions + - Elastic Agent actions responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@actions@{action_id}@cancel.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@actions@{action_id}@cancel.yaml index f91acd133355d..5b939e8c5fdf4 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@actions@{action_id}@cancel.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@actions@{action_id}@cancel.yaml @@ -12,7 +12,7 @@ parameters: post: summary: Cancel agent action tags: - - Agent actions + - Elastic Agent actions responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@reassign.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@reassign.yaml index c210cee12d424..3f6ce412fc51e 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@reassign.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@reassign.yaml @@ -7,7 +7,7 @@ parameters: post: summary: Reassign agent tags: - - Agents + - Elastic Agents responses: '200': description: OK @@ -34,7 +34,7 @@ post: put: summary: Reassign agent tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@request_diagnostics.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@request_diagnostics.yaml index eba9a695d1cbc..4ecfe08e5b783 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@request_diagnostics.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@request_diagnostics.yaml @@ -7,7 +7,7 @@ parameters: post: summary: Request agent diagnostics tags: - - Agents + - Elastic Agents requestBody: content: application/json: diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@unenroll.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@unenroll.yaml index c30bebfad328a..8a44b0219ed8a 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@unenroll.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@unenroll.yaml @@ -7,7 +7,7 @@ parameters: post: summary: Unenroll agent tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@upgrade.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@upgrade.yaml index d824d4a54f985..eb23e39018f2e 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@upgrade.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@upgrade.yaml @@ -7,7 +7,7 @@ parameters: post: summary: Upgrade agent tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@uploads.yaml b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@uploads.yaml index f92acc7fe5086..1e751bc338c52 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@uploads.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/agents@{agent_id}@uploads.yaml @@ -7,7 +7,7 @@ parameters: get: summary: List agent uploads tags: - - Agents + - Elastic Agents responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys.yaml b/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys.yaml index 3351b63026e57..625ad82e3f3f2 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys.yaml @@ -1,7 +1,7 @@ get: summary: List enrollment API keys tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK @@ -37,7 +37,7 @@ get: post: summary: Create enrollment API key tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys@{key_id}.yaml b/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys@{key_id}.yaml index d64b1053f0dc4..f3bdc459d6ccf 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys@{key_id}.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys@{key_id}.yaml @@ -7,7 +7,7 @@ parameters: get: summary: Get enrollment API key by ID tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK @@ -26,7 +26,7 @@ get: delete: summary: Delete enrollment API key by ID tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys@{key_id}_deprecated.yaml b/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys@{key_id}_deprecated.yaml index c0f5be7521e8a..ff3a6e8962557 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys@{key_id}_deprecated.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys@{key_id}_deprecated.yaml @@ -7,7 +7,7 @@ parameters: get: summary: Get enrollment API key by ID tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK @@ -27,7 +27,7 @@ get: delete: summary: Delete enrollment API key by ID tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys_deprecated.yaml b/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys_deprecated.yaml index 19022a0b08223..9ac906cb1dc0f 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys_deprecated.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/enrollment_api_keys_deprecated.yaml @@ -1,7 +1,7 @@ get: summary: List enrollment API keys tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK @@ -38,7 +38,7 @@ get: post: summary: Create enrollment API key tags: - - Enrollment API keys + - Fleet enrollment API keys responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/kubernetes.yaml b/x-pack/plugins/fleet/common/openapi/paths/kubernetes.yaml index 41110808cd62d..ccd20bbb8dd7b 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/kubernetes.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/kubernetes.yaml @@ -1,7 +1,7 @@ get: summary: Get full K8s agent manifest tags: - - Kubernetes + - Fleet Kubernetes responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/logstash_api_keys.yaml b/x-pack/plugins/fleet/common/openapi/paths/logstash_api_keys.yaml index 74e3bdde4cac8..3fcec0937916f 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/logstash_api_keys.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/logstash_api_keys.yaml @@ -1,7 +1,7 @@ post: summary: Generate Logstash API key tags: - - Outputs + - Fleet outputs responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/output_health@{output_id}.yaml b/x-pack/plugins/fleet/common/openapi/paths/output_health@{output_id}.yaml index b53936b8859ea..9b7dbb1888963 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/output_health@{output_id}.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/output_health@{output_id}.yaml @@ -1,7 +1,7 @@ get: summary: Get latest output health tags: - - Outputs + - Fleet outputs responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/outputs.yaml b/x-pack/plugins/fleet/common/openapi/paths/outputs.yaml index 85ce75e2762d2..39d527d6e1bb4 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/outputs.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/outputs.yaml @@ -1,7 +1,7 @@ get: summary: List outputs tags: - - Outputs + - Fleet outputs responses: '200': description: OK @@ -26,7 +26,7 @@ get: post: summary: Create output tags: - - Outputs + - Fleet outputs responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/outputs@{output_id}.yaml b/x-pack/plugins/fleet/common/openapi/paths/outputs@{output_id}.yaml index ec2ce9dc0be71..c10d93a8483dd 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/outputs@{output_id}.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/outputs@{output_id}.yaml @@ -1,7 +1,7 @@ get: summary: Get output by ID tags: - - Outputs + - Fleet outputs responses: '200': description: OK @@ -24,7 +24,7 @@ parameters: delete: summary: Delete output by ID tags: - - Outputs + - Fleet outputs operationId: delete-output responses: '200': @@ -45,7 +45,7 @@ delete: put: summary: Update output by ID tags: - - Outputs + - Fleet outputs operationId: update-output requestBody: content: diff --git a/x-pack/plugins/fleet/common/openapi/paths/package_policies.yaml b/x-pack/plugins/fleet/common/openapi/paths/package_policies.yaml index 8cfef762478e9..e7f54ab25c193 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/package_policies.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/package_policies.yaml @@ -1,7 +1,7 @@ get: summary: List package policies tags: - - Package policies + - Fleet package policies responses: '200': description: OK @@ -35,7 +35,7 @@ parameters: [] post: summary: Create package policy tags: - - Package policies + - Fleet package policies operationId: create-package-policy responses: '200': diff --git a/x-pack/plugins/fleet/common/openapi/paths/package_policies@_bulk_get.yaml b/x-pack/plugins/fleet/common/openapi/paths/package_policies@_bulk_get.yaml index 704cd041e40a6..7ce575c740fc2 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/package_policies@_bulk_get.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/package_policies@_bulk_get.yaml @@ -1,7 +1,7 @@ post: summary: Bulk get package policies tags: - - Package policies + - Fleet package policies requestBody: content: application/json: diff --git a/x-pack/plugins/fleet/common/openapi/paths/package_policies@delete.yaml b/x-pack/plugins/fleet/common/openapi/paths/package_policies@delete.yaml index f21111c23757a..789e8fb94b15b 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/package_policies@delete.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/package_policies@delete.yaml @@ -1,7 +1,7 @@ post: summary: Delete package policy tags: - - Package policies + - Fleet package policies operationId: post-delete-package-policy requestBody: content: diff --git a/x-pack/plugins/fleet/common/openapi/paths/package_policies@upgrade.yaml b/x-pack/plugins/fleet/common/openapi/paths/package_policies@upgrade.yaml index 1837675a15f22..b9efafda38dce 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/package_policies@upgrade.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/package_policies@upgrade.yaml @@ -1,7 +1,7 @@ post: summary: Upgrade package policy to a newer package version tags: - - Package policies + - Fleet package policies operationId: upgrade-package-policy requestBody: content: diff --git a/x-pack/plugins/fleet/common/openapi/paths/package_policies@upgrade_dryrun.yaml b/x-pack/plugins/fleet/common/openapi/paths/package_policies@upgrade_dryrun.yaml index 5019aba15898d..a6899cc927900 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/package_policies@upgrade_dryrun.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/package_policies@upgrade_dryrun.yaml @@ -1,7 +1,7 @@ post: summary: Dry run package policy upgrade tags: - - Package policies + - Fleet package policies operationId: upgrade-package-policy-dry-run requestBody: content: diff --git a/x-pack/plugins/fleet/common/openapi/paths/package_policies@{package_policy_id}.yaml b/x-pack/plugins/fleet/common/openapi/paths/package_policies@{package_policy_id}.yaml index 92f63dc1f6267..a0dc916bebde9 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/package_policies@{package_policy_id}.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/package_policies@{package_policy_id}.yaml @@ -7,7 +7,7 @@ parameters: get: summary: Get package policy by ID tags: - - Package policies + - Fleet package policies responses: '200': description: OK @@ -28,7 +28,7 @@ get: put: summary: Update package policy by ID tags: - - Package policies + - Fleet package policies operationId: update-package-policy requestBody: content: @@ -58,7 +58,7 @@ put: delete: summary: Delete package policy by ID tags: - - Package policies + - Fleet package policies operationId: delete-package-policy responses: '200': diff --git a/x-pack/plugins/fleet/common/openapi/paths/proxies.yaml b/x-pack/plugins/fleet/common/openapi/paths/proxies.yaml index 6c2844a9ac3ef..e787fba82d782 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/proxies.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/proxies.yaml @@ -1,7 +1,7 @@ get: summary: List proxies tags: - - Proxies + - Fleet proxies responses: '200': description: OK @@ -26,7 +26,7 @@ get: post: summary: Create proxy tags: - - Proxies + - Fleet proxies responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/proxies@{item_id}.yaml b/x-pack/plugins/fleet/common/openapi/paths/proxies@{item_id}.yaml index 3a0a10cb35662..037adb73bbbf3 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/proxies@{item_id}.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/proxies@{item_id}.yaml @@ -1,7 +1,7 @@ get: summary: Get proxy by ID tags: - - Proxies + - Fleet proxies responses: '200': description: OK @@ -26,7 +26,7 @@ parameters: delete: summary: Delete proxy by ID tags: - - Proxies + - Fleet proxies operationId: delete-fleet-proxies responses: '200': @@ -47,7 +47,7 @@ delete: put: summary: Update proxy by ID tags: - - Proxies + - Fleet proxies operationId: update-fleet-proxies requestBody: content: diff --git a/x-pack/plugins/fleet/common/openapi/paths/service_tokens.yaml b/x-pack/plugins/fleet/common/openapi/paths/service_tokens.yaml index e76f18c5b57d7..8a3c1c94e5b5e 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/service_tokens.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/service_tokens.yaml @@ -1,7 +1,7 @@ post: summary: Create service token tags: - - Service tokens + - Fleet service tokens responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/service_tokens_deprecated.yaml b/x-pack/plugins/fleet/common/openapi/paths/service_tokens_deprecated.yaml index 73069830be9e1..9690278f24f5a 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/service_tokens_deprecated.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/service_tokens_deprecated.yaml @@ -1,7 +1,7 @@ post: summary: Create service token tags: - - Service tokens + - Fleet service tokens responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/uninstall_tokens.yaml b/x-pack/plugins/fleet/common/openapi/paths/uninstall_tokens.yaml index daa6727007b2d..bee6157175777 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/uninstall_tokens.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/uninstall_tokens.yaml @@ -1,7 +1,7 @@ get: summary: List metadata for latest uninstall tokens per agent policy tags: - - Uninstall tokens + - Fleet uninstall tokens responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/openapi/paths/uninstall_tokens@{uninstall_token_id}.yaml b/x-pack/plugins/fleet/common/openapi/paths/uninstall_tokens@{uninstall_token_id}.yaml index 549a2c61f542d..7cae06ba6be2d 100644 --- a/x-pack/plugins/fleet/common/openapi/paths/uninstall_tokens@{uninstall_token_id}.yaml +++ b/x-pack/plugins/fleet/common/openapi/paths/uninstall_tokens@{uninstall_token_id}.yaml @@ -1,7 +1,7 @@ get: summary: Get one decrypted uninstall token by its ID tags: - - Uninstall tokens + - Fleet uninstall tokens responses: '200': description: OK diff --git a/x-pack/plugins/fleet/common/services/__snapshots__/simplified_package_policy_helper.test.ts.snap b/x-pack/plugins/fleet/common/services/__snapshots__/simplified_package_policy_helper.test.ts.snap index 5d747ebd88ebf..7c549b030a337 100644 --- a/x-pack/plugins/fleet/common/services/__snapshots__/simplified_package_policy_helper.test.ts.snap +++ b/x-pack/plugins/fleet/common/services/__snapshots__/simplified_package_policy_helper.test.ts.snap @@ -228,6 +228,7 @@ Object { ], "name": "nginx-1", "namespace": "default", + "output_id": "output123", "package": Object { "name": "nginx", "title": "Nginx", diff --git a/x-pack/plugins/fleet/common/services/routes.ts b/x-pack/plugins/fleet/common/services/routes.ts index 1b8551d89b832..ff1fb4a5ff693 100644 --- a/x-pack/plugins/fleet/common/services/routes.ts +++ b/x-pack/plugins/fleet/common/services/routes.ts @@ -294,6 +294,7 @@ export const appRoutesService = { getCheckPermissionsPath: () => APP_API_ROUTES.CHECK_PERMISSIONS_PATTERN, getRegenerateServiceTokenPath: () => APP_API_ROUTES.GENERATE_SERVICE_TOKEN_PATTERN, postHealthCheckPath: () => APP_API_ROUTES.HEALTH_CHECK_PATTERN, + getAgentPoliciesSpacesPath: () => APP_API_ROUTES.AGENT_POLICIES_SPACES, }; export const enrollmentAPIKeyRouteService = { diff --git a/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.test.ts b/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.test.ts index 0cde9d003dbb1..ff9d6eac7490f 100644 --- a/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.test.ts +++ b/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.test.ts @@ -37,6 +37,7 @@ describe('toPackagePolicy', () => { namespace: 'default', policy_id: 'policy123', policy_ids: ['policy123'], + output_id: 'output123', description: 'Test description', inputs: { 'nginx-logfile': { diff --git a/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.ts b/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.ts index 98dee1021fe21..8d616bf4cae11 100644 --- a/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.ts +++ b/x-pack/plugins/fleet/common/services/simplified_package_policy_helper.ts @@ -43,6 +43,7 @@ export interface SimplifiedPackagePolicy { id?: string; policy_id?: string; policy_ids: string[]; + output_id?: string; namespace: string; name: string; description?: string; @@ -147,6 +148,7 @@ export function simplifiedPackagePolicytoNewPackagePolicy( const { policy_id: policyId, policy_ids: policyIds, + output_id: outputId, namespace, name, description, @@ -161,6 +163,10 @@ export function simplifiedPackagePolicytoNewPackagePolicy( description ); + if (outputId) { + packagePolicy.output_id = outputId; + } + if (packagePolicy.package && options?.experimental_data_stream_features) { packagePolicy.package.experimental_data_stream_features = options.experimental_data_stream_features; diff --git a/x-pack/plugins/fleet/common/types/index.ts b/x-pack/plugins/fleet/common/types/index.ts index d5582bc87e37a..3338c8c86f2f2 100644 --- a/x-pack/plugins/fleet/common/types/index.ts +++ b/x-pack/plugins/fleet/common/types/index.ts @@ -31,6 +31,7 @@ export interface FleetConfigType { }; }; agentless?: { + enabled: boolean; api: { url: string; tls: { diff --git a/x-pack/plugins/fleet/common/types/models/agent_policy.ts b/x-pack/plugins/fleet/common/types/models/agent_policy.ts index 1468d2ac5b11e..ac69f0c673289 100644 --- a/x-pack/plugins/fleet/common/types/models/agent_policy.ts +++ b/x-pack/plugins/fleet/common/types/models/agent_policy.ts @@ -21,6 +21,7 @@ export interface NewAgentPolicy { id?: string; name: string; namespace: string; + space_ids?: string[]; description?: string; is_default?: boolean; is_default_fleet_server?: boolean; // Optional when creating a policy @@ -53,7 +54,7 @@ export interface GlobalDataTag { // SO definition for this type is declared in server/types/interfaces export interface AgentPolicy extends Omit { id: string; - space_id?: string | undefined; + space_ids?: string[] | undefined; status: ValueOf; package_policies?: PackagePolicy[]; is_managed: boolean; // required for created policy diff --git a/x-pack/plugins/fleet/common/types/models/package_policy.ts b/x-pack/plugins/fleet/common/types/models/package_policy.ts index 1b8a407ff8dd9..a6db753d1a1ce 100644 --- a/x-pack/plugins/fleet/common/types/models/package_policy.ts +++ b/x-pack/plugins/fleet/common/types/models/package_policy.ts @@ -81,6 +81,8 @@ export interface NewPackagePolicy { /** @deprecated */ policy_id?: string; policy_ids: string[]; + // Nullable to allow user to reset to default outputs + output_id?: string | null; package?: PackagePolicyPackage; inputs: NewPackagePolicyInput[]; vars?: PackagePolicyConfigRecord; @@ -99,7 +101,7 @@ export interface UpdatePackagePolicy extends NewPackagePolicy { // SO definition for this type is declared in server/types/interfaces export interface PackagePolicy extends Omit { id: string; - spaceId?: string; + spaceIds?: string[]; inputs: PackagePolicyInput[]; version?: string; agents?: number; diff --git a/x-pack/plugins/fleet/common/types/models/settings.ts b/x-pack/plugins/fleet/common/types/models/settings.ts index bb44724d5c54e..9a5166e41df96 100644 --- a/x-pack/plugins/fleet/common/types/models/settings.ts +++ b/x-pack/plugins/fleet/common/types/models/settings.ts @@ -13,7 +13,10 @@ export interface BaseSettings { export interface Settings extends BaseSettings { id: string; + version?: string; preconfigured_fields?: Array<'fleet_server_hosts'>; secret_storage_requirements_met?: boolean; output_secret_storage_requirements_met?: boolean; + use_space_awareness_migration_status?: 'pending' | 'success' | 'error'; + use_space_awareness_migration_started_at?: string | null; } diff --git a/x-pack/plugins/fleet/common/types/rest_spec/common.ts b/x-pack/plugins/fleet/common/types/rest_spec/common.ts index 07bd3c7019c16..2eda7dd7f9983 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/common.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/common.ts @@ -13,6 +13,7 @@ export interface ListWithKuery extends HttpFetchQuery { sortField?: string; sortOrder?: 'desc' | 'asc'; kuery?: string; + fields?: string[]; } export interface ListResult { diff --git a/x-pack/plugins/fleet/common/types/rest_spec/fleet_setup.ts b/x-pack/plugins/fleet/common/types/rest_spec/fleet_setup.ts index df308458e3049..61180ba5094d1 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/fleet_setup.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/fleet_setup.ts @@ -17,5 +17,6 @@ export interface GetFleetStatusResponse { >; missing_optional_features: Array<'encrypted_saved_object_encryption_key_required'>; package_verification_key_id?: string; + is_space_awareness_enabled?: boolean; is_secrets_storage_enabled?: boolean; } diff --git a/x-pack/plugins/fleet/common/types/rest_spec/package_policy.ts b/x-pack/plugins/fleet/common/types/rest_spec/package_policy.ts index ff190f0a556cd..8b74a3142fa97 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/package_policy.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/package_policy.ts @@ -63,6 +63,7 @@ export type PostDeletePackagePoliciesResponse = Array<{ package?: PackagePolicyPackage; policy_id?: string; policy_ids?: string[]; + output_id?: string; // Support generic errors statusCode?: number; body?: { diff --git a/x-pack/plugins/fleet/common/types/rest_spec/settings.ts b/x-pack/plugins/fleet/common/types/rest_spec/settings.ts index 889da89b130c7..6961a0254562f 100644 --- a/x-pack/plugins/fleet/common/types/rest_spec/settings.ts +++ b/x-pack/plugins/fleet/common/types/rest_spec/settings.ts @@ -34,7 +34,7 @@ export type EnrollmentSettingsFleetServerPolicy = Pick< | 'has_fleet_server' | 'fleet_server_host_id' | 'download_source_id' - | 'space_id' + | 'space_ids' >; export interface GetEnrollmentSettingsResponse { diff --git a/x-pack/plugins/fleet/public/applications/fleet/app.tsx b/x-pack/plugins/fleet/public/applications/fleet/app.tsx index 65a57cc81523b..ae4bbdf49747a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/app.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/app.tsx @@ -433,7 +433,6 @@ export const AppRoutes = memo( }} /> - {flyoutContext.isEnrollmentFlyoutOpen && ( )} - {flyoutContext.isFleetServerFlyoutOpen && ( flyoutContext.closeFleetServerFlyout()} /> diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.test.tsx index 22f81b125015e..d426cd754b619 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.test.tsx @@ -15,7 +15,7 @@ import { createFleetTestRendererMock } from '../../../mock'; import { AGENTS_PREFIX, FLEET_ENROLLMENT_API_PREFIX, - AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, AGENTS_INDEX, ENROLLMENT_API_KEYS_INDEX, INGEST_SAVED_OBJECT_INDEX, @@ -238,169 +238,171 @@ describe('getFieldSpecs', () => { }); it('returns fieldSpecs for Fleet agent policies', () => { - expect(getFieldSpecs(INGEST_SAVED_OBJECT_INDEX, AGENT_POLICY_SAVED_OBJECT_TYPE)).toEqual([ - { - aggregatable: true, - esTypes: ['keyword'], - name: 'ingest-agent-policies.agent_features.name', - searchable: true, - type: 'string', - }, - { - aggregatable: true, - esTypes: ['boolean'], - name: 'ingest-agent-policies.agent_features.enabled', - searchable: true, - type: 'boolean', - }, - { - aggregatable: true, - esTypes: ['keyword'], - name: 'ingest-agent-policies.data_output_id', - searchable: true, - type: 'string', - }, - { - aggregatable: true, - esTypes: ['text'], - name: 'ingest-agent-policies.description', - searchable: true, - type: 'string', - }, - { - aggregatable: true, - esTypes: ['keyword'], - name: 'ingest-agent-policies.download_source_id', - searchable: true, - type: 'string', - }, - { - aggregatable: true, - esTypes: ['keyword'], - name: 'ingest-agent-policies.fleet_server_host_id', - searchable: true, - type: 'string', - }, - { - aggregatable: true, - esTypes: ['integer'], - name: 'ingest-agent-policies.inactivity_timeout', - searchable: true, - type: 'number', - }, - { - aggregatable: true, - esTypes: ['boolean'], - name: 'ingest-agent-policies.is_default', - searchable: true, - type: 'boolean', - }, - { - aggregatable: true, - esTypes: ['boolean'], - name: 'ingest-agent-policies.is_default_fleet_server', - searchable: true, - type: 'boolean', - }, - { - aggregatable: true, - esTypes: ['boolean'], - name: 'ingest-agent-policies.is_managed', - searchable: true, - type: 'boolean', - }, - { - aggregatable: true, - esTypes: ['keyword'], - name: 'ingest-agent-policies.is_preconfigured', - searchable: true, - type: 'string', - }, - { - aggregatable: true, - esTypes: ['boolean'], - name: 'ingest-agent-policies.is_protected', - searchable: true, - type: 'boolean', - }, - { - aggregatable: true, - esTypes: ['keyword'], - name: 'ingest-agent-policies.monitoring_enabled', - searchable: true, - type: 'string', - }, - { - aggregatable: true, - esTypes: ['false'], - name: 'ingest-agent-policies.monitoring_enabled.index', - searchable: true, - type: 'false', - }, - { - aggregatable: true, - esTypes: ['keyword'], - name: 'ingest-agent-policies.monitoring_output_id', - searchable: true, - type: 'string', - }, - { - aggregatable: true, - esTypes: ['keyword'], - name: 'ingest-agent-policies.name', - searchable: true, - type: 'string', - }, - { - aggregatable: true, - esTypes: ['keyword'], - name: 'ingest-agent-policies.namespace', - searchable: true, - type: 'string', - }, - { - aggregatable: true, - esTypes: ['integer'], - name: 'ingest-agent-policies.revision', - searchable: true, - type: 'number', - }, - { - aggregatable: true, - esTypes: ['version'], - name: 'ingest-agent-policies.schema_version', - searchable: true, - type: 'string', - }, - { - aggregatable: true, - esTypes: ['keyword'], - name: 'ingest-agent-policies.status', - searchable: true, - type: 'string', - }, - { - aggregatable: true, - esTypes: ['integer'], - name: 'ingest-agent-policies.unenroll_timeout', - searchable: true, - type: 'number', - }, - { - aggregatable: true, - esTypes: ['date'], - name: 'ingest-agent-policies.updated_at', - searchable: true, - type: 'date', - }, - { - aggregatable: true, - esTypes: ['keyword'], - name: 'ingest-agent-policies.updated_by', - searchable: true, - type: 'string', - }, - ]); + expect(getFieldSpecs(INGEST_SAVED_OBJECT_INDEX, LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE)).toEqual( + [ + { + aggregatable: true, + esTypes: ['keyword'], + name: 'ingest-agent-policies.agent_features.name', + searchable: true, + type: 'string', + }, + { + aggregatable: true, + esTypes: ['boolean'], + name: 'ingest-agent-policies.agent_features.enabled', + searchable: true, + type: 'boolean', + }, + { + aggregatable: true, + esTypes: ['keyword'], + name: 'ingest-agent-policies.data_output_id', + searchable: true, + type: 'string', + }, + { + aggregatable: true, + esTypes: ['text'], + name: 'ingest-agent-policies.description', + searchable: true, + type: 'string', + }, + { + aggregatable: true, + esTypes: ['keyword'], + name: 'ingest-agent-policies.download_source_id', + searchable: true, + type: 'string', + }, + { + aggregatable: true, + esTypes: ['keyword'], + name: 'ingest-agent-policies.fleet_server_host_id', + searchable: true, + type: 'string', + }, + { + aggregatable: true, + esTypes: ['integer'], + name: 'ingest-agent-policies.inactivity_timeout', + searchable: true, + type: 'number', + }, + { + aggregatable: true, + esTypes: ['boolean'], + name: 'ingest-agent-policies.is_default', + searchable: true, + type: 'boolean', + }, + { + aggregatable: true, + esTypes: ['boolean'], + name: 'ingest-agent-policies.is_default_fleet_server', + searchable: true, + type: 'boolean', + }, + { + aggregatable: true, + esTypes: ['boolean'], + name: 'ingest-agent-policies.is_managed', + searchable: true, + type: 'boolean', + }, + { + aggregatable: true, + esTypes: ['keyword'], + name: 'ingest-agent-policies.is_preconfigured', + searchable: true, + type: 'string', + }, + { + aggregatable: true, + esTypes: ['boolean'], + name: 'ingest-agent-policies.is_protected', + searchable: true, + type: 'boolean', + }, + { + aggregatable: true, + esTypes: ['keyword'], + name: 'ingest-agent-policies.monitoring_enabled', + searchable: true, + type: 'string', + }, + { + aggregatable: true, + esTypes: ['false'], + name: 'ingest-agent-policies.monitoring_enabled.index', + searchable: true, + type: 'false', + }, + { + aggregatable: true, + esTypes: ['keyword'], + name: 'ingest-agent-policies.monitoring_output_id', + searchable: true, + type: 'string', + }, + { + aggregatable: true, + esTypes: ['keyword'], + name: 'ingest-agent-policies.name', + searchable: true, + type: 'string', + }, + { + aggregatable: true, + esTypes: ['keyword'], + name: 'ingest-agent-policies.namespace', + searchable: true, + type: 'string', + }, + { + aggregatable: true, + esTypes: ['integer'], + name: 'ingest-agent-policies.revision', + searchable: true, + type: 'number', + }, + { + aggregatable: true, + esTypes: ['version'], + name: 'ingest-agent-policies.schema_version', + searchable: true, + type: 'string', + }, + { + aggregatable: true, + esTypes: ['keyword'], + name: 'ingest-agent-policies.status', + searchable: true, + type: 'string', + }, + { + aggregatable: true, + esTypes: ['integer'], + name: 'ingest-agent-policies.unenroll_timeout', + searchable: true, + type: 'number', + }, + { + aggregatable: true, + esTypes: ['date'], + name: 'ingest-agent-policies.updated_at', + searchable: true, + type: 'date', + }, + { + aggregatable: true, + esTypes: ['keyword'], + name: 'ingest-agent-policies.updated_by', + searchable: true, + type: 'string', + }, + ] + ); }); it('returns empty array if indexPattern is not one of the previous', async () => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx index 3e47a3a7955b3..1a7074e2f885a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/components/search_bar.tsx @@ -23,6 +23,7 @@ import { AGENTS_INDEX, ENROLLMENT_API_KEYS_INDEX, AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, INGEST_SAVED_OBJECT_INDEX, } from '../constants'; @@ -51,6 +52,8 @@ const getMappings = (indexPattern: string, fieldPrefix: string) => { switch (fieldPrefix) { case AGENT_POLICY_SAVED_OBJECT_TYPE: return AGENT_POLICY_MAPPINGS; + case LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE: + return AGENT_POLICY_MAPPINGS; default: return {}; } diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx index c17e3345bfd1d..185c694a5c84e 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_advanced_fields/index.tsx @@ -30,7 +30,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { - AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, dataTypes, DEFAULT_MAX_AGENT_POLICIES_WITH_INACTIVITY_TIMEOUT, } from '../../../../../../../common/constants'; @@ -41,6 +41,8 @@ import { useGetAgentPolicies, useLicense, useUIExtension, + useLink, + useFleetStatus, } from '../../../../hooks'; import { AgentPolicyPackageBadge } from '../../../../components'; @@ -60,6 +62,7 @@ import { } from './hooks'; import { CustomFields } from './custom_fields'; +import { SpaceSelector } from './space_selector'; interface Props { agentPolicy: Partial; @@ -75,7 +78,11 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent = validation, disabled = false, }) => { + const useSpaceAwareness = ExperimentalFeaturesService.get()?.useSpaceAwareness ?? false; const { docLinks } = useStartServices(); + const { spaceId } = useFleetStatus(); + + const { getAbsolutePath } = useLink(); const AgentTamperProtectionWrapper = useUIExtension( 'endpoint', 'endpoint-agent-tamper-protection' @@ -95,7 +102,7 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent = const { data: agentPoliciesData } = useGetAgentPolicies({ page: 1, perPage: 0, - kuery: `${AGENT_POLICY_SAVED_OBJECT_TYPE}.inactivity_timeout:*`, + kuery: `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.inactivity_timeout:*`, }); const totalAgentPoliciesWithInactivityTimeout = agentPoliciesData?.total ?? 0; @@ -257,6 +264,63 @@ export const AgentPolicyAdvancedOptionsContent: React.FunctionComponent = /> + {useSpaceAwareness ? ( + + + + } + description={ + + + + ), + }} + /> + } + > + + { + updateAgentPolicy({ + space_ids: newValue, + }); + }} + /> + + + ) : null} void; + isDisabled?: boolean; +} + +export const SpaceSelector: React.FC = ({ value, onChange, isDisabled }) => { + const res = useAgentPoliciesSpaces(); + + const renderOption = React.useCallback( + (option: any, searchValue: string, contentClassName: string) => ( + + {option.label} + + ), + [] + ); + + const options: Array> = useMemo(() => { + return ( + res.data?.items.map((item: any) => ({ + label: item.name, + key: item.id, + ...item, + })) ?? [] + ); + }, [res.data]); + + const selectedOptions: Array> = useMemo(() => { + if (res.isInitialLoading) { + return []; + } + return value.map((v) => { + const existingOption = options.find((opt) => opt.key === v); + + return existingOption + ? existingOption + : { + label: v, + key: v, + }; + }); + }, [options, value, res.isInitialLoading]); + + return ( + { + onChange(newOptions.map(({ key }) => key as string)); + }} + /> + ); +}; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/hooks.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/hooks.tsx index 55b8ac90c749c..c63339d682bb7 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/hooks.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/hooks.tsx @@ -8,6 +8,10 @@ import { useMemo } from 'react'; import { useHistory } from 'react-router-dom'; +import { LICENCE_FOR_OUTPUT_PER_INTEGRATION } from '../../../../../../../../../common/constants'; +import { getAllowedOutputTypesForIntegration } from '../../../../../../../../../common/services/output_helpers'; +import { useGetOutputs, useLicense } from '../../../../../../hooks'; + export function useDataStreamId() { const history = useHistory(); @@ -16,3 +20,21 @@ export function useDataStreamId() { return searchParams.get('datastreamId') ?? undefined; }, [history.location.search]); } + +export function useOutputs(packageName: string) { + const licenseService = useLicense(); + const canUseOutputPerIntegration = licenseService.hasAtLeast(LICENCE_FOR_OUTPUT_PER_INTEGRATION); + const { data: outputsData, isLoading } = useGetOutputs(); + const allowedOutputTypes = getAllowedOutputTypesForIntegration(packageName); + const allowedOutputs = useMemo(() => { + if (!outputsData || !canUseOutputPerIntegration) { + return []; + } + return outputsData.items.filter((output) => allowedOutputTypes.includes(output.type)); + }, [allowedOutputTypes, canUseOutputPerIntegration, outputsData]); + return { + isLoading, + canUseOutputPerIntegration, + allowedOutputs, + }; +} diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_panel.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_panel.test.tsx index 322bbfbaa57e2..c889dc862bf9e 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_panel.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_panel.test.tsx @@ -359,7 +359,6 @@ describe('PackagePolicyInputPanel', () => { describe('When agentless is enabled', () => { beforeEach(() => { useAgentlessMock.mockReturnValue({ - agentlessAPIUrl: 'https://agentless.api.url', isAgentlessEnabled: true, isAgentlessPackagePolicy: jest.fn(), isAgentlessAgentPolicy: jest.fn(), @@ -395,7 +394,6 @@ describe('PackagePolicyInputPanel', () => { describe('When agentless not enabled', () => { beforeEach(() => { useAgentlessMock.mockReturnValue({ - agentlessAPIUrl: undefined, isAgentlessEnabled: false, isAgentlessPackagePolicy: jest.fn(), isAgentlessAgentPolicy: jest.fn(), diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_define_package_policy.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_define_package_policy.tsx index c312b48a2d290..43c3f8092e921 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_define_package_policy.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_define_package_policy.tsx @@ -20,6 +20,7 @@ import { EuiLink, EuiCallOut, EuiSpacer, + EuiSelect, } from '@elastic/eui'; import styled from 'styled-components'; @@ -32,6 +33,7 @@ import { isAdvancedVar } from '../../services'; import type { PackagePolicyValidationResults } from '../../services'; import { PackagePolicyInputVarField } from './components'; +import { useOutputs } from './components/hooks'; // on smaller screens, fields should be displayed in one column const FormGroupResponsiveFields = styled(EuiDescribedFormGroup)` @@ -81,6 +83,14 @@ export const StepDefinePackagePolicy: React.FunctionComponent<{ }); } + // Outputs + const { + isLoading: isOutputsLoading, + canUseOutputPerIntegration, + allowedOutputs, + } = useOutputs(packageInfo.name); + + // Managed policy const isManaged = packagePolicy.is_managed; return validationResults ? ( @@ -245,6 +255,7 @@ export const StepDefinePackagePolicy: React.FunctionComponent<{ {isShowingAdvanced ? ( + {/* Namespace */} + + {/* Output */} + {canUseOutputPerIntegration && ( + + + } + helpText={ + + } + > + ({ + value: output.id, + text: output.name, + })), + ]} + value={packagePolicy.output_id || ''} + onChange={(e) => { + updatePackagePolicy({ + output_id: e.target.value.trim() || null, + }); + }} + /> + + + )} + + {/* Data retention settings info */} 0) && - !isAgentlessPackagePolicy(data!.item) && + !isAgentlessConfigured && hasFleetAddAgentsPrivileges; if (promptForAgentEnrollment && hasAzureArmTemplate) { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/setup_technology.test.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/setup_technology.test.ts index b3fadedcc964e..f32ea1cd007ce 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/setup_technology.test.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/setup_technology.test.ts @@ -53,7 +53,6 @@ describe('useAgentless', () => { const { result } = renderHook(() => useAgentless()); expect(result.current.isAgentlessEnabled).toBeFalsy(); - expect(result.current.agentlessAPIUrl).toBeFalsy(); expect(result.current.isAgentlessCloudEnabled).toBeFalsy(); expect(result.current.isAgentlessServerlessEnabled).toBeFalsy(); }); @@ -69,8 +68,6 @@ describe('useAgentless', () => { const { result } = renderHook(() => useAgentless()); - expect(result.current.agentlessAPIUrl).toBeTruthy(); - expect(result.current.agentlessAPIUrl).toBe(agentlessAPIUrl); expect(result.current.isAgentlessEnabled).toBeFalsy(); expect(result.current.isAgentlessCloudEnabled).toBeFalsy(); expect(result.current.isAgentlessServerlessEnabled).toBeFalsy(); @@ -92,7 +89,6 @@ describe('useAgentless', () => { const { result } = renderHook(() => useAgentless()); - expect(result.current.agentlessAPIUrl).toBeTruthy(); expect(result.current.isAgentlessEnabled).toBeFalsy(); expect(result.current.isAgentlessCloudEnabled).toBeFalsy(); expect(result.current.isAgentlessServerlessEnabled).toBeFalsy(); @@ -102,16 +98,13 @@ describe('useAgentless', () => { const agentlessAPIUrl = 'https://agentless.api.url'; (useConfig as MockFn).mockReturnValue({ agentless: { + enabled: true, api: { url: agentlessAPIUrl, }, }, } as any); - mockedExperimentalFeaturesService.get.mockReturnValue({ - agentless: true, - } as any); - (useStartServices as MockFn).mockReturnValue({ cloud: { isServerlessEnabled: false, @@ -121,7 +114,6 @@ describe('useAgentless', () => { const { result } = renderHook(() => useAgentless()); - expect(result.current.agentlessAPIUrl).toBeTruthy(); expect(result.current.isAgentlessEnabled).toBeTruthy(); expect(result.current.isAgentlessCloudEnabled).toBeTruthy(); expect(result.current.isAgentlessServerlessEnabled).toBeFalsy(); @@ -149,7 +141,6 @@ describe('useAgentless', () => { const { result } = renderHook(() => useAgentless()); - expect(result.current.agentlessAPIUrl).toBeTruthy(); expect(result.current.isAgentlessEnabled).toBeTruthy(); expect(result.current.isAgentlessCloudEnabled).toBeFalsy(); expect(result.current.isAgentlessServerlessEnabled).toBeTruthy(); @@ -230,9 +221,38 @@ describe('useSetupTechnology', () => { expect(sendGetOneAgentPolicy).toHaveBeenCalled(); }); + it('should set agentless setup technology if agent policy supports agentless in edit page', async () => { + (useConfig as MockFn).mockReturnValue({ + agentless: { + api: { + url: 'https://agentless.api.url', + }, + }, + } as any); + (useStartServices as MockFn).mockReturnValue({ + cloud: { + isCloudEnabled: true, + }, + }); + const { result } = renderHook(() => + useSetupTechnology({ + setNewAgentPolicy, + newAgentPolicy: newAgentPolicyMock, + updateAgentPolicies: updateAgentPoliciesMock, + setSelectedPolicyTab: setSelectedPolicyTabMock, + packagePolicy: packagePolicyMock, + isEditPage: true, + agentPolicies: [{ id: 'agentless-policy-id', supports_agentless: true } as any], + }) + ); + + expect(result.current.selectedSetupTechnology).toBe(SetupTechnology.AGENTLESS); + }); + it('should create agentless policy if agentless feature is enabled and isCloud is true and agentless.api.url', async () => { (useConfig as MockFn).mockReturnValue({ agentless: { + enabled: true, api: { url: 'https://agentless.api.url', }, @@ -240,7 +260,6 @@ describe('useSetupTechnology', () => { } as any); (useStartServices as MockFn).mockReturnValue({ cloud: { - // isServerlessEnabled: false, isCloudEnabled: true, }, }); @@ -271,6 +290,7 @@ describe('useSetupTechnology', () => { it('should update agentless policy name to match integration name if agentless is enabled', async () => { (useConfig as MockFn).mockReturnValue({ agentless: { + enabled: true, api: { url: 'https://agentless.api.url', }, @@ -278,7 +298,6 @@ describe('useSetupTechnology', () => { } as any); (useStartServices as MockFn).mockReturnValue({ cloud: { - // isServerlessEnabled: false, isCloudEnabled: true, }, }); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/setup_technology.ts b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/setup_technology.ts index e9c5c04892e7f..7fc159a2d4348 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/setup_technology.ts +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/hooks/setup_technology.ts @@ -28,13 +28,11 @@ export const useAgentless = () => { const { cloud } = useStartServices(); const isServerless = !!cloud?.isServerlessEnabled; const isCloud = !!cloud?.isCloudEnabled; - const agentlessAPIUrl = config.agentless?.api.url; - const isAgentlessEnabled = - agentlessExperimentalFeatureEnabled && (isServerless || (isCloud && !!agentlessAPIUrl)); + const isAgentlessCloudEnabled = isCloud && !!config.agentless?.enabled; + const isAgentlessServerlessEnabled = isServerless && agentlessExperimentalFeatureEnabled; - const isAgentlessCloudEnabled = isCloud && isAgentlessEnabled && !!agentlessAPIUrl; - const isAgentlessServerlessEnabled = isServerless && isAgentlessEnabled; + const isAgentlessEnabled = isAgentlessCloudEnabled || isAgentlessServerlessEnabled; const isAgentlessAgentPolicy = (agentPolicy: AgentPolicy | undefined) => { if (!agentPolicy) return false; @@ -64,7 +62,6 @@ export const useAgentless = () => { return isAgentlessEnabled && packagePolicy.policy_ids.includes(AGENTLESS_POLICY_ID); }; return { - agentlessAPIUrl, isAgentlessCloudEnabled, isAgentlessServerlessEnabled, isAgentlessEnabled, @@ -82,6 +79,7 @@ export function useSetupTechnology({ packageInfo, packagePolicy, isEditPage, + agentPolicies, }: { setNewAgentPolicy: (policy: NewAgentPolicy) => void; newAgentPolicy: NewAgentPolicy; @@ -90,8 +88,8 @@ export function useSetupTechnology({ packageInfo?: PackageInfo; packagePolicy: NewPackagePolicy; isEditPage?: boolean; + agentPolicies?: AgentPolicy[]; }) { - const { cloud } = useStartServices(); const { isAgentlessEnabled, isAgentlessCloudEnabled, isAgentlessServerlessEnabled } = useAgentless(); @@ -108,7 +106,8 @@ export function useSetupTechnology({ ); useEffect(() => { - if (isEditPage) { + if (isEditPage && agentPolicies && agentPolicies.some((policy) => policy.supports_agentless)) { + setSelectedSetupTechnology(SetupTechnology.AGENTLESS); return; } if (isAgentlessCloudEnabled && selectedSetupTechnology === SetupTechnology.AGENTLESS) { @@ -130,6 +129,8 @@ export function useSetupTechnology({ selectedSetupTechnology, updateAgentPolicies, setNewAgentPolicy, + agentPolicies, + setSelectedSetupTechnology, ]); // tech debt: remove this useEffect when Serverless uses the Agentless API @@ -144,12 +145,10 @@ export function useSetupTechnology({ } }; - if (isAgentlessEnabled) { - if (cloud?.isServerlessEnabled) { - fetchAgentlessPolicy(); - } + if (isAgentlessServerlessEnabled) { + fetchAgentlessPolicy(); } - }, [isAgentlessEnabled, cloud]); + }, [isAgentlessServerlessEnabled]); const handleSetupTechnologyChange = useCallback( (setupTechnology: SetupTechnology) => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx index ac7d0e9db77fc..9dbdcafdc94bb 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx @@ -780,6 +780,7 @@ describe('When on the package policy create page', () => { beforeEach(async () => { (useConfig as jest.MockedFunction).mockReturnValue({ agentless: { + enabled: true, api: { url: 'http://agentless-api-url', }, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx index 433549f714cf0..ed9805fb5f75a 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/package_policies/package_policies_table.tsx @@ -37,6 +37,8 @@ import { usePermissionCheck, useStartServices, useMultipleAgentPolicies, + useGetOutputs, + useDefaultOutput, } from '../../../../../hooks'; import { pkgKeyFromPackageInfo } from '../../../../../services'; @@ -106,6 +108,16 @@ export const PackagePoliciesTable: React.FunctionComponent = ({ return packagePolicy.policy_ids.length || 0; }, []); + const { data: outputsData, isLoading: isOutputsLoading } = useGetOutputs(); + const { output: defaultOutputData } = useDefaultOutput(); + const outputNamesById = useMemo(() => { + const outputs = outputsData?.items ?? []; + return outputs.reduce>((acc, output) => { + acc[output.id] = output.name; + return acc; + }, {}); + }, [outputsData]); + const columns = useMemo( (): EuiInMemoryTableProps['columns'] => [ { @@ -115,6 +127,7 @@ export const PackagePoliciesTable: React.FunctionComponent = ({ name: i18n.translate('xpack.fleet.policyDetails.packagePoliciesTable.nameColumnTitle', { defaultMessage: 'Integration policy', }), + width: '35%', render: (value: string, packagePolicy: InMemoryPackagePolicy) => ( @@ -278,10 +291,67 @@ export const PackagePoliciesTable: React.FunctionComponent = ({ ); }, }, + { + field: 'output_id', + name: i18n.translate('xpack.fleet.policyDetails.packagePoliciesTable.outputColumnTitle', { + defaultMessage: 'Output', + }), + render: (outputId: InMemoryPackagePolicy['output_id']) => { + if (isOutputsLoading) { + return null; + } + if (outputId) { + return {outputNamesById[outputId] || outputId}; + } + if (agentPolicy.data_output_id) { + return ( + <> + + {outputNamesById[agentPolicy.data_output_id] || agentPolicy.data_output_id} + +   + + + ); + } + if (defaultOutputData) { + return ( + <> + + {outputNamesById[defaultOutputData.id] || defaultOutputData.id} + +   + + + ); + } + }, + }, { name: i18n.translate('xpack.fleet.policyDetails.packagePoliciesTable.actionsColumnTitle', { defaultMessage: 'Actions', }), + width: '70px', actions: [ { render: (packagePolicy: InMemoryPackagePolicy) => { @@ -309,8 +379,11 @@ export const PackagePoliciesTable: React.FunctionComponent = ({ agentPolicy, canUseMultipleAgentPolicies, canReadAgentPolicies, - canWriteIntegrationPolicies, getSharedPoliciesNumber, + canWriteIntegrationPolicies, + isOutputsLoading, + defaultOutputData, + outputNamesById, ] ); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx index 7ddc9a465fb3b..9be265a6385cb 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx @@ -45,6 +45,7 @@ const pickAgentPolicyKeysToSend = (agentPolicy: AgentPolicy) => 'name', 'description', 'namespace', + 'space_ids', 'monitoring_enabled', 'unenroll_timeout', 'inactivity_timeout', diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/hooks/use_package_policy_steps.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/hooks/use_package_policy_steps.tsx index dd349fca9909e..5acd854a76f04 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/hooks/use_package_policy_steps.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/edit_package_policy_page/hooks/use_package_policy_steps.tsx @@ -145,6 +145,7 @@ export function usePackagePolicySteps({ packageInfo, packagePolicy, isEditPage: true, + agentPolicies, }); const stepSelectAgentPolicy = useMemo( diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/index.tsx index 40f057b56551c..6ab01d06f52dd 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/index.tsx @@ -25,7 +25,11 @@ import { useHistory } from 'react-router-dom'; import type { AgentPolicy } from '../../../types'; import { getRootIntegrations } from '../../../../../../common/services'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE, INGEST_SAVED_OBJECT_INDEX } from '../../../constants'; +import { + AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, + INGEST_SAVED_OBJECT_INDEX, +} from '../../../constants'; import { useAuthz, usePagination, @@ -35,6 +39,7 @@ import { useUrlParams, useBreadcrumbs, useGetAgentPoliciesQuery, + useFleetStatus, } from '../../../hooks'; import { SearchBar } from '../../../components'; import { AgentPolicySummaryLine } from '../../../../../components'; @@ -43,6 +48,7 @@ import { LinkedAgentCount, AgentPolicyActionMenu } from '../components'; import { CreateAgentPolicyFlyout } from './components'; export const AgentPolicyListPage: React.FunctionComponent<{}> = () => { + const { isSpaceAwarenessEnabled } = useFleetStatus(); useBreadcrumbs('policies_list'); const { getPath } = useLink(); const hasFleetAllAgentPoliciesPrivileges = useAuthz().fleet.allAgentPolicies; @@ -321,7 +327,11 @@ export const AgentPolicyListPage: React.FunctionComponent<{}> = () => { { setPagination({ ...pagination, @@ -342,7 +352,6 @@ export const AgentPolicyListPage: React.FunctionComponent<{}> = () => { {createAgentPolicyButton} - loading={isLoading} diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/hooks/use_fetch_agents_data.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/hooks/use_fetch_agents_data.tsx index 95041d7c089d1..e67d0e83c28e0 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/hooks/use_fetch_agents_data.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/hooks/use_fetch_agents_data.tsx @@ -25,7 +25,7 @@ import { sendGetActionStatus, } from '../../../../hooks'; import { AgentStatusKueryHelper, ExperimentalFeaturesService } from '../../../../services'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../../../constants'; +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../../../constants'; import { getKuery } from '../utils/get_kuery'; @@ -166,7 +166,7 @@ export function useFetchAgentsData() { kuery: AgentStatusKueryHelper.buildKueryForInactiveAgents(), }), sendGetAgentPolicies({ - kuery: `${AGENT_POLICY_SAVED_OBJECT_TYPE}.is_managed:true`, + kuery: `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.is_managed:true`, perPage: SO_SEARCH_LIMIT, full: false, }), diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/preconfiguration_debugger.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/preconfiguration_debugger.tsx index 7642589bc1d6c..f140e4068d040 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/preconfiguration_debugger.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/preconfiguration_debugger.tsx @@ -29,13 +29,13 @@ import { useLink, useStartServices, } from '../../../hooks'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../../constants'; +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../../constants'; import { queryClient } from '..'; import { CodeBlock } from './code_block'; const fetchPreconfiguredPolicies = async () => { - const kuery = `${AGENT_POLICY_SAVED_OBJECT_TYPE}.is_preconfigured:true`; + const kuery = `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.is_preconfigured:true`; const response = await sendGetAgentPolicies({ kuery, perPage: SO_SEARCH_LIMIT, full: true }); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/saved_object_debugger.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/saved_object_debugger.tsx index cf41612a0d5fd..4c4cdddd1f106 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/saved_object_debugger.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/debug/components/saved_object_debugger.tsx @@ -26,8 +26,8 @@ import { debugRoutesService } from '../../../../../../common/services'; import { OUTPUT_SAVED_OBJECT_TYPE, - AGENT_POLICY_SAVED_OBJECT_TYPE, - PACKAGE_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, PACKAGES_SAVED_OBJECT_TYPE, DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE, FLEET_SERVER_HOST_SAVED_OBJECT_TYPE, @@ -60,13 +60,13 @@ const fetchSavedObjects = async (type?: string, name?: string) => { export const SavedObjectDebugger: React.FunctionComponent = () => { const types = [ { - value: `${AGENT_POLICY_SAVED_OBJECT_TYPE}`, + value: `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}`, text: i18n.translate('xpack.fleet.debug.savedObjectDebugger.agentPolicyLabel', { defaultMessage: 'Agent policy', }), }, { - value: `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}`, + value: `${LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE}`, text: i18n.translate('xpack.fleet.debug.savedObjectDebugger.packagePolicyLabel', { defaultMessage: 'Integration policy', }), diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/download_source_flyout/services/get_count.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/download_source_flyout/services/get_count.tsx index ce9428771c0e4..23acf9e8c43cd 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/download_source_flyout/services/get_count.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/download_source_flyout/services/get_count.tsx @@ -7,12 +7,12 @@ import { sendGetAgentPolicies, sendGetAgents } from '../../../../../hooks'; import type { DownloadSource } from '../../../../../types'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../../../../constants'; +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../../../../constants'; export async function getCountsForDownloadSource(downloadSource: DownloadSource) { - let kuery = `${AGENT_POLICY_SAVED_OBJECT_TYPE}.download_source_id:"${downloadSource.id}"`; + let kuery = `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.download_source_id:"${downloadSource.id}"`; if (downloadSource.is_default) { - kuery += ` or (not ${AGENT_POLICY_SAVED_OBJECT_TYPE}.download_source_id:*)`; + kuery += ` or (not ${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.download_source_id:*)`; } const agentPolicies = await sendGetAgentPolicies({ kuery, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_fleet_proxy_flyout/use_fleet_proxy_form.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_fleet_proxy_flyout/use_fleet_proxy_form.tsx index 2a4250bd9707a..2d8a5b4aa1952 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_fleet_proxy_flyout/use_fleet_proxy_form.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_fleet_proxy_flyout/use_fleet_proxy_form.tsx @@ -33,7 +33,7 @@ const ConfirmTitle = () => ( const ConfirmDescription: React.FunctionComponent = ({}) => ( ); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/fleet_server_hosts_flyout/use_fleet_server_host_form.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/fleet_server_hosts_flyout/use_fleet_server_host_form.test.tsx index 8df533f0206b7..95a94848f4794 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/fleet_server_hosts_flyout/use_fleet_server_host_form.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/fleet_server_hosts_flyout/use_fleet_server_host_form.test.tsx @@ -11,10 +11,6 @@ import { createFleetTestRendererMock } from '../../../../../../mock'; import { useFleetServerHostsForm } from './use_fleet_server_host_form'; -jest.mock('../../services/agent_and_policies_count', () => ({ - ...jest.requireActual('../../services/agent_and_policies_count'), - getAgentAndPolicyCount: () => ({ agentCount: 0, agentPolicyCount: 0 }), -})); jest.mock('../../hooks/use_confirm_modal', () => ({ ...jest.requireActual('../../hooks/use_confirm_modal'), useConfirmModal: () => ({ confirm: () => true }), diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/services/agent_and_policies_count.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/services/agent_and_policies_count.tsx index 7e8cdac388cfe..9ea3db4e14851 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/services/agent_and_policies_count.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/services/agent_and_policies_count.tsx @@ -5,17 +5,24 @@ * 2.0. */ -import { sendGetAgentPolicies, sendGetAgents } from '../../../hooks'; +import { sendGetAgentPolicies, sendGetPackagePolicies, sendGetAgents } from '../../../hooks'; import type { Output } from '../../../types'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../../constants'; +import { + PACKAGE_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, + SO_SEARCH_LIMIT, +} from '../../../constants'; export async function getAgentAndPolicyCountForOutput(output: Output) { - let kuery = `${AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:"${output.id}" or ${AGENT_POLICY_SAVED_OBJECT_TYPE}.monitoring_output_id:"${output.id}"`; + let agentPolicyKuery = `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:"${output.id}" or ${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.monitoring_output_id:"${output.id}"`; + const packagePolicyKuery = `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.output_id:"${output.id}"`; + if (output.is_default) { - kuery += ` or (not ${AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:*)`; + agentPolicyKuery += ` or (not ${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:*)`; } + const agentPolicies = await sendGetAgentPolicies({ - kuery, + kuery: agentPolicyKuery, page: 1, perPage: SO_SEARCH_LIMIT, }); @@ -23,7 +30,26 @@ export async function getAgentAndPolicyCountForOutput(output: Output) { if (agentPolicies.error) { throw agentPolicies.error; } - const agentPolicyCount = agentPolicies.data?.items?.length ?? 0; + + const packagePolicies = await sendGetPackagePolicies({ + kuery: packagePolicyKuery, + page: 1, + perPage: SO_SEARCH_LIMIT, + }); + + if (packagePolicies.error) { + throw agentPolicies.error; + } + + const agentPolicyIds = (agentPolicies.data?.items || []).map((policy) => policy.id); + const agentPolicyIdsFromPackagePolicies = (packagePolicies.data?.items || []).reduce( + (acc: string[], packagePolicy) => { + return [...acc, ...(packagePolicy.policy_ids || [])]; + }, + [] + ); + const uniqueAgentPolicyIds = new Set([...agentPolicyIds, ...agentPolicyIdsFromPackagePolicies]); + const agentPolicyCount = uniqueAgentPolicyIds.size; let agentCount = 0; if (agentPolicyCount > 0) { @@ -31,7 +57,7 @@ export async function getAgentAndPolicyCountForOutput(output: Output) { page: 1, perPage: 0, // We only need the count here showInactive: false, - kuery: agentPolicies.data?.items.map((policy) => `policy_id:"${policy.id}"`).join(' or '), + kuery: [...uniqueAgentPolicyIds].map((id) => `policy_id:"${id}"`).join(' or '), }); if (agents.error) { @@ -43,28 +69,3 @@ export async function getAgentAndPolicyCountForOutput(output: Output) { return { agentPolicyCount, agentCount }; } - -export async function getAgentAndPolicyCount() { - const agentPolicies = await sendGetAgentPolicies({ - perPage: 0, - }); - - if (agentPolicies.error) { - throw agentPolicies.error; - } - const agentPolicyCount = agentPolicies.data?.total ?? 0; - - const agents = await sendGetAgents({ - page: 1, - perPage: 0, // We only need the count here - showInactive: false, - }); - - if (agents.error) { - throw agents.error; - } - - const agentCount = agents.data?.total ?? 0; - - return { agentPolicyCount, agentCount }; -} diff --git a/x-pack/plugins/fleet/public/applications/integrations/app.tsx b/x-pack/plugins/fleet/public/applications/integrations/app.tsx index 992ecff3e49a3..8527dbc4c6c69 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/app.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/app.tsx @@ -169,7 +169,6 @@ export const AppRoutes = memo(() => { }} /> - {flyoutContext.isEnrollmentFlyoutOpen && ( { /> )} - {flyoutContext.isFleetServerFlyoutOpen && ( flyoutContext.closeFleetServerFlyout()} /> diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.tsx index 4261d32b6b4b5..629cba228b18d 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/integration_preference.tsx @@ -171,10 +171,11 @@ export const IntegrationPreference = ({ )} - {title} - {title}, + }} options={radios} idSelected={idSelected} onChange={(id, value) => { diff --git a/x-pack/plugins/fleet/public/constants/index.ts b/x-pack/plugins/fleet/public/constants/index.ts index 1c0a04b9cb8a7..4fbe799aa7337 100644 --- a/x-pack/plugins/fleet/public/constants/index.ts +++ b/x-pack/plugins/fleet/public/constants/index.ts @@ -14,10 +14,11 @@ export { AGENT_API_ROUTES, SO_SEARCH_LIMIT, AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, AGENTS_PREFIX, UNPRIVILEGED_AGENT_KUERY, PRIVILEGED_AGENT_KUERY, - PACKAGE_POLICY_SAVED_OBJECT_TYPE, + LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE as PACKAGE_POLICY_SAVED_OBJECT_TYPE, FLEET_SERVER_PACKAGE, // Fleet Server index AGENTS_INDEX, diff --git a/x-pack/plugins/fleet/public/hooks/use_fleet_status.tsx b/x-pack/plugins/fleet/public/hooks/use_fleet_status.tsx index b05b3a1abc049..019940dc92238 100644 --- a/x-pack/plugins/fleet/public/hooks/use_fleet_status.tsx +++ b/x-pack/plugins/fleet/public/hooks/use_fleet_status.tsx @@ -21,6 +21,7 @@ export interface FleetStatusProviderProps { missingRequirements?: GetFleetStatusResponse['missing_requirements']; missingOptionalFeatures?: GetFleetStatusResponse['missing_optional_features']; isSecretsStorageEnabled?: GetFleetStatusResponse['is_secrets_storage_enabled']; + isSpaceAwarenessEnabled?: GetFleetStatusResponse['is_space_awareness_enabled']; spaceId?: string; } @@ -64,6 +65,7 @@ export const FleetStatusProvider: React.FC<{ missingRequirements: data?.missing_requirements, missingOptionalFeatures: data?.missing_optional_features, isSecretsStorageEnabled: data?.is_secrets_storage_enabled, + isSpaceAwarenessEnabled: data?.is_space_awareness_enabled, spaceId, }; diff --git a/x-pack/plugins/fleet/public/hooks/use_multiple_agent_policies.ts b/x-pack/plugins/fleet/public/hooks/use_multiple_agent_policies.ts index 2adf814e8ffba..b85b944c6ee00 100644 --- a/x-pack/plugins/fleet/public/hooks/use_multiple_agent_policies.ts +++ b/x-pack/plugins/fleet/public/hooks/use_multiple_agent_policies.ts @@ -5,12 +5,11 @@ * 2.0. */ +import { LICENCE_FOR_MULTIPLE_AGENT_POLICIES } from '../../common/constants'; import { ExperimentalFeaturesService } from '../services'; import { useLicense } from './use_license'; -export const LICENCE_FOR_MULTIPLE_AGENT_POLICIES = 'enterprise'; - export function useMultipleAgentPolicies() { const licenseService = useLicense(); const { enableReusableIntegrationPolicies } = ExperimentalFeaturesService.get(); diff --git a/x-pack/plugins/fleet/public/hooks/use_request/index.ts b/x-pack/plugins/fleet/public/hooks/use_request/index.ts index dc2f1292220cb..ff3981d0ee12c 100644 --- a/x-pack/plugins/fleet/public/hooks/use_request/index.ts +++ b/x-pack/plugins/fleet/public/hooks/use_request/index.ts @@ -22,3 +22,4 @@ export * from './download_source'; export * from './fleet_server_hosts'; export * from './fleet_proxies'; export * from './health_check'; +export * from './spaces'; diff --git a/x-pack/plugins/fleet/public/hooks/use_request/spaces.ts b/x-pack/plugins/fleet/public/hooks/use_request/spaces.ts new file mode 100644 index 0000000000000..20b4eadbd24b0 --- /dev/null +++ b/x-pack/plugins/fleet/public/hooks/use_request/spaces.ts @@ -0,0 +1,22 @@ +/* + * 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 { API_VERSIONS, appRoutesService } from '../../../common'; + +import { sendRequestForRq } from './use_request'; + +export function useAgentPoliciesSpaces() { + return useQuery(['fleet-get-spaces'], async () => { + return sendRequestForRq({ + method: 'get', + path: appRoutesService.getAgentPoliciesSpacesPath(), + version: API_VERSIONS.internal.v1, + }); + }); +} diff --git a/x-pack/plugins/fleet/server/collectors/agent_policies.ts b/x-pack/plugins/fleet/server/collectors/agent_policies.ts index 190c43f341ff8..3412e5f7f3c6e 100644 --- a/x-pack/plugins/fleet/server/collectors/agent_policies.ts +++ b/x-pack/plugins/fleet/server/collectors/agent_policies.ts @@ -8,12 +8,9 @@ import type { SavedObjectsClientContract } from '@kbn/core/server'; import _ from 'lodash'; -import { - AGENT_POLICY_SAVED_OBJECT_TYPE, - OUTPUT_SAVED_OBJECT_TYPE, - SO_SEARCH_LIMIT, -} from '../../common'; +import { OUTPUT_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../common'; import type { OutputSOAttributes, AgentPolicy } from '../types'; +import { getAgentPolicySavedObjectType } from '../services/agent_policy'; export interface AgentPoliciesUsage { count: number; @@ -35,9 +32,10 @@ export const getAgentPoliciesUsage = async ( const outputsById = _.keyBy(outputs, 'id'); + const agentPolicySavedObjectType = await getAgentPolicySavedObjectType(); const { saved_objects: agentPolicies, total: totalAgentPolicies } = await soClient.find({ - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: agentPolicySavedObjectType, page: 1, perPage: SO_SEARCH_LIMIT, }); diff --git a/x-pack/plugins/fleet/server/config.test.ts b/x-pack/plugins/fleet/server/config.test.ts index 86f05be014d84..e2b08f4e50cde 100644 --- a/x-pack/plugins/fleet/server/config.test.ts +++ b/x-pack/plugins/fleet/server/config.test.ts @@ -102,12 +102,20 @@ describe('Config schema', () => { }); }).not.toThrow(); }); - it('should not allow to specify a agentless.api.url in xpack.fleet.agentless.api without the tls config ', () => { + + it('should allow to specify xpack.fleet.agentless.enabled flag ', () => { + expect(() => { + config.schema.validate({ + agentless: { enabled: true }, + }); + }).not.toThrow(); + }); + it('should allow to specify a agentless.api.url in xpack.fleet.agentless.api without the tls config ', () => { expect(() => { config.schema.validate({ agentless: { api: { url: 'https://agentless.api.url' } }, }); - }).toThrow(); + }).not.toThrow(); }); it('should allow to specify agentless.api.url and the tls config in in xpack.fleet.agentless.api', () => { diff --git a/x-pack/plugins/fleet/server/config.ts b/x-pack/plugins/fleet/server/config.ts index 5ca34d5b505b3..8ea3f204ffc8f 100644 --- a/x-pack/plugins/fleet/server/config.ts +++ b/x-pack/plugins/fleet/server/config.ts @@ -35,9 +35,7 @@ export const config: PluginConfigDescriptor = { enabled: true, }, agentless: { - api: { - url: true, - }, + enabled: true, }, enableExperimental: true, developer: { @@ -149,14 +147,19 @@ export const config: PluginConfigDescriptor = { }), agentless: schema.maybe( schema.object({ - api: schema.object({ - url: schema.uri({ scheme: ['http', 'https'] }), - tls: schema.object({ - certificate: schema.string(), - key: schema.string(), - ca: schema.string(), - }), - }), + enabled: schema.boolean({ defaultValue: false }), + api: schema.maybe( + schema.object({ + url: schema.maybe(schema.uri({ scheme: ['http', 'https'] })), + tls: schema.maybe( + schema.object({ + certificate: schema.maybe(schema.string()), + key: schema.maybe(schema.string()), + ca: schema.maybe(schema.string()), + }) + ), + }) + ), }) ), packages: PreconfiguredPackagesSchema, diff --git a/x-pack/plugins/fleet/server/constants/index.ts b/x-pack/plugins/fleet/server/constants/index.ts index 8ea5297ecd59b..7751a8f23a59b 100644 --- a/x-pack/plugins/fleet/server/constants/index.ts +++ b/x-pack/plugins/fleet/server/constants/index.ts @@ -45,8 +45,9 @@ export { // Saved object types SO_SEARCH_LIMIT, AGENTS_PREFIX, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, AGENT_POLICY_SAVED_OBJECT_TYPE, - PACKAGE_POLICY_SAVED_OBJECT_TYPE, + LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE as PACKAGE_POLICY_SAVED_OBJECT_TYPE, OUTPUT_SAVED_OBJECT_TYPE, PACKAGES_SAVED_OBJECT_TYPE, ASSETS_SAVED_OBJECT_TYPE, diff --git a/x-pack/plugins/fleet/server/errors/index.ts b/x-pack/plugins/fleet/server/errors/index.ts index e2f8b88380484..80d8116baaaa3 100644 --- a/x-pack/plugins/fleet/server/errors/index.ts +++ b/x-pack/plugins/fleet/server/errors/index.ts @@ -65,6 +65,8 @@ export class PackagePolicyNameExistsError extends FleetError {} export class BundledPackageLocationNotFoundError extends FleetError {} export class PackagePolicyRequestError extends FleetError {} +export class PackagePolicyMultipleAgentPoliciesError extends FleetError {} +export class PackagePolicyOutputError extends FleetError {} export class EnrollmentKeyNameExistsError extends FleetError {} export class HostedAgentPolicyRestrictionRelatedError extends FleetError { diff --git a/x-pack/plugins/fleet/server/integration_tests/enable_space_awareness.test.ts b/x-pack/plugins/fleet/server/integration_tests/enable_space_awareness.test.ts new file mode 100644 index 0000000000000..0af9026bf8fa2 --- /dev/null +++ b/x-pack/plugins/fleet/server/integration_tests/enable_space_awareness.test.ts @@ -0,0 +1,228 @@ +/* + * 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 Path from 'path'; + +import type { KibanaRequest, SavedObjectsClientContract } from '@kbn/core/server'; +import { type MockedLogger, loggerMock } from '@kbn/logging-mocks'; + +import { + type TestElasticsearchUtils, + type TestKibanaUtils, + createRootWithCorePlugins, + createTestServers, +} from '@kbn/core-test-helpers-kbn-server'; +import { SECURITY_EXTENSION_ID } from '@kbn/core-saved-objects-server'; + +import { + AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, + PACKAGE_POLICY_SAVED_OBJECT_TYPE, +} from '../../common/constants'; + +import { appContextService } from '../services/app_context'; +import { enableSpaceAwarenessMigration } from '../services/spaces/enable_space_awareness'; + +import { + FLEET_AGENT_POLICIES_SCHEMA_VERSION, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, +} from '../constants'; + +import { useDockerRegistry, waitForFleetSetup } from './helpers'; + +const logFilePath = Path.join(__dirname, 'logs.log'); + +const fakeRequest = { + headers: {}, + getBasePath: () => '', + path: '/', + route: { settings: {} }, + url: { + href: '/', + }, + raw: { + req: { + url: '/', + }, + }, +} as unknown as KibanaRequest; + +describe('enableSpaceAwareness', () => { + let esServer: TestElasticsearchUtils; + let kbnServer: TestKibanaUtils; + + const registryUrl = useDockerRegistry(); + + const startServers = async () => { + const { startES } = createTestServers({ + adjustTimeout: (t) => jest.setTimeout(t), + settings: { + es: { + license: 'trial', + }, + kbn: {}, + }, + }); + + esServer = await startES(); + const startKibana = async () => { + const root = createRootWithCorePlugins( + { + xpack: { + fleet: { + registryUrl, + packages: [ + { + name: 'nginx', + version: 'latest', + }, + ], + }, + }, + logging: { + appenders: { + file: { + type: 'file', + fileName: logFilePath, + layout: { + type: 'json', + }, + }, + }, + loggers: [ + { + name: 'root', + appenders: ['file'], + }, + { + name: 'plugins.fleet', + level: 'all', + }, + ], + }, + }, + { oss: false } + ); + + await root.preboot(); + const coreSetup = await root.setup(); + const coreStart = await root.start(); + + return { + root, + coreSetup, + coreStart, + stop: async () => await root.shutdown(), + }; + }; + kbnServer = await startKibana(); + + await waitForFleetSetup(kbnServer.root); + }; + + const stopServers = async () => { + if (kbnServer) { + await kbnServer.stop(); + } + + if (esServer) { + await esServer.stop(); + } + + await new Promise((res) => setTimeout(res, 10000)); + }; + + // Share the same servers for all the test to make test a lot faster (but test are not isolated anymore) + beforeAll(async () => { + await startServers(); + }); + + afterAll(async () => { + await stopServers(); + }); + + let soClient: SavedObjectsClientContract; + + let logger: MockedLogger; + + beforeAll(async () => { + soClient = kbnServer.coreStart.savedObjects.getScopedClient(fakeRequest, { + excludedExtensions: [SECURITY_EXTENSION_ID], + }); + logger = loggerMock.create(); + appContextService.getLogger = () => logger; + + const RANGES = Array.from({ length: 5000 }, (value, index) => index); + + await soClient.bulkCreate( + RANGES.map((i) => ({ + id: `agent-policy-${i}`, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, + attributes: { + name: `agent-policy-${i}`, + schema_version: FLEET_AGENT_POLICIES_SCHEMA_VERSION, + revision: 1, + updated_at: new Date().toISOString(), + }, + })), + { + refresh: 'wait_for', + } + ); + + await soClient.bulkCreate( + RANGES.map((i) => ({ + id: `package-policy-${i}`, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, + attributes: { + name: `package-policy-${i}`, + created_at: new Date().toISOString(), + updated_at: new Date().toISOString(), + }, + })), + { + refresh: 'wait_for', + } + ); + }); + it('should support concurrent calls', async () => { + const res = await Promise.allSettled([ + enableSpaceAwarenessMigration(), + enableSpaceAwarenessMigration(), + enableSpaceAwarenessMigration(), + enableSpaceAwarenessMigration(), + enableSpaceAwarenessMigration(), + ]); + + const logs = loggerMock.collect(logger); + expect(res.filter((p) => p.status === 'fulfilled')).toHaveLength(1); + // It should start and complete the migration only once + expect( + logs.info.filter((m) => m[0] === 'Starting Fleet space awareness migration') + ).toHaveLength(1); + expect( + logs.info.filter((m) => m[0] === 'Fleet space awareness migration is complete') + ).toHaveLength(1); + // + expect( + logs.info.filter((m) => m[0] === 'Fleet space awareness migration is pending') + ).toHaveLength(4); + + // Check saved object are migrated + const resAgentPolicies = await soClient.find({ + type: AGENT_POLICY_SAVED_OBJECT_TYPE, + perPage: 0, + }); + expect(resAgentPolicies.total).toBe(5000); + + const resPackagePolicies = await soClient.find({ + type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + perPage: 0, + }); + expect(resPackagePolicies.total).toBe(5000); + }); +}); diff --git a/x-pack/plugins/fleet/server/integration_tests/upgrade_agent_policy_schema_version.test.ts b/x-pack/plugins/fleet/server/integration_tests/upgrade_agent_policy_schema_version.test.ts index dd4e925a7f17a..57e42a842a02c 100644 --- a/x-pack/plugins/fleet/server/integration_tests/upgrade_agent_policy_schema_version.test.ts +++ b/x-pack/plugins/fleet/server/integration_tests/upgrade_agent_policy_schema_version.test.ts @@ -23,7 +23,10 @@ import { createRootWithCorePlugins, } from '@kbn/core-test-helpers-kbn-server'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE, FLEET_AGENT_POLICIES_SCHEMA_VERSION } from '../constants'; +import { + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, + FLEET_AGENT_POLICIES_SCHEMA_VERSION, +} from '../constants'; import { upgradeAgentPolicySchemaVersion } from '../services/setup/upgrade_agent_policy_schema_version'; import { AGENT_POLICY_INDEX } from '../../common'; import { agentPolicyService } from '../services'; @@ -141,7 +144,7 @@ describe('upgrade agent policy schema version', () => { await soClient.bulkCreate([ // up-to-date schema_version { - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, id: uuidv4(), attributes: { schema_version: FLEET_AGENT_POLICIES_SCHEMA_VERSION, @@ -150,7 +153,7 @@ describe('upgrade agent policy schema version', () => { }, // out-of-date schema_version { - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, id: uuidv4(), attributes: { schema_version: '0.0.1', @@ -159,7 +162,7 @@ describe('upgrade agent policy schema version', () => { }, // missing schema_version { - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, id: uuidv4(), attributes: { revision: 1, @@ -170,7 +173,7 @@ describe('upgrade agent policy schema version', () => { await upgradeAgentPolicySchemaVersion(soClient); const policies = await agentPolicyService.list(soClient, { - kuery: `${AGENT_POLICY_SAVED_OBJECT_TYPE}.schema_version:${FLEET_AGENT_POLICIES_SCHEMA_VERSION}`, + kuery: `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.schema_version:${FLEET_AGENT_POLICIES_SCHEMA_VERSION}`, }); // all 3 should be up-to-date after upgrade expect(policies.total).toBe(3); diff --git a/x-pack/plugins/fleet/server/mocks/index.ts b/x-pack/plugins/fleet/server/mocks/index.ts index 9e517ad928ba3..6a91add910fb8 100644 --- a/x-pack/plugins/fleet/server/mocks/index.ts +++ b/x-pack/plugins/fleet/server/mocks/index.ts @@ -19,6 +19,8 @@ import { licensingMock } from '@kbn/licensing-plugin/server/mocks'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; import { securityMock } from '@kbn/security-plugin/server/mocks'; import { cloudMock } from '@kbn/cloud-plugin/public/mocks'; +import { SPACES_EXTENSION_ID } from '@kbn/core-saved-objects-server'; +import type { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import type { PackagePolicyClient } from '../services/package_policy_service'; import type { AgentPolicyServiceInterface } from '../services'; @@ -59,7 +61,11 @@ export interface MockedFleetAppContext extends FleetAppContext { export const createAppContextStartContractMock = ( configOverrides: Partial = {}, - isServerless: boolean = false + isServerless: boolean = false, + soClients: Partial<{ + internal?: SavedObjectsClientContract; + withoutSpaceExtensions?: SavedObjectsClientContract; + }> = {} ): MockedFleetAppContext => { const config = { agents: { enabled: true, elasticsearch: {} }, @@ -70,12 +76,26 @@ export const createAppContextStartContractMock = ( const config$ = of(config); + const mockedSavedObject = savedObjectsServiceMock.createStartContract(); + + const internalSoClient = soClients.internal ?? savedObjectsClientMock.create(); + const internalSoClientWithoutSpaceExtension = + soClients.withoutSpaceExtensions ?? savedObjectsClientMock.create(); + + mockedSavedObject.getScopedClient.mockImplementation((request, options) => { + if (options?.excludedExtensions?.includes(SPACES_EXTENSION_ID)) { + return internalSoClientWithoutSpaceExtension; + } + + return internalSoClient; + }); + return { elasticsearch: elasticsearchServiceMock.createStart(), data: dataPluginMock.createStartContract(), encryptedSavedObjectsStart: encryptedSavedObjectsMock.createStart(), encryptedSavedObjectsSetup: encryptedSavedObjectsMock.createSetup({ canEncrypt: true }), - savedObjects: savedObjectsServiceMock.createStartContract(), + savedObjects: mockedSavedObject, securityCoreStart: securityServiceMock.createStart(), securitySetup: securityMock.createSetup(), securityStart: securityMock.createStart(), @@ -116,6 +136,7 @@ export const createFleetRequestHandlerContextMock = (): jest.Mocked< > => { return { authz: createFleetAuthzMock(), + getAllSpaces: jest.fn(), agentClient: { asCurrentUser: agentServiceMock.createClient(), asInternalUser: agentServiceMock.createClient(), @@ -167,21 +188,22 @@ export const createPackagePolicyServiceMock = (): jest.Mocked { - return { + return Promise.resolve({ async *[Symbol.asyncIterator]() { yield Promise.resolve([PackagePolicyMocks.generatePackagePolicy({ id: '111' })]); yield Promise.resolve([PackagePolicyMocks.generatePackagePolicy({ id: '222' })]); }, - }; + }); }), fetchAllItemIds: jest.fn((..._) => { - return { + return Promise.resolve({ async *[Symbol.asyncIterator]() { yield Promise.resolve(['111']); yield Promise.resolve(['222']); }, - }; + }); }), + removeOutputFromAll: jest.fn(), }; }; diff --git a/x-pack/plugins/fleet/server/mocks/package_policy.mocks.ts b/x-pack/plugins/fleet/server/mocks/package_policy.mocks.ts index 6f79a20e6d1f3..b98dafa9abfd0 100644 --- a/x-pack/plugins/fleet/server/mocks/package_policy.mocks.ts +++ b/x-pack/plugins/fleet/server/mocks/package_policy.mocks.ts @@ -28,6 +28,7 @@ const generatePackagePolicySOAttributesMock = ( updated_by: 'user-a', policy_id: '444-555-666', policy_ids: ['444-555-666'], + output_id: 'output-123', enabled: true, inputs: [], namespace: 'default', diff --git a/x-pack/plugins/fleet/server/plugin.ts b/x-pack/plugins/fleet/server/plugin.ts index ae65f94238bfa..d05ef1de33641 100644 --- a/x-pack/plugins/fleet/server/plugin.ts +++ b/x-pack/plugins/fleet/server/plugin.ts @@ -78,7 +78,7 @@ import { } from './services/security'; import { - AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, ASSETS_SAVED_OBJECT_TYPE, DOWNLOAD_SOURCE_SAVED_OBJECT_TYPE, FLEET_SERVER_HOST_SAVED_OBJECT_TYPE, @@ -150,6 +150,7 @@ export interface FleetStartDeps { telemetry?: TelemetryPluginStart; savedObjectsTagging: SavedObjectTaggingStart; taskManager: TaskManagerStartContract; + spaces: SpacesPluginStart; } export interface FleetAppContext { @@ -183,7 +184,7 @@ export type FleetSetupContract = void; const allSavedObjectTypes = [ OUTPUT_SAVED_OBJECT_TYPE, - AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, PACKAGE_POLICY_SAVED_OBJECT_TYPE, PACKAGES_SAVED_OBJECT_TYPE, ASSETS_SAVED_OBJECT_TYPE, @@ -257,6 +258,7 @@ export class FleetPlugin private kibanaInstanceId: FleetAppContext['kibanaInstanceId']; private httpSetup?: HttpServiceSetup; private securitySetup!: SecurityPluginSetup; + private spacesPluginsStart?: SpacesPluginStart; private encryptedSavedObjectsSetup?: EncryptedSavedObjectsPluginSetup; private readonly telemetryEventsSender: TelemetryEventsSender; private readonly fleetStatus$: BehaviorSubject; @@ -517,6 +519,7 @@ export class FleetPlugin .getSavedObjects() .getScopedClient(request, { excludedExtensions: [SECURITY_EXTENSION_ID] }); + const spacesPluginsStart = this.spacesPluginsStart; return { get agentClient() { const agentService = plugin.setupAgentService(esClient.asInternalUser, soClient); @@ -554,7 +557,9 @@ export class FleetPlugin get spaceId() { return deps.spaces?.spacesService?.getSpaceId(request) ?? DEFAULT_SPACE_ID; }, - + getAllSpaces() { + return spacesPluginsStart!.spacesService.createSpacesClient(request).getAll(); + }, get limitedToPackages() { if (routeAuthz && routeAuthz.granted) { return routeAuthz.scopeDataToPackages; @@ -600,6 +605,7 @@ export class FleetPlugin } public start(core: CoreStart, plugins: FleetStartDeps): FleetStartContract { + this.spacesPluginsStart = plugins.spaces; const messageSigningService = new MessageSigningService( this.initializerContext.logger, plugins.encryptedSavedObjects.getClient({ diff --git a/x-pack/plugins/fleet/server/routes/agent/handlers.ts b/x-pack/plugins/fleet/server/routes/agent/handlers.ts index 8ff3f82b7e6c6..350eb24847d85 100644 --- a/x-pack/plugins/fleet/server/routes/agent/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent/handlers.ts @@ -47,8 +47,8 @@ import { getAgentStatusForAgentPolicy } from '../../services/agents'; import { isAgentInNamespace } from '../../services/spaces/agent_namespaces'; import { getCurrentNamespace } from '../../services/spaces/get_current_namespace'; -function verifyNamespace(agent: Agent, namespace?: string) { - if (!isAgentInNamespace(agent, namespace)) { +async function verifyNamespace(agent: Agent, namespace?: string) { + if (!(await isAgentInNamespace(agent, namespace))) { throw new FleetNotFoundError(`${agent.id} not found in namespace`); } } @@ -62,7 +62,7 @@ export const getAgentHandler: FleetRequestHandler< const esClientCurrentUser = coreContext.elasticsearch.client.asCurrentUser; let agent = await fleetContext.agentClient.asCurrentUser.getAgent(request.params.agentId); - verifyNamespace(agent, getCurrentNamespace(coreContext.savedObjects.client)); + await verifyNamespace(agent, getCurrentNamespace(coreContext.savedObjects.client)); if (request.query.withMetrics) { agent = (await fetchAndAssignAgentMetrics(esClientCurrentUser, [agent]))[0]; @@ -92,7 +92,7 @@ export const deleteAgentHandler: FleetRequestHandler< try { const agent = await fleetContext.agentClient.asCurrentUser.getAgent(request.params.agentId); - verifyNamespace(agent, getCurrentNamespace(coreContext.savedObjects.client)); + await verifyNamespace(agent, getCurrentNamespace(coreContext.savedObjects.client)); await AgentService.deleteAgent(esClient, request.params.agentId); @@ -132,7 +132,7 @@ export const updateAgentHandler: FleetRequestHandler< try { const agent = await fleetContext.agentClient.asCurrentUser.getAgent(request.params.agentId); - verifyNamespace(agent, getCurrentNamespace(soClient)); + await verifyNamespace(agent, getCurrentNamespace(soClient)); await AgentService.updateAgent(esClient, request.params.agentId, partialAgent); const body = { diff --git a/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts b/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts index 8b7a93f6f332e..2d374f869fcf4 100644 --- a/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/agent_policy/handlers.ts @@ -6,7 +6,7 @@ */ import type { TypeOf } from '@kbn/config-schema'; -import type { RequestHandler, ResponseHeaders } from '@kbn/core/server'; +import type { KibanaRequest, RequestHandler, ResponseHeaders } from '@kbn/core/server'; import pMap from 'p-map'; import { safeDump } from 'js-yaml'; @@ -28,6 +28,7 @@ import type { FleetRequestHandler, BulkGetAgentPoliciesRequestSchema, AgentPolicy, + FleetRequestHandlerContext, } from '../../types'; import type { @@ -47,8 +48,10 @@ import { defaultFleetErrorHandler, AgentPolicyNotFoundError, FleetUnauthorizedError, + FleetError, } from '../../errors'; import { createAgentPolicyWithPackages } from '../../services/agent_policy_create'; +import { updateAgentPolicySpaces } from '../../services/spaces/agent_policy'; export async function populateAssignedAgentsCount( agentClient: AgentClient, @@ -97,6 +100,24 @@ function sanitizeItemForReadAgentOnly(item: AgentPolicy): AgentPolicy { }; } +export async function checkAgentPoliciesAllPrivilegesForSpaces( + request: KibanaRequest, + context: FleetRequestHandlerContext, + spaceIds: string[] +) { + const security = appContextService.getSecurity(); + const spaces = await (await context.fleet).getAllSpaces(); + const allSpaceId = spaces.map((s) => s.id); + const res = await security.authz.checkPrivilegesWithRequest(request).atSpaces(allSpaceId, { + kibana: [security.authz.actions.api.get(`fleet-agent-policies-all`)], + }); + + return allSpaceId.filter( + (id) => + res.privileges.kibana.find((privilege) => privilege.resource === id)?.authorized ?? false + ); +} + export const getAgentPoliciesHandler: FleetRequestHandler< undefined, TypeOf @@ -218,26 +239,54 @@ export const createAgentPolicyHandler: FleetRequestHandler< const user = appContextService.getSecurityCore().authc.getCurrentUser(request) || undefined; const withSysMonitoring = request.query.sys_monitoring ?? false; const monitoringEnabled = request.body.monitoring_enabled; - const { has_fleet_server: hasFleetServer, force, ...newPolicy } = request.body; + const { + has_fleet_server: hasFleetServer, + force, + space_ids: spaceIds, + ...newPolicy + } = request.body; const spaceId = fleetContext.spaceId; const authorizationHeader = HTTPAuthorizationHeader.parseFromRequest(request, user?.username); try { + let authorizedSpaces: string[] | undefined; + if (spaceIds?.length) { + authorizedSpaces = await checkAgentPoliciesAllPrivilegesForSpaces(request, context, spaceIds); + for (const requestedSpaceId of spaceIds) { + if (!authorizedSpaces.includes(requestedSpaceId)) { + throw new FleetError( + `No enough permissions to create policies in space ${requestedSpaceId}` + ); + } + } + } + + const agentPolicy = await createAgentPolicyWithPackages({ + soClient, + esClient, + newPolicy, + hasFleetServer, + withSysMonitoring, + monitoringEnabled, + spaceId, + user, + authorizationHeader, + force, + }); + const body: CreateAgentPolicyResponse = { - item: await createAgentPolicyWithPackages({ - soClient, - esClient, - newPolicy, - hasFleetServer, - withSysMonitoring, - monitoringEnabled, - spaceId, - user, - authorizationHeader, - force, - }), + item: agentPolicy, }; + if (spaceIds && spaceIds.length > 1 && authorizedSpaces) { + await updateAgentPolicySpaces({ + agentPolicyId: agentPolicy.id, + currentSpaceId: spaceId, + newSpaceIds: spaceIds, + authorizedSpaces, + }); + } + return response.ok({ body, }); @@ -259,20 +308,36 @@ export const updateAgentPolicyHandler: FleetRequestHandler< > = async (context, request, response) => { const coreContext = await context.core; const fleetContext = await context.fleet; - const soClient = coreContext.savedObjects.client; const esClient = coreContext.elasticsearch.client.asInternalUser; const user = appContextService.getSecurityCore().authc.getCurrentUser(request) || undefined; - const { force, ...data } = request.body; + const { force, space_ids: spaceIds, ...data } = request.body; + + let spaceId = fleetContext.spaceId; - const spaceId = fleetContext.spaceId; try { + if (spaceIds?.length) { + const authorizedSpaces = await checkAgentPoliciesAllPrivilegesForSpaces( + request, + context, + spaceIds + ); + await updateAgentPolicySpaces({ + agentPolicyId: request.params.agentPolicyId, + currentSpaceId: spaceId, + newSpaceIds: spaceIds, + authorizedSpaces, + }); + + spaceId = spaceIds[0]; + } const agentPolicy = await agentPolicyService.update( - soClient, + appContextService.getInternalUserSOClientForSpaceId(spaceId), esClient, request.params.agentPolicyId, data, { force, user, spaceId } ); + const body: UpdateAgentPolicyResponse = { item: agentPolicy }; return response.ok({ body, diff --git a/x-pack/plugins/fleet/server/routes/app/index.ts b/x-pack/plugins/fleet/server/routes/app/index.ts index db1b86c12243b..994348f6d9967 100644 --- a/x-pack/plugins/fleet/server/routes/app/index.ts +++ b/x-pack/plugins/fleet/server/routes/app/index.ts @@ -8,16 +8,17 @@ import type { RequestHandler, RouteValidationResultFactory } from '@kbn/core/server'; import type { TypeOf } from '@kbn/config-schema'; +import { parseExperimentalConfigValue } from '../../../common/experimental_features'; import type { FleetAuthzRouter } from '../../services/security'; - import { APP_API_ROUTES } from '../../constants'; import { API_VERSIONS } from '../../../common/constants'; - import { appContextService } from '../../services'; import type { CheckPermissionsResponse, GenerateServiceTokenResponse } from '../../../common/types'; import { defaultFleetErrorHandler, GenerateServiceTokenError } from '../../errors'; import type { FleetRequestHandler, GenerateServiceTokenRequestSchema } from '../../types'; import { CheckPermissionsRequestSchema } from '../../types'; +import { enableSpaceAwarenessMigration } from '../../services/spaces/enable_space_awareness'; +import { type FleetConfigType } from '../../config'; export const getCheckPermissionsHandler: FleetRequestHandler< unknown, @@ -98,6 +99,23 @@ export const getCheckPermissionsHandler: FleetRequestHandler< } }; +export const postEnableSpaceAwarenessHandler: FleetRequestHandler = async ( + context, + request, + response +) => { + try { + await enableSpaceAwarenessMigration(); + + return response.ok({ + body: {}, + }); + } catch (e) { + const error = new GenerateServiceTokenError(e); + return defaultFleetErrorHandler({ error, response }); + } +}; + export const generateServiceTokenHandler: RequestHandler< null, null, @@ -133,6 +151,35 @@ export const generateServiceTokenHandler: RequestHandler< } }; +export const getAgentPoliciesSpacesHandler: FleetRequestHandler< + null, + null, + TypeOf +> = async (context, request, response) => { + try { + const spaces = await (await context.fleet).getAllSpaces(); + const security = appContextService.getSecurity(); + const spaceIds = spaces.map(({ id }) => id); + const res = await security.authz.checkPrivilegesWithRequest(request).atSpaces(spaceIds, { + kibana: [security.authz.actions.api.get(`fleet-agent-policies-all`)], + }); + + const authorizedSpaces = spaces.filter( + (space) => + res.privileges.kibana.find((privilege) => privilege.resource === space.id)?.authorized ?? + false + ); + + return response.ok({ + body: { + items: authorizedSpaces, + }, + }); + } catch (error) { + return defaultFleetErrorHandler({ error, response }); + } +}; + const serviceTokenBodyValidation = (data: any, validationResult: RouteValidationResultFactory) => { const { ok } = validationResult; if (!data) { @@ -142,7 +189,26 @@ const serviceTokenBodyValidation = (data: any, validationResult: RouteValidation return ok({ remote }); }; -export const registerRoutes = (router: FleetAuthzRouter) => { +export const registerRoutes = (router: FleetAuthzRouter, config: FleetConfigType) => { + const experimentalFeatures = parseExperimentalConfigValue(config.enableExperimental); + + if (experimentalFeatures.useSpaceAwareness) { + router.versioned + .post({ + path: '/internal/fleet/enable_space_awareness', + access: 'internal', + fleetAuthz: { + fleet: { all: true }, + }, + }) + .addVersion( + { + version: API_VERSIONS.internal.v1, + validate: {}, + }, + postEnableSpaceAwarenessHandler + ); + } router.versioned .get({ path: APP_API_ROUTES.CHECK_PERMISSIONS_PATTERN, @@ -155,6 +221,22 @@ export const registerRoutes = (router: FleetAuthzRouter) => { getCheckPermissionsHandler ); + router.versioned + .get({ + path: APP_API_ROUTES.AGENT_POLICIES_SPACES, + access: 'internal', + fleetAuthz: { + fleet: { allAgentPolicies: true }, + }, + }) + .addVersion( + { + version: API_VERSIONS.internal.v1, + validate: {}, + }, + getAgentPoliciesSpacesHandler + ); + router.versioned .post({ path: APP_API_ROUTES.GENERATE_SERVICE_TOKEN_PATTERN, diff --git a/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts b/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts index 4edea93176de4..a38f5bdadc617 100644 --- a/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts +++ b/x-pack/plugins/fleet/server/routes/enrollment_api_key/handler.ts @@ -23,19 +23,19 @@ import type { import * as APIKeyService from '../../services/api_keys'; import { agentPolicyService } from '../../services/agent_policy'; import { defaultFleetErrorHandler, AgentPolicyNotFoundError } from '../../errors'; -import { appContextService } from '../../services'; import { getCurrentNamespace } from '../../services/spaces/get_current_namespace'; +import { isSpaceAwarenessEnabled } from '../../services/spaces/helpers'; export const getEnrollmentApiKeysHandler: RequestHandler< undefined, TypeOf > = async (context, request, response) => { - const { useSpaceAwareness } = appContextService.getExperimentalFeatures(); // Use kibana_system and depend on authz checks on HTTP layer to prevent abuse const esClient = (await context.core).elasticsearch.client.asInternalUser; const soClient = (await context.core).savedObjects.client; try { + const useSpaceAwareness = await isSpaceAwarenessEnabled(); const { items, total, page, perPage } = await APIKeyService.listEnrollmentApiKeys(esClient, { page: request.query.page, perPage: request.query.perPage, @@ -91,7 +91,7 @@ export const deleteEnrollmentApiKeyHandler: RequestHandler< TypeOf > = async (context, request, response) => { try { - const { useSpaceAwareness } = appContextService.getExperimentalFeatures(); + const useSpaceAwareness = await isSpaceAwarenessEnabled(); const coreContext = await context.core; const esClient = coreContext.elasticsearch.client.asInternalUser; const currentNamespace = getCurrentNamespace(coreContext.savedObjects.client); @@ -124,7 +124,7 @@ export const getOneEnrollmentApiKeyHandler: RequestHandler< const coreContext = await context.core; const esClient = coreContext.elasticsearch.client.asInternalUser; const currentNamespace = getCurrentNamespace(coreContext.savedObjects.client); - const { useSpaceAwareness } = appContextService.getExperimentalFeatures(); + const useSpaceAwareness = await isSpaceAwarenessEnabled(); const apiKey = await APIKeyService.getEnrollmentAPIKey( esClient, diff --git a/x-pack/plugins/fleet/server/routes/index.ts b/x-pack/plugins/fleet/server/routes/index.ts index 9257d672848a7..41ce57e85de2b 100644 --- a/x-pack/plugins/fleet/server/routes/index.ts +++ b/x-pack/plugins/fleet/server/routes/index.ts @@ -31,7 +31,7 @@ import { registerRoutes as registerDebugRoutes } from './debug'; export function registerRoutes(fleetAuthzRouter: FleetAuthzRouter, config: FleetConfigType) { // Always register app routes for permissions checking - registerAppRoutes(fleetAuthzRouter); + registerAppRoutes(fleetAuthzRouter, config); // The upload package route is only authorized for the superuser registerEPMRoutes(fleetAuthzRouter, config); diff --git a/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts b/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts index bfe2011af9d89..f42ed00360033 100644 --- a/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts +++ b/x-pack/plugins/fleet/server/routes/package_policy/handlers.test.ts @@ -28,7 +28,6 @@ import type { AgentPolicy, FleetRequestHandler } from '../../types'; import type { PackagePolicy } from '../../types'; import { createPackagePolicyHandler, getPackagePoliciesHandler } from './handlers'; - import { registerRoutes } from '.'; const packagePolicyServiceMock = packagePolicyService as jest.Mocked; @@ -202,6 +201,7 @@ describe('When calling package policy', () => { }; beforeEach(() => { + jest.spyOn(licenseService, 'hasAtLeast').mockClear(); // @ts-ignore const postMock = routerMock.versioned.post.mock; // @ts-ignore @@ -221,29 +221,6 @@ describe('When calling package policy', () => { }, }); }); - - it('should throw if no enterprise license and multiple policy_ids is provided', async () => { - const request = getCreateKibanaRequest({ ...newPolicy, policy_ids: ['1', '2'] } as any); - await createPackagePolicyHandler(context, request as any, response); - expect(response.customError).toHaveBeenCalledWith({ - statusCode: 400, - body: { - message: 'Reusable integration policies are only available with an Enterprise license', - }, - }); - }); - - it('should not throw if enterprise license and multiple policy_ids is provided', async () => { - jest.spyOn(licenseService, 'hasAtLeast').mockReturnValue(true); - const request = getCreateKibanaRequest({ ...newPolicy, policy_ids: ['1', '2'] } as any); - await createPackagePolicyHandler(context, request as any, response); - expect(response.customError).not.toHaveBeenCalledWith({ - statusCode: 400, - body: { - message: 'Reusable integration policies are only available with an Enterprise license', - }, - }); - }); }); describe('Update api handler', () => { @@ -308,6 +285,7 @@ describe('When calling package policy', () => { }); beforeEach(() => { + jest.spyOn(licenseService, 'hasAtLeast').mockClear(); packagePolicyServiceMock.update.mockImplementation((soClient, esClient, policyId, newData) => Promise.resolve(newData as PackagePolicy) ); @@ -333,6 +311,7 @@ describe('When calling package policy', () => { }, ], }); + (agentPolicyService.get as jest.Mock).mockResolvedValue({ inputs: [] }); }); it('should use existing package policy props if not provided by request', async () => { @@ -393,63 +372,30 @@ describe('When calling package policy', () => { }); }); - it('should throw if no enterprise license and multiple policy_ids is provided', async () => { - jest.spyOn(licenseService, 'hasAtLeast').mockReturnValue(false); - const request = getUpdateKibanaRequest({ policy_ids: ['1', '2'] } as any); - await routeHandler(context, request, response); - expect(response.customError).toHaveBeenCalledWith({ - statusCode: 400, - body: { - message: 'Reusable integration policies are only available with an Enterprise license', - }, + it('should throw if policy_ids changed on agentless integration', async () => { + (agentPolicyService.get as jest.Mock).mockResolvedValue({ + supports_agentless: true, + inputs: [], }); - }); - - it('should not throw if enterprise license and multiple policy_ids is provided', async () => { jest.spyOn(licenseService, 'hasAtLeast').mockReturnValue(true); jest .spyOn(appContextService, 'getExperimentalFeatures') .mockReturnValue({ enableReusableIntegrationPolicies: true } as any); const request = getUpdateKibanaRequest({ policy_ids: ['1', '2'] } as any); await routeHandler(context, request, response); - expect(response.ok).toHaveBeenCalled(); - }); - - it('should throw if enterprise license and feature flag is disabled and multiple policy_ids is provided', async () => { - jest.spyOn(licenseService, 'hasAtLeast').mockReturnValue(true); - jest - .spyOn(appContextService, 'getExperimentalFeatures') - .mockReturnValue({ enableReusableIntegrationPolicies: false } as any); - const request = getUpdateKibanaRequest({ policy_ids: ['1', '2'] } as any); - await routeHandler(context, request, response); - expect(response.customError).toHaveBeenCalledWith({ - statusCode: 400, - body: { - message: 'Reusable integration policies are not supported', - }, - }); - }); - - it('should throw if empty policy_ids are provided', async () => { - jest.spyOn(licenseService, 'hasAtLeast').mockReturnValue(true); - jest - .spyOn(appContextService, 'getExperimentalFeatures') - .mockReturnValue({ enableReusableIntegrationPolicies: true } as any); - const request = getUpdateKibanaRequest({ policy_ids: [] } as any); - await routeHandler(context, request, response); expect(response.customError).toHaveBeenCalledWith({ statusCode: 400, body: { - message: 'At least one agent policy id must be provided', + message: 'Cannot change agent policies of an agentless integration', }, }); }); it('should rename the agentless agent policy to sync with the package policy name if agentless is enabled', async () => { jest.spyOn(appContextService, 'getCloud').mockReturnValue({ isCloudEnabled: true } as any); - jest - .spyOn(appContextService, 'getExperimentalFeatures') - .mockReturnValue({ agentless: true } as any); + jest.spyOn(appContextService, 'getConfig').mockReturnValue({ + agentless: { enabled: true }, + } as any); mockAgentPolicy({ supports_agentless: true, @@ -466,11 +412,11 @@ describe('When calling package policy', () => { { force: true } ); }); - it('should not rename the agentless agent policy if agentless is not enabled', async () => { + it('should not rename the agentless agent policy if agentless is not enabled in cloud environment', async () => { jest.spyOn(appContextService, 'getCloud').mockReturnValue({ isCloudEnabled: true } as any); - jest - .spyOn(appContextService, 'getExperimentalFeatures') - .mockReturnValue({ agentless: false } as any); + jest.spyOn(appContextService, 'getConfig').mockReturnValue({ + agentless: { enabled: false }, + } as any); mockAgentPolicy({ supports_agentless: true, @@ -483,9 +429,6 @@ describe('When calling package policy', () => { }); it('should not rename the agentless agent policy if cloud is not enabled', async () => { jest.spyOn(appContextService, 'getCloud').mockReturnValue({ isCloudEnabled: false } as any); - jest - .spyOn(appContextService, 'getExperimentalFeatures') - .mockReturnValue({ agentless: true } as any); mockAgentPolicy({ supports_agentless: true, @@ -498,9 +441,9 @@ describe('When calling package policy', () => { }); it('should not rename the agentless agent policy if the package policy name has not changed', async () => { jest.spyOn(appContextService, 'getCloud').mockReturnValue({ isCloudEnabled: true } as any); - jest - .spyOn(appContextService, 'getExperimentalFeatures') - .mockReturnValue({ agentless: true } as any); + jest.spyOn(appContextService, 'getConfig').mockReturnValue({ + agentless: { enabled: true }, + } as any); mockAgentPolicy({ supports_agentless: true, @@ -514,9 +457,9 @@ describe('When calling package policy', () => { }); it('should not rename the agentless agent policy if the agent policy does not support agentless', async () => { jest.spyOn(appContextService, 'getCloud').mockReturnValue({ isCloudEnabled: true } as any); - jest - .spyOn(appContextService, 'getExperimentalFeatures') - .mockReturnValue({ agentless: true } as any); + jest.spyOn(appContextService, 'getConfig').mockReturnValue({ + agentless: { enabled: true }, + } as any); mockAgentPolicy({ supports_agentless: false, diff --git a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts index 24872b2db72f2..5cc00ef014cde 100644 --- a/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/package_policy/handlers.ts @@ -10,7 +10,7 @@ import type { TypeOf } from '@kbn/config-schema'; import { SavedObjectsErrorHelpers } from '@kbn/core/server'; import type { RequestHandler } from '@kbn/core/server'; -import { groupBy, keyBy } from 'lodash'; +import { groupBy, isEmpty, isEqual, keyBy } from 'lodash'; import { HTTPAuthorizationHeader } from '../../../common/http_authorization_header'; @@ -63,7 +63,6 @@ import { import type { SimplifiedPackagePolicy } from '../../../common/services/simplified_package_policy_helper'; import { - canUseMultipleAgentPolicies, isSimplifiedCreatePackagePolicyRequest, removeFieldsFromInputSchema, renameAgentlessAgentPolicy, @@ -242,21 +241,12 @@ export const createPackagePolicyHandler: FleetRequestHandler< const authorizationHeader = HTTPAuthorizationHeader.parseFromRequest(request, user?.username); let wasPackageAlreadyInstalled = false; - if ('output_id' in newPolicy) { - // TODO Remove deprecated APIs https://github.com/elastic/kibana/issues/121485 - delete newPolicy.output_id; - } const spaceId = fleetContext.spaceId; try { if (!newPolicy.policy_id && (!newPolicy.policy_ids || newPolicy.policy_ids.length === 0)) { throw new PackagePolicyRequestError('Either policy_id or policy_ids must be provided'); } - const { canUseReusablePolicies, errorMessage } = canUseMultipleAgentPolicies(); - if ((newPolicy.policy_ids ?? []).length > 1 && !canUseReusablePolicies) { - throw new PackagePolicyRequestError(errorMessage); - } - let newPackagePolicy: NewPackagePolicy; if (isSimplifiedCreatePackagePolicyRequest(newPolicy)) { if (!pkg) { @@ -369,11 +359,6 @@ export const updatePackagePolicyHandler: FleetRequestHandler< try { const { force, package: pkg, ...body } = request.body; - // TODO Remove deprecated APIs https://github.com/elastic/kibana/issues/121485 - if ('output_id' in body) { - delete body.output_id; - } - let newData: NewPackagePolicy; if ( @@ -420,15 +405,24 @@ export const updatePackagePolicyHandler: FleetRequestHandler< } } newData.inputs = alignInputsAndStreams(newData.inputs); - const { canUseReusablePolicies, errorMessage } = canUseMultipleAgentPolicies(); - if ((newData.policy_ids ?? []).length > 1 && !canUseReusablePolicies) { - throw new PackagePolicyRequestError(errorMessage); - } if (newData.policy_ids && newData.policy_ids.length === 0) { throw new PackagePolicyRequestError('At least one agent policy id must be provided'); } + if ( + newData.policy_ids && + !isEmpty(packagePolicy.policy_ids) && + !isEqual(newData.policy_ids, packagePolicy.policy_ids) + ) { + const agentPolicy = await agentPolicyService.get(soClient, packagePolicy.policy_ids[0]); + if (agentPolicy?.supports_agentless) { + throw new PackagePolicyRequestError( + 'Cannot change agent policies of an agentless integration' + ); + } + } + await renameAgentlessAgentPolicy(soClient, esClient, packagePolicy, newData.name); const updatedPackagePolicy = await packagePolicyService.update( diff --git a/x-pack/plugins/fleet/server/routes/package_policy/utils/index.ts b/x-pack/plugins/fleet/server/routes/package_policy/utils/index.ts index f2ffc641c36ab..032dab4a07acc 100644 --- a/x-pack/plugins/fleet/server/routes/package_policy/utils/index.ts +++ b/x-pack/plugins/fleet/server/routes/package_policy/utils/index.ts @@ -21,8 +21,7 @@ import type { PackagePolicyInput, NewPackagePolicyInput, } from '../../../types'; -import { appContextService } from '../../../services'; -import { agentPolicyService, licenseService } from '../../../services'; +import { agentPolicyService } from '../../../services'; import type { SimplifiedPackagePolicy } from '../../../../common/services/simplified_package_policy_helper'; import { PackagePolicyRequestError } from '../../../errors'; import type { NewPackagePolicyInputStream } from '../../../../common'; @@ -56,20 +55,6 @@ export function removeFieldsFromInputSchema( }); } -const LICENCE_FOR_MULTIPLE_AGENT_POLICIES = 'enterprise'; - -export function canUseMultipleAgentPolicies() { - const hasEnterpriseLicence = licenseService.hasAtLeast(LICENCE_FOR_MULTIPLE_AGENT_POLICIES); - const { enableReusableIntegrationPolicies } = appContextService.getExperimentalFeatures(); - - return { - canUseReusablePolicies: hasEnterpriseLicence && enableReusableIntegrationPolicies, - errorMessage: !hasEnterpriseLicence - ? 'Reusable integration policies are only available with an Enterprise license' - : 'Reusable integration policies are not supported', - }; -} - /** * If an agentless agent policy is associated with the package policy, * it will rename the agentless agent policy of a package policy to keep it in sync with the package policy name. diff --git a/x-pack/plugins/fleet/server/routes/settings/enrollment_settings_handler.ts b/x-pack/plugins/fleet/server/routes/settings/enrollment_settings_handler.ts index 132777867becb..17cb27296d9e4 100644 --- a/x-pack/plugins/fleet/server/routes/settings/enrollment_settings_handler.ts +++ b/x-pack/plugins/fleet/server/routes/settings/enrollment_settings_handler.ts @@ -115,7 +115,7 @@ export const getFleetServerOrAgentPolicies = async ( has_fleet_server: policy.has_fleet_server, fleet_server_host_id: policy.fleet_server_host_id, download_source_id: policy.download_source_id, - space_id: policy.space_id, + space_ids: policy.space_ids, }); // If an agent policy is specified, return only that policy diff --git a/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts b/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts index bb9bf0b507ca9..6923d00c18222 100644 --- a/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts +++ b/x-pack/plugins/fleet/server/routes/setup/handlers.test.ts @@ -49,6 +49,7 @@ describe('FleetSetupHandler', () => { uninstallTokenService: { asCurrentUser: createUninstallTokenServiceMock(), }, + getAllSpaces: jest.fn(), agentClient: { asCurrentUser: agentServiceMock.createClient(), asInternalUser: agentServiceMock.createClient(), @@ -136,6 +137,7 @@ describe('FleetStatusHandler', () => { uninstallTokenService: { asCurrentUser: createUninstallTokenServiceMock(), }, + getAllSpaces: jest.fn(), agentClient: { asCurrentUser: agentServiceMock.createClient(), asInternalUser: agentServiceMock.createClient(), @@ -179,6 +181,7 @@ describe('FleetStatusHandler', () => { const expectedBody = { isReady: true, is_secrets_storage_enabled: false, + is_space_awareness_enabled: false, missing_optional_features: [], missing_requirements: [], }; @@ -200,6 +203,7 @@ describe('FleetStatusHandler', () => { const expectedBody = { isReady: false, is_secrets_storage_enabled: false, + is_space_awareness_enabled: false, missing_optional_features: [], missing_requirements: ['api_keys', 'fleet_server'], }; @@ -228,6 +232,7 @@ describe('FleetStatusHandler', () => { const expectedBody = { isReady: true, is_secrets_storage_enabled: false, + is_space_awareness_enabled: false, missing_optional_features: [], missing_requirements: [], }; diff --git a/x-pack/plugins/fleet/server/routes/setup/handlers.ts b/x-pack/plugins/fleet/server/routes/setup/handlers.ts index 019fb2af5276b..05ee55320d445 100644 --- a/x-pack/plugins/fleet/server/routes/setup/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/setup/handlers.ts @@ -13,6 +13,7 @@ import { defaultFleetErrorHandler } from '../../errors'; import type { FleetRequestHandler } from '../../types'; import { getGpgKeyIdOrUndefined } from '../../services/epm/packages/package_verification'; import { isSecretStorageEnabled } from '../../services/secrets'; +import { isSpaceAwarenessEnabled } from '../../services/spaces/helpers'; export const getFleetStatusHandler: FleetRequestHandler = async (context, request, response) => { const coreContext = await context.core; @@ -24,7 +25,14 @@ export const getFleetStatusHandler: FleetRequestHandler = async (context, reques const isApiKeysEnabled = await appContextService .getSecurity() .authc.apiKeys.areAPIKeysEnabled(); - const isFleetServerMissing = !(await hasFleetServers(esClient, soClient)); + + const [hasFleetServersRes, useSecretsStorage, isSpaceAwarenessEnabledRes] = await Promise.all([ + hasFleetServers(esClient, soClient), + isSecretStorageEnabled(esClient, soClient), + isSpaceAwarenessEnabled(), + ]); + + const isFleetServerMissing = !hasFleetServersRes; const isFleetServerStandalone = appContextService.getConfig()?.internal?.fleetServerStandalone ?? false; @@ -43,13 +51,12 @@ export const getFleetStatusHandler: FleetRequestHandler = async (context, reques missingOptionalFeatures.push('encrypted_saved_object_encryption_key_required'); } - const useSecretsStorage = await isSecretStorageEnabled(esClient, soClient); - const body: GetFleetStatusResponse = { isReady: missingRequirements.length === 0, missing_requirements: missingRequirements, missing_optional_features: missingOptionalFeatures, is_secrets_storage_enabled: useSecretsStorage, + is_space_awareness_enabled: isSpaceAwarenessEnabledRes, }; const packageVerificationKeyId = await getGpgKeyIdOrUndefined(); diff --git a/x-pack/plugins/fleet/server/routes/uninstall_token/handlers.ts b/x-pack/plugins/fleet/server/routes/uninstall_token/handlers.ts index 5e61d5b9b01a2..24d85b8d14250 100644 --- a/x-pack/plugins/fleet/server/routes/uninstall_token/handlers.ts +++ b/x-pack/plugins/fleet/server/routes/uninstall_token/handlers.ts @@ -15,7 +15,7 @@ import type { } from '../../types/rest_spec/uninstall_token'; import { defaultFleetErrorHandler } from '../../errors'; import type { GetUninstallTokenResponse } from '../../../common/types/rest_spec/uninstall_token'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../constants'; +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../constants'; export const getUninstallTokensMetadataHandler: FleetRequestHandler< unknown, @@ -40,7 +40,7 @@ export const getUninstallTokensMetadataHandler: FleetRequestHandler< const { items: managedPolicies } = await agentPolicyService.list(soClient, { fields: ['id'], perPage: SO_SEARCH_LIMIT, - kuery: `${AGENT_POLICY_SAVED_OBJECT_TYPE}.is_managed:true`, + kuery: `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.is_managed:true`, }); const managedPolicyIds = managedPolicies.map((policy) => policy.id); diff --git a/x-pack/plugins/fleet/server/routes/utils/filter_utils_real_queries.test.ts b/x-pack/plugins/fleet/server/routes/utils/filter_utils_real_queries.test.ts index a8765dc87327b..0c81462dd197b 100644 --- a/x-pack/plugins/fleet/server/routes/utils/filter_utils_real_queries.test.ts +++ b/x-pack/plugins/fleet/server/routes/utils/filter_utils_real_queries.test.ts @@ -8,7 +8,7 @@ import * as esKuery from '@kbn/es-query'; import { - AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, PACKAGE_POLICY_SAVED_OBJECT_TYPE, AGENTS_PREFIX, AGENT_POLICY_MAPPINGS, @@ -30,11 +30,11 @@ describe('ValidateFilterKueryNode validates real kueries through KueryNode', () describe('Agent policies', () => { it('Search by data_output_id', async () => { const astFilter = esKuery.fromKueryExpression( - `${AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id: test_id` + `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id: test_id` ); const validationObject = validateFilterKueryNode({ astFilter, - types: [AGENT_POLICY_SAVED_OBJECT_TYPE], + types: [LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE], indexMapping: AGENT_POLICY_MAPPINGS, storeValue: true, }); @@ -51,11 +51,11 @@ describe('ValidateFilterKueryNode validates real kueries through KueryNode', () it('Search by inactivity timeout', async () => { const astFilter = esKuery.fromKueryExpression( - `${AGENT_POLICY_SAVED_OBJECT_TYPE}.inactivity_timeout:*` + `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.inactivity_timeout:*` ); const validationObject = validateFilterKueryNode({ astFilter, - types: [AGENT_POLICY_SAVED_OBJECT_TYPE], + types: [LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE], indexMapping: AGENT_POLICY_MAPPINGS, storeValue: true, }); @@ -73,9 +73,9 @@ describe('ValidateFilterKueryNode validates real kueries through KueryNode', () it('Complex query', async () => { const validationObject = validateFilterKueryNode({ astFilter: esKuery.fromKueryExpression( - `${AGENT_POLICY_SAVED_OBJECT_TYPE}.download_source_id:some_id or (not ${AGENT_POLICY_SAVED_OBJECT_TYPE}.download_source_id:*)` + `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.download_source_id:some_id or (not ${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.download_source_id:*)` ), - types: [AGENT_POLICY_SAVED_OBJECT_TYPE], + types: [LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE], indexMapping: AGENT_POLICY_MAPPINGS, storeValue: true, }); @@ -100,11 +100,11 @@ describe('ValidateFilterKueryNode validates real kueries through KueryNode', () it('Test another complex query', async () => { const astFilter = esKuery.fromKueryExpression( - `${AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id: test_id or ${AGENT_POLICY_SAVED_OBJECT_TYPE}.monitoring_output_id: test_id or (not ${AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:*)` + `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id: test_id or ${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.monitoring_output_id: test_id or (not ${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:*)` ); const validationObject = validateFilterKueryNode({ astFilter, - types: [AGENT_POLICY_SAVED_OBJECT_TYPE], + types: [LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE], indexMapping: AGENT_POLICY_MAPPINGS, storeValue: true, }); @@ -136,11 +136,11 @@ describe('ValidateFilterKueryNode validates real kueries through KueryNode', () it('Returns error if the attribute does not exist', async () => { const astFilter = esKuery.fromKueryExpression( - `${AGENT_POLICY_SAVED_OBJECT_TYPE}.package_policies:test_id_1 or ${AGENT_POLICY_SAVED_OBJECT_TYPE}.package_policies:test_id_2` + `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.package_policies:test_id_1 or ${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.package_policies:test_id_2` ); const validationObject = validateFilterKueryNode({ astFilter, - types: [AGENT_POLICY_SAVED_OBJECT_TYPE], + types: [LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE], indexMapping: AGENT_POLICY_MAPPINGS, storeValue: true, }); @@ -523,8 +523,8 @@ describe('validateKuery validates real kueries', () => { describe('Agent policies', () => { it('Search by data_output_id', async () => { const validationObj = validateKuery( - `${AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id: test_id`, - [AGENT_POLICY_SAVED_OBJECT_TYPE], + `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id: test_id`, + [LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE], AGENT_POLICY_MAPPINGS, true ); @@ -533,8 +533,8 @@ describe('validateKuery validates real kueries', () => { it('Search by data_output_id without SO wrapping', async () => { const validationObj = validateKuery( - `${AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id: test_id`, - [AGENT_POLICY_SAVED_OBJECT_TYPE], + `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id: test_id`, + [LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE], AGENT_POLICY_MAPPINGS, true ); @@ -543,8 +543,8 @@ describe('validateKuery validates real kueries', () => { it('Search by name', async () => { const validationObj = validateKuery( - `${AGENT_POLICY_SAVED_OBJECT_TYPE}.name: test_id`, - [AGENT_POLICY_SAVED_OBJECT_TYPE], + `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.name: test_id`, + [LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE], AGENT_POLICY_MAPPINGS, true ); @@ -553,8 +553,8 @@ describe('validateKuery validates real kueries', () => { it('Kuery with non existent parameter wrapped by SO', async () => { const validationObj = validateKuery( - `${AGENT_POLICY_SAVED_OBJECT_TYPE}.non_existent_parameter: 'test_id'`, - [AGENT_POLICY_SAVED_OBJECT_TYPE], + `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.non_existent_parameter: 'test_id'`, + [LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE], AGENT_POLICY_MAPPINGS, true ); @@ -567,7 +567,7 @@ describe('validateKuery validates real kueries', () => { it('Invalid search by non existent parameter', async () => { const validationObj = validateKuery( `non_existent_parameter: 'test_id'`, - [AGENT_POLICY_SAVED_OBJECT_TYPE], + [LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE], AGENT_POLICY_MAPPINGS, true ); diff --git a/x-pack/plugins/fleet/server/saved_objects/index.ts b/x-pack/plugins/fleet/server/saved_objects/index.ts index 4b76a952a0f3b..d955b10031536 100644 --- a/x-pack/plugins/fleet/server/saved_objects/index.ts +++ b/x-pack/plugins/fleet/server/saved_objects/index.ts @@ -9,10 +9,15 @@ import type { SavedObjectsServiceSetup, SavedObjectsType } from '@kbn/core/serve import type { EncryptedSavedObjectsPluginSetup } from '@kbn/encrypted-saved-objects-plugin/server'; +import { + LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, + PACKAGE_POLICY_SAVED_OBJECT_TYPE, +} from '../../common/constants'; + import { OUTPUT_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, AGENT_POLICY_SAVED_OBJECT_TYPE, - PACKAGE_POLICY_SAVED_OBJECT_TYPE, PACKAGES_SAVED_OBJECT_TYPE, ASSETS_SAVED_OBJECT_TYPE, GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, @@ -134,10 +139,7 @@ export const getSavedObjectTypes = ( }, mappings: { dynamic: false, - properties: { - // allowed_namespace_prefixes: { enabled: false }, - // managed_by: { type: 'keyword', index: false }, - }, + properties: {}, }, }, // Deprecated @@ -156,6 +158,8 @@ export const getSavedObjectTypes = ( prerelease_integrations_enabled: { type: 'boolean' }, secret_storage_requirements_met: { type: 'boolean' }, output_secret_storage_requirements_met: { type: 'boolean' }, + use_space_awareness_migration_status: { type: 'keyword', index: false }, + use_space_awareness_migration_started_at: { type: 'date', index: false }, }, }, migrations: { @@ -165,13 +169,24 @@ export const getSavedObjectTypes = ( }, modelVersions: { 1: settingsV1, + 2: { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + use_space_awareness_migration_status: { type: 'keyword', index: false }, + use_space_awareness_migration_started_at: { type: 'date', index: false }, + }, + }, + ], + }, }, }, - [AGENT_POLICY_SAVED_OBJECT_TYPE]: { - name: AGENT_POLICY_SAVED_OBJECT_TYPE, + [LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE]: { + name: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, indexPattern: INGEST_SAVED_OBJECT_INDEX, hidden: false, - namespaceType: useSpaceAwareness ? 'single' : 'agnostic', + namespaceType: 'agnostic', management: { importableAndExportable: false, }, @@ -250,6 +265,50 @@ export const getSavedObjectTypes = ( }, }, }, + [AGENT_POLICY_SAVED_OBJECT_TYPE]: { + name: AGENT_POLICY_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: false, + namespaceType: 'multiple', + management: { + importableAndExportable: false, + }, + mappings: { + properties: { + name: { type: 'keyword' }, + schema_version: { type: 'version' }, + description: { type: 'text' }, + namespace: { type: 'keyword' }, + is_managed: { type: 'boolean' }, + is_default: { type: 'boolean' }, + is_default_fleet_server: { type: 'boolean' }, + status: { type: 'keyword' }, + unenroll_timeout: { type: 'integer' }, + inactivity_timeout: { type: 'integer' }, + updated_at: { type: 'date' }, + updated_by: { type: 'keyword' }, + revision: { type: 'integer' }, + monitoring_enabled: { type: 'keyword', index: false }, + is_preconfigured: { type: 'keyword' }, + data_output_id: { type: 'keyword' }, + monitoring_output_id: { type: 'keyword' }, + download_source_id: { type: 'keyword' }, + fleet_server_host_id: { type: 'keyword' }, + agent_features: { + properties: { + name: { type: 'keyword' }, + enabled: { type: 'boolean' }, + }, + }, + is_protected: { type: 'boolean' }, + overrides: { type: 'flattened', index: false }, + keep_monitoring_alive: { type: 'boolean' }, + advanced_settings: { type: 'flattened', index: false }, + supports_agentless: { type: 'boolean' }, + global_data_tags: { type: 'flattened', index: false }, + }, + }, + }, [OUTPUT_SAVED_OBJECT_TYPE]: { name: OUTPUT_SAVED_OBJECT_TYPE, indexPattern: INGEST_SAVED_OBJECT_INDEX, @@ -464,11 +523,11 @@ export const getSavedObjectTypes = ( '8.0.0': migrateOutputToV800, }, }, - [PACKAGE_POLICY_SAVED_OBJECT_TYPE]: { - name: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + [LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE]: { + name: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, indexPattern: INGEST_SAVED_OBJECT_INDEX, hidden: false, - namespaceType: useSpaceAwareness ? 'single' : 'agnostic', + namespaceType: 'agnostic', management: { importableAndExportable: false, }, @@ -481,6 +540,7 @@ export const getSavedObjectTypes = ( is_managed: { type: 'boolean' }, policy_id: { type: 'keyword' }, policy_ids: { type: 'keyword' }, + output_id: { type: 'keyword' }, package: { properties: { name: { type: 'keyword' }, @@ -639,6 +699,16 @@ export const getSavedObjectTypes = ( }, ], }, + '14': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + output_id: { type: 'keyword' }, + }, + }, + ], + }, }, migrations: { '7.10.0': migratePackagePolicyToV7100, @@ -657,6 +727,51 @@ export const getSavedObjectTypes = ( '8.8.0': migratePackagePolicyToV880, }, }, + [PACKAGE_POLICY_SAVED_OBJECT_TYPE]: { + name: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + indexPattern: INGEST_SAVED_OBJECT_INDEX, + hidden: false, + namespaceType: 'multiple', + management: { + importableAndExportable: false, + }, + mappings: { + properties: { + name: { type: 'keyword' }, + description: { type: 'text' }, + namespace: { type: 'keyword' }, + enabled: { type: 'boolean' }, + is_managed: { type: 'boolean' }, + policy_id: { type: 'keyword' }, + policy_ids: { type: 'keyword' }, + output_id: { type: 'keyword' }, + package: { + properties: { + name: { type: 'keyword' }, + title: { type: 'keyword' }, + version: { type: 'keyword' }, + requires_root: { type: 'boolean' }, + }, + }, + elasticsearch: { + dynamic: false, + properties: {}, + }, + vars: { type: 'flattened' }, + inputs: { + dynamic: false, + properties: {}, + }, + secret_references: { properties: { id: { type: 'keyword' } } }, + overrides: { type: 'flattened', index: false }, + revision: { type: 'integer' }, + updated_at: { type: 'date' }, + updated_by: { type: 'keyword' }, + created_at: { type: 'date' }, + created_by: { type: 'keyword' }, + }, + }, + }, [PACKAGES_SAVED_OBJECT_TYPE]: { name: PACKAGES_SAVED_OBJECT_TYPE, indexPattern: INGEST_SAVED_OBJECT_INDEX, diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/cloud_security_posture/to_v8_11_0.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/cloud_security_posture/to_v8_11_0.ts index dd6760a9dc4ac..d866e998b2886 100644 --- a/x-pack/plugins/fleet/server/saved_objects/migrations/cloud_security_posture/to_v8_11_0.ts +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/cloud_security_posture/to_v8_11_0.ts @@ -22,7 +22,10 @@ export const migrateCspPackagePolicyToV8110: SavedObjectModelDataBackfillFn< const gcpPackage = updatedAttributes.inputs.find((input) => input.type === 'cloudbeat/cis_gcp'); if (gcpPackage) { - const isGcpAccountTypeExists = gcpPackage.streams[0]?.vars?.hasOwnProperty('gcp.account_type'); + const isGcpAccountTypeExists = Object.hasOwn( + gcpPackage.streams[0]?.vars ?? {}, + 'gcp.account_type' + ); if (!isGcpAccountTypeExists) { const migratedPolicy = { 'gcp.account_type': { value: 'single-account', type: 'text' } }; diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_5_0.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_5_0.ts index cf835ec87c949..d7e73d67a3c60 100644 --- a/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_5_0.ts +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/to_v8_5_0.ts @@ -14,7 +14,6 @@ export const migratePackagePolicyToV850: SavedObjectMigrationFn { - // @ts-expect-error output_id property does not exists anymore delete packagePolicyDoc.attributes.output_id; return packagePolicyDoc; diff --git a/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/full_agent_policy.test.ts.snap b/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/full_agent_policy.test.ts.snap index 86f8126c1c45a..8518e43fdaf0d 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/full_agent_policy.test.ts.snap +++ b/x-pack/plugins/fleet/server/services/agent_policies/__snapshots__/full_agent_policy.test.ts.snap @@ -1,5 +1,173 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`getFullAgentPolicy should return the right outputs and permissions when package policies use their own outputs 1`] = ` +Object { + "agent": Object { + "download": Object { + "sourceURI": "http://default-registry.co", + }, + "features": Object {}, + "monitoring": Object { + "enabled": false, + "logs": false, + "metrics": false, + }, + "protection": Object { + "enabled": false, + "signing_key": "", + "uninstall_token_hash": "", + }, + }, + "fleet": Object { + "hosts": Array [ + "http://fleetserver:8220", + ], + }, + "id": "integration-output-policy", + "inputs": Array [ + Object { + "data_stream": Object { + "namespace": "policyspace", + }, + "id": "test-logs-package-policy-using-output", + "meta": Object { + "package": Object { + "name": "test_package", + "version": "0.0.0", + }, + }, + "name": "test-policy-1", + "package_policy_id": "package-policy-using-output", + "revision": 1, + "streams": Array [ + Object { + "data_stream": Object { + "dataset": "some-logs", + "type": "logs", + }, + "id": "test-logs", + }, + ], + "type": "test-logs", + "use_output": "test-remote-id", + }, + Object { + "data_stream": Object { + "namespace": "defaultspace", + }, + "id": "test-logs-package-policy-no-output", + "meta": Object { + "package": Object { + "name": "system", + "version": "1.0.0", + }, + }, + "name": "test-policy-2", + "package_policy_id": "package-policy-no-output", + "revision": 1, + "streams": Array [ + Object { + "data_stream": Object { + "dataset": "some-logs", + "type": "logs", + }, + "id": "test-logs", + }, + ], + "type": "test-logs", + "use_output": "data-output-id", + }, + ], + "output_permissions": Object { + "data-output-id": Object { + "_elastic_agent_checks": Object { + "cluster": Array [ + "monitor", + ], + }, + "package-policy-no-output": Object { + "indices": Array [ + Object { + "names": Array [ + "logs-some-logs-defaultspace", + ], + "privileges": Array [ + "auto_configure", + "create_doc", + ], + }, + ], + }, + }, + "default": Object { + "_elastic_agent_checks": Object { + "cluster": Array [ + "monitor", + ], + }, + "_elastic_agent_monitoring": Object { + "indices": Array [ + Object { + "names": Array [], + "privileges": Array [], + }, + ], + }, + }, + "test-remote-id": Object { + "_elastic_agent_checks": Object { + "cluster": Array [ + "monitor", + ], + }, + "package-policy-using-output": Object { + "indices": Array [ + Object { + "names": Array [ + "logs-some-logs-policyspace", + ], + "privileges": Array [ + "auto_configure", + "create_doc", + ], + }, + ], + }, + }, + }, + "outputs": Object { + "data-output-id": Object { + "hosts": Array [ + "http://es-data.co:9201", + ], + "preset": "balanced", + "type": "elasticsearch", + }, + "default": Object { + "hosts": Array [ + "http://127.0.0.1:9201", + ], + "preset": "balanced", + "type": "elasticsearch", + }, + "test-remote-id": Object { + "hosts": Array [ + "http://127.0.0.1:9201", + ], + "preset": "balanced", + "service_token": undefined, + "type": "remote_elasticsearch", + }, + }, + "revision": 1, + "secret_references": Array [], + "signed": Object { + "data": "", + "signature": "", + }, +} +`; + exports[`getFullAgentPolicy should support a different data output 1`] = ` Object { "agent": Object { diff --git a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts index 5701a60b56d03..6a084b5dde586 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts @@ -401,6 +401,126 @@ describe('getFullAgentPolicy', () => { expect(agentPolicy?.outputs['test-remote-id']).toBeDefined(); }); + it('should return the right outputs and permissions when package policies use their own outputs', async () => { + mockedGetPackageInfo.mockResolvedValue({ + data_streams: [ + { + type: 'logs', + dataset: 'elastic_agent.metricbeat', + }, + { + type: 'metrics', + dataset: 'elastic_agent.metricbeat', + }, + { + type: 'logs', + dataset: 'elastic_agent.filebeat', + }, + { + type: 'metrics', + dataset: 'elastic_agent.filebeat', + }, + ], + } as PackageInfo); + mockAgentPolicy({ + id: 'integration-output-policy', + status: 'active', + package_policies: [ + { + id: 'package-policy-using-output', + name: 'test-policy-1', + namespace: 'policyspace', + enabled: true, + package: { name: 'test_package', version: '0.0.0', title: 'Test Package' }, + output_id: 'test-remote-id', + inputs: [ + { + type: 'test-logs', + enabled: true, + streams: [ + { + id: 'test-logs', + enabled: true, + data_stream: { type: 'logs', dataset: 'some-logs' }, + }, + ], + }, + { + type: 'test-metrics', + enabled: false, + streams: [ + { + id: 'test-logs', + enabled: false, + data_stream: { type: 'metrics', dataset: 'some-metrics' }, + }, + ], + }, + ], + created_at: '', + updated_at: '', + created_by: '', + updated_by: '', + revision: 1, + policy_id: '', + policy_ids: [''], + }, + { + id: 'package-policy-no-output', + name: 'test-policy-2', + namespace: '', + enabled: true, + package: { name: 'system', version: '1.0.0', title: 'System' }, + inputs: [ + { + type: 'test-logs', + enabled: true, + streams: [ + { + id: 'test-logs', + enabled: true, + data_stream: { type: 'logs', dataset: 'some-logs' }, + }, + ], + }, + { + type: 'test-metrics', + enabled: false, + streams: [ + { + id: 'test-logs', + enabled: false, + data_stream: { type: 'metrics', dataset: 'some-metrics' }, + }, + ], + }, + ], + created_at: '', + updated_at: '', + created_by: '', + updated_by: '', + revision: 1, + policy_id: '', + policy_ids: [''], + }, + ], + is_managed: false, + namespace: 'defaultspace', + revision: 1, + name: 'Policy', + updated_at: '2020-01-01', + updated_by: 'qwerty', + is_protected: false, + data_output_id: 'data-output-id', + }); + + const agentPolicy = await getFullAgentPolicy( + savedObjectsClientMock.create(), + 'integration-output-policy' + ); + expect(agentPolicy).toMatchSnapshot(); + }); + it('should return the sourceURI from the agent policy', async () => { mockAgentPolicy({ namespace: 'default', diff --git a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts index efc3a732149d6..a65b4ce8dc9fd 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts @@ -25,6 +25,7 @@ import type { FullAgentPolicyOutput, FleetProxy, FleetServerHost, + AgentPolicy, } from '../../types'; import type { FullAgentPolicyMonitoring, @@ -67,11 +68,17 @@ async function fetchAgentPolicy(soClient: SavedObjectsClientContract, id: string export async function getFullAgentPolicy( soClient: SavedObjectsClientContract, id: string, - options?: { standalone: boolean } + options?: { standalone?: boolean; agentPolicy?: AgentPolicy } ): Promise { const standalone = options?.standalone ?? false; - const agentPolicy = await fetchAgentPolicy(soClient, id); + let agentPolicy: AgentPolicy | null; + if (options?.agentPolicy?.package_policies) { + agentPolicy = options.agentPolicy; + } else { + agentPolicy = await fetchAgentPolicy(soClient, id); + } + if (!agentPolicy) { return null; } @@ -192,20 +199,50 @@ export async function getFullAgentPolicy( }, }; - if (agentPolicy.space_id) { - fullAgentPolicy.namespaces = [agentPolicy.space_id]; + if (agentPolicy.space_ids) { + fullAgentPolicy.namespaces = agentPolicy.space_ids; } - const dataPermissions = - (await storedPackagePoliciesToAgentPermissions( + const packagePoliciesByOutputId = Object.keys(fullAgentPolicy.outputs).reduce( + (acc: Record, outputId) => { + acc[outputId] = []; + return acc; + }, + {} + ); + (agentPolicy.package_policies || []).forEach((packagePolicy) => { + const packagePolicyDataOutput = packagePolicy.output_id + ? outputs.find((output) => output.id === packagePolicy.output_id) + : undefined; + if (packagePolicyDataOutput) { + packagePoliciesByOutputId[getOutputIdForAgentPolicy(packagePolicyDataOutput)].push( + packagePolicy + ); + } else { + packagePoliciesByOutputId[getOutputIdForAgentPolicy(dataOutput)].push(packagePolicy); + } + }); + + const dataPermissionsByOutputId = Object.keys(fullAgentPolicy.outputs).reduce( + (acc: Record, outputId) => { + acc[outputId] = {}; + return acc; + }, + {} + ); + for (const [outputId, packagePolicies] of Object.entries(packagePoliciesByOutputId)) { + const dataPermissions = await storedPackagePoliciesToAgentPermissions( packageInfoCache, agentPolicy.namespace, - agentPolicy.package_policies - )) || {}; - - dataPermissions._elastic_agent_checks = { - cluster: DEFAULT_CLUSTER_PERMISSIONS, - }; + packagePolicies + ); + dataPermissionsByOutputId[outputId] = { + _elastic_agent_checks: { + cluster: DEFAULT_CLUSTER_PERMISSIONS, + }, + ...(dataPermissions || {}), + }; + } const monitoringPermissions = await getMonitoringPermissions( soClient, @@ -233,8 +270,11 @@ export async function getFullAgentPolicy( Object.assign(permissions, monitoringPermissions); } - if (outputId === getOutputIdForAgentPolicy(dataOutput)) { - Object.assign(permissions, dataPermissions); + if ( + outputId === getOutputIdForAgentPolicy(dataOutput) || + packagePoliciesByOutputId[outputId].length > 0 + ) { + Object.assign(permissions, dataPermissionsByOutputId[outputId]); } outputPermissions[outputId] = permissions; diff --git a/x-pack/plugins/fleet/server/services/agent_policies/output_helpers.test.ts b/x-pack/plugins/fleet/server/services/agent_policies/output_helpers.test.ts index dfdcf26adaa4e..0afef0170a99f 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/output_helpers.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/output_helpers.test.ts @@ -13,7 +13,7 @@ import { appContextService } from '..'; import { outputService } from '../output'; import { validateOutputForPolicy } from '.'; -import { validateOutputForNewPackagePolicy } from './outputs_helpers'; +import { validateAgentPolicyOutputForIntegration } from './outputs_helpers'; jest.mock('../app_context'); jest.mock('../output'); @@ -254,14 +254,14 @@ describe('validateOutputForPolicy', () => { }); }); -describe('validateOutputForNewPackagePolicy', () => { - it('should not allow fleet_server integration to be added to a policy using a logstash output', async () => { +describe('validateAgentPolicyOutputForIntegration', () => { + it('should not allow fleet_server integration to be added or edited to a policy using a logstash output', async () => { mockHasLicence(true); mockedOutputService.get.mockResolvedValue({ type: 'logstash', } as any); await expect( - validateOutputForNewPackagePolicy( + validateAgentPolicyOutputForIntegration( savedObjectsClientMock.create(), { name: 'Agent policy', @@ -273,15 +273,29 @@ describe('validateOutputForNewPackagePolicy', () => { ).rejects.toThrow( 'Integration "fleet_server" cannot be added to agent policy "Agent policy" because it uses output type "logstash".' ); + await expect( + validateAgentPolicyOutputForIntegration( + savedObjectsClientMock.create(), + { + name: 'Agent policy', + data_output_id: 'test1', + monitoring_output_id: 'test1', + } as any, + 'fleet_server', + false + ) + ).rejects.toThrow( + 'Agent policy "Agent policy" uses output type "logstash" which cannot be used for integration "fleet_server".' + ); }); - it('should not allow apm integration to be added to a policy using a kafka output', async () => { + it('should not allow apm integration to be added or edited to a policy using a kafka output', async () => { mockHasLicence(true); mockedOutputService.get.mockResolvedValue({ type: 'kafka', } as any); await expect( - validateOutputForNewPackagePolicy( + validateAgentPolicyOutputForIntegration( savedObjectsClientMock.create(), { name: 'Agent policy', @@ -293,6 +307,20 @@ describe('validateOutputForNewPackagePolicy', () => { ).rejects.toThrow( 'Integration "apm" cannot be added to agent policy "Agent policy" because it uses output type "kafka".' ); + await expect( + validateAgentPolicyOutputForIntegration( + savedObjectsClientMock.create(), + { + name: 'Agent policy', + data_output_id: 'test1', + monitoring_output_id: 'test1', + } as any, + 'apm', + false + ) + ).rejects.toThrow( + 'Agent policy "Agent policy" uses output type "kafka" which cannot be used for integration "apm".' + ); }); it('should not allow synthetics integration to be added to a policy using a default logstash output', async () => { @@ -302,7 +330,7 @@ describe('validateOutputForNewPackagePolicy', () => { } as any); mockedOutputService.getDefaultDataOutputId.mockResolvedValue('default'); await expect( - validateOutputForNewPackagePolicy( + validateAgentPolicyOutputForIntegration( savedObjectsClientMock.create(), { name: 'Agent policy', @@ -320,7 +348,7 @@ describe('validateOutputForNewPackagePolicy', () => { type: 'logstash', } as any); - await validateOutputForNewPackagePolicy( + await validateAgentPolicyOutputForIntegration( savedObjectsClientMock.create(), { name: 'Agent policy', @@ -335,7 +363,7 @@ describe('validateOutputForNewPackagePolicy', () => { type: 'elasticsearch', } as any); - await validateOutputForNewPackagePolicy( + await validateAgentPolicyOutputForIntegration( savedObjectsClientMock.create(), { name: 'Agent policy', diff --git a/x-pack/plugins/fleet/server/services/agent_policies/outputs_helpers.ts b/x-pack/plugins/fleet/server/services/agent_policies/outputs_helpers.ts index 67f5a7772aa52..66f45427601e6 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/outputs_helpers.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/outputs_helpers.ts @@ -96,10 +96,11 @@ export async function validateOutputForPolicy( } } -export async function validateOutputForNewPackagePolicy( +export async function validateAgentPolicyOutputForIntegration( soClient: SavedObjectsClientContract, agentPolicy: AgentPolicy, - packageName: string + packageName: string, + isNewPackagePolicy: boolean = true ) { const allowedOutputTypeForPolicy = getAllowedOutputTypesForIntegration(packageName); @@ -109,9 +110,15 @@ export async function validateOutputForNewPackagePolicy( if (isOutputTypeRestricted) { const dataOutput = await getDataOutputForAgentPolicy(soClient, agentPolicy); if (!allowedOutputTypeForPolicy.includes(dataOutput.type)) { - throw new OutputInvalidError( - `Integration "${packageName}" cannot be added to agent policy "${agentPolicy.name}" because it uses output type "${dataOutput.type}".` - ); + if (isNewPackagePolicy) { + throw new OutputInvalidError( + `Integration "${packageName}" cannot be added to agent policy "${agentPolicy.name}" because it uses output type "${dataOutput.type}".` + ); + } else { + throw new OutputInvalidError( + `Agent policy "${agentPolicy.name}" uses output type "${dataOutput.type}" which cannot be used for integration "${packageName}".` + ); + } } } } diff --git a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.test.ts b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.test.ts index 40cda7583a3c1..9004d544f399d 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.test.ts @@ -222,6 +222,7 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { version: '0.0.0', }, inputs: [mockInput, mockInput2], + output_id: 'new-output', }, { ...mockPackagePolicy, @@ -243,7 +244,7 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { revision: 1, type: 'test-logs', data_stream: { namespace: 'default' }, - use_output: 'default', + use_output: 'new-output', meta: { package: { name: 'mock_package', @@ -270,7 +271,7 @@ describe('Fleet - storedPackagePoliciesToAgentInputs', () => { revision: 1, type: 'test-metrics', data_stream: { namespace: 'default' }, - use_output: 'default', + use_output: 'new-output', meta: { package: { name: 'mock_package', diff --git a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.ts b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.ts index d7f0c70a0786b..807312fe5e7cb 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/package_policies_to_agent_inputs.ts @@ -27,7 +27,7 @@ const isPolicyEnabled = (packagePolicy: PackagePolicy) => { export const storedPackagePolicyToAgentInputs = ( packagePolicy: PackagePolicy, packageInfo?: PackageInfo, - outputId: string = DEFAULT_OUTPUT.name, + agentPolicyOutputId: string = DEFAULT_OUTPUT.name, agentPolicyNamespace?: string, addFields?: FullAgentPolicyAddFields ): FullAgentPolicyInput[] => { @@ -62,7 +62,7 @@ export const storedPackagePolicyToAgentInputs = ( data_stream: { namespace: packagePolicy?.namespace || agentPolicyNamespace || 'default', // custom namespace has precedence on agent policy's one }, - use_output: outputId, + use_output: packagePolicy.output_id || agentPolicyOutputId, package_policy_id: packagePolicy.id, ...getFullInputStreams(input), }; @@ -140,7 +140,7 @@ export const getFullInputStreams = ( export const storedPackagePoliciesToAgentInputs = async ( packagePolicies: PackagePolicy[], packageInfoCache: Map, - outputId: string = DEFAULT_OUTPUT.name, + agentPolicyOutputId: string = DEFAULT_OUTPUT.name, agentPolicyNamespace?: string, globalDataTags?: GlobalDataTag[] ): Promise => { @@ -164,7 +164,7 @@ export const storedPackagePoliciesToAgentInputs = async ( ...storedPackagePolicyToAgentInputs( packagePolicy, packageInfo, - outputId, + agentPolicyOutputId, agentPolicyNamespace, addFields ) diff --git a/x-pack/plugins/fleet/server/services/agent_policies/related_saved_objects.ts b/x-pack/plugins/fleet/server/services/agent_policies/related_saved_objects.ts index 0108e9cd97721..52dd34a757693 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/related_saved_objects.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/related_saved_objects.ts @@ -35,11 +35,20 @@ export async function fetchRelatedSavedObjects( const monitoringOutputId = agentPolicy.monitoring_output_id || defaultMonitoringOutputId || dataOutputId; + const outputIds = uniq([ + dataOutputId, + monitoringOutputId, + ...(agentPolicy.package_policies || []).reduce((acc: string[], packagePolicy) => { + if (packagePolicy.output_id) { + acc.push(packagePolicy.output_id); + } + return acc; + }, []), + ]); + const [outputs, { host: downloadSourceUri, proxy_id: downloadSourceProxyId }, fleetServerHosts] = await Promise.all([ - outputService.bulkGet(soClient, uniq([dataOutputId, monitoringOutputId]), { - ignoreNotFound: true, - }), + outputService.bulkGet(soClient, outputIds, { ignoreNotFound: true }), getSourceUriForAgentPolicy(soClient, agentPolicy), getFleetServerHostsForAgentPolicy(soClient, agentPolicy).catch((err) => { appContextService diff --git a/x-pack/plugins/fleet/server/services/agent_policies/utils.ts b/x-pack/plugins/fleet/server/services/agent_policies/utils.ts index dc69ab6ec013d..bfaecaaf6c01a 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/utils.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/utils.ts @@ -40,7 +40,7 @@ export const mapAgentPolicySavedObjectToAgentPolicy = ({ return { id, version, - space_id: namespaces?.[0] ? namespaces?.[0] : undefined, + space_ids: namespaces, description, is_default, is_default_fleet_server, diff --git a/x-pack/plugins/fleet/server/services/agent_policy.test.ts b/x-pack/plugins/fleet/server/services/agent_policy.test.ts index a5dbbc6b233b3..37bc2abe4c27c 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.test.ts @@ -11,6 +11,8 @@ import { loggerMock } from '@kbn/logging-mocks'; import type { Logger } from '@kbn/core/server'; import type { SavedObjectError } from '@kbn/core-saved-objects-common'; +import { LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '../../common/constants'; + import { PackagePolicyRestrictionRelatedError, FleetUnauthorizedError, @@ -23,7 +25,10 @@ import type { NewAgentPolicy, PreconfiguredAgentPolicy, } from '../types'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '../constants'; +import { + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, + AGENT_POLICY_SAVED_OBJECT_TYPE, +} from '../constants'; import { AGENT_POLICY_INDEX, SO_SEARCH_LIMIT } from '../../common'; @@ -31,7 +36,7 @@ import { agentPolicyService } from './agent_policy'; import { agentPolicyUpdateEventHandler } from './agent_policy_update'; import { getAgentsByKuery } from './agents'; -import { packagePolicyService } from './package_policy'; +import { getPackagePolicySavedObjectType, packagePolicyService } from './package_policy'; import { appContextService } from './app_context'; import { outputService } from './output'; import { downloadSourceService } from './download_source'; @@ -40,35 +45,69 @@ import * as outputsHelpers from './agent_policies/outputs_helpers'; import { auditLoggingService } from './audit_logging'; import { licenseService } from './license'; import type { UninstallTokenServiceInterface } from './security/uninstall_token_service'; +import { isSpaceAwarenessEnabled } from './spaces/helpers'; + +jest.mock('./spaces/helpers'); function getSavedObjectMock(agentPolicyAttributes: any) { const mock = savedObjectsClientMock.create(); + const mockPolicy = { + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, + references: [], + attributes: agentPolicyAttributes as AgentPolicy, + }; mock.get.mockImplementation(async (type: string, id: string) => { return { - type, id, - references: [], - attributes: agentPolicyAttributes as AgentPolicy, + ...mockPolicy, }; }); - mock.find.mockImplementation(async (options) => { + mock.bulkGet.mockImplementation(async (options) => { return { - saved_objects: [ - { - id: '93f74c0-e876-11ea-b7d3-8b2acec6f75c', - attributes: { - fleet_server_hosts: ['http://fleetserver:8220'], - }, - type: 'ingest_manager_settings', - score: 1, - references: [], - }, - ], - total: 1, - page: 1, - per_page: 1, + saved_objects: [], }; }); + mock.find.mockImplementation(async (options) => { + switch (options.type) { + case LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE: + return { + saved_objects: [ + { + id: 'agent-policy-id', + score: 1, + ...mockPolicy, + }, + ], + total: 1, + page: 1, + per_page: 1, + }; + case LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE: + return { + saved_objects: [], + total: 0, + page: 1, + per_page: 1, + }; + default: + return { + saved_objects: [ + { + id: '93f74c0-e876-11ea-b7d3-8b2acec6f75c', + attributes: { + fleet_server_hosts: ['http://fleetserver:8220'], + }, + type: 'ingest_manager_settings', + score: 1, + references: [], + }, + ], + total: 1, + page: 1, + per_page: 1, + }; + } + }); return mock; } @@ -119,6 +158,10 @@ describe('Agent policy', () => { mockedLogger = loggerMock.create(); mockedAppContextService.getLogger.mockReturnValue(mockedLogger); mockedAppContextService.getExperimentalFeatures.mockReturnValue({ agentless: false } as any); + jest.mocked(isSpaceAwarenessEnabled).mockResolvedValue(false); + jest + .mocked(getPackagePolicySavedObjectType) + .mockResolvedValue(LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE); }); afterEach(() => { @@ -173,7 +216,7 @@ describe('Agent policy', () => { soClient.create.mockResolvedValueOnce({ id: 'test-agent-policy', - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, attributes: {}, references: [], }); @@ -190,6 +233,48 @@ describe('Agent policy', () => { { id: 'test-agent-policy' } ); + expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenCalledWith({ + action: 'create', + id: 'test-agent-policy', + savedObjectType: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, + }); + }); + + it('should write to the correct saved object-type if user opt-in for space awerness', async () => { + jest.mocked(isSpaceAwarenessEnabled).mockResolvedValue(true); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + const soClient = savedObjectsClientMock.create(); + + soClient.find.mockResolvedValueOnce({ + total: 0, + saved_objects: [], + per_page: 0, + page: 1, + }); + + soClient.create.mockResolvedValueOnce({ + id: 'test-agent-policy', + type: AGENT_POLICY_SAVED_OBJECT_TYPE, + attributes: {}, + references: [], + }); + + mockOutputsHelpers.validateOutputForPolicy.mockResolvedValueOnce(undefined); + + await agentPolicyService.create( + soClient, + esClient, + { + name: 'test', + namespace: 'default', + }, + { id: 'test-agent-policy' } + ); + expect(soClient.create).toBeCalledWith( + AGENT_POLICY_SAVED_OBJECT_TYPE, + expect.anything(), + expect.anything() + ); expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenCalledWith({ action: 'create', id: 'test-agent-policy', @@ -317,10 +402,10 @@ describe('Agent policy', () => { }); it('should create a policy with is_managed true if agentless feature flag is set and in cloud env', async () => { - jest - .spyOn(appContextService, 'getExperimentalFeatures') - .mockReturnValue({ agentless: true } as any); jest.spyOn(appContextService, 'getCloud').mockReturnValue({ isCloudEnabled: true } as any); + jest.spyOn(appContextService, 'getConfig').mockReturnValue({ + agentless: { enabled: true }, + } as any); const soClient = getAgentPolicyCreateMock(); const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; @@ -353,12 +438,38 @@ describe('Agent policy', () => { }); it('should throw error when attempting to create policy with supports_agentless true on cloud environment that does not support the agentless feature', async () => { + jest.spyOn(appContextService, 'getConfig').mockReturnValue({ + agentless: { enabled: false }, + } as any); + + jest + .spyOn(appContextService, 'getCloud') + .mockReturnValue({ isCloudEnabled: true, isServerlessEnabled: false } as any); + + const soClient = getAgentPolicyCreateMock(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + await expect( + agentPolicyService.create(soClient, esClient, { + name: 'test', + namespace: 'default', + supports_agentless: true, + }) + ).rejects.toThrowError( + new AgentPolicyInvalidError( + 'supports_agentless is only allowed in serverless and cloud environments that support the agentless feature' + ) + ); + }); + + it('should throw error when attempting to create policy with supports_agentless true on serverless environment that does not support the agentless feature', async () => { jest .spyOn(appContextService, 'getExperimentalFeatures') - .mockReturnValue({ agentless: true } as any); + .mockReturnValue({ agentless: false } as any); + jest .spyOn(appContextService, 'getCloud') - .mockReturnValue({ isCloudEnabled: false, isServerlessEnabled: false } as any); + .mockReturnValue({ isCloudEnabled: false, isServerlessEnabled: true } as any); const soClient = getAgentPolicyCreateMock(); const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; @@ -386,7 +497,7 @@ describe('Agent policy', () => { id: 'test-agent-policy', attributes: {}, references: [], - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, }); await agentPolicyService.get(soClient, 'test-agent-policy', false); @@ -394,7 +505,7 @@ describe('Agent policy', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).toBeCalledWith({ action: 'get', id: 'test-agent-policy', - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, }); }); }); @@ -409,13 +520,13 @@ describe('Agent policy', () => { id: 'test-agent-policy-1', attributes: {}, references: [], - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, }, { id: 'test-agent-policy-2', attributes: {}, references: [], - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, }, ], }); @@ -425,13 +536,13 @@ describe('Agent policy', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenNthCalledWith(1, { action: 'get', id: 'test-agent-policy-1', - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, }); expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenNthCalledWith(2, { action: 'get', id: 'test-agent-policy-2', - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, }); }); }); @@ -447,14 +558,14 @@ describe('Agent policy', () => { id: 'test-agent-policy-1', attributes: {}, references: [], - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, score: 0, }, { id: 'test-agent-policy-2', attributes: {}, references: [], - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, score: 0, }, ], @@ -471,13 +582,13 @@ describe('Agent policy', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenNthCalledWith(1, { action: 'find', id: 'test-agent-policy-1', - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, }); expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenNthCalledWith(2, { action: 'find', id: 'test-agent-policy-2', - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, }); }); }); @@ -551,7 +662,7 @@ describe('Agent policy', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenCalledWith({ action: 'delete', id: 'mocked', - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, }); }); @@ -651,7 +762,7 @@ describe('Agent policy', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenCalledWith({ action: 'delete', id: 'mocked', - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, }); }); @@ -754,12 +865,12 @@ describe('Agent policy', () => { [ expect.objectContaining({ attributes: expect.objectContaining({ - fleet_server_hosts: ['http://fleetserver:8220'], - revision: NaN, - updated_by: 'system', + monitoring_enabled: ['metrics'], }), - id: '93f74c0-e876-11ea-b7d3-8b2acec6f75c', - type: 'ingest_manager_settings', + id: 'agent-policy-id', + namespace: undefined, + type: 'ingest-agent-policies', + version: undefined, }), ], expect.objectContaining({ @@ -998,7 +1109,7 @@ describe('Agent policy', () => { attributes: {}, references: [], id: 'test-agent-policy', - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, }); await agentPolicyService.update(soClient, esClient, 'test-agent-policy', { @@ -1010,7 +1121,7 @@ describe('Agent policy', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenCalledWith({ action: 'update', id: 'test-agent-policy', - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, }); }); @@ -1090,9 +1201,9 @@ describe('Agent policy', () => { }); it('should not throw AgentPolicyInvalidError if support_agentless is defined in stateful', async () => { - jest - .spyOn(appContextService, 'getExperimentalFeatures') - .mockReturnValue({ agentless: true } as any); + jest.spyOn(appContextService, 'getConfig').mockReturnValue({ + agentless: { enabled: true }, + } as any); jest .spyOn(appContextService, 'getCloud') .mockReturnValue({ isServerlessEnabled: false, isCloudEnabled: true } as any); @@ -1313,7 +1424,7 @@ describe('Agent policy', () => { attributes: {}, references: [], id: 'test-agent-policy', - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, }, ], }); @@ -1350,7 +1461,7 @@ describe('Agent policy', () => { soClient.create.mockResolvedValueOnce({ id: 'my-unique-id', - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, attributes: {}, references: [], }); @@ -1362,7 +1473,7 @@ describe('Agent policy', () => { ); expect(soClient.create).toHaveBeenCalledWith( - AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, expect.anything(), expect.objectContaining({ id: 'my-unique-id' }) ); @@ -1372,7 +1483,7 @@ describe('Agent policy', () => { describe('getInactivityTimeouts', () => { const createPolicySO = (id: string, inactivityTimeout: number) => ({ id, - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, attributes: { inactivity_timeout: inactivityTimeout }, references: [], score: 1, @@ -1391,12 +1502,17 @@ describe('Agent policy', () => { it('should return empty array if no policies with inactivity timeouts', async () => { const mockSoClient = createMockSoClientThatReturns([]); - expect(await agentPolicyService.getInactivityTimeouts(mockSoClient)).toEqual([]); + mockedAppContextService.getInternalUserSOClientWithoutSpaceExtension.mockReturnValueOnce( + mockSoClient + ); + expect(await agentPolicyService.getInactivityTimeouts()).toEqual([]); }); it('should return single inactivity timeout', async () => { const mockSoClient = createMockSoClientThatReturns([createPolicySO('policy1', 1000)]); - - expect(await agentPolicyService.getInactivityTimeouts(mockSoClient)).toEqual([ + mockedAppContextService.getInternalUserSOClientWithoutSpaceExtension.mockReturnValueOnce( + mockSoClient + ); + expect(await agentPolicyService.getInactivityTimeouts()).toEqual([ { inactivityTimeout: 1000, policyIds: ['policy1'] }, ]); }); @@ -1405,8 +1521,11 @@ describe('Agent policy', () => { createPolicySO('policy1', 1000), createPolicySO('policy2', 1000), ]); + mockedAppContextService.getInternalUserSOClientWithoutSpaceExtension.mockReturnValueOnce( + mockSoClient + ); - expect(await agentPolicyService.getInactivityTimeouts(mockSoClient)).toEqual([ + expect(await agentPolicyService.getInactivityTimeouts()).toEqual([ { inactivityTimeout: 1000, policyIds: ['policy1', 'policy2'] }, ]); }); @@ -1416,8 +1535,10 @@ describe('Agent policy', () => { createPolicySO('policy2', 1000), createPolicySO('policy3', 2000), ]); - - expect(await agentPolicyService.getInactivityTimeouts(mockSoClient)).toEqual([ + mockedAppContextService.getInternalUserSOClientWithoutSpaceExtension.mockReturnValueOnce( + mockSoClient + ); + expect(await agentPolicyService.getInactivityTimeouts()).toEqual([ { inactivityTimeout: 1000, policyIds: ['policy1', 'policy2'] }, { inactivityTimeout: 2000, policyIds: ['policy3'] }, ]); @@ -1436,7 +1557,7 @@ describe('Agent policy', () => { return { score: 1, id: 'so-123', - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, version: 'abc', updated_at: soAttributes.updated_at, attributes: soAttributes, @@ -1465,13 +1586,13 @@ describe('Agent policy', () => { }); it('should return an iterator', async () => { - expect(agentPolicyService.fetchAllAgentPolicyIds(soClientMock)).toEqual({ + expect(await agentPolicyService.fetchAllAgentPolicyIds(soClientMock)).toEqual({ [Symbol.asyncIterator]: expect.any(Function), }); }); it('should provide item ids on every iteration', async () => { - for await (const ids of agentPolicyService.fetchAllAgentPolicyIds(soClientMock)) { + for await (const ids of await agentPolicyService.fetchAllAgentPolicyIds(soClientMock)) { expect(ids).toEqual(['so-123', 'so-123']); } @@ -1479,13 +1600,13 @@ describe('Agent policy', () => { }); it('should use default options', async () => { - for await (const ids of agentPolicyService.fetchAllAgentPolicyIds(soClientMock)) { + for await (const ids of await agentPolicyService.fetchAllAgentPolicyIds(soClientMock)) { expect(ids); } expect(soClientMock.find).toHaveBeenCalledWith( expect.objectContaining({ - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, perPage: 1000, sortField: 'created_at', sortOrder: 'asc', @@ -1496,7 +1617,7 @@ describe('Agent policy', () => { }); it('should use custom options when defined', async () => { - for await (const ids of agentPolicyService.fetchAllAgentPolicyIds(soClientMock, { + for await (const ids of await agentPolicyService.fetchAllAgentPolicyIds(soClientMock, { perPage: 13, kuery: 'one=two', })) { @@ -1505,7 +1626,7 @@ describe('Agent policy', () => { expect(soClientMock.find).toHaveBeenCalledWith( expect.objectContaining({ - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, perPage: 13, sortField: 'created_at', sortOrder: 'asc', @@ -1529,13 +1650,13 @@ describe('Agent policy', () => { }); it('should return an iterator', async () => { - expect(agentPolicyService.fetchAllAgentPolicies(soClientMock)).toEqual({ + expect(await agentPolicyService.fetchAllAgentPolicies(soClientMock)).toEqual({ [Symbol.asyncIterator]: expect.any(Function), }); }); it('should provide items on every iteration', async () => { - for await (const items of agentPolicyService.fetchAllAgentPolicies(soClientMock)) { + for await (const items of await agentPolicyService.fetchAllAgentPolicies(soClientMock)) { expect(items.map((item) => item.id)).toEqual(soList.map((_so) => 'so-123')); } @@ -1543,7 +1664,25 @@ describe('Agent policy', () => { }); it('should use default options', async () => { - for await (const ids of agentPolicyService.fetchAllAgentPolicies(soClientMock)) { + for await (const ids of await agentPolicyService.fetchAllAgentPolicies(soClientMock)) { + expect(ids); + } + + expect(soClientMock.find).toHaveBeenCalledWith( + expect.objectContaining({ + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, + perPage: 1000, + sortField: 'created_at', + sortOrder: 'asc', + fields: [], + filter: undefined, + }) + ); + }); + + it('should use new saved object if user opt-in for space awareness', async () => { + jest.mocked(isSpaceAwarenessEnabled).mockResolvedValue(true); + for await (const ids of await agentPolicyService.fetchAllAgentPolicies(soClientMock)) { expect(ids); } @@ -1560,7 +1699,7 @@ describe('Agent policy', () => { }); it('should use custom options when defined', async () => { - for await (const ids of agentPolicyService.fetchAllAgentPolicies(soClientMock, { + for await (const ids of await agentPolicyService.fetchAllAgentPolicies(soClientMock, { kuery: 'one=two', perPage: 12, sortOrder: 'desc', @@ -1571,7 +1710,7 @@ describe('Agent policy', () => { expect(soClientMock.find).toHaveBeenCalledWith( expect.objectContaining({ - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, perPage: 12, sortField: 'updated_by', sortOrder: 'desc', @@ -1585,7 +1724,7 @@ describe('Agent policy', () => { describe('turnOffAgentTamperProtections', () => { const createPolicySO = (id: string, isProtected: boolean, error?: SavedObjectError) => ({ id, - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, attributes: { is_protected: isProtected, }, @@ -1607,9 +1746,11 @@ describe('Agent policy', () => { }); const getMockAgentPolicyFetchAllAgentPolicies = (items: AgentPolicy[]) => - jest.fn(async function* () { - yield items; - }); + jest.fn().mockResolvedValue( + jest.fn(async function* () { + yield items; + })() + ); it('should return if all policies are compliant', async () => { const mockSoClient = savedObjectsClientMock.create(); diff --git a/x-pack/plugins/fleet/server/services/agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policy.ts index d243ef8b60e16..b2ba41b78586a 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy.ts @@ -16,7 +16,7 @@ import type { SavedObjectsBulkUpdateObject, SavedObjectsBulkUpdateResponse, SavedObjectsClientContract, - SavedObjectsFindResult, + SavedObject, SavedObjectsUpdateResponse, } from '@kbn/core/server'; import { SavedObjectsUtils } from '@kbn/core/server'; @@ -41,7 +41,7 @@ import { import type { HTTPAuthorizationHeader } from '../../common/http_authorization_header'; import { - AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, AGENTS_PREFIX, FLEET_AGENT_POLICIES_SCHEMA_VERSION, PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE, @@ -56,6 +56,7 @@ import type { NewAgentPolicy, NewPackagePolicy, PackagePolicy, + PackagePolicySOAttributes, PostAgentPolicyCreateCallback, PostAgentPolicyUpdateCallback, PreconfiguredAgentPolicy, @@ -65,6 +66,7 @@ import { agentPolicyStatuses, FLEET_ELASTIC_AGENT_PACKAGE, UUID_V5_NAMESPACE, + AGENT_POLICY_SAVED_OBJECT_TYPE, } from '../../common/constants'; import type { DeleteAgentPolicyResponse, @@ -98,28 +100,53 @@ import { import { bulkInstallPackages } from './epm/packages'; import { getAgentsByKuery } from './agents'; -import { packagePolicyService } from './package_policy'; +import { getPackagePolicySavedObjectType, packagePolicyService } from './package_policy'; import { incrementPackagePolicyCopyName } from './package_policies'; import { outputService } from './output'; import { agentPolicyUpdateEventHandler } from './agent_policy_update'; -import { escapeSearchQueryPhrase, normalizeKuery } from './saved_object'; +import { escapeSearchQueryPhrase, normalizeKuery as _normalizeKuery } from './saved_object'; import { getFullAgentPolicy, validateOutputForPolicy } from './agent_policies'; import { auditLoggingService } from './audit_logging'; import { licenseService } from './license'; import { createSoFindIterable } from './utils/create_so_find_iterable'; import { isAgentlessEnabled } from './utils/agentless'; import { validatePolicyNamespaceForSpace } from './spaces/policy_namespaces'; - -const SAVED_OBJECT_TYPE = AGENT_POLICY_SAVED_OBJECT_TYPE; +import { isSpaceAwarenessEnabled } from './spaces/helpers'; const KEY_EDITABLE_FOR_MANAGED_POLICIES = ['namespace']; +function normalizeKuery(savedObjectType: string, kuery: string) { + if (savedObjectType === LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE) { + return _normalizeKuery( + savedObjectType, + kuery.replace( + new RegExp(`${AGENT_POLICY_SAVED_OBJECT_TYPE}\\.`, 'g'), + `${savedObjectType}.attributes.` + ) + ); + } else { + return _normalizeKuery( + savedObjectType, + kuery.replace( + new RegExp(`${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}\\.`, 'g'), + `${savedObjectType}.attributes.` + ) + ); + } +} + +export async function getAgentPolicySavedObjectType() { + return (await isSpaceAwarenessEnabled()) + ? AGENT_POLICY_SAVED_OBJECT_TYPE + : LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE; +} + class AgentPolicyService { private triggerAgentPolicyUpdatedEvent = async ( esClient: ElasticsearchClient, action: 'created' | 'updated' | 'deleted', agentPolicyId: string, - options?: { skipDeploy?: boolean; spaceId?: string } + options?: { skipDeploy?: boolean; spaceId?: string; agentPolicy?: AgentPolicy | null } ) => { return agentPolicyUpdateEventHandler(esClient, action, agentPolicyId, options); }; @@ -130,16 +157,23 @@ class AgentPolicyService { id: string, agentPolicy: Partial, user?: AuthenticatedUser, - options: { bumpRevision: boolean; removeProtection: boolean; skipValidation: boolean } = { + options: { + bumpRevision: boolean; + removeProtection: boolean; + skipValidation: boolean; + returnUpdatedPolicy?: boolean; + } = { bumpRevision: true, removeProtection: false, skipValidation: false, + returnUpdatedPolicy: true, } ): Promise { + const savedObjectType = await getAgentPolicySavedObjectType(); auditLoggingService.writeCustomSoAuditLog({ action: 'update', id, - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); const logger = appContextService.getLogger(); logger.debug(`Starting update of agent policy ${id}`); @@ -171,7 +205,7 @@ class AgentPolicyService { getAllowedOutputTypeForPolicy(existingAgentPolicy) ); } - await soClient.update(SAVED_OBJECT_TYPE, id, { + await soClient.update(savedObjectType, id, { ...agentPolicy, ...(options.bumpRevision ? { revision: existingAgentPolicy.revision + 1 } : {}), ...(options.removeProtection @@ -181,9 +215,14 @@ class AgentPolicyService { updated_by: user ? user.username : 'system', }); + const newAgentPolicy = await this.get(soClient, id, false); + + newAgentPolicy!.package_policies = existingAgentPolicy.package_policies; + if (options.bumpRevision || options.removeProtection) { await this.triggerAgentPolicyUpdatedEvent(esClient, 'updated', id, { spaceId: soClient.getCurrentNamespace(), + agentPolicy: newAgentPolicy, }); } logger.debug( @@ -191,7 +230,10 @@ class AgentPolicyService { options.bumpRevision ? existingAgentPolicy.revision + 1 : existingAgentPolicy.revision }` ); - return (await this.get(soClient, id)) as AgentPolicy; + if (options.returnUpdatedPolicy !== false) { + return (await this.get(soClient, id)) as AgentPolicy; + } + return newAgentPolicy as AgentPolicy; } public async ensurePreconfiguredAgentPolicy( @@ -306,6 +348,7 @@ class AgentPolicyService { skipDeploy?: boolean; } = {} ): Promise { + const savedObjectType = await getAgentPolicySavedObjectType(); // Ensure an ID is provided, so we can include it in the audit logs below if (!options.id) { options.id = SavedObjectsUtils.generateId(); @@ -314,7 +357,7 @@ class AgentPolicyService { auditLoggingService.writeCustomSoAuditLog({ action: 'create', id: options.id, - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); await this.runExternalCallbacks('agentPolicyCreate', agentPolicy); this.checkTamperProtectionLicense(agentPolicy); @@ -338,7 +381,7 @@ class AgentPolicyService { await validateOutputForPolicy(soClient, agentPolicy); const newSo = await soClient.create( - SAVED_OBJECT_TYPE, + savedObjectType, { ...agentPolicy, status: 'active', @@ -368,8 +411,10 @@ class AgentPolicyService { soClient: SavedObjectsClientContract, givenPolicy: { id?: string; name: string } ) { + const savedObjectType = await getAgentPolicySavedObjectType(); + const results = await soClient.find({ - type: SAVED_OBJECT_TYPE, + type: savedObjectType, searchFields: ['name'], search: escapeSearchQueryPhrase(givenPolicy.name), }); @@ -392,7 +437,9 @@ class AgentPolicyService { id: string, withPackagePolicies: boolean = true ): Promise { - const agentPolicySO = await soClient.get(SAVED_OBJECT_TYPE, id); + const savedObjectType = await getAgentPolicySavedObjectType(); + + const agentPolicySO = await soClient.get(savedObjectType, id); if (!agentPolicySO) { return null; } @@ -411,7 +458,7 @@ class AgentPolicyService { auditLoggingService.writeCustomSoAuditLog({ action: 'get', id, - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); return agentPolicy; @@ -422,15 +469,20 @@ class AgentPolicyService { ids: Array, options: { fields?: string[]; withPackagePolicies?: boolean; ignoreMissing?: boolean } = {} ): Promise { + const savedObjectType = await getAgentPolicySavedObjectType(); + const objects = ids.map((id) => { if (typeof id === 'string') { - return { ...options, id, type: SAVED_OBJECT_TYPE }; + return { ...options, id, type: savedObjectType }; } return { ...options, id: id.id, - namespaces: id.spaceId ? [id.spaceId] : undefined, - type: SAVED_OBJECT_TYPE, + namespaces: + savedObjectType === AGENT_POLICY_SAVED_OBJECT_TYPE && id.spaceId + ? [id.spaceId] + : undefined, + type: savedObjectType, }; }); const bulkGetResponse = await soClient.bulkGet(objects); @@ -471,7 +523,7 @@ class AgentPolicyService { auditLoggingService.writeCustomSoAuditLog({ action: 'get', id: agentPolicy.id, - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); } @@ -492,6 +544,8 @@ class AgentPolicyService { page: number; perPage: number; }> { + const savedObjectType = await getAgentPolicySavedObjectType(); + const { page = 1, perPage = 20, @@ -503,14 +557,14 @@ class AgentPolicyService { } = options; const baseFindParams = { - type: SAVED_OBJECT_TYPE, + type: savedObjectType, sortField, sortOrder, page, perPage, ...(fields ? { fields } : {}), }; - const filter = kuery ? normalizeKuery(SAVED_OBJECT_TYPE, kuery) : undefined; + const filter = kuery ? normalizeKuery(savedObjectType, kuery) : undefined; let agentPoliciesSO; try { agentPoliciesSO = await soClient.find({ @@ -540,16 +594,12 @@ class AgentPolicyService { (await packagePolicyService.findAllForAgentPolicy(soClient, agentPolicySO.id)) || []; } if (options.withAgentCount) { - await getAgentsByKuery( - appContextService.getInternalUserESClient(), - appContextService.getInternalUserSOClientForSpaceId(agentPolicy.space_id), - { - showInactive: true, - perPage: 0, - page: 1, - kuery: `${AGENTS_PREFIX}.policy_id:${agentPolicy.id}`, - } - ).then(({ total }) => (agentPolicy.agents = total)); + await getAgentsByKuery(appContextService.getInternalUserESClient(), soClient, { + showInactive: true, + perPage: 0, + page: 1, + kuery: `${AGENTS_PREFIX}.policy_id:${agentPolicy.id}`, + }).then(({ total }) => (agentPolicy.agents = total)); } else { agentPolicy.agents = 0; } @@ -563,7 +613,7 @@ class AgentPolicyService { auditLoggingService.writeCustomSoAuditLog({ action: 'find', id: agentPolicy.id, - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); } @@ -770,14 +820,13 @@ class AgentPolicyService { esClient: ElasticsearchClient, id: string, options?: { user?: AuthenticatedUser; removeProtection?: boolean } - ): Promise { - const res = await this._update(soClient, esClient, id, {}, options?.user, { + ): Promise { + await this._update(soClient, esClient, id, {}, options?.user, { bumpRevision: true, removeProtection: options?.removeProtection ?? false, skipValidation: false, + returnUpdatedPolicy: false, }); - - return res; } /** @@ -791,9 +840,10 @@ class AgentPolicyService { esClient: ElasticsearchClient, outputId: string ) { + const savedObjectType = await getAgentPolicySavedObjectType(); const agentPolicies = ( await soClient.find({ - type: SAVED_OBJECT_TYPE, + type: savedObjectType, fields: ['revision', 'data_output_id', 'monitoring_output_id'], searchFields: ['data_output_id', 'monitoring_output_id'], search: escapeSearchQueryPhrase(outputId), @@ -849,9 +899,10 @@ class AgentPolicyService { esClient: ElasticsearchClient, fleetServerHostId: string ) { + const savedObjectType = await getAgentPolicySavedObjectType(); const agentPolicies = ( await soClient.find({ - type: SAVED_OBJECT_TYPE, + type: savedObjectType, fields: ['revision', 'fleet_server_host_id'], searchFields: ['fleet_server_host_id'], search: escapeSearchQueryPhrase(fleetServerHostId), @@ -876,7 +927,7 @@ class AgentPolicyService { private async _bumpPolicies( internalSoClientWithoutSpaceExtension: SavedObjectsClientContract, esClient: ElasticsearchClient, - savedObjectsResults: Array>, + savedObjectsResults: Array>, options?: { user?: AuthenticatedUser } ): Promise> { const bumpedPolicies = savedObjectsResults.map( @@ -938,22 +989,62 @@ class AgentPolicyService { outputId: string, options?: { user?: AuthenticatedUser } ): Promise> { + const { useSpaceAwareness } = appContextService.getExperimentalFeatures(); const internalSoClientWithoutSpaceExtension = appContextService.getInternalUserSOClientWithoutSpaceExtension(); - const currentPolicies = + const savedObjectType = await getAgentPolicySavedObjectType(); + // All agent policies directly using output + const agentPoliciesUsingOutput = await internalSoClientWithoutSpaceExtension.find({ - type: SAVED_OBJECT_TYPE, + type: savedObjectType, fields: ['revision', 'data_output_id', 'monitoring_output_id', 'namespaces'], searchFields: ['data_output_id', 'monitoring_output_id'], search: escapeSearchQueryPhrase(outputId), perPage: SO_SEARCH_LIMIT, namespaces: ['*'], }); + + // All package policies directly using output + const packagePoliciesUsingOutput = + await internalSoClientWithoutSpaceExtension.find({ + type: await getPackagePolicySavedObjectType(), + fields: ['output_id', 'namespaces', 'policy_ids'], + searchFields: ['output_id'], + search: escapeSearchQueryPhrase(outputId), + perPage: SO_SEARCH_LIMIT, + namespaces: ['*'], + }); + + const agentPolicyIdsDirectlyUsingOutput = agentPoliciesUsingOutput.saved_objects.map( + (agentPolicySO) => agentPolicySO.id + ); + const agentPolicyIdsOfPackagePoliciesUsingOutput = + packagePoliciesUsingOutput.saved_objects.reduce((acc: Set, packagePolicySO) => { + const newIds = packagePolicySO.attributes.policy_ids.filter((policyId) => { + return !agentPolicyIdsDirectlyUsingOutput.includes(policyId); + }); + return new Set([...acc, ...newIds]); + }, new Set()); + + // Agent policies of the identified package policies, excluding ones already retrieved directly + const agentPoliciesOfPackagePoliciesUsingOutput = + await internalSoClientWithoutSpaceExtension.bulkGet( + [...agentPolicyIdsOfPackagePoliciesUsingOutput].map((id) => ({ + type: savedObjectType, + id, + fields: ['revision', 'data_output_id', 'monitoring_output_id', 'namespaces'], + ...(useSpaceAwareness ? { namespaces: ['*'] } : {}), + })) + ); + return this._bumpPolicies( internalSoClientWithoutSpaceExtension, esClient, - currentPolicies.saved_objects, + [ + ...agentPoliciesUsingOutput.saved_objects, + ...agentPoliciesOfPackagePoliciesUsingOutput.saved_objects, + ], options ); } @@ -964,10 +1055,10 @@ class AgentPolicyService { ): Promise> { const internalSoClientWithoutSpaceExtension = appContextService.getInternalUserSOClientWithoutSpaceExtension(); - + const savedObjectType = await getAgentPolicySavedObjectType(); const currentPolicies = await internalSoClientWithoutSpaceExtension.find({ - type: SAVED_OBJECT_TYPE, + type: savedObjectType, fields: ['name', 'revision', 'namespaces'], perPage: SO_SEARCH_LIMIT, namespaces: ['*'], @@ -989,11 +1080,11 @@ class AgentPolicyService { ): Promise { const logger = appContextService.getLogger(); logger.debug(`Deleting agent policy ${id}`); - + const savedObjectType = await getAgentPolicySavedObjectType(); auditLoggingService.writeCustomSoAuditLog({ action: 'delete', id, - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); const agentPolicy = await this.get(soClient, id, false); @@ -1076,7 +1167,7 @@ class AgentPolicyService { }); } - await soClient.delete(SAVED_OBJECT_TYPE, id); + await soClient.delete(savedObjectType, id); await this.triggerAgentPolicyUpdatedEvent(esClient, 'deleted', id, { spaceId: soClient.getCurrentNamespace(), }); @@ -1091,11 +1182,19 @@ class AgentPolicyService { }; } - public async deployPolicy(soClient: SavedObjectsClientContract, agentPolicyId: string) { - await this.deployPolicies(soClient, [agentPolicyId]); + public async deployPolicy( + soClient: SavedObjectsClientContract, + agentPolicyId: string, + agentPolicy?: AgentPolicy | null + ) { + await this.deployPolicies(soClient, [agentPolicyId], agentPolicy ? [agentPolicy] : undefined); } - public async deployPolicies(soClient: SavedObjectsClientContract, agentPolicyIds: string[]) { + public async deployPolicies( + soClient: SavedObjectsClientContract, + agentPolicyIds: string[], + agentPolicies?: AgentPolicy[] + ) { // Use internal ES client so we have permissions to write to .fleet* indices const esClient = appContextService.getInternalUserESClient(); const defaultOutputId = await outputService.getDefaultDataOutputId(soClient); @@ -1117,7 +1216,10 @@ class AgentPolicyService { // There are some potential performance concerns around using `getFullAgentPolicy` in this context, e.g. // re-fetching outputs, settings, and upgrade download source URI data for each policy. This could potentially // be a bottleneck in environments with several thousand agent policies being deployed here. - (agentPolicyId) => agentPolicyService.getFullAgentPolicy(soClient, agentPolicyId), + (agentPolicyId) => + agentPolicyService.getFullAgentPolicy(soClient, agentPolicyId, { + agentPolicy: agentPolicies?.find((policy) => policy.id === agentPolicyId), + }), { concurrency: 50, } @@ -1318,7 +1420,7 @@ class AgentPolicyService { public async getFullAgentPolicy( soClient: SavedObjectsClientContract, id: string, - options?: { standalone: boolean } + options?: { standalone?: boolean; agentPolicy?: AgentPolicy } ): Promise { return getFullAgentPolicy(soClient, id, options); } @@ -1334,9 +1436,10 @@ class AgentPolicyService { esClient: ElasticsearchClient, downloadSourceId: string ) { + const savedObjectType = await getAgentPolicySavedObjectType(); const agentPolicies = ( await soClient.find({ - type: SAVED_OBJECT_TYPE, + type: savedObjectType, fields: ['revision', 'download_source_id'], searchFields: ['download_source_id'], search: escapeSearchQueryPhrase(downloadSourceId), @@ -1371,9 +1474,10 @@ class AgentPolicyService { ): Promise> { const internalSoClientWithoutSpaceExtension = appContextService.getInternalUserSOClientWithoutSpaceExtension(); + const savedObjectType = await getAgentPolicySavedObjectType(); const currentPolicies = await internalSoClientWithoutSpaceExtension.find({ - type: SAVED_OBJECT_TYPE, + type: savedObjectType, fields: ['revision', 'download_source_id', 'namespaces'], searchFields: ['download_source_id'], search: escapeSearchQueryPhrase(downloadSourceId), @@ -1396,9 +1500,10 @@ class AgentPolicyService { ): Promise> { const internalSoClientWithoutSpaceExtension = appContextService.getInternalUserSOClientWithoutSpaceExtension(); + const savedObjectType = await getAgentPolicySavedObjectType(); const currentPolicies = await internalSoClientWithoutSpaceExtension.find({ - type: SAVED_OBJECT_TYPE, + type: savedObjectType, fields: ['revision', 'fleet_server_host_id', 'namespaces'], searchFields: ['fleet_server_host_id'], search: escapeSearchQueryPhrase(fleetServerHostId), @@ -1413,15 +1518,19 @@ class AgentPolicyService { ); } - public async getInactivityTimeouts( - soClient: SavedObjectsClientContract - ): Promise> { - const findRes = await soClient.find({ - type: SAVED_OBJECT_TYPE, + public async getInactivityTimeouts(): Promise< + Array<{ policyIds: string[]; inactivityTimeout: number }> + > { + const savedObjectType = await getAgentPolicySavedObjectType(); + const internalSoClientWithoutSpaceExtension = + appContextService.getInternalUserSOClientWithoutSpaceExtension(); + const findRes = await internalSoClientWithoutSpaceExtension.find({ + type: savedObjectType, page: 1, perPage: SO_SEARCH_LIMIT, - filter: `${SAVED_OBJECT_TYPE}.attributes.inactivity_timeout > 0`, + filter: `${savedObjectType}.attributes.inactivity_timeout > 0`, fields: [`inactivity_timeout`], + namespaces: ['*'], }); const groupedResults = groupBy(findRes.saved_objects, (so) => so.attributes.inactivity_timeout); @@ -1436,8 +1545,9 @@ class AgentPolicyService { updatedPolicies: Array> | null; failedPolicies: Array<{ id: string; error: Error | SavedObjectError }>; }> { - const agentPolicyFetcher = this.fetchAllAgentPolicies(soClient, { - kuery: 'ingest-agent-policies.is_protected: true', + const savedObjectType = await getAgentPolicySavedObjectType(); + const agentPolicyFetcher = await this.fetchAllAgentPolicies(soClient, { + kuery: `${savedObjectType}.is_protected: true`, }); const updatedAgentPolicies: Array> = []; @@ -1449,7 +1559,7 @@ class AgentPolicyService { const { id, revision } = agentPolicy; return { id, - type: SAVED_OBJECT_TYPE, + type: savedObjectType, attributes: { is_protected: false, revision: revision + 1, @@ -1496,36 +1606,38 @@ class AgentPolicyService { } public async getAllManagedAgentPolicies(soClient: SavedObjectsClientContract) { + const savedObjectType = await getAgentPolicySavedObjectType(); const { saved_objects: agentPolicies } = await soClient.find({ - type: SAVED_OBJECT_TYPE, + type: savedObjectType, page: 1, perPage: SO_SEARCH_LIMIT, - filter: normalizeKuery(SAVED_OBJECT_TYPE, 'ingest-agent-policies.is_managed: true'), + filter: normalizeKuery(savedObjectType, 'ingest-agent-policies.is_managed: true'), }); return agentPolicies; } - public fetchAllAgentPolicyIds( + public async fetchAllAgentPolicyIds( soClient: SavedObjectsClientContract, { perPage = 1000, kuery = undefined }: FetchAllAgentPolicyIdsOptions = {} - ): AsyncIterable { + ): Promise> { + const savedObjectType = await getAgentPolicySavedObjectType(); return createSoFindIterable<{}>({ soClient, findRequest: { - type: SAVED_OBJECT_TYPE, + type: savedObjectType, perPage, sortField: 'created_at', sortOrder: 'asc', fields: ['id'], - filter: kuery ? normalizeKuery(SAVED_OBJECT_TYPE, kuery) : undefined, + filter: kuery ? normalizeKuery(savedObjectType, kuery) : undefined, }, resultsMapper: (data) => { return data.saved_objects.map((agentPolicySO) => { auditLoggingService.writeCustomSoAuditLog({ action: 'find', id: agentPolicySO.id, - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); return agentPolicySO.id; }); @@ -1533,7 +1645,7 @@ class AgentPolicyService { }); } - public fetchAllAgentPolicies( + public async fetchAllAgentPolicies( soClient: SavedObjectsClientContract, { perPage = 1000, @@ -1542,23 +1654,24 @@ class AgentPolicyService { sortField = 'created_at', fields = [], }: FetchAllAgentPoliciesOptions = {} - ): AsyncIterable { + ): Promise> { + const savedObjectType = await getAgentPolicySavedObjectType(); return createSoFindIterable({ soClient, findRequest: { - type: SAVED_OBJECT_TYPE, + type: savedObjectType, sortField, sortOrder, perPage, fields, - filter: kuery ? normalizeKuery(SAVED_OBJECT_TYPE, kuery) : undefined, + filter: kuery ? normalizeKuery(savedObjectType, kuery) : undefined, }, resultsMapper(data) { return data.saved_objects.map((agentPolicySO) => { auditLoggingService.writeCustomSoAuditLog({ action: 'find', id: agentPolicySO.id, - savedObjectType: AGENT_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); return mapAgentPolicySavedObjectToAgentPolicy(agentPolicySO); }); diff --git a/x-pack/plugins/fleet/server/services/agent_policy_update.ts b/x-pack/plugins/fleet/server/services/agent_policy_update.ts index 54203900a7dc1..b295c2ca6d744 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy_update.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy_update.ts @@ -8,6 +8,8 @@ import type { KibanaRequest } from '@kbn/core/server'; import type { ElasticsearchClient } from '@kbn/core/server'; +import type { AgentPolicy } from '../../common'; + import { generateEnrollmentAPIKey, deleteEnrollmentApiKeyForAgentPolicyId } from './api_keys'; import { unenrollForAgentPolicyId } from './agents'; import { agentPolicyService } from './agent_policy'; @@ -32,7 +34,7 @@ export async function agentPolicyUpdateEventHandler( esClient: ElasticsearchClient, action: string, agentPolicyId: string, - options?: { skipDeploy?: boolean; spaceId?: string } + options?: { skipDeploy?: boolean; spaceId?: string; agentPolicy?: AgentPolicy | null } ) { // `soClient` from ingest `appContextService` is used to create policy change actions // to ensure encrypted SOs are handled correctly @@ -47,12 +49,12 @@ export async function agentPolicyUpdateEventHandler( forceRecreate: true, }); if (!options?.skipDeploy) { - await agentPolicyService.deployPolicy(internalSoClient, agentPolicyId); + await agentPolicyService.deployPolicy(internalSoClient, agentPolicyId, options?.agentPolicy); } } if (action === 'updated') { - await agentPolicyService.deployPolicy(internalSoClient, agentPolicyId); + await agentPolicyService.deployPolicy(internalSoClient, agentPolicyId, options?.agentPolicy); } if (action === 'deleted') { diff --git a/x-pack/plugins/fleet/server/services/agent_policy_watch.test.ts b/x-pack/plugins/fleet/server/services/agent_policy_watch.test.ts index 0c848703fa7a3..e2aab90b2b34a 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy_watch.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy_watch.test.ts @@ -21,7 +21,7 @@ import type { SavedObjectError } from '@kbn/core-saved-objects-common'; import type { SavedObjectsServiceStart } from '@kbn/core-saved-objects-server'; import type { AgentPolicy } from '../../common'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '../../common'; +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE } from '../../common'; import { LicenseService } from '../../common/services'; @@ -52,7 +52,7 @@ describe('Agent Policy-Changing license watcher', () => { const createPolicySO = (id: string, isProtected: boolean, error?: SavedObjectError) => ({ id, - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, attributes: { is_protected: isProtected, }, @@ -101,12 +101,14 @@ describe('Agent Policy-Changing license watcher', () => { it('should bulk update policies that are not compliant', async () => { const getMockAgentPolicyFetchAllAgentPolicies = (items: AgentPolicy[]) => - jest.fn(async function* (soClient: SavedObjectsClientContract) { - const chunkSize = 1000; // Emulate paginated response - for (let i = 0; i < items.length; i += chunkSize) { - yield items.slice(i, i + chunkSize); - } - }); + jest.fn().mockResolvedValue( + jest.fn(async function* () { + const chunkSize = 1000; // Emulate paginated response + for (let i = 0; i < items.length; i += chunkSize) { + yield items.slice(i, i + chunkSize); + } + })() + ); const policiesToUpdate = Array.from({ length: 2001 }, (_, i) => createAgentPolicyMock({ id: `policy${i}`, is_protected: true }) @@ -159,9 +161,11 @@ describe('Agent Policy-Changing license watcher', () => { it('should return failed policies if bulk update fails', async () => { const getMockAgentPolicyFetchAllAgentPolicies = (items: AgentPolicy[]) => - jest.fn(async function* (soClient: SavedObjectsClientContract) { - yield items; - }); + jest.fn().mockResolvedValue( + jest.fn(async function* () { + yield items; + })() + ); agentPolicySvcMock.fetchAllAgentPolicies = getMockAgentPolicyFetchAllAgentPolicies([ createAgentPolicyMock({ is_protected: true }), diff --git a/x-pack/plugins/fleet/server/services/agent_policy_watch.ts b/x-pack/plugins/fleet/server/services/agent_policy_watch.ts index 37df623f4f8bb..bb8304bd41fa9 100644 --- a/x-pack/plugins/fleet/server/services/agent_policy_watch.ts +++ b/x-pack/plugins/fleet/server/services/agent_policy_watch.ts @@ -23,13 +23,12 @@ import type { AgentPolicySOAttributes } from '../types'; import type { LicenseService } from '../../common/services/license'; import type { AgentPolicy } from '../../common'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '../../common'; import { isAgentPolicyValidForLicense, unsetAgentPolicyAccordingToLicenseLevel, } from '../../common/services/agent_policy_config'; -import { agentPolicyService } from './agent_policy'; +import { agentPolicyService, getAgentPolicySavedObjectType } from './agent_policy'; export class PolicyWatcher { private logger: Logger; @@ -72,7 +71,7 @@ export class PolicyWatcher { public async watch(license: ILicense) { const log = this.logger.get('endpoint', 'agentPolicyLicenseWatch'); - const agentPolicyFetcher = agentPolicyService.fetchAllAgentPolicies( + const agentPolicyFetcher = await agentPolicyService.fetchAllAgentPolicies( this.makeInternalSOClient(this.soStart), { fields: ['is_protected', 'id', 'revision'] } // Don't forget to extend this to include all fields that are used in the `isAgentPolicyValidForLicense` function ); @@ -92,6 +91,7 @@ export class PolicyWatcher { if (policiesToUpdate.length === 0) { break; } + const savedObjectType = await getAgentPolicySavedObjectType(); const { saved_objects: bulkUpdateSavedObjects } = await this.makeInternalSOClient( this.soStart @@ -99,7 +99,7 @@ export class PolicyWatcher { policiesToUpdate.map((policy) => { const { id, revision, ...policyContent } = policy; return { - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: savedObjectType, id, attributes: { ...policyContent, diff --git a/x-pack/plugins/fleet/server/services/agents/action_status.ts b/x-pack/plugins/fleet/server/services/agents/action_status.ts index 5c93c5eaa3c2f..d078620c30321 100644 --- a/x-pack/plugins/fleet/server/services/agents/action_status.ts +++ b/x-pack/plugins/fleet/server/services/agents/action_status.ts @@ -239,7 +239,7 @@ async function getActions( ignore_unavailable: true, from: 0, size: getPerPage(options), - query: addNamespaceFilteringToQuery(query, namespace), + query: await addNamespaceFilteringToQuery(query, namespace), body: { sort: [{ '@timestamp': 'desc' }], }, @@ -390,7 +390,7 @@ async function getPolicyChangeActions( index: AGENT_POLICY_INDEX, ignore_unavailable: true, size: getPerPage(options), - query: addNamespaceFilteringToQuery(query, namespace), + query: await addNamespaceFilteringToQuery(query, namespace), sort: [ { '@timestamp': { diff --git a/x-pack/plugins/fleet/server/services/agents/agentless_agent.test.ts b/x-pack/plugins/fleet/server/services/agents/agentless_agent.test.ts index 376b652ecb163..dc057fd962c9b 100644 --- a/x-pack/plugins/fleet/server/services/agents/agentless_agent.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/agentless_agent.test.ts @@ -219,8 +219,9 @@ describe('Agentless Agent service', () => { const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; jest.spyOn(appContextService, 'getConfig').mockReturnValue({ agentless: { + enabled: true, api: { - url: 'http://api.agentless.com/api/v1/ess', + url: 'http://api.agentless.com', tls: { certificate: '/path/to/cert', key: '/path/to/key', diff --git a/x-pack/plugins/fleet/server/services/agents/agentless_agent.ts b/x-pack/plugins/fleet/server/services/agents/agentless_agent.ts index 2e97ab335a8a4..21d3a6c8df73d 100644 --- a/x-pack/plugins/fleet/server/services/agents/agentless_agent.ts +++ b/x-pack/plugins/fleet/server/services/agents/agentless_agent.ts @@ -22,6 +22,7 @@ import { appContextService } from '../app_context'; import { listEnrollmentApiKeys } from '../api_keys'; import { listFleetServerHosts } from '../fleet_server_host'; +import { prependAgentlessApiBasePathToEndpoint } from '../utils/agentless'; class AgentlessAgentService { public async createAgentlessAgent( @@ -69,7 +70,7 @@ class AgentlessAgentService { ); const requestConfig = { - url: `${agentlessConfig.api.url}/deployments`, + url: prependAgentlessApiBasePathToEndpoint(agentlessConfig, '/deployments'), data: { policy_id: policyId, fleet_url: fleetUrl, diff --git a/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts index 280df2e78bb94..2c9f2a0c32b8d 100644 --- a/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts +++ b/x-pack/plugins/fleet/server/services/agents/build_status_runtime_field.ts @@ -168,7 +168,7 @@ export function _buildStatusRuntimeField(opts: { // pathPrefix is used by the endpoint team currently to run // agent queries against the endpoint metadata index export async function buildAgentStatusRuntimeField( - soClient: SavedObjectsClientContract, + soClient: SavedObjectsClientContract, // Deprecated, it's now using an internal client pathPrefix?: string ) { const config = appContextService.getConfig(); @@ -182,7 +182,7 @@ export async function buildAgentStatusRuntimeField( } const maxAgentPoliciesWithInactivityTimeout = config?.developer?.maxAgentPoliciesWithInactivityTimeout; - const inactivityTimeouts = await agentPolicyService.getInactivityTimeouts(soClient); + const inactivityTimeouts = await agentPolicyService.getInactivityTimeouts(); return _buildStatusRuntimeField({ inactivityTimeouts, diff --git a/x-pack/plugins/fleet/server/services/agents/crud.test.ts b/x-pack/plugins/fleet/server/services/agents/crud.test.ts index d51b0d52d4d7c..cd27870e32a3a 100644 --- a/x-pack/plugins/fleet/server/services/agents/crud.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/crud.test.ts @@ -38,6 +38,7 @@ jest.mock('./versions', () => { getLatestAvailableAgentVersion: jest.fn().mockResolvedValue('8.8.0'), }; }); +jest.mock('../spaces/helpers'); const mockedAuditLoggingService = auditLoggingService as jest.Mocked; @@ -56,7 +57,9 @@ describe('Agents CRUD test', () => { closePointInTime: jest.fn(), } as unknown as ElasticsearchClient; - mockContract = createAppContextStartContractMock(); + mockContract = createAppContextStartContractMock({}, false, { + withoutSpaceExtensions: soClientMock, + }); appContextService.start(mockContract); }); diff --git a/x-pack/plugins/fleet/server/services/agents/crud.ts b/x-pack/plugins/fleet/server/services/agents/crud.ts index 64c20cbbc4d6b..7fdf76c76992b 100644 --- a/x-pack/plugins/fleet/server/services/agents/crud.ts +++ b/x-pack/plugins/fleet/server/services/agents/crud.ts @@ -29,6 +29,7 @@ import { import { auditLoggingService } from '../audit_logging'; import { isAgentInNamespace } from '../spaces/agent_namespaces'; import { getCurrentNamespace } from '../spaces/get_current_namespace'; +import { isSpaceAwarenessEnabled } from '../spaces/helpers'; import { searchHitToAgent, agentSOAttributesToFleetServerAgentDoc } from './helpers'; import { buildAgentStatusRuntimeField } from './build_status_runtime_field'; @@ -228,7 +229,7 @@ export async function getAgentsByKuery( } = options; const filters = []; - const useSpaceAwareness = appContextService.getExperimentalFeatures()?.useSpaceAwareness; + const useSpaceAwareness = await isSpaceAwarenessEnabled(); if (useSpaceAwareness && spaceId) { if (spaceId === DEFAULT_SPACE_ID) { filters.push(`namespaces:"${DEFAULT_SPACE_ID}" or not namespaces:*`); @@ -406,7 +407,7 @@ export async function getAgentById( throw new AgentNotFoundError(`Agent ${agentId} not found`); } - if (!isAgentInNamespace(agentHit, getCurrentNamespace(soClient))) { + if ((await isAgentInNamespace(agentHit, getCurrentNamespace(soClient))) !== true) { throw new AgentNotFoundError(`${agentHit.id} not found in namespace`); } diff --git a/x-pack/plugins/fleet/server/services/agents/reassign.test.ts b/x-pack/plugins/fleet/server/services/agents/reassign.test.ts index 6261b3295496a..4ae78e07d3a8d 100644 --- a/x-pack/plugins/fleet/server/services/agents/reassign.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/reassign.test.ts @@ -16,7 +16,12 @@ import { createClientMock } from './action.mock'; describe('reassignAgent', () => { beforeEach(async () => { - appContextService.start(createAppContextStartContractMock()); + const { soClient } = createClientMock(); + appContextService.start( + createAppContextStartContractMock({}, false, { + withoutSpaceExtensions: soClient, + }) + ); }); afterEach(() => { diff --git a/x-pack/plugins/fleet/server/services/agents/request_diagnostics.test.ts b/x-pack/plugins/fleet/server/services/agents/request_diagnostics.test.ts index a6aa09ee2a36d..7010b1f2c3b1e 100644 --- a/x-pack/plugins/fleet/server/services/agents/request_diagnostics.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/request_diagnostics.test.ts @@ -14,7 +14,12 @@ import { bulkRequestDiagnostics, requestDiagnostics } from './request_diagnostic describe('requestDiagnostics', () => { beforeEach(async () => { - appContextService.start(createAppContextStartContractMock()); + const { soClient } = createClientMock(); + appContextService.start( + createAppContextStartContractMock({}, false, { + withoutSpaceExtensions: soClient, + }) + ); }); afterEach(() => { diff --git a/x-pack/plugins/fleet/server/services/agents/status.test.ts b/x-pack/plugins/fleet/server/services/agents/status.test.ts index d4b2fcbc8e9ae..346352f26de70 100644 --- a/x-pack/plugins/fleet/server/services/agents/status.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/status.test.ts @@ -15,7 +15,23 @@ import { getAgentStatusForAgentPolicy } from './status'; describe('getAgentStatusForAgentPolicy', () => { beforeEach(async () => { - appContextService.start(createAppContextStartContractMock()); + const soClient = { + find: jest.fn().mockResolvedValue({ + saved_objects: [ + { + id: 'agentPolicyId', + attributes: { + name: 'Policy 1', + }, + }, + ], + }), + }; + appContextService.start( + createAppContextStartContractMock({}, false, { + withoutSpaceExtensions: soClient as any, + }) + ); }); afterEach(() => { diff --git a/x-pack/plugins/fleet/server/services/agents/status.ts b/x-pack/plugins/fleet/server/services/agents/status.ts index 1940a816dd2d7..99d2d25b139c8 100644 --- a/x-pack/plugins/fleet/server/services/agents/status.ts +++ b/x-pack/plugins/fleet/server/services/agents/status.ts @@ -16,13 +16,11 @@ import type { } from '@elastic/elasticsearch/lib/api/types'; import { agentStatusesToSummary } from '../../../common/services'; - import { AGENTS_INDEX } from '../../constants'; import type { AgentStatus } from '../../types'; import { FleetError, FleetUnauthorizedError } from '../../errors'; - import { appContextService } from '../app_context'; - +import { isSpaceAwarenessEnabled } from '../spaces/helpers'; import { retryTransientEsErrors } from '../epm/elasticsearch/retry'; import { getAgentById, removeSOAttributes } from './crud'; @@ -54,7 +52,7 @@ export async function getAgentStatusForAgentPolicy( const clauses: QueryDslQueryContainer[] = []; - const useSpaceAwareness = appContextService.getExperimentalFeatures()?.useSpaceAwareness; + const useSpaceAwareness = await isSpaceAwarenessEnabled(); if (useSpaceAwareness && spaceId) { if (spaceId === DEFAULT_SPACE_ID) { clauses.push( diff --git a/x-pack/plugins/fleet/server/services/agents/unenroll.test.ts b/x-pack/plugins/fleet/server/services/agents/unenroll.test.ts index 4231d8dfc078d..b43c600a09a5d 100644 --- a/x-pack/plugins/fleet/server/services/agents/unenroll.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/unenroll.test.ts @@ -27,7 +27,12 @@ const mockedInvalidateAPIKeys = invalidateAPIKeys as jest.MockedFunction { beforeEach(async () => { - appContextService.start(createAppContextStartContractMock()); + const { soClient } = createClientMock(); + appContextService.start( + createAppContextStartContractMock({}, false, { + withoutSpaceExtensions: soClient, + }) + ); }); afterEach(() => { diff --git a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts index 35163288e97dc..efeb5649cd576 100644 --- a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.test.ts @@ -8,8 +8,7 @@ import type { SavedObjectsClientContract } from '@kbn/core/server'; import type { ElasticsearchClientMock } from '@kbn/core/server/mocks'; import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; -import { appContextService } from '../app_context'; - +import { isSpaceAwarenessEnabled } from '../spaces/helpers'; import type { Agent } from '../../types'; import { createClientMock } from './action.mock'; @@ -17,6 +16,7 @@ import { MAX_RETRY_COUNT } from './retry_helper'; import { updateAgentTags } from './update_agent_tags'; import { UpdateAgentTagsActionRunner, updateTagsBatch } from './update_agent_tags_action_runner'; +jest.mock('../spaces/helpers'); jest.mock('../app_context', () => { const { loggerMock } = jest.requireActual('@kbn/logging-mocks'); return { @@ -418,11 +418,9 @@ describe('update_agent_tags', () => { ); }); - describe('with the useSpaceAwareness feature flag enabled', () => { + describe('with isSpaceAwarenessEnabled return true', () => { beforeEach(() => { - jest.mocked(appContextService.getExperimentalFeatures).mockReturnValue({ - useSpaceAwareness: true, - } as any); + jest.mocked(isSpaceAwarenessEnabled).mockResolvedValue(true); }); it('should not update tags for agents in another space', async () => { diff --git a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.ts b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.ts index f3443458249b7..7d37581cef997 100644 --- a/x-pack/plugins/fleet/server/services/agents/update_agent_tags.ts +++ b/x-pack/plugins/fleet/server/services/agents/update_agent_tags.ts @@ -38,7 +38,7 @@ export async function updateAgentTags( outgoingErrors[maybeAgent.id] = new AgentReassignmentError( `Cannot find agent ${maybeAgent.id}` ); - } else if (!isAgentInNamespace(maybeAgent, currentNameSpace)) { + } else if ((await isAgentInNamespace(maybeAgent, currentNameSpace)) !== true) { outgoingErrors[maybeAgent.id] = new AgentReassignmentError( `Agent ${maybeAgent.id} is not in the current space` ); @@ -49,7 +49,7 @@ export async function updateAgentTags( } else if ('kuery' in options) { const batchSize = options.batchSize ?? SO_SEARCH_LIMIT; - const namespaceFilter = agentsKueryNamespaceFilter(currentNameSpace); + const namespaceFilter = await agentsKueryNamespaceFilter(currentNameSpace); const filters = namespaceFilter ? [namespaceFilter] : []; if (options.kuery !== '') { filters.push(options.kuery); diff --git a/x-pack/plugins/fleet/server/services/agents/upgrade.test.ts b/x-pack/plugins/fleet/server/services/agents/upgrade.test.ts index 78468e2337dec..b1e78862fde0e 100644 --- a/x-pack/plugins/fleet/server/services/agents/upgrade.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/upgrade.test.ts @@ -36,7 +36,12 @@ jest.mock('./action_status', () => { describe('sendUpgradeAgentsActions (plural)', () => { beforeEach(async () => { - appContextService.start(createAppContextStartContractMock()); + const { soClient } = createClientMock(); + appContextService.start( + createAppContextStartContractMock({}, false, { + withoutSpaceExtensions: soClient, + }) + ); }); afterEach(() => { diff --git a/x-pack/plugins/fleet/server/services/agents/versions.test.ts b/x-pack/plugins/fleet/server/services/agents/versions.test.ts index 1277099f65f9a..58e6dadd7f9e0 100644 --- a/x-pack/plugins/fleet/server/services/agents/versions.test.ts +++ b/x-pack/plugins/fleet/server/services/agents/versions.test.ts @@ -221,6 +221,42 @@ describe('getAvailableVersions', () => { expect(res).toEqual(['8.10.0', '8.9.2', '8.1.0', '8.0.0', '7.17.0']); }); + it('should not include duplicate', async () => { + mockKibanaVersion = '300.0.0'; + mockedReadFile.mockResolvedValue(`["8.1.0", "8.0.0", "7.17.0", "7.16.0"]`); + mockedFetch.mockResolvedValueOnce({ + status: 200, + text: jest.fn().mockResolvedValue( + JSON.stringify([ + [ + { + title: 'Elastic Agent 8.1.0', + version_number: '8.1.0', + }, + { + title: 'Elastic Agent 8.10.0', + version_number: '8.10.0', + }, + { + title: 'Elastic Agent 8.10.0', + version_number: '8.10.0+build202407291657', + }, + { + title: 'Elastic Agent 8.9.2', + version_number: '8.9.2', + }, + , + ], + ]) + ), + } as any); + + const res = await getAvailableVersions({ ignoreCache: true }); + + // Should sort, uniquify and filter out versions < 7.17 + expect(res).toEqual(['8.10.0', '8.9.2', '8.1.0', '8.0.0', '7.17.0']); + }); + it('should cache results', async () => { mockKibanaVersion = '9.0.0'; mockedReadFile.mockResolvedValue(`["8.1.0", "8.0.0", "7.17.0", "7.16.0"]`); diff --git a/x-pack/plugins/fleet/server/services/agents/versions.ts b/x-pack/plugins/fleet/server/services/agents/versions.ts index fad0028c80691..f374275bf941b 100644 --- a/x-pack/plugins/fleet/server/services/agents/versions.ts +++ b/x-pack/plugins/fleet/server/services/agents/versions.ts @@ -111,10 +111,12 @@ export const getAvailableVersions = async ({ // Coerce each version to a semver object and compare to our `MINIMUM_SUPPORTED_VERSION` - we // only want support versions in the final result. We'll also sort by newest version first. - availableVersions = uniq([...availableVersions, ...apiVersions]) - .map((item: any) => semverCoerce(item)?.version || '') - .filter((v: any) => semverGte(v, MINIMUM_SUPPORTED_VERSION)) - .sort((a: any, b: any) => (semverGt(a, b) ? -1 : 1)); + availableVersions = uniq( + [...availableVersions, ...apiVersions] + .map((item: any) => semverCoerce(item)?.version || '') + .filter((v: any) => semverGte(v, MINIMUM_SUPPORTED_VERSION)) + .sort((a: any, b: any) => (semverGt(a, b) ? -1 : 1)) + ); // if api versions are empty (air gapped or API not available), we add current kibana version, as the build file might not contain the latest released version if ( diff --git a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.test.ts b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.test.ts index 6d37dd44a7f5e..e023814948abb 100644 --- a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.test.ts +++ b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.test.ts @@ -11,8 +11,8 @@ import { loggerMock } from '@kbn/logging-mocks'; import type { Logger } from '@kbn/core/server'; import { securityMock } from '@kbn/security-plugin/server/mocks'; +import type { AgentPolicy } from '../../../common'; import { ENROLLMENT_API_KEYS_INDEX } from '../../constants'; - import { agentPolicyService } from '../agent_policy'; import { auditLoggingService } from '../audit_logging'; import { appContextService } from '../app_context'; @@ -26,6 +26,7 @@ import { jest.mock('../audit_logging'); jest.mock('../agent_policy'); jest.mock('../app_context'); +jest.mock('../spaces/helpers'); jest.mock('uuid', () => { return { @@ -98,8 +99,8 @@ describe('enrollment api keys', () => { mockedAgentPolicyService.get.mockResolvedValue({ id: 'test-agent-policy', - space_id: 'test123', - } as any); + space_ids: ['test123'], + } as AgentPolicy); await generateEnrollmentAPIKey(soClient, esClient, { name: 'test-api-key', @@ -116,6 +117,40 @@ describe('enrollment api keys', () => { }) ); }); + + it('should set namespaces if agent policy specify mulitple space IDs', async () => { + const soClient = savedObjectsClientMock.create(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + + esClient.create.mockResolvedValue({ + _id: 'test-enrollment-api-key-id', + } as any); + + esClient.security.createApiKey.mockResolvedValue({ + api_key: 'test-api-key-value', + id: 'test-api-key-id', + } as any); + + mockedAgentPolicyService.get.mockResolvedValue({ + id: 'test-agent-policy', + space_ids: ['test123', 'test456'], + } as AgentPolicy); + + await generateEnrollmentAPIKey(soClient, esClient, { + name: 'test-api-key', + expiration: '7d', + agentPolicyId: 'test-agent-policy', + forceRecreate: true, + }); + + expect(esClient.create).toHaveBeenCalledWith( + expect.objectContaining({ + body: expect.objectContaining({ + namespaces: ['test123', 'test456'], + }), + }) + ); + }); }); describe('deleteEnrollmentApiKey', () => { diff --git a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts index e89917143732f..d7b75071201d2 100644 --- a/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts +++ b/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts @@ -23,6 +23,7 @@ import { escapeSearchQueryPhrase } from '../saved_object'; import { auditLoggingService } from '../audit_logging'; import { _joinFilters } from '../agents'; import { appContextService } from '../app_context'; +import { isSpaceAwarenessEnabled } from '../spaces/helpers'; import { invalidateAPIKeys } from './security'; @@ -54,7 +55,7 @@ export async function listEnrollmentApiKeys( filters.push(kuery); } - const useSpaceAwareness = appContextService.getExperimentalFeatures()?.useSpaceAwareness; + const useSpaceAwareness = await isSpaceAwarenessEnabled(); if (useSpaceAwareness && spaceId) { if (spaceId === DEFAULT_SPACE_ID) { // TODO use constant @@ -312,7 +313,7 @@ export async function generateEnrollmentAPIKey( api_key: apiKey, name, policy_id: agentPolicyId, - namespaces: agentPolicy?.space_id ? [agentPolicy?.space_id] : undefined, + namespaces: agentPolicy?.space_ids, created_at: new Date().toISOString(), }; diff --git a/x-pack/plugins/fleet/server/services/api_keys/transform_api_keys.ts b/x-pack/plugins/fleet/server/services/api_keys/transform_api_keys.ts index ab17eeaac7921..8888ae75e4699 100644 --- a/x-pack/plugins/fleet/server/services/api_keys/transform_api_keys.ts +++ b/x-pack/plugins/fleet/server/services/api_keys/transform_api_keys.ts @@ -26,8 +26,8 @@ import type { export function isTransformApiKey(arg: any): arg is TransformAPIKey { return ( arg && - arg.hasOwnProperty('api_key') && - arg.hasOwnProperty('encoded') && + Object.hasOwn(arg, 'api_key') && + Object.hasOwn(arg, 'encoded') && typeof arg.encoded === 'string' ); } diff --git a/x-pack/plugins/fleet/server/services/app_context.ts b/x-pack/plugins/fleet/server/services/app_context.ts index 970291bf7d552..f2965025d45d1 100644 --- a/x-pack/plugins/fleet/server/services/app_context.ts +++ b/x-pack/plugins/fleet/server/services/app_context.ts @@ -35,7 +35,10 @@ import type { SavedObjectTaggingStart } from '@kbn/saved-objects-tagging-plugin/ import { SECURITY_EXTENSION_ID, SPACES_EXTENSION_ID } from '@kbn/core-saved-objects-server'; import type { FleetConfigType } from '../../common/types'; -import type { ExperimentalFeatures } from '../../common/experimental_features'; +import { + allowedExperimentalValues, + type ExperimentalFeatures, +} from '../../common/experimental_features'; import type { ExternalCallback, ExternalCallbacksStorage, @@ -61,7 +64,7 @@ class AppContextService { private encryptedSavedObjectsStart: EncryptedSavedObjectsPluginStart | undefined; private data: DataPluginStart | undefined; private esClient: ElasticsearchClient | undefined; - private experimentalFeatures?: ExperimentalFeatures; + private experimentalFeatures: ExperimentalFeatures = allowedExperimentalValues; private securityCoreStart: SecurityServiceStart | undefined; private securitySetup: SecurityPluginSetup | undefined; private securityStart: SecurityPluginStart | undefined; @@ -168,9 +171,6 @@ class AppContextService { } public getExperimentalFeatures() { - if (!this.experimentalFeatures) { - throw new Error('experimentalFeatures not set.'); - } return this.experimentalFeatures; } diff --git a/x-pack/plugins/fleet/server/services/epm/agent/agent.test.ts b/x-pack/plugins/fleet/server/services/epm/agent/agent.test.ts index e57b19c847806..a3e5749384c0b 100644 --- a/x-pack/plugins/fleet/server/services/epm/agent/agent.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/agent/agent.test.ts @@ -327,6 +327,25 @@ input: logs }); }); + it('should support $$$$ yaml values at root level', () => { + const streamTemplate = ` +input: logs +{{custom}} + `; + const vars = { + custom: { + type: 'yaml', + value: 'test: $$$$', + }, + }; + + const output = compileTemplate(vars, streamTemplate); + expect(output).toEqual({ + input: 'logs', + test: '$$$$', + }); + }); + it('should suport !!str for string values', () => { const stringTemplate = ` my-package: diff --git a/x-pack/plugins/fleet/server/services/epm/agent/agent.ts b/x-pack/plugins/fleet/server/services/epm/agent/agent.ts index 9a26394cd1cb1..f1187e3629c0b 100644 --- a/x-pack/plugins/fleet/server/services/epm/agent/agent.ts +++ b/x-pack/plugins/fleet/server/services/epm/agent/agent.ts @@ -164,8 +164,7 @@ function replaceRootLevelYamlVariables(yamlVariables: { [k: string]: any }, yaml let patchedTemplate = yamlTemplate; Object.entries(yamlVariables).forEach(([key, val]) => { - patchedTemplate = patchedTemplate.replace( - new RegExp(`^"${key}"`, 'gm'), + patchedTemplate = patchedTemplate.replace(new RegExp(`^"${key}"`, 'gm'), () => val ? safeDump(val) : '' ); }); diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts index 58dde5d714886..2ee8477e04f42 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/install.ts @@ -135,7 +135,7 @@ const installPreBuiltTemplates = async ( const esClientParams = { name: templateName, body: content }; const esClientRequestOptions = { ignore: [404] }; - if (content.hasOwnProperty('template') || content.hasOwnProperty('composed_of')) { + if (Object.hasOwn(content, 'template') || Object.hasOwn(content, 'composed_of')) { // Template is v2 return retryTransientEsErrors( () => esClient.indices.putIndexTemplate(esClientParams, esClientRequestOptions), diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts index e44e70b85efe0..795c7418b3b70 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/template/template.ts @@ -651,10 +651,10 @@ function _generateMappings( function generateDynamicAndEnabled(field: Field) { const props: Properties = {}; - if (field.hasOwnProperty('enabled')) { + if (Object.hasOwn(field, 'enabled')) { props.enabled = field.enabled; } - if (field.hasOwnProperty('dynamic')) { + if (Object.hasOwn(field, 'dynamic')) { props.dynamic = field.dynamic; } return props; @@ -663,10 +663,10 @@ function generateDynamicAndEnabled(field: Field) { function generateNestedProps(field: Field) { const props = generateDynamicAndEnabled(field); - if (field.hasOwnProperty('include_in_parent')) { + if (Object.hasOwn(field, 'include_in_parent')) { props.include_in_parent = field.include_in_parent; } - if (field.hasOwnProperty('include_in_root')) { + if (Object.hasOwn(field, 'include_in_root')) { props.include_in_root = field.include_in_root; } return props; diff --git a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform_utils.ts b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform_utils.ts index 8a24e6fb78149..16ff62acc1f74 100644 --- a/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform_utils.ts +++ b/x-pack/plugins/fleet/server/services/epm/elasticsearch/transform/transform_utils.ts @@ -24,7 +24,7 @@ export const getDestinationIndexAliases = (aliasSettings: unknown): TransformAli if (isPopulatedObject(aliasSettings)) { Object.keys(aliasSettings).forEach((alias) => { - if (aliasSettings.hasOwnProperty(alias) && typeof alias === 'string') { + if (Object.hasOwn(aliasSettings, alias) && typeof alias === 'string') { const moveOnCreation = aliasSettings[alias]?.move_on_creation === true; aliases.push({ alias, move_on_creation: moveOnCreation }); } diff --git a/x-pack/plugins/fleet/server/services/epm/packages/_install_package.ts b/x-pack/plugins/fleet/server/services/epm/packages/_install_package.ts index 97b0eeb823e02..c8c7a8d9e3d03 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/_install_package.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/_install_package.ts @@ -20,7 +20,7 @@ import { getNormalizedDataStreams } from '../../../../common/services'; import { MAX_TIME_COMPLETE_INSTALL, ASSETS_SAVED_OBJECT_TYPE, - PACKAGE_POLICY_SAVED_OBJECT_TYPE, + LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT, } from '../../../../common/constants'; import { PACKAGES_SAVED_OBJECT_TYPE, FLEET_INSTALL_FORMAT_VERSION } from '../../../constants'; @@ -361,7 +361,7 @@ export async function _installPackage({ const policyIdsToUpgrade = await packagePolicyService.listIds(savedObjectsClient, { page: 1, perPage: SO_SEARCH_LIMIT, - kuery: `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name:${pkgName}`, + kuery: `${LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name:${pkgName}`, }); logger.debug( `Package install - Package is flagged with keep_policies_up_to_date, upgrading its associated package policies ${policyIdsToUpgrade}` diff --git a/x-pack/plugins/fleet/server/services/epm/packages/get.ts b/x-pack/plugins/fleet/server/services/epm/packages/get.ts index ce0bbeb4f6d2c..b3f0d28438d54 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/get.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/get.ts @@ -22,7 +22,6 @@ import { buildNode as buildWildcardNode } from '@kbn/es-query/src/kuery/node_typ import { ASSETS_SAVED_OBJECT_TYPE, installationStatuses, - PACKAGE_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT, } from '../../../../common/constants'; import { isPackageLimited } from '../../../../common/services'; @@ -55,7 +54,7 @@ import * as Registry from '../registry'; import type { PackageAsset } from '../archive/storage'; import { getEsPackage } from '../archive/storage'; import { normalizeKuery } from '../../saved_object'; - +import { getPackagePolicySavedObjectType } from '../../package_policy'; import { auditLoggingService } from '../../audit_logging'; import { getFilteredSearchPackages } from '../filtered_packages'; @@ -479,9 +478,11 @@ export const getPackageUsageStats = async ({ savedObjectsClient: SavedObjectsClientContract; pkgName: string; }): Promise => { + const packagePolicySavedObjectType = await getPackagePolicySavedObjectType(); + const filter = normalizeKuery( - PACKAGE_POLICY_SAVED_OBJECT_TYPE, - `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name: ${pkgName}` + packagePolicySavedObjectType, + `${packagePolicySavedObjectType}.package.name: ${pkgName}` ); const agentPolicyCount = new Set(); let page = 1; @@ -491,7 +492,7 @@ export const getPackageUsageStats = async ({ // using saved Objects client directly, instead of the `list()` method of `package_policy` service // in order to not cause a circular dependency (package policy service imports from this module) const packagePolicies = await savedObjectsClient.find({ - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: packagePolicySavedObjectType, perPage: 1000, page: page++, filter, @@ -501,7 +502,7 @@ export const getPackageUsageStats = async ({ auditLoggingService.writeCustomSoAuditLog({ action: 'find', id: packagePolicy.id, - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: packagePolicySavedObjectType, }); } diff --git a/x-pack/plugins/fleet/server/services/fleet_server/index.test.ts b/x-pack/plugins/fleet/server/services/fleet_server/index.test.ts index 7faea8c526819..ac97411a5b92f 100644 --- a/x-pack/plugins/fleet/server/services/fleet_server/index.test.ts +++ b/x-pack/plugins/fleet/server/services/fleet_server/index.test.ts @@ -45,6 +45,7 @@ describe('checkFleetServerVersionsForSecretsStorage', () => { afterEach(() => { appContextService.stop(); jest.clearAllMocks(); + jest.restoreAllMocks(); }); const esClientMock = elasticsearchServiceMock.createElasticsearchClient(); diff --git a/x-pack/plugins/fleet/server/services/fleet_server/index.ts b/x-pack/plugins/fleet/server/services/fleet_server/index.ts index a0d508f0929e9..41e22f072042f 100644 --- a/x-pack/plugins/fleet/server/services/fleet_server/index.ts +++ b/x-pack/plugins/fleet/server/services/fleet_server/index.ts @@ -12,7 +12,10 @@ import semverCoerce from 'semver/functions/coerce'; import { uniqBy } from 'lodash'; import type { AgentPolicy } from '../../../common/types'; -import { PACKAGE_POLICY_SAVED_OBJECT_TYPE, FLEET_SERVER_PACKAGE } from '../../../common/constants'; +import { + LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, + FLEET_SERVER_PACKAGE, +} from '../../../common/constants'; import { SO_SEARCH_LIMIT } from '../../constants'; import { getAgentsByKuery, getAgentStatusById } from '../agents'; import { packagePolicyService } from '../package_policy'; @@ -27,20 +30,20 @@ export const getFleetServerPolicies = async ( soClient: SavedObjectsClientContract ): Promise => { const fleetServerPackagePolicies = await packagePolicyService.list(soClient, { - kuery: `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name:${FLEET_SERVER_PACKAGE}`, + kuery: `${LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE}.package.name:${FLEET_SERVER_PACKAGE}`, spaceId: '*', }); // Extract associated fleet server agent policy IDs - const fleetServerAgentPolicyIds = fleetServerPackagePolicies.items.flatMap((p) => - p.policy_ids?.map((id) => ({ id, spaceId: p.spaceId } ?? [])) - ); + const fleetServerAgentPolicyIds = fleetServerPackagePolicies.items.flatMap((p) => { + return p.policy_ids?.map((id) => ({ id, spaceId: p.spaceIds?.[0] ?? DEFAULT_SPACE_ID } ?? [])); + }); // Retrieve associated agent policies const fleetServerAgentPolicies = fleetServerAgentPolicyIds.length ? await agentPolicyService.getByIDs( soClient, - uniqBy(fleetServerAgentPolicyIds, (p) => `${p?.spaceId ?? ''}:${p.id}`) + uniqBy(fleetServerAgentPolicyIds, (p) => p.id) ) : []; @@ -55,7 +58,7 @@ export const getFleetServerPolicies = async ( export const hasFleetServersForPolicies = async ( esClient: ElasticsearchClient, soClient: SavedObjectsClientContract, - agentPolicies: Array>, + agentPolicies: Array>, activeOnly: boolean = false ): Promise => { if (agentPolicies.length > 0) { @@ -64,10 +67,10 @@ export const hasFleetServersForPolicies = async ( soClient, undefined, agentPolicies - .map(({ id, space_id: spaceId }) => { + .map(({ id, space_ids: spaceIds }) => { const space = - spaceId && spaceId !== DEFAULT_SPACE_ID - ? `namespaces:"${spaceId}"` + spaceIds?.[0] && spaceIds?.[0] !== DEFAULT_SPACE_ID + ? `namespaces:"${spaceIds?.[0]}"` : `not namespaces:* or namespaces:"${DEFAULT_SPACE_ID}"`; return `(policy_id:${id} and (${space}))`; @@ -113,18 +116,20 @@ export async function checkFleetServerVersionsForSecretsStorage( let hasMore = true; const policyIds = new Set(); let page = 1; + const perPage = 200; while (hasMore) { const res = await packagePolicyService.list(soClient, { page: page++, - perPage: 20, + perPage, kuery: 'ingest-package-policies.package.name:fleet_server', + fields: ['policy_ids'], }); for (const item of res.items) { item.policy_ids.forEach((id) => policyIds.add(id)); } - if (res.items.length === 0) { + if (res.items.length < perPage) { hasMore = false; } } diff --git a/x-pack/plugins/fleet/server/services/output.test.ts b/x-pack/plugins/fleet/server/services/output.test.ts index 3bc9003162f44..0951657fae6dd 100644 --- a/x-pack/plugins/fleet/server/services/output.test.ts +++ b/x-pack/plugins/fleet/server/services/output.test.ts @@ -19,10 +19,12 @@ import { OUTPUT_SAVED_OBJECT_TYPE } from '../constants'; import { outputService, outputIdToUuid } from './output'; import { appContextService } from './app_context'; import { agentPolicyService } from './agent_policy'; +import { packagePolicyService } from './package_policy'; import { auditLoggingService } from './audit_logging'; jest.mock('./app_context'); jest.mock('./agent_policy'); +jest.mock('./package_policy'); jest.mock('./audit_logging'); const mockedAuditLoggingService = auditLoggingService as jest.Mocked; @@ -43,6 +45,7 @@ mockedAppContextService.getLogger.mockImplementation(() => { mockedAppContextService.getExperimentalFeatures.mockReturnValue({} as any); const mockedAgentPolicyService = agentPolicyService as jest.Mocked; +const mockedPackagePolicyService = packagePolicyService as jest.Mocked; const CLOUD_ID = 'dXMtZWFzdC0xLmF3cy5mb3VuZC5pbyRjZWM2ZjI2MWE3NGJmMjRjZTMzYmI4ODExYjg0Mjk0ZiRjNmMyY2E2ZDA0MjI0OWFmMGNjN2Q3YTllOTYyNTc0Mw=='; @@ -219,6 +222,7 @@ function getMockedSoClient( }); mockedAppContextService.getInternalUserSOClient.mockReturnValue(soClient); + mockedAppContextService.getInternalUserSOClientWithoutSpaceExtension.mockReturnValue(soClient); return soClient; } @@ -288,17 +292,23 @@ describe('Output Service', () => { } as unknown as ReturnType; beforeEach(() => { + mockedAgentPolicyService.getByIDs.mockResolvedValue([]); mockedAgentPolicyService.list.mockClear(); mockedAgentPolicyService.hasAPMIntegration.mockClear(); mockedAgentPolicyService.hasFleetServerIntegration.mockClear(); mockedAgentPolicyService.hasSyntheticsIntegration.mockClear(); mockedAgentPolicyService.removeOutputFromAll.mockReset(); + mockedPackagePolicyService.removeOutputFromAll.mockReset(); mockedAppContextService.getInternalUserSOClient.mockReset(); mockedAppContextService.getEncryptedSavedObjectsSetup.mockReset(); mockedAuditLoggingService.writeCustomSoAuditLog.mockReset(); mockedAgentPolicyService.update.mockReset(); }); + afterEach(() => { + mockedAgentPolicyService.getByIDs.mockClear(); + }); + describe('create', () => { describe('elasticsearch output', () => { it('works with a predefined id', async () => { @@ -1412,7 +1422,7 @@ describe('Output Service', () => { hosts: ['test:4343'], }) ).rejects.toThrowError( - 'Logstash output cannot be used with Fleet Server integration in fleet server policy. Please create a new ElasticSearch output.' + 'Logstash output cannot be used with Fleet Server integration in fleet server policy. Please create a new Elasticsearch output.' ); }); @@ -1428,7 +1438,7 @@ describe('Output Service', () => { hosts: ['test:4343'], }) ).rejects.toThrowError( - 'Logstash output cannot be used with Synthetics integration in synthetics policy. Please create a new ElasticSearch output.' + 'Logstash output cannot be used with Synthetics integration in synthetics policy. Please create a new Elasticsearch output.' ); }); @@ -1758,6 +1768,7 @@ describe('Output Service', () => { fromPreconfiguration: true, }); expect(mockedAgentPolicyService.removeOutputFromAll).toBeCalled(); + expect(mockedPackagePolicyService.removeOutputFromAll).toBeCalled(); expect(soClient.delete).toBeCalled(); }); diff --git a/x-pack/plugins/fleet/server/services/output.ts b/x-pack/plugins/fleet/server/services/output.ts index f42867f0686bb..57a641ed44d6f 100644 --- a/x-pack/plugins/fleet/server/services/output.ts +++ b/x-pack/plugins/fleet/server/services/output.ts @@ -37,7 +37,8 @@ import type { PolicySecretReference, } from '../types'; import { - AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, + PACKAGE_POLICY_SAVED_OBJECT_TYPE, DEFAULT_OUTPUT, DEFAULT_OUTPUT_ID, OUTPUT_SAVED_OBJECT_TYPE, @@ -63,6 +64,7 @@ import { import type { OutputType } from '../types'; import { agentPolicyService } from './agent_policy'; +import { packagePolicyService } from './package_policy'; import { appContextService } from './app_context'; import { escapeSearchQueryPhrase } from './saved_object'; import { auditLoggingService } from './audit_logging'; @@ -124,40 +126,63 @@ function outputSavedObjectToOutput(so: SavedObject): Output }; } -async function getAgentPoliciesPerOutput( - soClient: SavedObjectsClientContract, - outputId?: string, - isDefault?: boolean -) { - let kuery: string; +async function getAgentPoliciesPerOutput(outputId?: string, isDefault?: boolean) { + const internalSoClientWithoutSpaceExtension = + appContextService.getInternalUserSOClientWithoutSpaceExtension(); + let agentPoliciesKuery: string; + const packagePoliciesKuery: string = `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.output_id:"${outputId}"`; if (outputId) { if (isDefault) { - kuery = `${AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:"${outputId}" or not ${AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:*`; + agentPoliciesKuery = `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:"${outputId}" or not ${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:*`; } else { - kuery = `${AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:"${outputId}"`; + agentPoliciesKuery = `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:"${outputId}"`; } } else { if (isDefault) { - kuery = `not ${AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:*`; + agentPoliciesKuery = `not ${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.data_output_id:*`; } else { return; } } - const agentPolicySO = await agentPolicyService.list(soClient, { - kuery, + // Get agent policies directly using output + const directAgentPolicies = await agentPolicyService.list(internalSoClientWithoutSpaceExtension, { + kuery: agentPoliciesKuery, perPage: SO_SEARCH_LIMIT, withPackagePolicies: true, }); - return agentPolicySO?.items; + const directAgentPolicyIds = directAgentPolicies?.items.map((policy) => policy.id); + + // Get package policies using output and derive agent policies from that which + // are not already identfied above. The IDs cannot be used as part of the kuery + // above since the underlying saved object client .find() only filters on attributes + const packagePolicySOs = await packagePolicyService.list(internalSoClientWithoutSpaceExtension, { + kuery: packagePoliciesKuery, + perPage: SO_SEARCH_LIMIT, + }); + const agentPolicyIdsFromPackagePolicies = [ + ...new Set( + packagePolicySOs?.items.reduce((acc: string[], packagePolicy) => { + return [ + ...acc, + ...packagePolicy.policy_ids.filter((id) => !directAgentPolicyIds?.includes(id)), + ]; + }, []) + ), + ]; + const agentPoliciesFromPackagePolicies = await agentPolicyService.getByIDs( + internalSoClientWithoutSpaceExtension, + agentPolicyIdsFromPackagePolicies, + { + withPackagePolicies: true, + } + ); + + return [...directAgentPolicies.items, ...agentPoliciesFromPackagePolicies]; } -async function validateLogstashOutputNotUsedInAPMPolicy( - soClient: SavedObjectsClientContract, - outputId?: string, - isDefault?: boolean -) { - const agentPolicies = await getAgentPoliciesPerOutput(soClient, outputId, isDefault); +async function validateLogstashOutputNotUsedInAPMPolicy(outputId?: string, isDefault?: boolean) { + const agentPolicies = await getAgentPoliciesPerOutput(outputId, isDefault); // Validate no policy with APM use that policy if (agentPolicies) { @@ -169,16 +194,19 @@ async function validateLogstashOutputNotUsedInAPMPolicy( } } -async function findPoliciesWithFleetServerOrSynthetics( - soClient: SavedObjectsClientContract, - outputId?: string, - isDefault?: boolean -) { +async function findPoliciesWithFleetServerOrSynthetics(outputId?: string, isDefault?: boolean) { + const internalSoClientWithoutSpaceExtension = + appContextService.getInternalUserSOClientWithoutSpaceExtension(); + // find agent policies by outputId // otherwise query all the policies const agentPolicies = outputId - ? await getAgentPoliciesPerOutput(soClient, outputId, isDefault) - : (await agentPolicyService.list(soClient, { withPackagePolicies: true }))?.items; + ? await getAgentPoliciesPerOutput(outputId, isDefault) + : ( + await agentPolicyService.list(internalSoClientWithoutSpaceExtension, { + withPackagePolicies: true, + }) + )?.items; const policiesWithFleetServer = agentPolicies?.filter((policy) => agentPolicyService.hasFleetServerIntegration(policy)) || []; @@ -199,13 +227,12 @@ function validateOutputNotUsedInPolicy( dataOutputType )} output cannot be used with ${integrationName} integration in ${ agentPolicy.name - }. Please create a new ElasticSearch output.` + }. Please create a new Elasticsearch output.` ); } } async function validateTypeChanges( - soClient: SavedObjectsClientContract, esClient: ElasticsearchClient, id: string, data: Nullable>, @@ -213,12 +240,14 @@ async function validateTypeChanges( defaultDataOutputId: string | null, fromPreconfiguration: boolean ) { + const internalSoClientWithoutSpaceExtension = + appContextService.getInternalUserSOClientWithoutSpaceExtension(); const mergedIsDefault = data.is_default ?? originalOutput.is_default; const { policiesWithFleetServer, policiesWithSynthetics } = - await findPoliciesWithFleetServerOrSynthetics(soClient, id, mergedIsDefault); + await findPoliciesWithFleetServerOrSynthetics(id, mergedIsDefault); if (data.type === outputType.Logstash || originalOutput.type === outputType.Logstash) { - await validateLogstashOutputNotUsedInAPMPolicy(soClient, id, mergedIsDefault); + await validateLogstashOutputNotUsedInAPMPolicy(id, mergedIsDefault); } // prevent changing an ES output to logstash or kafka if it's used by fleet server or synthetics policies if ( @@ -230,7 +259,7 @@ async function validateTypeChanges( validateOutputNotUsedInPolicy(policiesWithSynthetics, data.type, 'Synthetics'); } await updateAgentPoliciesDataOutputId( - soClient, + internalSoClientWithoutSpaceExtension, esClient, data, mergedIsDefault, @@ -274,7 +303,7 @@ class OutputService { return appContextService.getInternalUserSOClient(fakeRequest); } - private async _getDefaultDataOutputsSO(soClient: SavedObjectsClientContract) { + private async _getDefaultDataOutputsSO() { const outputs = await this.encryptedSoClient.find({ type: OUTPUT_SAVED_OBJECT_TYPE, searchFields: ['is_default'], @@ -403,7 +432,7 @@ class OutputService { } public async getDefaultDataOutputId(soClient: SavedObjectsClientContract) { - const outputs = await this._getDefaultDataOutputsSO(soClient); + const outputs = await this._getDefaultDataOutputsSO(); if (!outputs.saved_objects.length) { return null; @@ -454,7 +483,7 @@ class OutputService { const defaultDataOutputId = await this.getDefaultDataOutputId(soClient); if (output.type === outputType.Logstash || output.type === outputType.Kafka) { - await validateLogstashOutputNotUsedInAPMPolicy(soClient, undefined, data.is_default); + await validateLogstashOutputNotUsedInAPMPolicy(undefined, data.is_default); if (!appContextService.getEncryptedSavedObjectsSetup()?.canEncrypt) { throw new FleetEncryptedSavedObjectEncryptionKeyRequired( `${output.type} output needs encrypted saved object api key to be set` @@ -462,7 +491,7 @@ class OutputService { } } const { policiesWithFleetServer, policiesWithSynthetics } = - await findPoliciesWithFleetServerOrSynthetics(soClient); + await findPoliciesWithFleetServerOrSynthetics(); await updateAgentPoliciesDataOutputId( soClient, esClient, @@ -740,8 +769,17 @@ class OutputService { throw new OutputUnauthorizedError(`Default monitoring output ${id} cannot be deleted.`); } + const internalSoClientWithoutSpaceExtension = + appContextService.getInternalUserSOClientWithoutSpaceExtension(); + + await packagePolicyService.removeOutputFromAll( + internalSoClientWithoutSpaceExtension, + appContextService.getInternalUserESClient(), + id + ); + await agentPolicyService.removeOutputFromAll( - soClient, + internalSoClientWithoutSpaceExtension, appContextService.getInternalUserESClient(), id ); @@ -808,7 +846,6 @@ class OutputService { const mergedType = data.type ?? originalOutput.type; const defaultDataOutputId = await this.getDefaultDataOutputId(soClient); await validateTypeChanges( - soClient, esClient, id, updateData, diff --git a/x-pack/plugins/fleet/server/services/package_policies/utils.test.ts b/x-pack/plugins/fleet/server/services/package_policies/utils.test.ts index 9bf58298b09d3..311bfeb339f20 100644 --- a/x-pack/plugins/fleet/server/services/package_policies/utils.test.ts +++ b/x-pack/plugins/fleet/server/services/package_policies/utils.test.ts @@ -4,10 +4,15 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; import { PackagePolicyMocks } from '../../mocks'; -import { mapPackagePolicySavedObjectToPackagePolicy } from './utils'; +import { appContextService } from '../app_context'; +import { licenseService } from '../license'; +import { outputService } from '../output'; + +import { mapPackagePolicySavedObjectToPackagePolicy, preflightCheckPackagePolicy } from './utils'; describe('Package Policy Utils', () => { describe('mapPackagePolicySavedObjectToPackagePolicy()', () => { @@ -38,6 +43,7 @@ describe('Package Policy Utils', () => { }, policy_id: '444-555-666', policy_ids: ['444-555-666'], + output_id: 'output-123', revision: 1, secret_references: [], updated_at: '2024-01-25T15:21:13.389Z', @@ -47,4 +53,94 @@ describe('Package Policy Utils', () => { }); }); }); + + describe('preflightCheckPackagePolicy', () => { + beforeEach(() => { + jest.spyOn(licenseService, 'hasAtLeast').mockClear(); + jest.spyOn(appContextService, 'getExperimentalFeatures').mockClear(); + }); + const soClient = savedObjectsClientMock.create(); + const testPolicy = { + name: 'Test Package Policy', + namespace: 'test', + enabled: true, + policy_ids: ['test'], + inputs: [], + package: { + name: 'test', + title: 'Test', + version: '0.0.1', + }, + }; + + it('should throw if no enterprise license and multiple policy_ids is provided', async () => { + jest.spyOn(licenseService, 'hasAtLeast').mockReturnValue(false); + jest + .spyOn(appContextService, 'getExperimentalFeatures') + .mockReturnValue({ enableReusableIntegrationPolicies: true } as any); + + await expect( + preflightCheckPackagePolicy(soClient, { ...testPolicy, policy_ids: ['1', '2'] }) + ).rejects.toThrowError( + 'Reusable integration policies are only available with an Enterprise license' + ); + }); + + it('should throw if enterprise license and multiple policy_ids is provided but no feature flag', async () => { + jest.spyOn(licenseService, 'hasAtLeast').mockReturnValue(true); + jest + .spyOn(appContextService, 'getExperimentalFeatures') + .mockReturnValue({ enableReusableIntegrationPolicies: false } as any); + + await expect( + preflightCheckPackagePolicy(soClient, { ...testPolicy, policy_ids: ['1', '2'] }) + ).rejects.toThrowError('Reusable integration policies are not supported'); + }); + + it('should not throw if enterprise license and multiple policy_ids is provided', async () => { + jest.spyOn(licenseService, 'hasAtLeast').mockReturnValue(true); + jest + .spyOn(appContextService, 'getExperimentalFeatures') + .mockReturnValue({ enableReusableIntegrationPolicies: true } as any); + await expect( + preflightCheckPackagePolicy(soClient, { ...testPolicy, policy_ids: ['1', '2'] }) + ).resolves.not.toThrow(); + }); + + it('should throw if no valid license and output_id is provided', async () => { + jest.spyOn(licenseService, 'hasAtLeast').mockReturnValue(false); + + await expect( + preflightCheckPackagePolicy(soClient, { ...testPolicy, output_id: 'some-output' }) + ).rejects.toThrowError('Output per integration is only available with an enterprise license'); + }); + + it('should throw if valid license and an incompatible output_id for the package is given', async () => { + jest.spyOn(licenseService, 'hasAtLeast').mockReturnValue(true); + jest + .spyOn(outputService, 'get') + .mockResolvedValueOnce({ id: 'non-es-output', type: 'kafka' } as any); + + await expect( + preflightCheckPackagePolicy(soClient, { + ...testPolicy, + output_id: 'non-es-output', + package: { name: 'apm', version: '1.0.0', title: 'APM' }, + }) + ).rejects.toThrowError('Output type "kafka" is not usable with package "apm"'); + }); + + it('should not throw if valid license and valid output_id is provided', async () => { + jest.spyOn(licenseService, 'hasAtLeast').mockReturnValue(true); + jest + .spyOn(outputService, 'get') + .mockResolvedValueOnce({ id: 'es-output', type: 'elasticsearch' } as any); + await expect( + preflightCheckPackagePolicy(soClient, { + ...testPolicy, + output_id: 'es-output', + }) + ).resolves.not.toThrow(); + }); + }); }); diff --git a/x-pack/plugins/fleet/server/services/package_policies/utils.ts b/x-pack/plugins/fleet/server/services/package_policies/utils.ts index cf2d69c8874b9..61ff380fec559 100644 --- a/x-pack/plugins/fleet/server/services/package_policies/utils.ts +++ b/x-pack/plugins/fleet/server/services/package_policies/utils.ts @@ -6,8 +6,18 @@ */ import type { SavedObject } from '@kbn/core-saved-objects-common/src/server_types'; +import type { SavedObjectsClientContract } from '@kbn/core/server'; -import type { PackagePolicy, PackagePolicySOAttributes } from '../../types'; +import { + LICENCE_FOR_OUTPUT_PER_INTEGRATION, + LICENCE_FOR_MULTIPLE_AGENT_POLICIES, +} from '../../../common/constants'; +import { getAllowedOutputTypesForIntegration } from '../../../common/services/output_helpers'; +import type { PackagePolicy, NewPackagePolicy, PackagePolicySOAttributes } from '../../types'; +import { PackagePolicyMultipleAgentPoliciesError, PackagePolicyOutputError } from '../../errors'; +import { licenseService } from '../license'; +import { outputService } from '../output'; +import { appContextService } from '../app_context'; export const mapPackagePolicySavedObjectToPackagePolicy = ({ /* eslint-disable @typescript-eslint/naming-convention */ @@ -21,6 +31,7 @@ export const mapPackagePolicySavedObjectToPackagePolicy = ({ is_managed, policy_id, policy_ids, + output_id, // `package` is a reserved keyword package: packageInfo, inputs, @@ -45,6 +56,7 @@ export const mapPackagePolicySavedObjectToPackagePolicy = ({ is_managed, policy_id, policy_ids, + output_id, package: packageInfo, inputs, vars, @@ -59,3 +71,69 @@ export const mapPackagePolicySavedObjectToPackagePolicy = ({ created_by, }; }; + +export async function preflightCheckPackagePolicy( + soClient: SavedObjectsClientContract, + packagePolicy: PackagePolicy | NewPackagePolicy +) { + // If package policy has multiple agent policies, check if they can be used + const { canUseReusablePolicies, errorMessage: canUseMultipleAgentPoliciesErrorMessage } = + canUseMultipleAgentPolicies(); + if ((packagePolicy.policy_ids ?? []).length > 1 && !canUseReusablePolicies) { + throw new PackagePolicyMultipleAgentPoliciesError(canUseMultipleAgentPoliciesErrorMessage); + } + + // If package policy has an output_id, check if it can be used + if (packagePolicy.output_id && packagePolicy.package) { + const { canUseOutputForIntegrationResult, errorMessage: outputForIntegrationErrorMessage } = + await canUseOutputForIntegration( + soClient, + packagePolicy.package.name, + packagePolicy.output_id + ); + if (!canUseOutputForIntegrationResult && outputForIntegrationErrorMessage) { + throw new PackagePolicyOutputError(outputForIntegrationErrorMessage); + } + } +} + +export function canUseMultipleAgentPolicies() { + const hasEnterpriseLicence = licenseService.hasAtLeast(LICENCE_FOR_MULTIPLE_AGENT_POLICIES); + const { enableReusableIntegrationPolicies } = appContextService.getExperimentalFeatures(); + + return { + canUseReusablePolicies: hasEnterpriseLicence && enableReusableIntegrationPolicies, + errorMessage: !hasEnterpriseLicence + ? 'Reusable integration policies are only available with an Enterprise license' + : 'Reusable integration policies are not supported', + }; +} + +export async function canUseOutputForIntegration( + soClient: SavedObjectsClientContract, + packageName: string, + outputId: string +) { + const hasAllowedLicense = licenseService.hasAtLeast(LICENCE_FOR_OUTPUT_PER_INTEGRATION); + if (!hasAllowedLicense) { + return { + canUseOutputForIntegrationResult: false, + errorMessage: `Output per integration is only available with an ${LICENCE_FOR_OUTPUT_PER_INTEGRATION} license`, + }; + } + + const allowedOutputTypes = getAllowedOutputTypesForIntegration(packageName); + const output = await outputService.get(soClient, outputId); + + if (!allowedOutputTypes.includes(output.type)) { + return { + canUseOutputForIntegrationResult: false, + errorMessage: `Output type "${output.type}" is not usable with package "${packageName}"`, + }; + } + + return { + canUseOutputForIntegrationResult: true, + errorMessage: null, + }; +} diff --git a/x-pack/plugins/fleet/server/services/package_policy.test.ts b/x-pack/plugins/fleet/server/services/package_policy.test.ts index a62a5048ec567..08a2ef507fe20 100644 --- a/x-pack/plugins/fleet/server/services/package_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/package_policy.test.ts @@ -19,6 +19,10 @@ import type { } from '@kbn/core/server'; import { SavedObjectsErrorHelpers } from '@kbn/core/server'; +import { + LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, + PACKAGE_POLICY_SAVED_OBJECT_TYPE, +} from '../../common/constants'; import { PackagePolicyMocks } from '../mocks/package_policy.mocks'; import type { @@ -53,8 +57,6 @@ import { PackagePolicyValidationError, } from '../errors'; -import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '../constants'; - import { mapPackagePolicySavedObjectToPackagePolicy } from './package_policies'; import { @@ -71,6 +73,9 @@ import { getPackageInfo } from './epm/packages'; import { sendTelemetryEvents } from './upgrade_sender'; import { auditLoggingService } from './audit_logging'; import { agentPolicyService } from './agent_policy'; +import { isSpaceAwarenessEnabled } from './spaces/helpers'; + +jest.mock('./spaces/helpers'); const mockedSendTelemetryEvents = sendTelemetryEvents as jest.MockedFunction< typeof sendTelemetryEvents @@ -221,6 +226,7 @@ const mockAgentPolicyGet = () => { describe('Package policy service', () => { beforeEach(() => { appContextService.start(createAppContextStartContractMock()); + jest.mocked(isSpaceAwarenessEnabled).mockResolvedValue(false); }); afterEach(() => { @@ -240,7 +246,7 @@ describe('Package policy service', () => { id: 'test-package-policy', attributes: {}, references: [], - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); mockAgentPolicyGet(); @@ -268,7 +274,7 @@ describe('Package policy service', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).toBeCalledWith({ action: 'create', id: 'test-package-policy', - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); }); }); @@ -281,7 +287,7 @@ describe('Package policy service', () => { id: 'test-package-policy', attributes: {}, references: [], - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); mockAgentPolicyGet(); @@ -334,13 +340,13 @@ describe('Package policy service', () => { id: 'test-package-policy-1', attributes: {}, references: [], - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }, { id: 'test-package-policy-2', attributes: {}, references: [], - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }, ], }); @@ -371,13 +377,13 @@ describe('Package policy service', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenNthCalledWith(1, { action: 'create', id: 'test-package-policy-1', - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenNthCalledWith(2, { action: 'create', id: 'test-package-policy-2', - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); }); }); @@ -389,7 +395,7 @@ describe('Package policy service', () => { id: 'test-package-policy', attributes: {}, references: [], - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); await packagePolicyService.get(soClient, 'test-package-policy'); @@ -397,7 +403,7 @@ describe('Package policy service', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).toBeCalledWith({ action: 'get', id: 'test-package-policy', - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); }); }); @@ -411,13 +417,13 @@ describe('Package policy service', () => { id: 'test-package-policy-1', attributes: {}, references: [], - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }, { id: 'test-package-policy-2', attributes: {}, references: [], - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }, ], }); @@ -430,13 +436,13 @@ describe('Package policy service', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenNthCalledWith(1, { action: 'get', id: 'test-package-policy-1', - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenNthCalledWith(2, { action: 'get', id: 'test-package-policy-2', - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); }); }); @@ -453,14 +459,14 @@ describe('Package policy service', () => { id: 'test-package-policy-1', attributes: {}, references: [], - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, score: 0, }, { id: 'test-package-policy-2', attributes: {}, references: [], - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, score: 0, }, ], @@ -475,13 +481,13 @@ describe('Package policy service', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenNthCalledWith(1, { action: 'find', id: 'test-package-policy-1', - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenNthCalledWith(2, { action: 'find', id: 'test-package-policy-2', - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); }); }); @@ -1686,14 +1692,14 @@ describe('Package policy service', () => { soClient.get.mockResolvedValue({ id: 'test-package-policy', - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, references: [], attributes, }); soClient.update.mockResolvedValue({ id: 'test-package-policy', - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, references: [], attributes, }); @@ -1706,7 +1712,7 @@ describe('Package policy service', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenCalledWith({ action: 'update', id: 'test-package-policy', - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); }); }); @@ -2474,13 +2480,13 @@ describe('Package policy service', () => { const mockPackagePolicies = [ { id: 'test-package-policy-1', - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, attributes: {}, references: [], }, { id: 'test-package-policy-2', - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, attributes: {}, references: [], }, @@ -2527,7 +2533,7 @@ describe('Package policy service', () => { const mockPackagePolicy = { id: 'test-package-policy', - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, attributes: {}, references: [], }; @@ -2545,7 +2551,7 @@ describe('Package policy service', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).toHaveBeenCalledWith({ action: 'delete', id: 'test-package-policy', - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, }); }); }); @@ -2921,6 +2927,7 @@ describe('Package policy service', () => { version: 'WzYyMzcsMV0=', name: 'my-cis_kubernetes_benchmark', namespace: 'default', + output_id: null, description: '', package: { name: 'cis_kubernetes_benchmark', @@ -4971,13 +4978,13 @@ describe('Package policy service', () => { }); it('should return an iterator', async () => { - expect(packagePolicyService.fetchAllItemIds(soClientMock)).toEqual({ + expect(await packagePolicyService.fetchAllItemIds(soClientMock)).toEqual({ [Symbol.asyncIterator]: expect.any(Function), }); }); it('should provide item ids on every iteration', async () => { - for await (const ids of packagePolicyService.fetchAllItemIds(soClientMock)) { + for await (const ids of await packagePolicyService.fetchAllItemIds(soClientMock)) { expect(ids).toEqual(['so-123', 'so-123']); } @@ -4985,13 +4992,13 @@ describe('Package policy service', () => { }); it('should use default options', async () => { - for await (const ids of packagePolicyService.fetchAllItemIds(soClientMock)) { + for await (const ids of await packagePolicyService.fetchAllItemIds(soClientMock)) { expect(ids); } expect(soClientMock.find).toHaveBeenCalledWith( expect.objectContaining({ - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, perPage: 1000, sortField: 'created_at', sortOrder: 'asc', @@ -5002,7 +5009,7 @@ describe('Package policy service', () => { }); it('should use custom options when defined', async () => { - for await (const ids of packagePolicyService.fetchAllItemIds(soClientMock, { + for await (const ids of await packagePolicyService.fetchAllItemIds(soClientMock, { perPage: 13, kuery: 'one=two', })) { @@ -5011,7 +5018,7 @@ describe('Package policy service', () => { expect(soClientMock.find).toHaveBeenCalledWith( expect.objectContaining({ - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, perPage: 13, sortField: 'created_at', sortOrder: 'asc', @@ -5039,13 +5046,13 @@ describe('Package policy service', () => { }); it('should return an iterator', async () => { - expect(packagePolicyService.fetchAllItems(soClientMock)).toEqual({ + expect(await packagePolicyService.fetchAllItems(soClientMock)).toEqual({ [Symbol.asyncIterator]: expect.any(Function), }); }); it('should provide items on every iteration', async () => { - for await (const items of packagePolicyService.fetchAllItems(soClientMock)) { + for await (const items of await packagePolicyService.fetchAllItems(soClientMock)) { expect(items).toEqual( PackagePolicyMocks.generatePackagePolicySavedObjectFindResponse().saved_objects.map( (soItem) => { @@ -5059,7 +5066,25 @@ describe('Package policy service', () => { }); it('should use default options', async () => { - for await (const ids of packagePolicyService.fetchAllItemIds(soClientMock)) { + for await (const ids of await packagePolicyService.fetchAllItemIds(soClientMock)) { + expect(ids); + } + + expect(soClientMock.find).toHaveBeenCalledWith( + expect.objectContaining({ + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, + perPage: 1000, + sortField: 'created_at', + sortOrder: 'asc', + fields: [], + filter: undefined, + }) + ); + }); + + it('should use space aware saved object type if user opt-in for space awareness', async () => { + jest.mocked(isSpaceAwarenessEnabled).mockResolvedValue(true); + for await (const ids of await packagePolicyService.fetchAllItemIds(soClientMock)) { expect(ids); } @@ -5076,7 +5101,7 @@ describe('Package policy service', () => { }); it('should use custom options when defined', async () => { - for await (const ids of packagePolicyService.fetchAllItems(soClientMock, { + for await (const ids of await packagePolicyService.fetchAllItems(soClientMock, { kuery: 'one=two', perPage: 12, sortOrder: 'desc', @@ -5087,7 +5112,7 @@ describe('Package policy service', () => { expect(soClientMock.find).toHaveBeenCalledWith( expect.objectContaining({ - type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, perPage: 12, sortField: 'updated_by', sortOrder: 'desc', @@ -5096,6 +5121,61 @@ describe('Package policy service', () => { ); }); }); + + describe('removeOutputFromAll', () => { + it('should update policies using deleted output', async () => { + const soClient = savedObjectsClientMock.create(); + const esClient = elasticsearchServiceMock.createClusterClient().asInternalUser; + const updateSpy = jest.spyOn(packagePolicyService, 'update'); + soClient.find.mockResolvedValue({ + saved_objects: [ + { + id: 'package-policy-1', + attributes: { + name: 'policy1', + enabled: true, + policy_ids: ['agent-policy-1'], + output_id: 'output-id-123', + inputs: [], + package: { name: 'test-package', version: '1.0.0' }, + }, + }, + ], + } as any); + soClient.get.mockImplementation((type, id, options): any => { + if (id === 'package-policy-1') { + return Promise.resolve({ + id, + attributes: { + name: 'policy1', + enabled: true, + policy_ids: ['agent-policy-1'], + output_id: 'output-id-123', + inputs: [], + package: { name: 'test-package', version: '1.0.0' }, + }, + }); + } + }); + + await packagePolicyService.removeOutputFromAll(soClient, esClient, 'output-id-123'); + + expect(updateSpy).toHaveBeenCalledTimes(1); + expect(updateSpy).toHaveBeenCalledWith( + expect.anything(), + expect.anything(), + 'package-policy-1', + { + name: 'policy1', + enabled: true, + policy_id: 'agent-policy-1', + policy_ids: ['agent-policy-1'], + output_id: null, + inputs: [], + } + ); + }); + }); }); describe('getUpgradeDryRunDiff', () => { diff --git a/x-pack/plugins/fleet/server/services/package_policy.ts b/x-pack/plugins/fleet/server/services/package_policy.ts index d9605880c1572..d64c48ba7143b 100644 --- a/x-pack/plugins/fleet/server/services/package_policy.ts +++ b/x-pack/plugins/fleet/server/services/package_policy.ts @@ -48,6 +48,8 @@ import { SO_SEARCH_LIMIT, PACKAGES_SAVED_OBJECT_TYPE, DATASET_VAR_NAME, + LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, + PACKAGE_POLICY_SAVED_OBJECT_TYPE, } from '../../common/constants'; import type { PostDeletePackagePoliciesResponse, @@ -69,7 +71,6 @@ import type { AssetsMap, AgentPolicy, } from '../../common/types'; -import { PACKAGE_POLICY_SAVED_OBJECT_TYPE } from '../constants'; import { FleetError, fleetErrorToResponseOptions, @@ -107,7 +108,7 @@ import { agentPolicyService } from './agent_policy'; import { getPackageInfo, getInstallation, ensureInstalledPackage } from './epm/packages'; import { getAssetsDataFromAssetsMap } from './epm/packages/assets'; import { compileTemplate } from './epm/agent/agent'; -import { escapeSearchQueryPhrase, normalizeKuery } from './saved_object'; +import { escapeSearchQueryPhrase, normalizeKuery as _normalizeKuery } from './saved_object'; import { appContextService } from '.'; import { removeOldAssets } from './epm/packages/cleanup'; import type { PackageUpdateEvent, UpdateEventType } from './upgrade_sender'; @@ -115,6 +116,7 @@ import { sendTelemetryEvents } from './upgrade_sender'; import { handleExperimentalDatastreamFeatureOptIn, mapPackagePolicySavedObjectToPackagePolicy, + preflightCheckPackagePolicy, } from './package_policies'; import { updateDatastreamExperimentalFeatures } from './epm/packages/update'; import type { @@ -131,16 +133,15 @@ import { isSecretStorageEnabled, } from './secrets'; import { getPackageAssetsMap } from './epm/packages/get'; -import { validateOutputForNewPackagePolicy } from './agent_policies/outputs_helpers'; +import { validateAgentPolicyOutputForIntegration } from './agent_policies/outputs_helpers'; import type { PackagePolicyClientFetchAllItemIdsOptions } from './package_policy_service'; import { validatePolicyNamespaceForSpace } from './spaces/policy_namespaces'; +import { isSpaceAwarenessEnabled, isSpaceAwarenessMigrationPending } from './spaces/helpers'; export type InputsOverride = Partial & { vars?: Array; }; -const SAVED_OBJECT_TYPE = PACKAGE_POLICY_SAVED_OBJECT_TYPE; - async function getPkgInfoAssetsMap({ savedObjectsClient, packageInfos, @@ -173,6 +174,32 @@ async function getPkgInfoAssetsMap({ return packageInfosandAssetsMap; } +export async function getPackagePolicySavedObjectType() { + return (await isSpaceAwarenessEnabled()) + ? PACKAGE_POLICY_SAVED_OBJECT_TYPE + : LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE; +} + +function normalizeKuery(savedObjectType: string, kuery: string) { + if (savedObjectType === LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE) { + return _normalizeKuery( + savedObjectType, + kuery.replace( + new RegExp(`${PACKAGE_POLICY_SAVED_OBJECT_TYPE}\\.`, 'g'), + `${savedObjectType}.attributes.` + ) + ); + } else { + return _normalizeKuery( + savedObjectType, + kuery.replace( + new RegExp(`${LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE}\\.`, 'g'), + `${savedObjectType}.attributes.` + ) + ); + } +} + class PackagePolicyClientImpl implements PackagePolicyClient { public async create( soClient: SavedObjectsClientContract, @@ -201,10 +228,12 @@ class PackagePolicyClientImpl implements PackagePolicyClient { authorizationHeader = HTTPAuthorizationHeader.parseFromRequest(request); } + const savedObjectType = await getPackagePolicySavedObjectType(); + auditLoggingService.writeCustomSoAuditLog({ action: 'create', id: packagePolicyId, - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); const logger = appContextService.getLogger(); @@ -212,6 +241,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { logger.debug(`Creating new package policy`); this.keepPolicyIdInSync(packagePolicy); + await preflightCheckPackagePolicy(soClient, packagePolicy); let enrichedPackagePolicy = await packagePolicyService.runExternalCallbacks( 'packagePolicyCreate', @@ -228,8 +258,9 @@ class PackagePolicyClientImpl implements PackagePolicyClient { const agentPolicy = await agentPolicyService.get(soClient, policyId, true); agentPolicies.push(agentPolicy); - if (agentPolicy && enrichedPackagePolicy.package?.name) { - await validateOutputForNewPackagePolicy( + // If package policy did not set an output_id, see if the agent policy's output is compatible + if (!packagePolicy.output_id && agentPolicy && enrichedPackagePolicy.package?.name) { + await validateAgentPolicyOutputForIntegration( soClient, agentPolicy, enrichedPackagePolicy.package?.name @@ -345,7 +376,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { const isoDate = new Date().toISOString(); const newSo = await soClient.create( - SAVED_OBJECT_TYPE, + savedObjectType, { ...enrichedPackagePolicy, ...(enrichedPackagePolicy.package @@ -404,18 +435,19 @@ class PackagePolicyClientImpl implements PackagePolicyClient { created: PackagePolicy[]; failed: Array<{ packagePolicy: NewPackagePolicy; error?: Error | SavedObjectError }>; }> { + const savedObjectType = await getPackagePolicySavedObjectType(); for (const packagePolicy of packagePolicies) { if (!packagePolicy.id) { packagePolicy.id = SavedObjectsUtils.generateId(); } - - this.keepPolicyIdInSync(packagePolicy); - auditLoggingService.writeCustomSoAuditLog({ action: 'create', id: packagePolicy.id, - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); + + this.keepPolicyIdInSync(packagePolicy); + await preflightCheckPackagePolicy(soClient, packagePolicy); } const agentPolicyIds = new Set(packagePolicies.flatMap((pkgPolicy) => pkgPolicy.policy_ids)); @@ -471,6 +503,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { } const { pkgInfo, assetsMap } = packageInfoAndAsset; + validatePackagePolicyOrThrow(packagePolicy, pkgInfo); inputs = pkgInfo ? await _compilePackagePolicyInputs( @@ -493,7 +526,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { } policiesToCreate.push({ - type: SAVED_OBJECT_TYPE, + type: savedObjectType, id: packagePolicyId, attributes: { ...pkgPolicyWithoutId, @@ -611,7 +644,8 @@ class PackagePolicyClientImpl implements PackagePolicyClient { soClient: SavedObjectsClientContract, id: string ): Promise { - const packagePolicySO = await soClient.get(SAVED_OBJECT_TYPE, id); + const savedObjectType = await getPackagePolicySavedObjectType(); + const packagePolicySO = await soClient.get(savedObjectType, id); if (!packagePolicySO) { return null; } @@ -647,7 +681,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { auditLoggingService.writeCustomSoAuditLog({ action: 'get', id, - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); return response; @@ -657,11 +691,10 @@ class PackagePolicyClientImpl implements PackagePolicyClient { soClient: SavedObjectsClientContract, agentPolicyId: string ): Promise { + const savedObjectType = await getPackagePolicySavedObjectType(); const packagePolicySO = await soClient.find({ - type: SAVED_OBJECT_TYPE, - filter: `${SAVED_OBJECT_TYPE}.attributes.policy_ids:${escapeSearchQueryPhrase( - agentPolicyId - )}`, + type: savedObjectType, + filter: `${savedObjectType}.attributes.policy_ids:${escapeSearchQueryPhrase(agentPolicyId)}`, perPage: SO_SEARCH_LIMIT, }); if (!packagePolicySO) { @@ -678,7 +711,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { auditLoggingService.writeCustomSoAuditLog({ action: 'find', id: packagePolicy.id, - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); } @@ -690,10 +723,11 @@ class PackagePolicyClientImpl implements PackagePolicyClient { ids: string[], options: { ignoreMissing?: boolean } = {} ): Promise { + const savedObjectType = await getPackagePolicySavedObjectType(); const packagePolicySO = await soClient.bulkGet( ids.map((id) => ({ id, - type: SAVED_OBJECT_TYPE, + type: savedObjectType, })) ); if (!packagePolicySO) { @@ -724,7 +758,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { auditLoggingService.writeCustomSoAuditLog({ action: 'get', id: packagePolicy.id, - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); } @@ -735,15 +769,25 @@ class PackagePolicyClientImpl implements PackagePolicyClient { soClient: SavedObjectsClientContract, options: ListWithKuery & { spaceId?: string } ): Promise> { - const { page = 1, perPage = 20, sortField = 'updated_at', sortOrder = 'desc', kuery } = options; + const savedObjectType = await getPackagePolicySavedObjectType(); + + const { + page = 1, + perPage = 20, + sortField = 'updated_at', + sortOrder = 'desc', + kuery, + fields, + } = options; const packagePolicies = await soClient.find({ - type: SAVED_OBJECT_TYPE, + type: savedObjectType, sortField, sortOrder, page, perPage, - filter: kuery ? normalizeKuery(SAVED_OBJECT_TYPE, kuery) : undefined, + fields, + filter: kuery ? normalizeKuery(savedObjectType, kuery) : undefined, namespaces: options.spaceId ? [options.spaceId] : undefined, }); @@ -751,7 +795,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { auditLoggingService.writeCustomSoAuditLog({ action: 'find', id: packagePolicy.id, - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); } @@ -760,7 +804,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { id: packagePolicySO.id, version: packagePolicySO.version, ...packagePolicySO.attributes, - spaceId: packagePolicySO.namespaces?.[0], + spaceIds: packagePolicySO.namespaces, })), total: packagePolicies?.total, page, @@ -773,22 +817,22 @@ class PackagePolicyClientImpl implements PackagePolicyClient { options: ListWithKuery ): Promise> { const { page = 1, perPage = 20, sortField = 'updated_at', sortOrder = 'desc', kuery } = options; - + const savedObjectType = await getPackagePolicySavedObjectType(); const packagePolicies = await soClient.find<{}>({ - type: SAVED_OBJECT_TYPE, + type: savedObjectType, sortField, sortOrder, page, perPage, fields: [], - filter: kuery ? normalizeKuery(SAVED_OBJECT_TYPE, kuery) : undefined, + filter: kuery ? normalizeKuery(savedObjectType, kuery) : undefined, }); for (const packagePolicy of packagePolicies.saved_objects) { auditLoggingService.writeCustomSoAuditLog({ action: 'find', id: packagePolicy.id, - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); } @@ -807,10 +851,11 @@ class PackagePolicyClientImpl implements PackagePolicyClient { packagePolicyUpdate: UpdatePackagePolicy, options?: { user?: AuthenticatedUser; force?: boolean; skipUniqueNameVerification?: boolean } ): Promise { + const savedObjectType = await getPackagePolicySavedObjectType(); auditLoggingService.writeCustomSoAuditLog({ action: 'update', id, - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); const logger = appContextService.getLogger(); @@ -822,6 +867,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { try { logger.debug(`Starting update of package policy ${id}`); + await preflightCheckPackagePolicy(soClient, packagePolicyUpdate); enrichedPackagePolicy = await packagePolicyService.runExternalCallbacks( 'packagePolicyUpdate', packagePolicyUpdate, @@ -926,7 +972,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { logger.debug(`Updating SO with revision ${oldPackagePolicy.revision + 1}`); await soClient.update( - SAVED_OBJECT_TYPE, + savedObjectType, id, { ...restOfPackagePolicy, @@ -1014,11 +1060,12 @@ class PackagePolicyClientImpl implements PackagePolicyClient { error: Error | SavedObjectError; }>; }> { + const savedObjectType = await getPackagePolicySavedObjectType(); for (const packagePolicy of packagePolicyUpdates) { auditLoggingService.writeCustomSoAuditLog({ action: 'update', id: packagePolicy.id, - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); } const oldPackagePolicies = await this.getByIDs( @@ -1052,6 +1099,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { const id = packagePolicyUpdate.id; this.keepPolicyIdInSync(packagePolicyUpdate); const packagePolicy = { ...packagePolicyUpdate, name: packagePolicyUpdate.name.trim() }; + await preflightCheckPackagePolicy(soClient, packagePolicy); const oldPackagePolicy = oldPackagePolicies.find((p) => p.id === id); if (!oldPackagePolicy) { throw new PackagePolicyNotFoundError('Package policy not found'); @@ -1113,7 +1161,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { await handleExperimentalDatastreamFeatureOptIn({ soClient, esClient, packagePolicy }); policiesToUpdate.push({ - type: SAVED_OBJECT_TYPE, + type: savedObjectType, id, attributes: { ...restOfPackagePolicy, @@ -1216,11 +1264,12 @@ class PackagePolicyClientImpl implements PackagePolicyClient { context?: RequestHandlerContext, request?: KibanaRequest ): Promise { + const savedObjectType = await getPackagePolicySavedObjectType(); for (const id of ids) { auditLoggingService.writeCustomSoAuditLog({ action: 'delete', id, - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); } @@ -1277,9 +1326,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { const packagePolicy = packagePolicies.find((p) => p.id === id); if (!packagePolicy) { - throw new PackagePolicyNotFoundError( - `Saved object [ingest-package-policies/${id}] not found` - ); + throw new PackagePolicyNotFoundError(`Saved object [${savedObjectType}/${id}] not found`); } if (packagePolicy.is_managed && !options?.force) { @@ -1305,7 +1352,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { const secretsToDelete: string[] = []; if (idsToDelete.length > 0) { const { statuses } = await soClient.bulkDelete( - idsToDelete.map((id) => ({ id, type: SAVED_OBJECT_TYPE })) + idsToDelete.map((id) => ({ id, type: savedObjectType })) ); statuses.forEach(({ id, success, error }) => { @@ -1762,6 +1809,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { }, policy_id: newPolicy.policy_id ?? agentPolicyId, policy_ids: newPolicy.policy_ids ?? [agentPolicyId], + output_id: newPolicy.output_id, inputs: newPolicy.inputs[0]?.streams ? newPolicy.inputs : inputs, vars: newPolicy.vars || newPP.vars, }; @@ -1982,21 +2030,93 @@ class PackagePolicyClientImpl implements PackagePolicyClient { } } - fetchAllItemIds( + public async removeOutputFromAll( + soClient: SavedObjectsClientContract, + esClient: ElasticsearchClient, + outputId: string + ) { + const savedObjectType = await getPackagePolicySavedObjectType(); + const packagePolicies = ( + await soClient.find({ + type: savedObjectType, + fields: ['name', 'enabled', 'policy_ids', 'inputs', 'output_id'], + searchFields: ['output_id'], + search: escapeSearchQueryPhrase(outputId), + perPage: SO_SEARCH_LIMIT, + }) + ).saved_objects.map(mapPackagePolicySavedObjectToPackagePolicy); + + if (packagePolicies.length > 0) { + const getPackagePolicyUpdate = (packagePolicy: PackagePolicy) => ({ + name: packagePolicy.name, + enabled: packagePolicy.enabled, + policy_ids: packagePolicy.policy_ids, + inputs: packagePolicy.inputs, + output_id: packagePolicy.output_id === outputId ? null : packagePolicy.output_id, + }); + + // Validate that the new cleared/default output is valid for the package policies + // (from each of the associated agent policies) before updating any of them + await pMap( + packagePolicies, + async (packagePolicy) => { + const existingPackagePolicy = await this.get(soClient, packagePolicy.id); + + if (!existingPackagePolicy) { + throw new PackagePolicyNotFoundError('Package policy not found'); + } + + for (const policyId of packagePolicy.policy_ids) { + if (packagePolicy.package?.name) { + const agentPolicy = await agentPolicyService.get(soClient, policyId, true); + if (agentPolicy) { + await validateAgentPolicyOutputForIntegration( + soClient, + agentPolicy, + packagePolicy.package.name, + false + ); + } + } + } + }, + { + concurrency: 50, + } + ); + await pMap( + packagePolicies, + (packagePolicy) => { + return this.update( + soClient, + esClient, + packagePolicy.id, + getPackagePolicyUpdate(packagePolicy) + ); + }, + { + concurrency: 50, + } + ); + } + } + + async fetchAllItemIds( soClient: SavedObjectsClientContract, { perPage = 1000, kuery }: PackagePolicyClientFetchAllItemIdsOptions = {} - ): AsyncIterable { + ): Promise> { // TODO:PT Question for fleet team: do I need to `auditLoggingService.writeCustomSoAuditLog()` here? Its only IDs + const savedObjectType = await getPackagePolicySavedObjectType(); return createSoFindIterable<{}>({ soClient, findRequest: { - type: SAVED_OBJECT_TYPE, + type: savedObjectType, perPage, sortField: 'created_at', sortOrder: 'asc', fields: [], - filter: kuery ? normalizeKuery(SAVED_OBJECT_TYPE, kuery) : undefined, + filter: kuery ? normalizeKuery(savedObjectType, kuery) : undefined, }, resultsMapper: (data) => { return data.saved_objects.map((packagePolicySO) => packagePolicySO.id); @@ -2004,7 +2124,7 @@ class PackagePolicyClientImpl implements PackagePolicyClient { }); } - fetchAllItems( + async fetchAllItems( soClient: SavedObjectsClientContract, { perPage = 1000, @@ -2012,22 +2132,24 @@ class PackagePolicyClientImpl implements PackagePolicyClient { sortOrder = 'asc', sortField = 'created_at', }: PackagePolicyClientFetchAllItemsOptions = {} - ): AsyncIterable { + ): Promise> { + const savedObjectType = await getPackagePolicySavedObjectType(); + return createSoFindIterable({ soClient, findRequest: { - type: SAVED_OBJECT_TYPE, + type: savedObjectType, sortField, sortOrder, perPage, - filter: kuery ? normalizeKuery(SAVED_OBJECT_TYPE, kuery) : undefined, + filter: kuery ? normalizeKuery(savedObjectType, kuery) : undefined, }, resultsMapper(data) { return data.saved_objects.map((packagePolicySO) => { auditLoggingService.writeCustomSoAuditLog({ action: 'find', id: packagePolicySO.id, - savedObjectType: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + savedObjectType, }); return mapPackagePolicySavedObjectToPackagePolicy(packagePolicySO); @@ -2048,13 +2170,22 @@ export class PackagePolicyServiceImpl if (doesNotHaveRequiredFleetAuthz(authz, fleetRequiredAuthz)) { throw new FleetUnauthorizedError('Not authorized to this action on integration policies'); } + + if ((await isSpaceAwarenessMigrationPending()) === true) { + throw new FleetError('Migration to space awareness is pending'); + } }; return new PackagePolicyClientWithAuthz(preflightCheck); } public get asInternalUser() { - return new PackagePolicyClientWithAuthz(); + const preflightCheck = async () => { + if ((await isSpaceAwarenessMigrationPending()) === true) { + throw new FleetError('Migration to space awareness is pending'); + } + }; + return new PackagePolicyClientWithAuthz(preflightCheck); } } @@ -2073,6 +2204,51 @@ class PackagePolicyClientWithAuthz extends PackagePolicyClientImpl { } }; + async bulkCreate( + soClient: SavedObjectsClientContract, + esClient: ElasticsearchClient, + packagePolicies: NewPackagePolicyWithId[], + options?: + | { + user?: AuthenticatedUser | undefined; + bumpRevision?: boolean | undefined; + force?: true | undefined; + } + | undefined + ): Promise<{ + created: PackagePolicy[]; + failed: Array<{ packagePolicy: NewPackagePolicy; error?: Error | SavedObjectError }>; + }> { + await this.#runPreflight({ + fleetAuthz: { + integrations: { writeIntegrationPolicies: true }, + }, + }); + return super.bulkCreate(soClient, esClient, packagePolicies, options); + } + + async update( + soClient: SavedObjectsClientContract, + esClient: ElasticsearchClient, + id: string, + packagePolicyUpdate: UpdatePackagePolicy, + options?: + | { + user?: AuthenticatedUser | undefined; + force?: boolean | undefined; + skipUniqueNameVerification?: boolean | undefined; + } + | undefined + ): Promise { + await this.#runPreflight({ + fleetAuthz: { + integrations: { writeIntegrationPolicies: true }, + }, + }); + + return super.update(soClient, esClient, id, packagePolicyUpdate, options); + } + async create( soClient: SavedObjectsClientContract, esClient: ElasticsearchClient, @@ -2854,9 +3030,10 @@ async function requireUniqueName( packagePolicy: UpdatePackagePolicy | NewPackagePolicy, id?: string ) { + const savedObjectType = await getPackagePolicySavedObjectType(); const existingPoliciesWithName = await packagePolicyService.list(soClient, { perPage: SO_SEARCH_LIMIT, - kuery: `${PACKAGE_POLICY_SAVED_OBJECT_TYPE}.name:"${packagePolicy.name}"`, + kuery: `${savedObjectType}.name:"${packagePolicy.name}"`, }); const policiesToCheck = id diff --git a/x-pack/plugins/fleet/server/services/package_policy_service.ts b/x-pack/plugins/fleet/server/services/package_policy_service.ts index 1462d451388b5..8b47f42380935 100644 --- a/x-pack/plugins/fleet/server/services/package_policy_service.ts +++ b/x-pack/plugins/fleet/server/services/package_policy_service.ts @@ -219,6 +219,18 @@ export interface PackagePolicyClient { experimentalDataStreamFeatures: ExperimentalDataStreamFeature[]; }>; + /** + * Remove an output from all package policies that are using it, and replace the output by the default ones. + * @param soClient + * @param esClient + * @param outputId + */ + removeOutputFromAll( + soClient: SavedObjectsClientContract, + esClient: ElasticsearchClient, + outputId: string + ): Promise; + /** * Returns an `AsyncIterable` for retrieving all integration policy IDs * @param soClient @@ -227,7 +239,7 @@ export interface PackagePolicyClient { fetchAllItemIds( soClient: SavedObjectsClientContract, options?: PackagePolicyClientFetchAllItemIdsOptions - ): AsyncIterable; + ): Promise>; /** * Returns an `AsyncIterable` for retrieving all integration policies @@ -237,7 +249,7 @@ export interface PackagePolicyClient { fetchAllItems( soClient: SavedObjectsClientContract, options?: PackagePolicyClientFetchAllItemsOptions - ): AsyncIterable; + ): Promise>; } export type PackagePolicyClientFetchAllItemIdsOptions = Pick; diff --git a/x-pack/plugins/fleet/server/services/preconfiguration.test.ts b/x-pack/plugins/fleet/server/services/preconfiguration.test.ts index 21caf5088f457..802edd93e0543 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration.test.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration.test.ts @@ -20,7 +20,7 @@ import type { } from '../../common/types'; import type { AgentPolicy, NewPackagePolicy, Output, DownloadSource } from '../types'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '../constants'; +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE } from '../constants'; import { appContextService } from './app_context'; @@ -67,7 +67,7 @@ const mockDefaultDownloadService: DownloadSource = { function getPutPreconfiguredPackagesMock() { const soClient = savedObjectsClientMock.create(); soClient.find.mockImplementation(async ({ type, search }) => { - if (type === AGENT_POLICY_SAVED_OBJECT_TYPE) { + if (type === LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE) { const id = search!.replace(/"/g, ''); const attributes = mockConfiguredPolicies.get(id); if (attributes) { diff --git a/x-pack/plugins/fleet/server/services/preconfiguration/outputs.test.ts b/x-pack/plugins/fleet/server/services/preconfiguration/outputs.test.ts index f6feffd24df53..e21ae1e06dc78 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration/outputs.test.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration/outputs.test.ts @@ -6,11 +6,10 @@ */ import { elasticsearchServiceMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; -import { appContextService } from '..'; +import { appContextService } from '../app_context'; import type { PreconfiguredOutput } from '../../../common/types'; import type { Output } from '../../types'; - import * as agentPolicy from '../agent_policy'; import { outputService } from '../output'; @@ -25,11 +24,16 @@ jest.mock('../agent_policy_update'); jest.mock('../output'); jest.mock('../epm/packages/bundled_packages'); jest.mock('../epm/archive'); +jest.mock('../settings'); const mockedOutputService = outputService as jest.Mocked; jest.mock('../app_context', () => ({ appContextService: { + getExperimentalFeatures: jest.fn().mockReturnValue({ + useSpaceAwareness: false, + }), + getInternalUserSOClient: jest.fn(), getInternalUserSOClientWithoutSpaceExtension: jest.fn(), getLogger: () => new Proxy( @@ -60,6 +64,9 @@ describe('output preconfiguration', () => { per_page: 0, total: 0, }); + internalSoClientWithoutSpaceExtension.bulkGet.mockResolvedValue({ + saved_objects: [], + }); mockedOutputService.create.mockReset(); mockedOutputService.update.mockReset(); mockedOutputService.delete.mockReset(); diff --git a/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts b/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts index 79ea65c04980e..7e65dd665d0bd 100644 --- a/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts +++ b/x-pack/plugins/fleet/server/services/preconfiguration/reset_agent_policies.ts @@ -12,12 +12,12 @@ import { SavedObjectsErrorHelpers } from '@kbn/core/server'; import { appContextService } from '../app_context'; import { setupFleet } from '../setup'; import { - AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT, PACKAGE_POLICY_SAVED_OBJECT_TYPE, PRECONFIGURATION_DELETION_RECORD_SAVED_OBJECT_TYPE, } from '../../constants'; -import { agentPolicyService } from '../agent_policy'; +import { agentPolicyService, getAgentPolicySavedObjectType } from '../agent_policy'; import { packagePolicyService } from '../package_policy'; import { getAgentsByKuery, forceUnenrollAgent } from '../agents'; import { listEnrollmentApiKeys, deleteEnrollmentApiKey } from '../api_keys'; @@ -61,7 +61,8 @@ async function _deleteGhostPackagePolicies( return; } - const objects = policyIds.map((id) => ({ id, type: AGENT_POLICY_SAVED_OBJECT_TYPE })); + const savedObjectType = await getAgentPolicySavedObjectType(); + const objects = policyIds.map((id) => ({ id, type: savedObjectType })); const agentPolicyExistsMap = (await soClient.bulkGet(objects)).saved_objects.reduce((acc, so) => { if (so.error && so.error.statusCode === 404) { acc.set(so.id, false); @@ -146,7 +147,7 @@ async function _deleteExistingData( existingPolicies = ( await agentPolicyService.list(soClient, { perPage: SO_SEARCH_LIMIT, - kuery: `${AGENT_POLICY_SAVED_OBJECT_TYPE}.is_preconfigured:true`, + kuery: `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.is_preconfigured:true`, }) ).items; } diff --git a/x-pack/plugins/fleet/server/services/security/fleet_router.ts b/x-pack/plugins/fleet/server/services/security/fleet_router.ts index f8e374c458344..11a4b084d4807 100644 --- a/x-pack/plugins/fleet/server/services/security/fleet_router.ts +++ b/x-pack/plugins/fleet/server/services/security/fleet_router.ts @@ -5,21 +5,19 @@ * 2.0. */ -import type { - IKibanaResponse, - IRouter, - KibanaRequest, - KibanaResponseFactory, - Logger, - RequestHandler, - RouteMethod, +import { + type IKibanaResponse, + type IRouter, + type KibanaRequest, + type KibanaResponseFactory, + type Logger, + type RequestHandler, + type RouteMethod, } from '@kbn/core/server'; import type { VersionedRouteConfig } from '@kbn/core-http-server'; import { PUBLIC_API_ACCESS } from '../../../common/constants'; - import type { FleetRequestHandlerContext } from '../..'; - import { getRequestStore } from '../request_store'; import type { FleetVersionedRouteConfig } from './types'; @@ -82,6 +80,7 @@ export function makeRouterWithFleetAuthz { const so = getDefaultSO(canEncrypt); const so2 = getDefaultSO2(canEncrypt); - agentPolicyService.fetchAllAgentPolicyIds = jest.fn(async function* () { - yield items || [so.attributes.policy_id, so2.attributes.policy_id]; - }); + agentPolicyService.fetchAllAgentPolicyIds = jest.fn().mockResolvedValue( + jest.fn(async function* () { + yield items || [so.attributes.policy_id, so2.attributes.policy_id]; + })() + ); } function setupMocks(canEncrypt: boolean = true) { diff --git a/x-pack/plugins/fleet/server/services/security/uninstall_token_service/index.ts b/x-pack/plugins/fleet/server/services/security/uninstall_token_service/index.ts index 4cb5aa1221db7..0abad8961e47e 100644 --- a/x-pack/plugins/fleet/server/services/security/uninstall_token_service/index.ts +++ b/x-pack/plugins/fleet/server/services/security/uninstall_token_service/index.ts @@ -42,13 +42,9 @@ import type { UninstallTokenMetadata, } from '../../../../common/types/models/uninstall_token'; -import { - UNINSTALL_TOKENS_SAVED_OBJECT_TYPE, - SO_SEARCH_LIMIT, - AGENT_POLICY_SAVED_OBJECT_TYPE, -} from '../../../constants'; +import { UNINSTALL_TOKENS_SAVED_OBJECT_TYPE, SO_SEARCH_LIMIT } from '../../../constants'; import { appContextService } from '../../app_context'; -import { agentPolicyService } from '../../agent_policy'; +import { agentPolicyService, getAgentPolicySavedObjectType } from '../../agent_policy'; interface UninstallTokenSOAttributes { policy_id: string; @@ -231,10 +227,12 @@ export class UninstallTokenService implements UninstallTokenServiceInterface { } private async searchPoliciesByName(policyNameSearchString: string): Promise { - const policyNameFilter = `${AGENT_POLICY_SAVED_OBJECT_TYPE}.attributes.name:${policyNameSearchString}`; + const agentPolicySavedObjectType = await getAgentPolicySavedObjectType(); + + const policyNameFilter = `${agentPolicySavedObjectType}.attributes.name:${policyNameSearchString}`; const agentPoliciesSOs = await this.soClient.find({ - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: agentPolicySavedObjectType, filter: policyNameFilter, }); @@ -576,7 +574,7 @@ export class UninstallTokenService implements UninstallTokenServiceInterface { } private async getAllPolicyIds(): Promise { - const agentPolicyIdsFetcher = agentPolicyService.fetchAllAgentPolicyIds(this.soClient); + const agentPolicyIdsFetcher = await agentPolicyService.fetchAllAgentPolicyIds(this.soClient); const policyIds: string[] = []; for await (const agentPolicyId of agentPolicyIdsFetcher) { policyIds.push(...agentPolicyId); diff --git a/x-pack/plugins/fleet/server/services/settings.ts b/x-pack/plugins/fleet/server/services/settings.ts index 6e248d7817a5f..68829b734eeaf 100644 --- a/x-pack/plugins/fleet/server/services/settings.ts +++ b/x-pack/plugins/fleet/server/services/settings.ts @@ -6,7 +6,7 @@ */ import Boom from '@hapi/boom'; -import type { SavedObjectsClientContract } from '@kbn/core/server'; +import type { SavedObjectsClientContract, SavedObjectsUpdateOptions } from '@kbn/core/server'; import { normalizeHostsForAgents } from '../../common/services'; import { GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, GLOBAL_SETTINGS_ID } from '../../common/constants'; @@ -35,6 +35,7 @@ export async function getSettings(soClient: SavedObjectsClientContract): Promise return { id: settingsSo.id, + version: settingsSo.version, ...settingsSo.attributes, fleet_server_hosts: fleetServerHosts.items.flatMap((item) => item.host_urls), preconfigured_fields: getConfigFleetServerHosts() ? ['fleet_server_hosts'] : [], @@ -70,12 +71,14 @@ export async function settingsSetup(soClient: SavedObjectsClientContract) { export async function saveSettings( soClient: SavedObjectsClientContract, - newData: Partial> + newData: Partial>, + options?: SavedObjectsUpdateOptions & { createWithOverwrite?: boolean } ): Promise & Pick> { const data = { ...newData }; if (data.fleet_server_hosts) { data.fleet_server_hosts = data.fleet_server_hosts.map(normalizeHostsForAgents); } + const { createWithOverwrite, ...updateOptions } = options ?? {}; try { const settings = await getSettings(soClient); @@ -89,7 +92,8 @@ export async function saveSettings( const res = await soClient.update( GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, settings.id, - data + data, + updateOptions ); return { @@ -114,7 +118,8 @@ export async function saveSettings( }, { id: GLOBAL_SETTINGS_ID, - overwrite: true, + // Do not overwrite if version is passed + overwrite: typeof createWithOverwrite === 'undefined' ? true : createWithOverwrite, } ); diff --git a/x-pack/plugins/fleet/server/services/spaces/agent_namespaces.test.ts b/x-pack/plugins/fleet/server/services/spaces/agent_namespaces.test.ts index 3cf070ab8fea3..7ced6a3fcddb9 100644 --- a/x-pack/plugins/fleet/server/services/spaces/agent_namespaces.test.ts +++ b/x-pack/plugins/fleet/server/services/spaces/agent_namespaces.test.ts @@ -5,125 +5,114 @@ * 2.0. */ -import { appContextService } from '../app_context'; - import type { Agent } from '../../types'; import { agentsKueryNamespaceFilter, isAgentInNamespace } from './agent_namespaces'; +import { isSpaceAwarenessEnabled } from './helpers'; -jest.mock('../app_context'); - -const mockedAppContextService = appContextService as jest.Mocked; +jest.mock('./helpers'); describe('isAgentInNamespace', () => { - describe('with the useSpaceAwareness feature flag disabled', () => { + describe('with isSpaceAwarenessEnabled is false', () => { beforeEach(() => { - mockedAppContextService.getExperimentalFeatures.mockReturnValue({ - useSpaceAwareness: false, - } as any); + jest.mocked(isSpaceAwarenessEnabled).mockResolvedValue(false); }); - it('returns true even if the agent is in a different space', () => { + it('returns true even if the agent is in a different space', async () => { const agent = { id: '123', namespaces: ['default', 'space1'] } as Agent; - expect(isAgentInNamespace(agent, 'space2')).toEqual(true); + expect(await isAgentInNamespace(agent, 'space2')).toEqual(true); }); }); - describe('with the useSpaceAwareness feature flag enabled', () => { + describe('with the isSpaceAwarenessEnabled return true', () => { beforeEach(() => { - mockedAppContextService.getExperimentalFeatures.mockReturnValue({ - useSpaceAwareness: true, - } as any); + jest.mocked(isSpaceAwarenessEnabled).mockResolvedValue(true); }); describe('when the namespace is defined', () => { - it('returns true in a custom space if the agent namespaces include the namespace', () => { + it('returns true in a custom space if the agent namespaces include the namespace', async () => { const agent = { id: '123', namespaces: ['default', 'space1'] } as Agent; - expect(isAgentInNamespace(agent, 'space1')).toEqual(true); + expect(await isAgentInNamespace(agent, 'space1')).toEqual(true); }); - it('returns false in a custom space if the agent namespaces do not include the namespace', () => { + it('returns false in a custom space if the agent namespaces do not include the namespace', async () => { const agent = { id: '123', namespaces: ['default', 'space1'] } as Agent; - expect(isAgentInNamespace(agent, 'space2')).toEqual(false); + expect(await isAgentInNamespace(agent, 'space2')).toEqual(false); }); - it('returns true in the default space if the agent has zero length namespaces', () => { + it('returns true in the default space if the agent has zero length namespaces', async () => { const agent = { id: '123', namespaces: [] as string[] } as Agent; - expect(isAgentInNamespace(agent, 'default')).toEqual(true); + expect(await isAgentInNamespace(agent, 'default')).toEqual(true); }); - it('returns false in a custom space if the agent has zero length namespaces', () => { + it('returns false in a custom space if the agent has zero length namespaces', async () => { const agent = { id: '123', namespaces: [] as string[] } as Agent; - expect(isAgentInNamespace(agent, 'space1')).toEqual(false); + expect(await isAgentInNamespace(agent, 'space1')).toEqual(false); }); - it('returns true in the default space if the agent does not have namespaces', () => { + it('returns true in the default space if the agent does not have namespaces', async () => { const agent = { id: '123' } as Agent; - expect(isAgentInNamespace(agent, 'default')).toEqual(true); + expect(await isAgentInNamespace(agent, 'default')).toEqual(true); }); - it('returns false in a custom space if the agent does not have namespaces', () => { + it('returns false in a custom space if the agent does not have namespaces', async () => { const agent = { id: '123' } as Agent; - expect(isAgentInNamespace(agent, 'space1')).toEqual(false); + expect(await isAgentInNamespace(agent, 'space1')).toEqual(false); }); }); describe('when the namespace is undefined', () => { - it('returns true if the agent does not have namespaces', () => { + it('returns true if the agent does not have namespaces', async () => { const agent = { id: '123' } as Agent; - expect(isAgentInNamespace(agent)).toEqual(true); + expect(await isAgentInNamespace(agent)).toEqual(true); }); - it('returns true if the agent has zero length namespaces', () => { + it('returns true if the agent has zero length namespaces', async () => { const agent = { id: '123', namespaces: [] as string[] } as Agent; - expect(isAgentInNamespace(agent)).toEqual(true); + expect(await isAgentInNamespace(agent)).toEqual(true); }); - it('returns true if the agent namespaces include the default one', () => { + it('returns true if the agent namespaces include the default one', async () => { const agent = { id: '123', namespaces: ['default'] } as Agent; - expect(isAgentInNamespace(agent)).toEqual(true); + expect(await isAgentInNamespace(agent)).toEqual(true); }); - it('returns false if the agent namespaces include the default one', () => { + it('returns false if the agent namespaces include the default one', async () => { const agent = { id: '123', namespaces: ['space1'] } as Agent; - expect(isAgentInNamespace(agent)).toEqual(false); + expect(await isAgentInNamespace(agent)).toEqual(false); }); }); }); }); describe('agentsKueryNamespaceFilter', () => { - describe('with the useSpaceAwareness feature flag disabled', () => { + describe('with isSpaceAwarenessEnabled returning false', () => { beforeEach(() => { - mockedAppContextService.getExperimentalFeatures.mockReturnValue({ - useSpaceAwareness: false, - } as any); + jest.mocked(isSpaceAwarenessEnabled).mockResolvedValue(false); }); - it('returns undefined if the useSpaceAwareness feature flag disabled', () => { - expect(agentsKueryNamespaceFilter('space1')).toBeUndefined(); + it('returns undefined', async () => { + expect(await agentsKueryNamespaceFilter('space1')).toBeUndefined(); }); }); - describe('with the useSpaceAwareness feature flag enabled', () => { + describe('with isSpaceAwarenessEnabled returning true', () => { beforeEach(() => { - mockedAppContextService.getExperimentalFeatures.mockReturnValue({ - useSpaceAwareness: true, - } as any); + jest.mocked(isSpaceAwarenessEnabled).mockResolvedValue(true); }); - it('returns undefined if the namespace is undefined', () => { - expect(agentsKueryNamespaceFilter()).toBeUndefined(); + it('returns undefined if the namespace is undefined', async () => { + expect(await agentsKueryNamespaceFilter()).toBeUndefined(); }); - it('returns a kuery for the default space', () => { - expect(agentsKueryNamespaceFilter('default')).toEqual( + it('returns a kuery for the default space', async () => { + expect(await agentsKueryNamespaceFilter('default')).toEqual( 'namespaces:(default) or not namespaces:*' ); }); - it('returns a kuery for custom spaces', () => { - expect(agentsKueryNamespaceFilter('space1')).toEqual('namespaces:(space1)'); + it('returns a kuery for custom spaces', async () => { + expect(await agentsKueryNamespaceFilter('space1')).toEqual('namespaces:(space1)'); }); }); }); diff --git a/x-pack/plugins/fleet/server/services/spaces/agent_namespaces.ts b/x-pack/plugins/fleet/server/services/spaces/agent_namespaces.ts index 1a1834635662b..49253ad9767ea 100644 --- a/x-pack/plugins/fleet/server/services/spaces/agent_namespaces.ts +++ b/x-pack/plugins/fleet/server/services/spaces/agent_namespaces.ts @@ -7,12 +7,12 @@ import { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; -import { appContextService } from '../app_context'; - import type { Agent } from '../../types'; -export function isAgentInNamespace(agent: Agent, namespace?: string) { - const useSpaceAwareness = appContextService.getExperimentalFeatures()?.useSpaceAwareness; +import { isSpaceAwarenessEnabled } from './helpers'; + +export async function isAgentInNamespace(agent: Agent, namespace?: string) { + const useSpaceAwareness = await isSpaceAwarenessEnabled(); if (!useSpaceAwareness) { return true; } @@ -31,8 +31,8 @@ export function isAgentInNamespace(agent: Agent, namespace?: string) { ); } -export function agentsKueryNamespaceFilter(namespace?: string) { - const useSpaceAwareness = appContextService.getExperimentalFeatures()?.useSpaceAwareness; +export async function agentsKueryNamespaceFilter(namespace?: string) { + const useSpaceAwareness = await isSpaceAwarenessEnabled(); if (!useSpaceAwareness || !namespace) { return; } diff --git a/x-pack/plugins/fleet/server/services/spaces/agent_policy.ts b/x-pack/plugins/fleet/server/services/spaces/agent_policy.ts new file mode 100644 index 0000000000000..f488a89297265 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/spaces/agent_policy.ts @@ -0,0 +1,111 @@ +/* + * 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 deepEqual from 'fast-deep-equal'; + +import { DEFAULT_SPACE_ID } from '@kbn/spaces-plugin/common'; + +import { + AGENTS_INDEX, + AGENT_POLICY_SAVED_OBJECT_TYPE, + PACKAGE_POLICY_SAVED_OBJECT_TYPE, +} from '../../../common/constants'; + +import { appContextService } from '../app_context'; +import { agentPolicyService } from '../agent_policy'; +import { ENROLLMENT_API_KEYS_INDEX } from '../../constants'; +import { packagePolicyService } from '../package_policy'; +import { FleetError } from '../../errors'; + +import { isSpaceAwarenessEnabled } from './helpers'; + +export async function updateAgentPolicySpaces({ + agentPolicyId, + currentSpaceId, + newSpaceIds, + authorizedSpaces, +}: { + agentPolicyId: string; + currentSpaceId: string; + newSpaceIds: string[]; + authorizedSpaces: string[]; +}) { + const useSpaceAwareness = await isSpaceAwarenessEnabled(); + if (!useSpaceAwareness || !newSpaceIds || newSpaceIds.length === 0) { + return; + } + + const esClient = appContextService.getInternalUserESClient(); + const soClient = appContextService.getInternalUserSOClientWithoutSpaceExtension(); + + const currentSpaceSoClient = appContextService.getInternalUserSOClientForSpaceId(currentSpaceId); + const existingPolicy = await agentPolicyService.get(currentSpaceSoClient, agentPolicyId); + + const existingPackagePolicies = await packagePolicyService.findAllForAgentPolicy( + currentSpaceSoClient, + agentPolicyId + ); + + if (deepEqual(existingPolicy?.space_ids?.sort() ?? [DEFAULT_SPACE_ID], newSpaceIds.sort())) { + return; + } + + const spacesToAdd = newSpaceIds.filter( + (spaceId) => !existingPolicy?.space_ids?.includes(spaceId) ?? true + ); + const spacesToRemove = + existingPolicy?.space_ids?.filter((spaceId) => !newSpaceIds.includes(spaceId) ?? true) ?? []; + + // Privileges check + for (const spaceId of spacesToAdd) { + if (!authorizedSpaces.includes(spaceId)) { + throw new FleetError(`No enough permissions to create policies in space ${spaceId}`); + } + } + + for (const spaceId of spacesToRemove) { + if (!authorizedSpaces.includes(spaceId)) { + throw new FleetError(`No enough permissions to remove policies from space ${spaceId}`); + } + } + + const res = await soClient.updateObjectsSpaces( + [ + { + id: agentPolicyId, + type: AGENT_POLICY_SAVED_OBJECT_TYPE, + }, + ...existingPackagePolicies.map(({ id }) => ({ + id, + type: PACKAGE_POLICY_SAVED_OBJECT_TYPE, + })), + ], + spacesToAdd, + spacesToRemove, + { refresh: 'wait_for', namespace: currentSpaceId } + ); + + for (const soRes of res.objects) { + if (soRes.error) { + throw soRes.error; + } + } + + // Update fleet server index agents, enrollment api keys + await esClient.updateByQuery({ + index: ENROLLMENT_API_KEYS_INDEX, + script: `ctx._source.namespaces = [${newSpaceIds.map((spaceId) => `"${spaceId}"`).join(',')}]`, + ignore_unavailable: true, + refresh: true, + }); + await esClient.updateByQuery({ + index: AGENTS_INDEX, + script: `ctx._source.namespaces = [${newSpaceIds.map((spaceId) => `"${spaceId}"`).join(',')}]`, + ignore_unavailable: true, + refresh: true, + }); +} diff --git a/x-pack/plugins/fleet/server/services/spaces/enable_space_awareness.test.ts b/x-pack/plugins/fleet/server/services/spaces/enable_space_awareness.test.ts new file mode 100644 index 0000000000000..f8f4e95c78b45 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/spaces/enable_space_awareness.test.ts @@ -0,0 +1,203 @@ +/* + * 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 MockedLogger, loggerMock } from '@kbn/logging-mocks'; +import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; + +import type { Settings } from '../../types'; +import { appContextService } from '../app_context'; +import { getSettingsOrUndefined, saveSettings } from '../settings'; + +import { enableSpaceAwarenessMigration } from './enable_space_awareness'; + +jest.mock('../app_context'); +jest.mock('../settings'); + +function mockGetSettingsOrUndefined(settings?: Partial) { + if (settings) { + jest.mocked(getSettingsOrUndefined).mockResolvedValue(settings as any); + } else { + jest.mocked(getSettingsOrUndefined).mockResolvedValue(undefined); + } +} + +describe('enableSpaceAwarenessMigration', () => { + let mockedLogger: MockedLogger; + let soClient: ReturnType; + beforeEach(() => { + mockedLogger = loggerMock.create(); + soClient = savedObjectsClientMock.create(); + jest.mocked(appContextService.getExperimentalFeatures).mockReset(); + jest.mocked(appContextService.getLogger).mockReturnValue(mockedLogger); + jest + .mocked(appContextService.getInternalUserSOClientWithoutSpaceExtension) + .mockReturnValue(soClient); + jest.mocked(getSettingsOrUndefined).mockReset(); + jest.mocked(saveSettings).mockReset(); + + jest.mocked(saveSettings).mockResolvedValue({} as any); + }); + it('should do nothing if migration is already done', async () => { + mockGetSettingsOrUndefined({ + use_space_awareness_migration_status: 'success', + }); + await enableSpaceAwarenessMigration(); + const logs = loggerMock.collect(mockedLogger); + expect(logs).toMatchInlineSnapshot(` + Object { + "debug": Array [], + "error": Array [], + "fatal": Array [], + "info": Array [], + "log": Array [], + "trace": Array [], + "warn": Array [], + } + `); + }); + + it('should do migration if migration is not pending', async () => { + mockGetSettingsOrUndefined({}); + + soClient.createPointInTimeFinder.mockReturnValueOnce({ + find: jest.fn().mockImplementation(async function* () { + yield { + saved_objects: [ + { id: 'agent-policy-1', attributes: {} }, + { id: 'agent-policy-2', attributes: {} }, + ], + }; + }), + close: jest.fn(), + }); + + soClient.createPointInTimeFinder.mockReturnValueOnce({ + find: jest.fn().mockImplementation(async function* () { + yield { + saved_objects: [ + { id: 'package-policy-1', attributes: {} }, + { id: 'package-policy-2', attributes: {} }, + ], + }; + }), + close: jest.fn(), + }); + + soClient.bulkCreate.mockImplementation((objects) => { + return { + saved_objects: objects.map(() => ({})), + } as any; + }); + + await enableSpaceAwarenessMigration(); + + const logs = loggerMock.collect(mockedLogger); + expect(logs).toMatchInlineSnapshot(` + Object { + "debug": Array [], + "error": Array [], + "fatal": Array [], + "info": Array [ + Array [ + "Starting Fleet space awareness migration", + ], + Array [ + "Fleet space awareness migration is complete", + ], + ], + "log": Array [], + "trace": Array [], + "warn": Array [], + } + `); + + expect(soClient.bulkCreate).toBeCalledWith( + [ + expect.objectContaining({ + id: 'agent-policy-1', + type: 'fleet-agent-policies', + }), + expect.objectContaining({ + id: 'agent-policy-2', + type: 'fleet-agent-policies', + }), + ], + { overwrite: true, refresh: 'wait_for' } + ); + expect(soClient.bulkCreate).toBeCalledWith( + [ + expect.objectContaining({ + id: 'package-policy-1', + type: 'fleet-package-policies', + }), + expect.objectContaining({ + id: 'package-policy-2', + type: 'fleet-package-policies', + }), + ], + { overwrite: true, refresh: 'wait_for' } + ); + + expect(saveSettings).toBeCalledWith( + expect.anything(), + expect.objectContaining({ + use_space_awareness_migration_status: 'success', + }) + ); + }); + + it('should set the status to error if an error happen', async () => { + mockGetSettingsOrUndefined({}); + + soClient.createPointInTimeFinder.mockImplementation(() => { + return { + async *find() { + throw new Error('unexpected error test'); + }, + close: jest.fn(), + } as any; + }); + + let error: Error | undefined; + await enableSpaceAwarenessMigration().catch((err) => { + error = err; + }); + + expect(error).toBeDefined(); + + const logs = loggerMock.collect(mockedLogger); + expect(logs).toMatchInlineSnapshot(` + Object { + "debug": Array [], + "error": Array [ + Array [ + "Fleet space awareness migration failed", + Object { + "error": [Error: unexpected error test], + }, + ], + ], + "fatal": Array [], + "info": Array [ + Array [ + "Starting Fleet space awareness migration", + ], + ], + "log": Array [], + "trace": Array [], + "warn": Array [], + } + `); + + expect(saveSettings).toBeCalledWith( + expect.anything(), + expect.objectContaining({ + use_space_awareness_migration_status: 'error', + }) + ); + }); +}); diff --git a/x-pack/plugins/fleet/server/services/spaces/enable_space_awareness.ts b/x-pack/plugins/fleet/server/services/spaces/enable_space_awareness.ts new file mode 100644 index 0000000000000..ba8b08dbc6914 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/spaces/enable_space_awareness.ts @@ -0,0 +1,128 @@ +/* + * 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 { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; +import { SavedObjectsErrorHelpers, type Logger } from '@kbn/core/server'; + +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE } from '../../../common'; +import { + LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, + PACKAGE_POLICY_SAVED_OBJECT_TYPE, +} from '../../../common/constants'; +import { appContextService } from '..'; +import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '../../constants'; +import { getSettingsOrUndefined, saveSettings } from '../settings'; +import { FleetError } from '../../errors'; + +import { PENDING_MIGRATION_TIMEOUT } from './helpers'; + +export async function enableSpaceAwarenessMigration() { + const soClient = appContextService.getInternalUserSOClientWithoutSpaceExtension(); + const logger = appContextService.getLogger(); + + const existingSettings = await getSettingsOrUndefined(soClient); + if (existingSettings?.use_space_awareness_migration_status === 'success') { + return; + } + + if ( + existingSettings?.use_space_awareness_migration_started_at && + new Date(existingSettings?.use_space_awareness_migration_started_at).getTime() > + Date.now() - PENDING_MIGRATION_TIMEOUT + ) { + logger.info('Fleet space awareness migration is pending'); + throw new FleetError('Migration is pending.'); + } + + await saveSettings( + soClient, + { + use_space_awareness_migration_status: 'pending', + use_space_awareness_migration_started_at: new Date().toISOString(), + }, + { + createWithOverwrite: false, + version: existingSettings?.version, + } + ).catch((err) => { + if (SavedObjectsErrorHelpers.isConflictError(err)) { + logger.info('Fleet space awareness migration is pending'); + throw new FleetError('Migration is pending. (conflict acquiring the lock)'); + } + + throw err; + }); + + await runMigration(soClient, logger) + .then(async () => { + logger.info('Fleet space awareness migration is complete'); + // Update Settings SO + await saveSettings(soClient, { + use_space_awareness_migration_status: 'success', + use_space_awareness_migration_started_at: null, + }); + }) + .catch(async (error) => { + logger.error('Fleet space awareness migration failed', { error }); + await saveSettings(soClient, { + use_space_awareness_migration_status: 'error', + use_space_awareness_migration_started_at: null, + }); + throw error; + }); +} + +async function runMigration(soClient: SavedObjectsClientContract, logger: Logger) { + logger.info('Starting Fleet space awareness migration'); + // Agent Policy + await batchMigration( + soClient, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, + AGENT_POLICY_SAVED_OBJECT_TYPE + ); + // Package policu + await batchMigration( + soClient, + LEGACY_PACKAGE_POLICY_SAVED_OBJECT_TYPE, + PACKAGE_POLICY_SAVED_OBJECT_TYPE + ); +} + +const BATCH_SIZE = 1000; + +async function batchMigration( + soClient: SavedObjectsClientContract, + sourceSoType: string, + targetSoType: string +) { + const finder = soClient.createPointInTimeFinder({ + type: sourceSoType, + perPage: BATCH_SIZE, + }); + try { + for await (const result of finder.find()) { + const createRes = await soClient.bulkCreate( + result.saved_objects.map((so) => ({ + type: targetSoType, + id: so.id, + attributes: so.attributes, + })), + { + overwrite: true, + refresh: 'wait_for', + } + ); + for (const res of createRes.saved_objects) { + if (res.error) { + throw res.error; + } + } + } + } finally { + await finder.close(); + } +} diff --git a/x-pack/plugins/fleet/server/services/spaces/helper.test.ts b/x-pack/plugins/fleet/server/services/spaces/helper.test.ts new file mode 100644 index 0000000000000..76d9c8707fe0b --- /dev/null +++ b/x-pack/plugins/fleet/server/services/spaces/helper.test.ts @@ -0,0 +1,131 @@ +/* + * 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 { Settings } from '../../types'; +import { appContextService } from '../app_context'; +import { getSettingsOrUndefined } from '../settings'; + +import { isSpaceAwarenessEnabled, isSpaceAwarenessMigrationPending } from './helpers'; + +jest.mock('../app_context'); +jest.mock('../settings'); + +function mockFeatureFlag(val: boolean) { + jest.mocked(appContextService.getExperimentalFeatures).mockReturnValue({ + useSpaceAwareness: val, + } as any); +} + +function mockGetSettings(settings?: Partial) { + if (settings) { + jest.mocked(getSettingsOrUndefined).mockResolvedValue(settings as any); + } else { + jest.mocked(getSettingsOrUndefined).mockResolvedValue(undefined); + } +} + +describe('isSpaceAwarenessEnabled', () => { + beforeEach(() => { + jest.mocked(appContextService.getExperimentalFeatures).mockReset(); + jest.mocked(getSettingsOrUndefined).mockReset(); + }); + it('should return false if feature flag is disabled', async () => { + mockFeatureFlag(false); + await expect(isSpaceAwarenessEnabled()).resolves.toBe(false); + }); + + it('should return false if feature flag is enabled but user did not optin', async () => { + mockFeatureFlag(true); + mockGetSettings({ + use_space_awareness_migration_status: undefined, + }); + const res = await isSpaceAwarenessEnabled(); + + expect(res).toBe(false); + }); + + it('should return false if feature flag is enabled and settings do not exists', async () => { + mockFeatureFlag(true); + mockGetSettings(); + const res = await isSpaceAwarenessEnabled(); + + expect(res).toBe(false); + }); + + it('should return true if feature flag is enabled and user optin', async () => { + mockFeatureFlag(true); + mockGetSettings({ + use_space_awareness_migration_status: 'success', + }); + const res = await isSpaceAwarenessEnabled(); + + expect(res).toBe(true); + }); +}); + +describe('isSpaceAwarenessMigrationPending', () => { + beforeEach(() => { + jest.mocked(appContextService.getExperimentalFeatures).mockReset(); + jest.mocked(getSettingsOrUndefined).mockReset(); + }); + it('should return false if feature flag is disabled', async () => { + mockFeatureFlag(false); + const res = await isSpaceAwarenessMigrationPending(); + + expect(res).toBe(false); + }); + + it('should return false if feature flag is enabled but user did not optin', async () => { + mockFeatureFlag(true); + mockGetSettings({ + use_space_awareness_migration_status: undefined, + }); + const res = await isSpaceAwarenessMigrationPending(); + + expect(res).toBe(false); + }); + + it('should return false if feature flag is enabled and settings do not exists', async () => { + mockFeatureFlag(true); + mockGetSettings(); + const res = await isSpaceAwarenessMigrationPending(); + + expect(res).toBe(false); + }); + + it('should return false if feature flag is enabled and migration is complete', async () => { + mockFeatureFlag(true); + mockGetSettings({ + use_space_awareness_migration_status: 'success', + }); + const res = await isSpaceAwarenessMigrationPending(); + + expect(res).toBe(false); + }); + + it('should return true if feature flag is enabled and migration is in progress', async () => { + mockFeatureFlag(true); + mockGetSettings({ + use_space_awareness_migration_status: 'pending', + use_space_awareness_migration_started_at: new Date().toISOString(), + }); + const res = await isSpaceAwarenessMigrationPending(); + + expect(res).toBe(true); + }); + + it('should return false if feature flag is enabled and an old migration is in progress', async () => { + mockFeatureFlag(true); + mockGetSettings({ + use_space_awareness_migration_status: 'pending', + use_space_awareness_migration_started_at: new Date(Date.now() - 60 * 60 * 1000).toISOString(), + }); + const res = await isSpaceAwarenessMigrationPending(); + + expect(res).toBe(false); + }); +}); diff --git a/x-pack/plugins/fleet/server/services/spaces/helpers.ts b/x-pack/plugins/fleet/server/services/spaces/helpers.ts new file mode 100644 index 0000000000000..b9034acb178d2 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/spaces/helpers.ts @@ -0,0 +1,44 @@ +/* + * 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 { appContextService } from '../app_context'; +import { getSettingsOrUndefined } from '../settings'; + +export const PENDING_MIGRATION_TIMEOUT = 60 * 60 * 1000; +/** + * Return true if user optin for the space awareness feature. + */ +export async function isSpaceAwarenessEnabled(): Promise { + if (!appContextService.getExperimentalFeatures().useSpaceAwareness) { + return false; + } + + const settings = await getSettingsOrUndefined(appContextService.getInternalUserSOClient()); + + return settings?.use_space_awareness_migration_status === 'success' ?? false; +} + +/** + * Return true if space awareness migration is currently running + */ +export async function isSpaceAwarenessMigrationPending(): Promise { + if (!appContextService.getExperimentalFeatures().useSpaceAwareness) { + return false; + } + + const settings = await getSettingsOrUndefined(appContextService.getInternalUserSOClient()); + + if ( + settings?.use_space_awareness_migration_status === 'pending' && + settings?.use_space_awareness_migration_started_at && + new Date(settings?.use_space_awareness_migration_started_at).getTime() > + Date.now() - PENDING_MIGRATION_TIMEOUT + ) { + return true; + } + return false; +} diff --git a/x-pack/plugins/fleet/server/services/spaces/query_namespaces_filtering.test.ts b/x-pack/plugins/fleet/server/services/spaces/query_namespaces_filtering.test.ts index 43713597e364a..e9bdc4cb38e43 100644 --- a/x-pack/plugins/fleet/server/services/spaces/query_namespaces_filtering.test.ts +++ b/x-pack/plugins/fleet/server/services/spaces/query_namespaces_filtering.test.ts @@ -5,13 +5,10 @@ * 2.0. */ -import { appContextService } from '..'; - +import { isSpaceAwarenessEnabled } from './helpers'; import { addNamespaceFilteringToQuery } from './query_namespaces_filtering'; -const mockedAppContextService = appContextService as jest.Mocked; - -jest.mock('../app_context'); +jest.mock('./helpers'); describe('addNamespaceFilteringToQuery', () => { const baseActionQuery = { @@ -67,31 +64,29 @@ describe('addNamespaceFilteringToQuery', () => { }, }; - describe('with the useSpaceAwareness feature flag disabled', () => { + describe('with isSpaceAwarenessEnabled returning false', () => { beforeEach(() => { - mockedAppContextService.getExperimentalFeatures.mockReturnValue({ - useSpaceAwareness: false, - } as any); + jest.mocked(isSpaceAwarenessEnabled).mockResolvedValue(false); }); - it('should return the same query', () => { - expect(addNamespaceFilteringToQuery(baseActionQuery, 'mySpace')).toEqual(baseActionQuery); + it('should return the same query', async () => { + expect(await addNamespaceFilteringToQuery(baseActionQuery, 'mySpace')).toEqual( + baseActionQuery + ); }); }); - describe('with the useSpaceAwareness feature flag enabled', () => { + describe('with isSpaceAwarenessEnabled returning true', () => { beforeEach(() => { - mockedAppContextService.getExperimentalFeatures.mockReturnValue({ - useSpaceAwareness: true, - } as any); + jest.mocked(isSpaceAwarenessEnabled).mockResolvedValue(true); }); - it('should return the same query if the current namespace is undefined', () => { - expect(addNamespaceFilteringToQuery(baseActionQuery)).toEqual(baseActionQuery); + it('should return the same query if the current namespace is undefined', async () => { + expect(await addNamespaceFilteringToQuery(baseActionQuery)).toEqual(baseActionQuery); }); - it('should add a filter to the base action query in a custom space', () => { - expect(addNamespaceFilteringToQuery(baseActionQuery, 'mySpace')).toEqual({ + it('should add a filter to the base action query in a custom space', async () => { + expect(await addNamespaceFilteringToQuery(baseActionQuery, 'mySpace')).toEqual({ bool: { must_not: [ { @@ -111,8 +106,8 @@ describe('addNamespaceFilteringToQuery', () => { }); }); - it('should add a filter to the base action query in a custom space if there is already filtering', () => { - expect(addNamespaceFilteringToQuery(baseActionQueryWithFilter, 'mySpace')).toEqual({ + it('should add a filter to the base action query in a custom space if there is already filtering', async () => { + expect(await addNamespaceFilteringToQuery(baseActionQueryWithFilter, 'mySpace')).toEqual({ bool: { must_not: [ { @@ -140,8 +135,8 @@ describe('addNamespaceFilteringToQuery', () => { }); }); - it('should add a filter to the base policy query in a custom space', () => { - expect(addNamespaceFilteringToQuery(basePolicyQuery, 'mySpace')).toEqual({ + it('should add a filter to the base policy query in a custom space', async () => { + expect(await addNamespaceFilteringToQuery(basePolicyQuery, 'mySpace')).toEqual({ bool: { filter: [ { @@ -166,8 +161,8 @@ describe('addNamespaceFilteringToQuery', () => { }); }); - it('should add a filter to the base action query in the default space', () => { - expect(addNamespaceFilteringToQuery(baseActionQuery, 'default')).toEqual({ + it('should add a filter to the base action query in the default space', async () => { + expect(await addNamespaceFilteringToQuery(baseActionQuery, 'default')).toEqual({ bool: { must_not: [ { @@ -204,8 +199,8 @@ describe('addNamespaceFilteringToQuery', () => { }); }); - it('should add a filter to the base action query in the default space if there is already filtering', () => { - expect(addNamespaceFilteringToQuery(baseActionQueryWithFilter, 'default')).toEqual({ + it('should add a filter to the base action query in the default space if there is already filtering', async () => { + expect(await addNamespaceFilteringToQuery(baseActionQueryWithFilter, 'default')).toEqual({ bool: { must_not: [ { @@ -250,8 +245,8 @@ describe('addNamespaceFilteringToQuery', () => { }); }); - it('should add a filter to the base policy query in the default space', () => { - expect(addNamespaceFilteringToQuery(basePolicyQuery, 'default')).toEqual({ + it('should add a filter to the base policy query in the default space', async () => { + expect(await addNamespaceFilteringToQuery(basePolicyQuery, 'default')).toEqual({ bool: { filter: [ { diff --git a/x-pack/plugins/fleet/server/services/spaces/query_namespaces_filtering.ts b/x-pack/plugins/fleet/server/services/spaces/query_namespaces_filtering.ts index a2c233cbcc21a..55c450c116f65 100644 --- a/x-pack/plugins/fleet/server/services/spaces/query_namespaces_filtering.ts +++ b/x-pack/plugins/fleet/server/services/spaces/query_namespaces_filtering.ts @@ -7,10 +7,10 @@ import { DEFAULT_NAMESPACE_STRING } from '@kbn/core-saved-objects-utils-server'; -import { appContextService } from '..'; +import { isSpaceAwarenessEnabled } from './helpers'; -export function addNamespaceFilteringToQuery(query: any, namespace?: string) { - const useSpaceAwareness = appContextService.getExperimentalFeatures()?.useSpaceAwareness; +export async function addNamespaceFilteringToQuery(query: any, namespace?: string) { + const useSpaceAwareness = await isSpaceAwarenessEnabled(); if (!useSpaceAwareness || !namespace) { return query; } diff --git a/x-pack/plugins/fleet/server/services/utils/agentless.test.ts b/x-pack/plugins/fleet/server/services/utils/agentless.test.ts index 9c941a2d8d792..4a1bbdd5f7d84 100644 --- a/x-pack/plugins/fleet/server/services/utils/agentless.test.ts +++ b/x-pack/plugins/fleet/server/services/utils/agentless.test.ts @@ -13,6 +13,7 @@ import { isAgentlessCloudEnabled, isAgentlessEnabled, isAgentlessServerlessEnabled, + prependAgentlessApiBasePathToEndpoint, } from './agentless'; jest.mock('../app_context'); @@ -23,28 +24,37 @@ mockedAppContextService.getSecuritySetup.mockImplementation(() => ({ })); describe('isAgentlessCloudEnabled', () => { + afterEach(() => { + jest.clearAllMocks(); + }); it('should return false if cloud is not enabled', () => { - jest - .spyOn(appContextService, 'getExperimentalFeatures') - .mockReturnValue({ agentless: false } as any); + jest.spyOn(appContextService, 'getConfig').mockReturnValue({ + agentless: { + enabled: false, + }, + } as any); jest.spyOn(appContextService, 'getCloud').mockReturnValue({ isCloudEnabled: false } as any); expect(isAgentlessCloudEnabled()).toBe(false); }); it('should return false if cloud is enabled but agentless is not', () => { - jest - .spyOn(appContextService, 'getExperimentalFeatures') - .mockReturnValue({ agentless: false } as any); + jest.spyOn(appContextService, 'getConfig').mockReturnValue({ + agentless: { + enabled: false, + }, + } as any); jest.spyOn(appContextService, 'getCloud').mockReturnValue({ isCloudEnabled: true } as any); expect(isAgentlessCloudEnabled()).toBe(false); }); it('should return true if cloud is enabled and agentless is enabled', () => { - jest - .spyOn(appContextService, 'getExperimentalFeatures') - .mockReturnValue({ agentless: true } as any); + jest.spyOn(appContextService, 'getConfig').mockReturnValue({ + agentless: { + enabled: true, + }, + } as any); jest.spyOn(appContextService, 'getCloud').mockReturnValue({ isCloudEnabled: true } as any); expect(isAgentlessCloudEnabled()).toBe(true); @@ -52,6 +62,10 @@ describe('isAgentlessCloudEnabled', () => { }); describe('isAgentlessServerlessEnabled', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + it('should return false if serverless is not enabled', () => { jest .spyOn(appContextService, 'getExperimentalFeatures') @@ -83,6 +97,10 @@ describe('isAgentlessServerlessEnabled', () => { }); describe('isAgentlessEnabled', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + it('should return false if cloud and serverless are not enabled', () => { jest .spyOn(appContextService, 'getExperimentalFeatures') @@ -140,3 +158,34 @@ describe('isAgentlessEnabled', () => { expect(isAgentlessEnabled()).toBe(true); }); }); +describe('prependAgentlessApiBasePathToEndpoint', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + it('should prepend the agentless api base path to the endpoint', () => { + const agentlessConfig = { + api: { + url: 'https://agentless-api.com', + }, + } as any; + const endpoint = '/deployments'; + + expect(prependAgentlessApiBasePathToEndpoint(agentlessConfig, endpoint)).toBe( + 'https://agentless-api.com/api/v1/ess/deployments' + ); + }); + + it('should prepend the agentless api base path to the endpoint with a dynamic path', () => { + const agentlessConfig = { + api: { + url: 'https://agentless-api.com', + }, + } as any; + const endpoint = '/deployments/123'; + + expect(prependAgentlessApiBasePathToEndpoint(agentlessConfig, endpoint)).toBe( + 'https://agentless-api.com/api/v1/ess/deployments/123' + ); + }); +}); diff --git a/x-pack/plugins/fleet/server/services/utils/agentless.ts b/x-pack/plugins/fleet/server/services/utils/agentless.ts index 97a9dcbf5f505..d54ea2bb3d00b 100644 --- a/x-pack/plugins/fleet/server/services/utils/agentless.ts +++ b/x-pack/plugins/fleet/server/services/utils/agentless.ts @@ -6,12 +6,11 @@ */ import { appContextService } from '..'; +import type { FleetConfigType } from '../../config'; export const isAgentlessCloudEnabled = () => { const cloudSetup = appContextService.getCloud(); - return Boolean( - cloudSetup?.isCloudEnabled && appContextService.getExperimentalFeatures().agentless - ); + return Boolean(cloudSetup?.isCloudEnabled && appContextService.getConfig()?.agentless?.enabled); }; export const isAgentlessServerlessEnabled = () => { const cloudSetup = appContextService.getCloud(); @@ -22,3 +21,14 @@ export const isAgentlessServerlessEnabled = () => { export const isAgentlessEnabled = () => { return isAgentlessCloudEnabled() || isAgentlessServerlessEnabled(); }; + +const AGENTLESS_API_BASE_PATH = '/api/v1/ess'; + +type AgentlessApiEndpoints = '/deployments' | `/deployments/${string}`; + +export const prependAgentlessApiBasePathToEndpoint = ( + agentlessConfig: FleetConfigType['agentless'], + endpoint: AgentlessApiEndpoints +) => { + return `${agentlessConfig.api.url}${AGENTLESS_API_BASE_PATH}${endpoint}`; +}; diff --git a/x-pack/plugins/fleet/server/types/models/agent_policy.ts b/x-pack/plugins/fleet/server/types/models/agent_policy.ts index ca5858dccb5c5..f977392547400 100644 --- a/x-pack/plugins/fleet/server/types/models/agent_policy.ts +++ b/x-pack/plugins/fleet/server/types/models/agent_policy.ts @@ -41,6 +41,11 @@ function isInteger(n: number) { export const AgentPolicyBaseSchema = { id: schema.maybe(schema.string()), + space_ids: schema.maybe( + schema.arrayOf(schema.string(), { + minSize: 1, + }) + ), name: schema.string({ minLength: 1, validate: validateNonEmptyString }), namespace: AgentPolicyNamespaceSchema, description: schema.maybe(schema.string()), diff --git a/x-pack/plugins/fleet/server/types/models/package_policy.ts b/x-pack/plugins/fleet/server/types/models/package_policy.ts index 54db36b49d043..c80cb45c84ff9 100644 --- a/x-pack/plugins/fleet/server/types/models/package_policy.ts +++ b/x-pack/plugins/fleet/server/types/models/package_policy.ts @@ -98,6 +98,7 @@ const PackagePolicyBaseSchema = { namespace: schema.maybe(PackagePolicyNamespaceSchema), policy_id: schema.maybe(schema.string()), policy_ids: schema.maybe(schema.arrayOf(schema.string())), + output_id: schema.nullable(schema.maybe(schema.string())), enabled: schema.boolean(), is_managed: schema.maybe(schema.boolean()), package: schema.maybe( @@ -109,8 +110,6 @@ const PackagePolicyBaseSchema = { requires_root: schema.maybe(schema.boolean()), }) ), - // Deprecated TODO create remove issue - output_id: schema.maybe(schema.string()), inputs: schema.arrayOf(schema.object(PackagePolicyInputsSchema)), vars: schema.maybe(ConfigRecordSchema), overrides: schema.maybe( @@ -152,8 +151,6 @@ const CreatePackagePolicyProps = { requires_root: schema.maybe(schema.boolean()), }) ), - // Deprecated TODO create remove issue - output_id: schema.maybe(schema.string()), inputs: schema.arrayOf( schema.object({ ...PackagePolicyInputsSchema, @@ -191,6 +188,7 @@ export const SimplifiedPackagePolicyBaseSchema = schema.object({ name: schema.string(), description: schema.maybe(schema.string()), namespace: schema.maybe(schema.string()), + output_id: schema.nullable(schema.maybe(schema.string())), vars: schema.maybe(SimplifiedVarsSchema), inputs: schema.maybe( schema.recordOf( diff --git a/x-pack/plugins/fleet/server/types/models/preconfiguration.ts b/x-pack/plugins/fleet/server/types/models/preconfiguration.ts index 6216eb4bbd326..79586b1885ed9 100644 --- a/x-pack/plugins/fleet/server/types/models/preconfiguration.ts +++ b/x-pack/plugins/fleet/server/types/models/preconfiguration.ts @@ -162,6 +162,7 @@ export const PreconfiguredAgentPoliciesSchema = schema.arrayOf( }), description: schema.maybe(schema.string()), namespace: schema.maybe(PackagePolicyNamespaceSchema), + output_id: schema.nullable(schema.maybe(schema.string())), inputs: schema.maybe( schema.arrayOf( schema.object({ diff --git a/x-pack/plugins/fleet/server/types/request_context.ts b/x-pack/plugins/fleet/server/types/request_context.ts index dac735c9a3ed1..2369bf974af62 100644 --- a/x-pack/plugins/fleet/server/types/request_context.ts +++ b/x-pack/plugins/fleet/server/types/request_context.ts @@ -13,6 +13,7 @@ import type { SavedObjectsClientContract, IRouter, } from '@kbn/core/server'; +import type { GetSpaceResult } from '@kbn/spaces-plugin/common'; import type { FleetAuthz } from '../../common/authz'; import type { AgentClient } from '../services'; @@ -43,6 +44,7 @@ export type FleetRequestHandlerContext = CustomRequestHandlerContext<{ readonly internalSoClient: SavedObjectsClientContract; spaceId: string; + getAllSpaces(): Promise; /** * If data is to be limited to the list of integration package names. This will be set when * authz to the API was granted only based on Package Privileges. diff --git a/x-pack/plugins/fleet/server/types/rest_spec/agent_policy.ts b/x-pack/plugins/fleet/server/types/rest_spec/agent_policy.ts index aa38b54582fe5..0add093c8ce4e 100644 --- a/x-pack/plugins/fleet/server/types/rest_spec/agent_policy.ts +++ b/x-pack/plugins/fleet/server/types/rest_spec/agent_policy.ts @@ -9,7 +9,7 @@ import { schema } from '@kbn/config-schema'; import { NewAgentPolicySchema } from '../models'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE, AGENT_POLICY_MAPPINGS } from '../../constants'; +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, AGENT_POLICY_MAPPINGS } from '../../constants'; import { validateKuery } from '../../routes/utils/filter_utils'; @@ -27,7 +27,7 @@ export const GetAgentPoliciesRequestSchema = { validate: (value: string) => { const validationObj = validateKuery( value, - [AGENT_POLICY_SAVED_OBJECT_TYPE], + [LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE], AGENT_POLICY_MAPPINGS, true ); diff --git a/x-pack/plugins/fleet/server/types/so_attributes.ts b/x-pack/plugins/fleet/server/types/so_attributes.ts index 79640a0f90e12..ef39759b206f5 100644 --- a/x-pack/plugins/fleet/server/types/so_attributes.ts +++ b/x-pack/plugins/fleet/server/types/so_attributes.ts @@ -121,6 +121,8 @@ export interface PackagePolicySOAttributes { inputs: PackagePolicyInput[]; policy_id?: string; policy_ids: string[]; + // Nullable to allow user to reset to default outputs + output_id?: string | null; updated_at: string; updated_by: string; description?: string; diff --git a/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.js b/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.js index 81e1d9ce232d5..99eb2a63ee43b 100644 --- a/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.js +++ b/x-pack/plugins/graph/public/services/workspace/graph_client_workspace.js @@ -469,7 +469,7 @@ function GraphWorkspace(options) { }, }; for (const field in termsByField) { - if (termsByField.hasOwnProperty(field)) { + if (Object.hasOwn(termsByField, field)) { const tq = {}; tq[field] = termsByField[field]; q.bool.should.push({ @@ -529,7 +529,7 @@ function GraphWorkspace(options) { }); for (const n in allNodes) { - if (!allNodes.hasOwnProperty(n)) { + if (!Object.hasOwn(allNodes, n)) { continue; } let node = allNodes[n]; @@ -994,7 +994,7 @@ function GraphWorkspace(options) { const primaryVertices = []; const secondaryVertices = []; for (const fieldName in nodesByField) { - if (nodesByField.hasOwnProperty(fieldName)) { + if (Object.hasOwn(nodesByField, fieldName)) { primaryVertices.push({ field: fieldName, include: nodesByField[fieldName], @@ -1327,7 +1327,7 @@ function GraphWorkspace(options) { txtsByFieldType[node.data.field] = txt; }); for (const field in txtsByFieldType) { - if (txtsByFieldType.hasOwnProperty(field)) { + if (Object.hasOwn(txtsByFieldType, field)) { likeQueries.push({ more_like_this: { like: txtsByFieldType[field], diff --git a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/index_priority_field.tsx b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/index_priority_field.tsx index 309e283c14d7c..e0989adf44e4f 100644 --- a/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/index_priority_field.tsx +++ b/x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/index_priority_field.tsx @@ -28,9 +28,12 @@ export const IndexPriorityField: FunctionComponent = ({ phase }) => { const initialToggleValue = useMemo(() => { return ( - isNewPolicy || // enable index priority for new policies - !policy.phases[phase]?.actions || // enable index priority for new phases - policy.phases[phase]?.actions?.set_priority != null // enable index priority if it's set + // enable index priority for new policies + isNewPolicy || + // enable index priority for new phases: + !policy.phases[phase]?.actions || + // enable index priority if it's set: + policy.phases[phase]?.actions?.set_priority != null ); }, [isNewPolicy, policy.phases, phase]); diff --git a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/__jest__/test_pipeline.test.tsx b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/__jest__/test_pipeline.test.tsx index 3698d07018c71..93316a8358e77 100644 --- a/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/__jest__/test_pipeline.test.tsx +++ b/x-pack/plugins/ingest_pipelines/public/application/components/pipeline_editor/__jest__/test_pipeline.test.tsx @@ -377,9 +377,9 @@ describe('Test pipeline', () => { // Click the "Configuration" tab await actions.clickProcessorConfigurationTab(); // Verify type selector has not changed - expect(find('processorTypeSelector.input').find('[role="combobox"]').props().value).toBe( - 'Set' - ); + expect( + find('processorTypeSelector.input').find('input[role="combobox"]').props().value + ).toBe('Set'); }); }); diff --git a/x-pack/plugins/integration_assistant/server/graphs/ecs/pipeline.ts b/x-pack/plugins/integration_assistant/server/graphs/ecs/pipeline.ts index 96e41fee021a2..d925f443873e4 100644 --- a/x-pack/plugins/integration_assistant/server/graphs/ecs/pipeline.ts +++ b/x-pack/plugins/integration_assistant/server/graphs/ecs/pipeline.ts @@ -5,7 +5,7 @@ * 2.0. */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { load } from 'js-yaml'; +import { safeLoad } from 'js-yaml'; import { Environment, FileSystemLoader } from 'nunjucks'; import { join as joinPath } from 'path'; import type { EcsMappingState } from '../../types'; @@ -185,6 +185,6 @@ export function createPipeline(state: EcsMappingState): IngestPipeline { }); const template = env.getTemplate('pipeline.yml.njk'); const renderedTemplate = template.render(mappedValues); - const ingestPipeline = load(renderedTemplate) as IngestPipeline; + const ingestPipeline = safeLoad(renderedTemplate) as IngestPipeline; return ingestPipeline; } diff --git a/x-pack/plugins/integration_assistant/server/graphs/ecs/validate.ts b/x-pack/plugins/integration_assistant/server/graphs/ecs/validate.ts index 34f4f520243c9..c5fee772e133a 100644 --- a/x-pack/plugins/integration_assistant/server/graphs/ecs/validate.ts +++ b/x-pack/plugins/integration_assistant/server/graphs/ecs/validate.ts @@ -140,7 +140,7 @@ export function findInvalidEcsFields(ecsMapping: AnyObject): string[] { ); for (const [ecsValue, paths] of Object.entries(filteredOutput)) { - if (!Object.prototype.hasOwnProperty.call(ecsDict, ecsValue)) { + if (!Object.hasOwn(ecsDict, ecsValue)) { const field = paths.map((p) => p.join('.')); results.push(`Invalid ECS field mapping identified for ${ecsValue} : ${field.join(', ')}`); } diff --git a/x-pack/plugins/integration_assistant/server/integration_builder/pipeline.ts b/x-pack/plugins/integration_assistant/server/integration_builder/pipeline.ts index d733fd001be02..2cb22e4dfa8ab 100644 --- a/x-pack/plugins/integration_assistant/server/integration_builder/pipeline.ts +++ b/x-pack/plugins/integration_assistant/server/integration_builder/pipeline.ts @@ -11,6 +11,6 @@ import { createSync } from '../util'; export function createPipeline(specificDataStreamDir: string, pipeline: object): void { const filePath = joinPath(specificDataStreamDir, 'elasticsearch/ingest_pipeline/default.yml'); - const yamlContent = `---\n${yaml.dump(pipeline, { sortKeys: false })}`; + const yamlContent = `---\n${yaml.safeDump(pipeline, { sortKeys: false })}`; createSync(filePath, yamlContent); } diff --git a/x-pack/plugins/integration_assistant/server/util/processors.ts b/x-pack/plugins/integration_assistant/server/util/processors.ts index bfd544ec1182d..ad0ce1eec1f07 100644 --- a/x-pack/plugins/integration_assistant/server/util/processors.ts +++ b/x-pack/plugins/integration_assistant/server/util/processors.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { load } from 'js-yaml'; +import { safeLoad } from 'js-yaml'; import { join as joinPath } from 'path'; import { Environment, FileSystemLoader } from 'nunjucks'; import { deepCopy } from './util'; @@ -43,6 +43,6 @@ function createAppendProcessors(processors: SimplifiedProcessors): ESProcessorIt }); const template = env.getTemplate('append.yml.njk'); const renderedTemplate = template.render({ processors }); - const appendProcessors = load(renderedTemplate) as ESProcessorItem[]; + const appendProcessors = safeLoad(renderedTemplate) as ESProcessorItem[]; return appendProcessors; } diff --git a/x-pack/plugins/integration_assistant/server/util/samples.ts b/x-pack/plugins/integration_assistant/server/util/samples.ts index 8b306213fd3fd..e8489d79cdca0 100644 --- a/x-pack/plugins/integration_assistant/server/util/samples.ts +++ b/x-pack/plugins/integration_assistant/server/util/samples.ts @@ -203,5 +203,5 @@ export function generateFields(mergedDocs: string): string { .filter((key) => !ecsTopKeysSet.has(key)) .map((key) => recursiveParse(doc[key], [key])); - return yaml.dump(fieldsStructure, { sortKeys: false }); + return yaml.safeDump(fieldsStructure, { sortKeys: false }); } 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 6c66c463f92d4..440b70ab4b8a3 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 @@ -153,9 +153,6 @@ export function LensEditConfigurationFlyout({ } }; getESQLGridAttrs(); - return () => { - abortController.abort(); - }; }, [adHocDataViews, dataGridAttrs, query, startDependencies]); const attributesChanged: boolean = useMemo(() => { diff --git a/x-pack/plugins/lens/public/datasources/common/field_item.test.tsx b/x-pack/plugins/lens/public/datasources/common/field_item.test.tsx index 1a0dce938cea6..8e9477731d91c 100644 --- a/x-pack/plugins/lens/public/datasources/common/field_item.test.tsx +++ b/x-pack/plugins/lens/public/datasources/common/field_item.test.tsx @@ -5,42 +5,104 @@ * 2.0. */ -import React, { ReactElement } from 'react'; -import { ReactWrapper } from 'enzyme'; +import React from 'react'; import { act } from 'react-dom/test-utils'; import { uiActionsPluginMock } from '@kbn/ui-actions-plugin/public/mocks'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { DataView, DataViewField } from '@kbn/data-views-plugin/common'; -import * as loadFieldStatsModule from '@kbn/unified-field-list/src/services/field_stats'; -import { FieldStats, FieldPopoverFooter } from '@kbn/unified-field-list'; -import { render, screen } from '@testing-library/react'; +import { loadFieldStats } from '@kbn/unified-field-list/src/services/field_stats'; +import { fireEvent, render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { EuiLoadingSpinner, EuiPopover } from '@elastic/eui'; import { InnerFieldItem, FieldItemIndexPatternFieldProps } from './field_item'; import { coreMock } from '@kbn/core/public/mocks'; -import { mountWithIntl } from '@kbn/test-jest-helpers'; import { fieldFormatsServiceMock } from '@kbn/field-formats-plugin/public/mocks'; import { IndexPattern } from '../../types'; import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; import { documentField } from '../form_based/document_field'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; jest.mock('@kbn/unified-field-list/src/services/field_stats', () => ({ loadFieldStats: jest.fn().mockResolvedValue({}), })); -const clickField = async (wrapper: ReactWrapper, field?: string) => { - await act(async () => { - await wrapper - .find(`[data-test-subj="lnsFieldListPanelField-${field}"] .kbnFieldButton__button`) - .simulate('click'); - }); -}; +const corePluginMock = coreMock.createStart(); + +const indexPattern = { + id: '1', + title: 'my-fake-index-pattern', + timeFieldName: 'timestamp', + fields: [ + { + name: 'timestamp', + displayName: 'timestamp', + type: 'date', + aggregatable: true, + searchable: true, + }, + { + name: 'bytes', + displayName: 'bytes', + type: 'number', + aggregatable: true, + searchable: true, + }, + { + name: 'memory', + displayName: 'memory', + type: 'number', + aggregatable: true, + searchable: true, + }, + { + name: 'unsupported', + displayName: 'unsupported', + type: 'geo', + aggregatable: true, + searchable: true, + }, + { + name: 'source', + displayName: 'source', + type: 'string', + aggregatable: true, + searchable: true, + }, + { + name: 'ip_range', + displayName: 'ip_range', + type: 'ip_range', + aggregatable: true, + searchable: true, + }, + { + name: 'geo.coordinates', + displayName: 'geo.coordinates', + type: 'geo_shape', + aggregatable: true, + searchable: true, + }, + documentField, + ], + isTimeBased: jest.fn(), +} as unknown as IndexPattern; + +const dataView = { + ...indexPattern, + getFormatterForField: jest.fn(() => ({ + convert: jest.fn((s: unknown) => JSON.stringify(s)), + })), +} as unknown as DataView; + +const dataViewsMock = dataViewPluginMocks.createStartContract(); const mockedServices = { data: dataPluginMock.createStartContract(), - dataViews: dataViewPluginMocks.createStartContract(), + dataViews: { + ...dataViewsMock, + get: jest.fn().mockResolvedValue(dataView), + }, fieldFormats: fieldFormatsServiceMock.createStartContract(), charts: chartPluginMock.createSetupContract(), uiActions: uiActionsPluginMock.createStartContract(), @@ -59,198 +121,100 @@ const mockedServices = { discover: { save: true, saveQuery: true, show: true }, }, }, + core: corePluginMock, }; -const InnerFieldItemWrapper: React.FC = (props) => { - return ( - - - - ); +const defaultProps: FieldItemIndexPatternFieldProps = { + indexPattern, + highlight: '', + dateRange: { + fromDate: 'now-7d', + toDate: 'now', + }, + query: { query: '', language: 'lucene' }, + filters: [], + field: { + name: 'bytes', + displayName: 'bytes', + type: 'number', + aggregatable: true, + searchable: true, + }, + exists: true, + groupIndex: 0, + itemIndex: 0, + dropOntoWorkspace: () => {}, + hasSuggestionForField: () => false, }; -async function getComponent(props: FieldItemIndexPatternFieldProps) { - const instance = await mountWithIntl(); - // wait for lazy modules - await new Promise((resolve) => setTimeout(resolve, 0)); - await instance.update(); - return instance; -} - describe('Lens Field Item', () => { - let defaultProps: FieldItemIndexPatternFieldProps; - let indexPattern: IndexPattern; - let dataView: DataView; - beforeEach(() => { - indexPattern = { - id: '1', - title: 'my-fake-index-pattern', - timeFieldName: 'timestamp', - fields: [ - { - name: 'timestamp', - displayName: 'timestamp', - type: 'date', - aggregatable: true, - searchable: true, - }, - { - name: 'bytes', - displayName: 'bytes', - type: 'number', - aggregatable: true, - searchable: true, - }, - { - name: 'memory', - displayName: 'memory', - type: 'number', - aggregatable: true, - searchable: true, - }, - { - name: 'unsupported', - displayName: 'unsupported', - type: 'geo', - aggregatable: true, - searchable: true, - }, - { - name: 'source', - displayName: 'source', - type: 'string', - aggregatable: true, - searchable: true, - }, - { - name: 'ip_range', - displayName: 'ip_range', - type: 'ip_range', - aggregatable: true, - searchable: true, - }, - { - name: 'geo.coordinates', - displayName: 'geo.coordinates', - type: 'geo_shape', - aggregatable: true, - searchable: true, - }, - documentField, - ], - isTimeBased: jest.fn(), - } as unknown as IndexPattern; - - defaultProps = { - indexPattern, - highlight: '', - dateRange: { - fromDate: 'now-7d', - toDate: 'now', - }, - query: { query: '', language: 'lucene' }, - filters: [], - field: { - name: 'bytes', - displayName: 'bytes', - type: 'number', - aggregatable: true, - searchable: true, - }, - exists: true, - groupIndex: 0, - itemIndex: 0, - dropOntoWorkspace: () => {}, - hasSuggestionForField: () => false, + (loadFieldStats as jest.Mock).mockClear(); + }); + + const renderFieldItem = (props?: Partial) => { + const Wrapper: React.FC<{ + children: React.ReactNode; + }> = ({ children }) => { + return ( + + + + {children} + + + ); }; - dataView = { - ...indexPattern, - getFormatterForField: jest.fn(() => ({ - convert: jest.fn((s: unknown) => JSON.stringify(s)), - })), - } as unknown as DataView; + const rtlRender = render(, { wrapper: Wrapper }); + return { ...rtlRender }; + }; - (mockedServices.dataViews.get as jest.Mock).mockImplementation(() => { - return Promise.resolve(dataView); - }); - }); + const clickField = async (fieldname: string) => { + userEvent.click(screen.getByTestId(`field-${fieldname}-showDetails`)); + await act(() => new Promise((resolve) => setTimeout(resolve, 0))); + }; - beforeEach(() => { - (loadFieldStatsModule.loadFieldStats as jest.Mock).mockReset(); - (loadFieldStatsModule.loadFieldStats as jest.Mock).mockImplementation(() => - Promise.resolve({}) - ); - }); + const getFieldNode = (index = 0) => { + return screen.getAllByTestId('lnsFieldListPanelField')[index]; + }; + + const queryProgressBar = () => screen.queryByRole('progressbar', { name: 'Loading' }); + + const queryFieldStats = () => screen.queryByTestId('unifiedFieldStats-buttonGroup'); it('should display displayName of a field', async () => { - render(); - expect(screen.getAllByTestId('lnsFieldListPanelField')[0]).toHaveTextContent('bytes'); + renderFieldItem(); + expect(getFieldNode()).toHaveTextContent('bytes'); }); it('should show gauge icon for gauge fields', async () => { - render( - - ); + renderFieldItem({ field: { ...defaultProps.field, timeSeriesMetric: 'gauge' } }); expect(screen.getByText('Gauge metric')).toBeInTheDocument(); }); it('should render edit field button if callback is set', async () => { const editFieldSpy = jest.fn(); - const wrapper = await getComponent({ - ...defaultProps, - editField: editFieldSpy, - hideDetails: true, - }); - await clickField(wrapper, 'bytes'); - await wrapper.update(); - const popoverContent = wrapper.find(EuiPopover).prop('children'); - act(() => { - mountWithIntl( - - {popoverContent as ReactElement} - - ) - .find('[data-test-subj="fieldPopoverHeader_editField-bytes"]') - .first() - .simulate('click'); - }); + renderFieldItem({ editField: editFieldSpy, hideDetails: true }); + await clickField('bytes'); + fireEvent.click(screen.getByRole('button', { name: 'Edit data view field' })); expect(editFieldSpy).toHaveBeenCalledWith('bytes'); }); it('should not render edit field button for document field', async () => { - const editFieldSpy = jest.fn(); - const wrapper = await getComponent({ - ...defaultProps, - field: documentField, - editField: editFieldSpy, - hideDetails: true, - }); - await clickField(wrapper, documentField.name); - await wrapper.update(); - const popoverContent = wrapper.find(EuiPopover).prop('children'); - expect( - mountWithIntl( - - {popoverContent as ReactElement} - - ) - .find('[data-test-subj="fieldPopoverHeader_editField-bytes"]') - .exists() - ).toBeFalsy(); + renderFieldItem({ field: documentField }); + await clickField(documentField.name); + expect(screen.queryByRole('button', { name: 'Edit data view field' })).not.toBeInTheDocument(); }); it('should pass add filter callback and pass result to filter manager', async () => { - let resolveFunction: (arg: unknown) => void; - - (loadFieldStatsModule.loadFieldStats as jest.Mock).mockImplementation(() => { - return new Promise((resolve) => { - resolveFunction = resolve; - }); + (loadFieldStats as jest.Mock).mockResolvedValueOnce({ + totalDocuments: 4633, + sampledDocuments: 4633, + sampledValues: 4633, + topValues: { + buckets: [{ count: 147, key: 'abc' }], + }, }); const field = { @@ -261,31 +225,9 @@ describe('Lens Field Item', () => { searchable: true, filterable: true, }; - - const editFieldSpy = jest.fn(); - const wrapper = await getComponent({ - ...defaultProps, - field, - editField: editFieldSpy, - }); - - await clickField(wrapper, field.name); - await wrapper.update(); - - await act(async () => { - resolveFunction!({ - totalDocuments: 4633, - sampledDocuments: 4633, - sampledValues: 4633, - topValues: { - buckets: [{ count: 147, key: 'abc' }], - }, - }); - }); - - await wrapper.update(); - - wrapper.find(`[data-test-subj="plus-${field.name}-abc"]`).first().simulate('click'); + renderFieldItem({ field }); + await clickField('test'); + userEvent.click(screen.getByRole('button', { name: 'Filter for test: ""abc""' })); expect(mockedServices.data.query.filterManager.addFilters).toHaveBeenCalledWith([ expect.objectContaining({ query: { match_phrase: { test: 'abc' } } }), @@ -294,21 +236,23 @@ describe('Lens Field Item', () => { it('should request field stats every time the button is clicked', async () => { const dataViewField = new DataViewField(defaultProps.field); - let resolveFunction: (arg: unknown) => void; - - (loadFieldStatsModule.loadFieldStats as jest.Mock).mockImplementation(() => { - return new Promise((resolve) => { - resolveFunction = resolve; - }); + (loadFieldStats as jest.Mock).mockResolvedValueOnce({ + totalDocuments: 4633, + sampledDocuments: 4633, + sampledValues: 4633, + histogram: { + buckets: [{ count: 705, key: 0 }], + }, + topValues: { + buckets: [{ count: 147, key: 0 }], + }, }); - const wrapper = await getComponent(defaultProps); - - await clickField(wrapper, 'bytes'); + const { rerender } = renderFieldItem(); - await wrapper.update(); + await clickField('bytes'); - expect(loadFieldStatsModule.loadFieldStats).toHaveBeenCalledWith({ + expect(loadFieldStats).toHaveBeenCalledWith({ abortController: new AbortController(), services: { data: mockedServices.data }, dataView, @@ -324,66 +268,33 @@ describe('Lens Field Item', () => { toDate: 'now', field: dataViewField, }); + expect(queryFieldStats()).toBeInTheDocument(); + // closing the popover by clicking the button again + await clickField('bytes'); - expect(wrapper.find(EuiPopover).prop('isOpen')).toEqual(true); - - expect(wrapper.find(EuiLoadingSpinner)).toHaveLength(1); - - await act(async () => { - resolveFunction!({ - totalDocuments: 4633, - sampledDocuments: 4633, - sampledValues: 4633, - histogram: { - buckets: [{ count: 705, key: 0 }], - }, - topValues: { - buckets: [{ count: 147, key: 0 }], - }, - }); - }); - - await wrapper.update(); - - expect(wrapper.find(EuiLoadingSpinner)).toHaveLength(0); - - await clickField(wrapper, 'bytes'); - - await wrapper.update(); - - expect(loadFieldStatsModule.loadFieldStats).toHaveBeenCalledTimes(1); - - act(() => { - const closePopover = wrapper.find(EuiPopover).prop('closePopover'); - - closePopover(); - }); - - await wrapper.update(); + expect(loadFieldStats).toHaveBeenCalledTimes(1); + expect(queryFieldStats()).not.toBeInTheDocument(); - expect(wrapper.find(EuiPopover).prop('isOpen')).toEqual(false); - - act(() => { - wrapper.setProps({ - dateRange: { - fromDate: 'now-14d', - toDate: 'now-7d', + const newContextProps: Pick< + FieldItemIndexPatternFieldProps, + 'dateRange' | 'query' | 'filters' + > = { + dateRange: { + fromDate: 'now-14d', + toDate: 'now-7d', + }, + query: { query: 'geo.src : "US"', language: 'kuery' }, + filters: [ + { + query: { match: { phrase: { 'geo.dest': 'US' } } }, }, - query: { query: 'geo.src : "US"', language: 'kuery' }, - filters: [ - { - query: { match: { phrase: { 'geo.dest': 'US' } } }, - }, - ], - }); - }); - - await clickField(wrapper, 'bytes'); - - await wrapper.update(); + ] as unknown as FieldItemIndexPatternFieldProps['filters'], + }; + rerender(); + await clickField('bytes'); - expect(loadFieldStatsModule.loadFieldStats).toHaveBeenCalledTimes(2); - expect(loadFieldStatsModule.loadFieldStats).toHaveBeenLastCalledWith({ + expect(loadFieldStats).toHaveBeenCalledTimes(2); + expect(loadFieldStats).toHaveBeenLastCalledWith({ abortController: new AbortController(), services: { data: mockedServices.data }, dataView, @@ -412,24 +323,15 @@ describe('Lens Field Item', () => { }); it('should not request field stats for document field', async () => { - const wrapper = await getComponent({ - ...defaultProps, - field: documentField, - }); - - await clickField(wrapper, documentField.name); - - await wrapper.update(); - - expect(loadFieldStatsModule.loadFieldStats).toHaveBeenCalled(); - expect(wrapper.find(EuiPopover).prop('isOpen')).toEqual(true); - expect(wrapper.find(EuiLoadingSpinner)).toHaveLength(0); - expect(wrapper.find(FieldStats).text()).toBe('Analysis is not available for this field.'); + renderFieldItem({ field: documentField }); + await clickField(documentField.name); + expect(loadFieldStats).toHaveBeenCalled(); + expect(queryProgressBar()).not.toBeInTheDocument(); + expect(screen.getByText('Analysis is not available for this field.')).toBeInTheDocument(); }); it('should not request field stats for range fields', async () => { - const wrapper = await getComponent({ - ...defaultProps, + renderFieldItem({ field: { name: 'ip_range', displayName: 'ip_range', @@ -439,20 +341,14 @@ describe('Lens Field Item', () => { }, }); - await clickField(wrapper, 'ip_range'); - - await wrapper.update(); - - expect(loadFieldStatsModule.loadFieldStats).toHaveBeenCalled(); - expect(wrapper.find(EuiPopover).prop('isOpen')).toEqual(true); - expect(wrapper.find(EuiLoadingSpinner)).toHaveLength(0); - expect(wrapper.find(FieldStats).text()).toBe('Analysis is not available for this field.'); - expect(wrapper.find(FieldPopoverFooter).exists()).toBeFalsy(); + await clickField('ip_range'); + expect(loadFieldStats).toHaveBeenCalled(); + expect(queryProgressBar()).not.toBeInTheDocument(); + expect(screen.getByText('Analysis is not available for this field.')).toBeInTheDocument(); }); it('should request examples for geo fields and render Visualize button', async () => { - const wrapper = await getComponent({ - ...defaultProps, + renderFieldItem({ field: { name: 'geo.coordinates', displayName: 'geo.coordinates', @@ -461,46 +357,32 @@ describe('Lens Field Item', () => { searchable: true, }, }); + await clickField('geo.coordinates'); + expect(loadFieldStats).toHaveBeenCalled(); - await clickField(wrapper, 'geo.coordinates'); - - await wrapper.update(); - - expect(loadFieldStatsModule.loadFieldStats).toHaveBeenCalled(); - expect(wrapper.find(EuiPopover).prop('isOpen')).toEqual(true); - expect(wrapper.find(EuiLoadingSpinner)).toHaveLength(0); - expect(wrapper.find(FieldStats).text()).toBe( + expect(queryProgressBar()).not.toBeInTheDocument(); + expect(screen.getByTestId('lnsFieldListPanel-missingFieldStats')).toHaveTextContent( 'Lens is unable to create visualizations with this field because it does not contain data. To create a visualization, drag and drop a different field.' ); - expect(wrapper.find(FieldPopoverFooter).exists()).toBeTruthy(); }); - const clickFieldRtl = async (fieldname: string) => { - userEvent.click(screen.getByTestId(`field-${fieldname}-showDetails`)); - await act(() => new Promise((resolve) => setTimeout(resolve, 0))); - }; it('should display Explore in discover button', async () => { - render(); - await clickFieldRtl('bytes'); - expect( - screen.getAllByTestId('lnsFieldListPanel-exploreInDiscover-bytes')[0] - ).toBeInTheDocument(); + renderFieldItem(); + await clickField('bytes'); + expect(screen.getByTestId('lnsFieldListPanel-exploreInDiscover-bytes')).toBeInTheDocument(); }); it('should not display Explore in discover button for a geo_point field', async () => { - render( - - ); - await clickFieldRtl('geo_point'); + renderFieldItem({ + field: { + name: 'geo_point', + displayName: 'geo_point', + type: 'geo_point', + aggregatable: true, + searchable: true, + }, + }); + await clickField('geo_point'); expect( screen.queryByTestId('lnsFieldListPanel-exploreInDiscover-geo_point') ).not.toBeInTheDocument(); @@ -521,9 +403,9 @@ describe('Lens Field Item', () => { ); - await clickFieldRtl('bytes'); + await clickField('bytes'); expect( - screen.getAllByTestId('lnsFieldListPanel-exploreInDiscover-bytes')[0] - ).toBeInTheDocument(); + screen.queryByTestId('lnsFieldListPanel-exploreInDiscover-bytes') + ).not.toBeInTheDocument(); }); }); diff --git a/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_shift.tsx b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_shift.tsx index 82da59b38cc27..f02a2897f825f 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_shift.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/dimension_panel/time_shift.tsx @@ -151,7 +151,7 @@ export function TimeShift({ options={timeShiftOptions.filter(({ value }) => { const parsedValue = parseTimeShift(value); return ( - parsedValue && !isValueTooSmall(parsedValue) && !isValueNotMultiple(parsedValue) // && + parsedValue && !isValueTooSmall(parsedValue) && !isValueNotMultiple(parsedValue) ); })} selectedOptions={getSelectedOption()} diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.ts b/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.ts index 92029e34f856c..847876f5c0ebd 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_suggestions.ts @@ -61,7 +61,7 @@ export function getSuggestions({ !table.isMultiRow || table.columns.length <= 1 || table.columns.every((col) => col.operation.dataType !== 'number') || - table.columns.some((col) => !columnSortOrder.hasOwnProperty(col.operation.dataType)); + table.columns.some((col) => !Object.hasOwn(columnSortOrder, col.operation.dataType)); if ( (incompleteTable && state && !subVisualizationId) || diff --git a/x-pack/plugins/lens/server/migrations/common_migrations.ts b/x-pack/plugins/lens/server/migrations/common_migrations.ts index 0018f892b8b8e..0943ba2f0da53 100644 --- a/x-pack/plugins/lens/server/migrations/common_migrations.ts +++ b/x-pack/plugins/lens/server/migrations/common_migrations.ts @@ -323,7 +323,7 @@ export const getLensCustomVisualizationMigrations = ( const migrationMap: MigrateFunctionsObject = {}; const currentMigrations = migrationGetter(); for (const version in currentMigrations) { - if (currentMigrations.hasOwnProperty(version)) { + if (Object.hasOwn(currentMigrations, version)) { migrationMap[version] = getApplyCustomVisualizationMigrationToLens( id, currentMigrations[version] diff --git a/x-pack/plugins/licensing/common/license.ts b/x-pack/plugins/licensing/common/license.ts index 7231eeb4c1049..2f43af4bef49f 100644 --- a/x-pack/plugins/licensing/common/license.ts +++ b/x-pack/plugins/licensing/common/license.ts @@ -137,7 +137,7 @@ export class License implements ILicense { } getFeature(name: string) { - if (this.isAvailable && this.features && this.features.hasOwnProperty(name)) { + if (this.isAvailable && this.features && Object.hasOwn(this.features, name)) { return { ...this.features[name] }; } diff --git a/x-pack/plugins/maps/common/elasticsearch_util/elasticsearch_geo_utils.test.js b/x-pack/plugins/maps/common/elasticsearch_util/elasticsearch_geo_utils.test.js index 096f5370ca3b9..079df81fdf1f8 100644 --- a/x-pack/plugins/maps/common/elasticsearch_util/elasticsearch_geo_utils.test.js +++ b/x-pack/plugins/maps/common/elasticsearch_util/elasticsearch_geo_utils.test.js @@ -20,12 +20,12 @@ const geoFieldName = 'location'; const flattenHitMock = (hit) => { const properties = {}; for (const fieldName in hit._source) { - if (hit._source.hasOwnProperty(fieldName)) { + if (Object.hasOwn(hit._source, fieldName)) { properties[fieldName] = hit._source[fieldName]; } } for (const fieldName in hit.fields) { - if (hit.fields.hasOwnProperty(fieldName)) { + if (Object.hasOwn(hit.fields, fieldName)) { properties[fieldName] = hit.fields[fieldName]; } } @@ -338,7 +338,7 @@ describe('hitsToGeoJson', () => { }, ]; const geojson = hitsToGeoJson(hits, cachedFlattenHit, geoFieldName, 'geo_point', []); - expect(cachedProperities.hasOwnProperty('location')).toBe(true); + expect(Object.hasOwn(cachedProperities, 'location')).toBe(true); expect(geojson.features[0].properties).toEqual({}); }); }); diff --git a/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts b/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts index 393b30fb5feb2..7756a76159bc5 100644 --- a/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts +++ b/x-pack/plugins/maps/common/elasticsearch_util/es_agg_utils.ts @@ -44,7 +44,7 @@ export function extractPropertiesFromBucket( ): BucketProperties { const properties: BucketProperties = {}; for (const key in bucket) { - if (ignoreKeys.includes(key) || !bucket.hasOwnProperty(key)) { + if (ignoreKeys.includes(key) || !Object.hasOwn(bucket, key)) { continue; } @@ -72,7 +72,7 @@ export function extractPropertiesFromBucket( ) { const values = bucket[key].values; for (const k in values) { - if (values.hasOwnProperty(k)) { + if (Object.hasOwn(values, k)) { properties[key] = values[k]; break; } diff --git a/x-pack/plugins/maps/public/classes/layers/ems_vector_tile_layer/ems_vector_tile_layer.tsx b/x-pack/plugins/maps/public/classes/layers/ems_vector_tile_layer/ems_vector_tile_layer.tsx index 78f0297a0f38d..93e665b7af187 100644 --- a/x-pack/plugins/maps/public/classes/layers/ems_vector_tile_layer/ems_vector_tile_layer.tsx +++ b/x-pack/plugins/maps/public/classes/layers/ems_vector_tile_layer/ems_vector_tile_layer.tsx @@ -261,7 +261,7 @@ export class EmsVectorTileLayer extends AbstractLayer { _addSpriteSheetToMapFromImageData(json: EmsSpriteSheet, imgData: ImageData, mbMap: MbMap) { for (const imageId in json) { - if (!(json.hasOwnProperty(imageId) && !mbMap.hasImage(imageId))) { + if (!(Object.hasOwn(json, imageId) && !mbMap.hasImage(imageId))) { continue; } const { width, height, x, y, sdf, pixelRatio } = json[imageId]; @@ -310,7 +310,7 @@ export class EmsVectorTileLayer extends AbstractLayer { } const newJson: EmsSpriteSheet = {}; for (const imageId in spriteMeta.json) { - if (spriteMeta.json.hasOwnProperty(imageId)) { + if (Object.hasOwn(spriteMeta.json, imageId)) { const namespacedImageId = this._makeNamespacedImageId(imageId); newJson[namespacedImageId] = spriteMeta.json[imageId]; } diff --git a/x-pack/plugins/maps/public/classes/sources/es_agg_source/es_agg_source.ts b/x-pack/plugins/maps/public/classes/sources/es_agg_source/es_agg_source.ts index b4330ce9a0f9b..08a0d5c4c5e3e 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_agg_source/es_agg_source.ts +++ b/x-pack/plugins/maps/public/classes/sources/es_agg_source/es_agg_source.ts @@ -129,7 +129,7 @@ export abstract class AbstractESAggSource extends AbstractESSource implements IE metricFields.forEach((metricField) => { let value; for (const key in mbProperties) { - if (mbProperties.hasOwnProperty(key) && metricField.getMbFieldName() === key) { + if (Object.hasOwn(mbProperties, key) && metricField.getMbFieldName() === key) { value = mbProperties[key]; break; } diff --git a/x-pack/plugins/maps/public/classes/sources/join_sources/es_distance_source/process_distance_response.ts b/x-pack/plugins/maps/public/classes/sources/join_sources/es_distance_source/process_distance_response.ts index 9f18195cb2f84..49b106a017a67 100644 --- a/x-pack/plugins/maps/public/classes/sources/join_sources/es_distance_source/process_distance_response.ts +++ b/x-pack/plugins/maps/public/classes/sources/join_sources/es_distance_source/process_distance_response.ts @@ -15,7 +15,7 @@ export function processDistanceResponse(response: any, countPropertyName: string const propertiesMap: PropertiesMap = new Map(); const buckets: any = response?.aggregations?.distance?.buckets ?? {}; for (const docId in buckets) { - if (buckets.hasOwnProperty(docId)) { + if (Object.hasOwn(buckets, docId)) { const bucket = buckets[docId]; // skip empty buckets diff --git a/x-pack/plugins/maps/public/classes/sources/join_sources/table_source/table_source.ts b/x-pack/plugins/maps/public/classes/sources/join_sources/table_source/table_source.ts index 0fb24d198bf78..06395af80bf30 100644 --- a/x-pack/plugins/maps/public/classes/sources/join_sources/table_source/table_source.ts +++ b/x-pack/plugins/maps/public/classes/sources/join_sources/table_source/table_source.ts @@ -70,7 +70,7 @@ export class TableSource extends AbstractVectorSource implements ITermJoinSource let propKey: string | number | undefined; const props: { [key: string]: string | number } = {}; for (const key in row) { - if (row.hasOwnProperty(key)) { + if (Object.hasOwn(row, key)) { if (key === this._descriptor.term && row[key]) { propKey = row[key]; } @@ -200,7 +200,7 @@ export class TableSource extends AbstractVectorSource implements ITermJoinSource async getTooltipProperties(properties: GeoJsonProperties): Promise { const tooltipProperties: ITooltipProperty[] = []; for (const key in properties) { - if (properties.hasOwnProperty(key)) { + if (Object.hasOwn(properties, key)) { const field = this.getFieldByName(key); if (field) { tooltipProperties.push(new TooltipProperty(key, await field.getLabel(), properties[key])); diff --git a/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_single_layer_vector_source.tsx b/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_single_layer_vector_source.tsx index ee7e46c06ca0b..9424e8dc34c9e 100644 --- a/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_single_layer_vector_source.tsx +++ b/x-pack/plugins/maps/public/classes/sources/mvt_single_layer_vector_source/mvt_single_layer_vector_source.tsx @@ -199,7 +199,7 @@ export class MVTSingleLayerVectorSource extends AbstractSource implements IMvtVe async getTooltipProperties(properties: GeoJsonProperties): Promise { const tooltips = []; for (const key in properties) { - if (properties.hasOwnProperty(key)) { + if (Object.hasOwn(properties, key)) { for (let i = 0; i < this._tooltipFields.length; i++) { const mvtField = this._tooltipFields[i]; if (mvtField.getName() === key) { diff --git a/x-pack/plugins/maps/public/connected_components/mb_map/remove_orphaned.ts b/x-pack/plugins/maps/public/connected_components/mb_map/remove_orphaned.ts index db5ff3d22e6e3..4b6e8031f9e00 100644 --- a/x-pack/plugins/maps/public/connected_components/mb_map/remove_orphaned.ts +++ b/x-pack/plugins/maps/public/connected_components/mb_map/remove_orphaned.ts @@ -39,7 +39,7 @@ export function removeOrphanedSourcesAndLayers( }); for (const mbSourceId in mbStyle.sources) { - if (mbStyle.sources.hasOwnProperty(mbSourceId)) { + if (Object.hasOwn(mbStyle.sources, mbSourceId)) { // ignore mapbox sources from spatial filter layer if (spatialFilterLayer.ownsMbSourceId(mbSourceId)) { continue; diff --git a/x-pack/plugins/maps/public/lens/choropleth_chart/suggestions.ts b/x-pack/plugins/maps/public/lens/choropleth_chart/suggestions.ts index 68a17b4a0da67..d22dec0ee4b79 100644 --- a/x-pack/plugins/maps/public/lens/choropleth_chart/suggestions.ts +++ b/x-pack/plugins/maps/public/lens/choropleth_chart/suggestions.ts @@ -49,7 +49,7 @@ export function getSuggestions( }) .forEach((bucket) => { for (const tableId in activeData) { - if (activeData.hasOwnProperty(tableId)) { + if (Object.hasOwn(activeData, tableId)) { const emsSuggestion = getEmsSuggestion( emsFileLayers, activeData[tableId], diff --git a/x-pack/plugins/maps/public/selectors/map_selectors.ts b/x-pack/plugins/maps/public/selectors/map_selectors.ts index ff47c2ccfa874..3d00bcf4fee5b 100644 --- a/x-pack/plugins/maps/public/selectors/map_selectors.ts +++ b/x-pack/plugins/maps/public/selectors/map_selectors.ts @@ -443,7 +443,7 @@ export const getMostCommonDataViewId = createSelector( const counts: { [key: string]: number } = {}; function incrementCount(ids: string[]) { ids.forEach((id) => { - const count = counts.hasOwnProperty(id) ? counts[id] : 0; + const count = Object.hasOwn(counts, id) ? counts[id] : 0; counts[id] = count + 1; }); } diff --git a/x-pack/plugins/maps/server/maps_telemetry/map_stats/map_stats_collector.ts b/x-pack/plugins/maps/server/maps_telemetry/map_stats/map_stats_collector.ts index e300c2a584873..8a3cacf1821ae 100644 --- a/x-pack/plugins/maps/server/maps_telemetry/map_stats/map_stats_collector.ts +++ b/x-pack/plugins/maps/server/maps_telemetry/map_stats/map_stats_collector.ts @@ -155,7 +155,7 @@ export class MapStatsCollector { counts: { [key: string]: number } ) { for (const key in counts) { - if (!counts.hasOwnProperty(key)) { + if (!Object.hasOwn(counts, key)) { continue; } @@ -174,7 +174,7 @@ export class MapStatsCollector { } for (const key in clusterStats) { - if (clusterStats.hasOwnProperty(key)) { + if (Object.hasOwn(clusterStats, key)) { clusterStats[key].avg = clusterStats[key].total / this._mapCount; } } @@ -186,7 +186,7 @@ export class MapStatsCollector { } { const results: { [key: string]: Omit } = {}; for (const key in clusterStats) { - if (clusterStats.hasOwnProperty(key)) { + if (Object.hasOwn(clusterStats, key)) { results[key] = this._excludeTotal(clusterStats[key]); } } diff --git a/x-pack/plugins/ml/common/types/alerts.ts b/x-pack/plugins/ml/common/types/alerts.ts index 12bae1a9d3d16..dd49f4fa272ec 100644 --- a/x-pack/plugins/ml/common/types/alerts.ts +++ b/x-pack/plugins/ml/common/types/alerts.ts @@ -105,15 +105,15 @@ export interface InfluencerAnomalyAlertDoc extends BaseAnomalyAlertDoc { export type AlertHitDoc = RecordAnomalyAlertDoc | BucketAnomalyAlertDoc | InfluencerAnomalyAlertDoc; export function isRecordAnomalyAlertDoc(arg: any): arg is RecordAnomalyAlertDoc { - return arg.hasOwnProperty('result_type') && arg.result_type === ML_ANOMALY_RESULT_TYPE.RECORD; + return Object.hasOwn(arg, 'result_type') && arg.result_type === ML_ANOMALY_RESULT_TYPE.RECORD; } export function isBucketAnomalyAlertDoc(arg: any): arg is BucketAnomalyAlertDoc { - return arg.hasOwnProperty('result_type') && arg.result_type === ML_ANOMALY_RESULT_TYPE.BUCKET; + return Object.hasOwn(arg, 'result_type') && arg.result_type === ML_ANOMALY_RESULT_TYPE.BUCKET; } export function isInfluencerAnomalyAlertDoc(arg: any): arg is InfluencerAnomalyAlertDoc { - return arg.hasOwnProperty('result_type') && arg.result_type === ML_ANOMALY_RESULT_TYPE.INFLUENCER; + return Object.hasOwn(arg, 'result_type') && arg.result_type === ML_ANOMALY_RESULT_TYPE.INFLUENCER; } export type MlAnomalyDetectionAlertParams = { diff --git a/x-pack/plugins/ml/common/util/es_utils.ts b/x-pack/plugins/ml/common/util/es_utils.ts index 44623dbd74ec6..f2ccd5980bcdc 100644 --- a/x-pack/plugins/ml/common/util/es_utils.ts +++ b/x-pack/plugins/ml/common/util/es_utils.ts @@ -36,8 +36,7 @@ export function isValidIndexName(indexName: string) { /^[^-_\+]+$/.test(indexName.charAt(0)) && // Cannot be . or .. indexName !== '.' && - indexName !== '..' && - // Cannot be longer than 255 bytes (note it is bytes, + indexName !== '..' && // Cannot be longer than 255 bytes (note it is bytes, // so multi-byte characters will count towards the 255 limit faster) isValidIndexNameLength(indexName) ); diff --git a/x-pack/plugins/ml/common/util/job_utils.ts b/x-pack/plugins/ml/common/util/job_utils.ts index 73c8cc927e5c7..eb89fe695522f 100644 --- a/x-pack/plugins/ml/common/util/job_utils.ts +++ b/x-pack/plugins/ml/common/util/job_utils.ts @@ -301,8 +301,8 @@ export function isModelPlotEnabled( // 'partition' field values even though this is supported on the back-end. // If supplied, check both the by and partition entities are in the terms. const detector = job.analysis_config.detectors[detectorIndex]; - const detectorHasPartitionField = detector.hasOwnProperty('partition_field_name'); - const detectorHasByField = detector.hasOwnProperty('by_field_name'); + const detectorHasPartitionField = Object.hasOwn(detector, 'partition_field_name'); + const detectorHasByField = Object.hasOwn(detector, 'by_field_name'); const terms = termsStr.split(','); if (detectorHasPartitionField) { diff --git a/x-pack/plugins/ml/common/util/validation_utils.ts b/x-pack/plugins/ml/common/util/validation_utils.ts index 66084f83ea87d..b31431cdb7d0d 100644 --- a/x-pack/plugins/ml/common/util/validation_utils.ts +++ b/x-pack/plugins/ml/common/util/validation_utils.ts @@ -45,7 +45,7 @@ export function findAggField( value = returnParent === true ? aggs : aggs[k]; return true; } - if (aggs.hasOwnProperty(k) && aggs[k] !== null && typeof aggs[k] === 'object') { + if (Object.hasOwn(aggs, k) && aggs[k] !== null && typeof aggs[k] === 'object') { value = findAggField(aggs[k], fieldName, returnParent); return value !== undefined; } diff --git a/x-pack/plugins/ml/public/application/components/model_snapshots/revert_model_snapshot_flyout/revert_model_snapshot_flyout.tsx b/x-pack/plugins/ml/public/application/components/model_snapshots/revert_model_snapshot_flyout/revert_model_snapshot_flyout.tsx index 8d7f1cc1649da..ac1e31ced032c 100644 --- a/x-pack/plugins/ml/public/application/components/model_snapshots/revert_model_snapshot_flyout/revert_model_snapshot_flyout.tsx +++ b/x-pack/plugins/ml/public/application/components/model_snapshots/revert_model_snapshot_flyout/revert_model_snapshot_flyout.tsx @@ -192,7 +192,6 @@ export const RevertModelSnapshotFlyout: FC = ({ {false && ( // disabled for now <> - = ({ - {revertModalVisible && ( = ( - {Array.isArray(chartsData.seriesToPlot) && chartsData.seriesToPlot.length === 0 && @@ -84,7 +83,6 @@ export const ExplorerAnomaliesContainer: FC = ( )} - {showCharts && ( { if (group.partial === false || (group.partial === true && j.oldGroups.includes(gId))) { @@ -159,7 +159,7 @@ export class GroupSelector extends Component { let success = true; for (const jobId in resp) { // check success of each job update - if (resp.hasOwnProperty(jobId)) { + if (Object.hasOwn(resp, jobId)) { if (resp[jobId].success === false) { getToastNotificationService().displayErrorToast(resp[jobId].error); success = false; diff --git a/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/get_inference_properties_from_pipeline_config.ts b/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/get_inference_properties_from_pipeline_config.ts index 6baa258d9f624..ce77b21a3bd34 100644 --- a/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/get_inference_properties_from_pipeline_config.ts +++ b/x-pack/plugins/ml/public/application/model_management/create_pipeline_for_model/get_inference_properties_from_pipeline_config.ts @@ -63,7 +63,7 @@ export function isMlInferencePipelineInferenceConfig( export function isMlIngestInferenceProcessor(arg: unknown): arg is MLIngestInferenceProcessor { return ( isPopulatedObject(arg) && - arg.hasOwnProperty('inference_config') && + Object.hasOwn(arg, 'inference_config') && (isPopulatedObject(arg.inference_config, [SUPPORTED_PYTORCH_TASKS.QUESTION_ANSWERING]) || isPopulatedObject(arg.inference_config, [SUPPORTED_PYTORCH_TASKS.ZERO_SHOT_CLASSIFICATION])) ); @@ -105,7 +105,7 @@ export function getInferencePropertiesFromPipelineConfig( const configSettings = propertiesToReturn.inferenceConfig && propertiesToReturn.inferenceConfig[type]; propertiesToReturn[property] = - configSettings && configSettings.hasOwnProperty(property) + configSettings && Object.hasOwn(configSettings, property) ? // @ts-ignore configSettings[property] : undefined; diff --git a/x-pack/plugins/ml/public/application/model_management/models_list.tsx b/x-pack/plugins/ml/public/application/model_management/models_list.tsx index bc5c2450ebacf..c7622501d072b 100644 --- a/x-pack/plugins/ml/public/application/model_management/models_list.tsx +++ b/x-pack/plugins/ml/public/application/model_management/models_list.tsx @@ -401,7 +401,7 @@ export const ModelsList: FC = ({ }); const elasticModels = models.filter((model) => - ELASTIC_MODEL_DEFINITIONS.hasOwnProperty(model.model_id) + Object.hasOwn(ELASTIC_MODEL_DEFINITIONS, model.model_id) ); if (elasticModels.length > 0) { for (const model of elasticModels) { diff --git a/x-pack/plugins/ml/public/application/overview/components/anomaly_detection_panel/anomaly_detection_panel.tsx b/x-pack/plugins/ml/public/application/overview/components/anomaly_detection_panel/anomaly_detection_panel.tsx index 0ceea014110a8..dba7581577058 100644 --- a/x-pack/plugins/ml/public/application/overview/components/anomaly_detection_panel/anomaly_detection_panel.tsx +++ b/x-pack/plugins/ml/public/application/overview/components/anomaly_detection_panel/anomaly_detection_panel.tsx @@ -138,7 +138,7 @@ export const AnomalyDetectionPanel: FC = ({ anomalyTimelineService, setLa const tempGroups = { ...groupsObject }; for (const groupId in tempGroups) { - if (tempGroups.hasOwnProperty(groupId)) { + if (Object.hasOwn(tempGroups, groupId)) { tempGroups[groupId].overallSwimLane = groupsOverallScoreData[groupId]; } } diff --git a/x-pack/plugins/ml/public/application/services/field_format_service.ts b/x-pack/plugins/ml/public/application/services/field_format_service.ts index de4885861d331..d01a7294d9c0a 100644 --- a/x-pack/plugins/ml/public/application/services/field_format_service.ts +++ b/x-pack/plugins/ml/public/application/services/field_format_service.ts @@ -74,7 +74,7 @@ export class FieldFormatService { // Return the FieldFormat to use for formatting values from // the detector from the job with the specified ID. getFieldFormat(jobId: string, detectorIndex: number) { - if (this.formatsByJob.hasOwnProperty(jobId)) { + if (Object.hasOwn(this.formatsByJob, jobId)) { return this.formatsByJob[jobId][detectorIndex]; } } diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx index 06e57b138386c..ead36e4ffe3a4 100644 --- a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx +++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/series_controls/series_controls.tsx @@ -268,7 +268,7 @@ export const SeriesControls: FC> = ({ // In case anomalous selector has been changed // we need to change it for all the other fields for (const c in updatedResultConfig) { - if (updatedResultConfig.hasOwnProperty(c)) { + if (Object.hasOwn(updatedResultConfig, c)) { updatedResultConfig[c as MlEntityFieldType]!.anomalousOnly = updatedFieldConfig.anomalousOnly; } @@ -279,7 +279,7 @@ export const SeriesControls: FC> = ({ // In case time range selector has been changed // we need to change it for all the other fields for (const c in updatedResultConfig) { - if (updatedResultConfig.hasOwnProperty(c)) { + if (Object.hasOwn(updatedResultConfig, c)) { updatedResultConfig[c as MlEntityFieldType]!.applyTimeRange = updatedFieldConfig.applyTimeRange; } diff --git a/x-pack/plugins/ml/public/application/util/custom_url_utils.ts b/x-pack/plugins/ml/public/application/util/custom_url_utils.ts index 6f5786e0eeb71..8e9279688e91f 100644 --- a/x-pack/plugins/ml/public/application/util/custom_url_utils.ts +++ b/x-pack/plugins/ml/public/application/util/custom_url_utils.ts @@ -141,8 +141,7 @@ function isKibanaUrl(urlConfig: MlUrlConfig) { urlValue.startsWith('apm#/') || // BrowserRouter based plugins urlValue.startsWith('metrics/') || - urlValue.startsWith('security/') || - // Legacy links + urlValue.startsWith('security/') || // Legacy links urlValue.startsWith('siem#/') ); } @@ -308,7 +307,7 @@ function buildKibanaUrl( const q = rison.decode(queryDef); - if (isRisonObject(q) && q.hasOwnProperty('query')) { + if (isRisonObject(q) && Object.hasOwn(q, 'query')) { const [resultPrefix, resultPostfix] = [prefix, postfix].map(replaceSingleTokenValues); const resultQuery = getQueryStringResult( resultPrefix, diff --git a/x-pack/plugins/ml/public/maps/anomaly_source.tsx b/x-pack/plugins/ml/public/maps/anomaly_source.tsx index 3c997cc98299c..780ecd3cc7352 100644 --- a/x-pack/plugins/ml/public/maps/anomaly_source.tsx +++ b/x-pack/plugins/ml/public/maps/anomaly_source.tsx @@ -284,7 +284,7 @@ export class AnomalySource implements IVectorSource { if (key === GEOJSON_FEATURE_ID_PROPERTY_NAME) { continue; } - if (properties.hasOwnProperty(key)) { + if (Object.hasOwn(properties, key)) { tooltipProperties.push(new AnomalySourceTooltipProperty(key, properties[key])); } } diff --git a/x-pack/plugins/ml/public/maps/util.ts b/x-pack/plugins/ml/public/maps/util.ts index 84f1b62314e1e..7666552e40e93 100644 --- a/x-pack/plugins/ml/public/maps/util.ts +++ b/x-pack/plugins/ml/public/maps/util.ts @@ -98,7 +98,7 @@ function getCoordinates(latLonString: string): number[] { export function getInitialAnomaliesLayers(jobId: string) { const initialLayers = []; for (const layer in ML_ANOMALY_LAYERS) { - if (ML_ANOMALY_LAYERS.hasOwnProperty(layer)) { + if (Object.hasOwn(ML_ANOMALY_LAYERS, layer)) { initialLayers.push({ id: htmlIdGenerator()(), type: LAYER_TYPE.GEOJSON_VECTOR, @@ -119,7 +119,7 @@ export function getInitialAnomaliesLayers(jobId: string) { export function getInitialSourceIndexFieldLayers(sourceIndexWithGeoFields: SourceIndexGeoFields) { const initialLayers = [] as unknown as LayerDescriptor[] & SerializableRecord; for (const index in sourceIndexWithGeoFields) { - if (sourceIndexWithGeoFields.hasOwnProperty(index)) { + if (Object.hasOwn(sourceIndexWithGeoFields, index)) { const { dataViewId, geoFields } = sourceIndexWithGeoFields[index]; geoFields.forEach((geoField) => { diff --git a/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts b/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts index 04db54521680b..720a39193b9a7 100644 --- a/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts +++ b/x-pack/plugins/ml/server/models/data_visualizer/data_visualizer.ts @@ -409,9 +409,9 @@ export class DataVisualizer { }; let cardinalityField: AggCardinality; - if (datafeedConfig?.script_fields?.hasOwnProperty(field)) { + if (Object.hasOwn(datafeedConfig?.script_fields ?? {}, field)) { cardinalityField = aggs[`${safeFieldName}_cardinality`] = { - cardinality: { script: datafeedConfig?.script_fields[field].script }, + cardinality: { script: datafeedConfig?.script_fields![field].script }, }; } else { cardinalityField = { @@ -475,8 +475,8 @@ export class DataVisualizer { }); } else { if ( - datafeedConfig?.script_fields?.hasOwnProperty(field) || - datafeedConfig?.runtime_mappings?.hasOwnProperty(field) + Object.hasOwn(datafeedConfig?.script_fields ?? {}, field) || + Object.hasOwn(datafeedConfig?.runtime_mappings ?? {}, field) ) { const cardinality = get( aggregations, diff --git a/x-pack/plugins/ml/server/models/fields_service/fields_service.ts b/x-pack/plugins/ml/server/models/fields_service/fields_service.ts index 117dd7738d329..cba34e2cbb8e3 100644 --- a/x-pack/plugins/ml/server/models/fields_service/fields_service.ts +++ b/x-pack/plugins/ml/server/models/fields_service/fields_service.ts @@ -59,13 +59,13 @@ export function fieldsServiceProvider({ asCurrentUser }: IScopedClusterClient) { fieldNames.forEach((fieldName) => { if ( typeof datafeedConfig?.script_fields === 'object' && - datafeedConfig.script_fields.hasOwnProperty(fieldName) + Object.hasOwn(datafeedConfig.script_fields, fieldName) ) { aggregatableFields.push(fieldName); } if ( typeof datafeedConfig?.runtime_mappings === 'object' && - datafeedConfig.runtime_mappings.hasOwnProperty(fieldName) + Object.hasOwn(datafeedConfig.runtime_mappings, fieldName) ) { aggregatableFields.push(fieldName); } @@ -122,7 +122,7 @@ export function fieldsServiceProvider({ asCurrentUser }: IScopedClusterClient) { ) ?? {}; // No need to perform aggregation over the cached fields - const fieldsToAgg = aggregatableFields.filter((field) => !cachedValues.hasOwnProperty(field)); + const fieldsToAgg = aggregatableFields.filter((field) => !Object.hasOwn(cachedValues, field)); if (fieldsToAgg.length === 0) { return cachedValues; @@ -151,12 +151,12 @@ export function fieldsServiceProvider({ asCurrentUser }: IScopedClusterClient) { (obj, field) => { if ( typeof datafeedConfig?.script_fields === 'object' && - datafeedConfig.script_fields.hasOwnProperty(field) + Object.hasOwn(datafeedConfig.script_fields, field) ) { obj[field] = { cardinality: { script: datafeedConfig.script_fields[field].script } }; } else if ( typeof datafeedConfig?.runtime_mappings === 'object' && - datafeedConfig.runtime_mappings.hasOwnProperty(field) + Object.hasOwn(datafeedConfig.runtime_mappings, field) ) { obj[field] = { cardinality: { field } }; runtimeMappings.runtime_mappings = datafeedConfig.runtime_mappings; @@ -350,7 +350,7 @@ export function fieldsServiceProvider({ asCurrentUser }: IScopedClusterClient) { ) ?? {}; // No need to perform aggregation over the cached fields - const fieldsToAgg = aggregatableFields.filter((field) => !cachedValues.hasOwnProperty(field)); + const fieldsToAgg = aggregatableFields.filter((field) => !Object.hasOwn(cachedValues, field)); if (fieldsToAgg.length === 0) { return cachedValues; diff --git a/x-pack/plugins/ml/server/models/job_service/jobs.ts b/x-pack/plugins/ml/server/models/job_service/jobs.ts index d8a0557a90fd3..d9cebc84bb742 100644 --- a/x-pack/plugins/ml/server/models/job_service/jobs.ts +++ b/x-pack/plugins/ml/server/models/job_service/jobs.ts @@ -454,7 +454,7 @@ export function jobsProvider( // de-duplicate calendars for (const cal in calendarsByJobId) { - if (calendarsByJobId.hasOwnProperty(cal)) { + if (Object.hasOwn(calendarsByJobId, cal)) { calendarsByJobId[cal] = uniq(calendarsByJobId[cal]); } } diff --git a/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.ts b/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.ts index c2d9db3749375..de07daf5057e7 100644 --- a/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.ts +++ b/x-pack/plugins/ml/server/models/job_validation/validate_cardinality.ts @@ -98,13 +98,13 @@ const validateFactory = (client: IScopedClusterClient, job: CombinedJob): Valida aggregatableFieldNames = uniqueFieldNames.filter((field) => { if ( typeof datafeedConfig?.script_fields === 'object' && - datafeedConfig?.script_fields.hasOwnProperty(field) + Object.hasOwn(datafeedConfig?.script_fields ?? {}, field) ) { return true; } if ( typeof datafeedConfig?.runtime_mappings === 'object' && - datafeedConfig?.runtime_mappings.hasOwnProperty(field) + Object.hasOwn(datafeedConfig?.runtime_mappings ?? {}, field) ) { return true; } diff --git a/x-pack/plugins/ml/server/models/notifications_service/notifications_service_provider.ts b/x-pack/plugins/ml/server/models/notifications_service/notifications_service_provider.ts index f5cf04915b536..5b6239d034527 100644 --- a/x-pack/plugins/ml/server/models/notifications_service/notifications_service_provider.ts +++ b/x-pack/plugins/ml/server/models/notifications_service/notifications_service_provider.ts @@ -273,7 +273,7 @@ export class NotificationsService { return res.reduce((acc, curr) => { for (const levelKey in curr) { - if (curr.hasOwnProperty(levelKey)) { + if (Object.hasOwn(curr, levelKey)) { acc[levelKey as MlNotificationMessageLevel] += curr[levelKey as MlNotificationMessageLevel]; } diff --git a/x-pack/plugins/monitoring/public/application/contexts/global_state_context.tsx b/x-pack/plugins/monitoring/public/application/contexts/global_state_context.tsx index 44b1fd9f53995..f853252bc69db 100644 --- a/x-pack/plugins/monitoring/public/application/contexts/global_state_context.tsx +++ b/x-pack/plugins/monitoring/public/application/contexts/global_state_context.tsx @@ -49,7 +49,7 @@ export const GlobalStateProvider: FC const initialState: any = globalState.getState(); for (const key in initialState) { - if (!initialState.hasOwnProperty(key)) { + if (!Object.hasOwn(initialState, key)) { continue; } localState[key] = initialState[key]; diff --git a/x-pack/plugins/monitoring/public/components/logstash/pipeline_viewer/models/graph/plugin_vertex.js b/x-pack/plugins/monitoring/public/components/logstash/pipeline_viewer/models/graph/plugin_vertex.js index 03d9fa747df13..4298408eeb657 100644 --- a/x-pack/plugins/monitoring/public/components/logstash/pipeline_viewer/models/graph/plugin_vertex.js +++ b/x-pack/plugins/monitoring/public/components/logstash/pipeline_viewer/models/graph/plugin_vertex.js @@ -59,7 +59,7 @@ export class PluginVertex extends Vertex { } get eventsPerSecond() { - if (!this.eventsPerMillisecond.hasOwnProperty('data')) { + if (!Object.hasOwn(this.eventsPerMillisecond, 'data')) { return this.eventsPerMillisecond * 1000; } @@ -72,7 +72,7 @@ export class PluginVertex extends Vertex { } get latestEventsPerSecond() { - if (!this.eventsPerSecond.hasOwnProperty('data')) { + if (!Object.hasOwn(this.eventsPerSecond, 'data')) { return this.eventsPerSecond; } diff --git a/x-pack/plugins/monitoring/public/lib/form_validation.ts b/x-pack/plugins/monitoring/public/lib/form_validation.ts index f09e9f6015074..4a3633db61f15 100644 --- a/x-pack/plugins/monitoring/public/lib/form_validation.ts +++ b/x-pack/plugins/monitoring/public/lib/form_validation.ts @@ -21,7 +21,7 @@ export function getMissingFieldErrors(data: any, defaultData: any) { const errors: any = {}; for (const key in data) { - if (!data.hasOwnProperty(key)) { + if (!Object.hasOwn(data, key)) { continue; } diff --git a/x-pack/plugins/monitoring/server/lib/alerts/fetch_available_ccs.ts b/x-pack/plugins/monitoring/server/lib/alerts/fetch_available_ccs.ts index 8be48d16463d8..d65c71bab52bf 100644 --- a/x-pack/plugins/monitoring/server/lib/alerts/fetch_available_ccs.ts +++ b/x-pack/plugins/monitoring/server/lib/alerts/fetch_available_ccs.ts @@ -11,7 +11,7 @@ export async function fetchAvailableCcs(esClient: ElasticsearchClient): Promise< const availableCcs = []; const response = await esClient.cluster.remoteInfo(); for (const remoteName in response) { - if (!response.hasOwnProperty(remoteName)) { + if (!Object.hasOwn(response, remoteName)) { continue; } const remoteInfo = response[remoteName]; @@ -26,7 +26,7 @@ export async function fetchAvailableCcsLegacy(callCluster: any): Promise { if (vertex?.stats) { - if (!vertex.stats.hasOwnProperty(stat)) { + if (!Object.hasOwn(vertex.stats, stat)) { vertex.stats[stat] = { data: [] }; } vertex.stats[stat].data?.push([timestamp, vertexStats[stat]]); diff --git a/x-pack/plugins/monitoring/server/telemetry_collection/get_beats_stats.ts b/x-pack/plugins/monitoring/server/telemetry_collection/get_beats_stats.ts index 6b23c04fe9ed6..9a0a8bba0153d 100644 --- a/x-pack/plugins/monitoring/server/telemetry_collection/get_beats_stats.ts +++ b/x-pack/plugins/monitoring/server/telemetry_collection/get_beats_stats.ts @@ -233,7 +233,7 @@ export function processResults( const heartbeatState = hit._source?.beats_state?.state?.heartbeat; if (heartbeatState !== undefined) { - if (!clusters[clusterUuid].hasOwnProperty('heartbeat')) { + if (!Object.hasOwn(clusters[clusterUuid], 'heartbeat')) { clusters[clusterUuid].heartbeat = { monitors: 0, endpoints: 0, @@ -244,7 +244,7 @@ export function processResults( clusterHb.monitors += heartbeatState.monitors; clusterHb.endpoints += heartbeatState.endpoints; for (const proto in heartbeatState) { - if (!heartbeatState.hasOwnProperty(proto)) { + if (!Object.hasOwn(heartbeatState, proto)) { continue; } const val = heartbeatState[proto]; @@ -252,7 +252,7 @@ export function processResults( continue; } - if (!clusterHb.hasOwnProperty(proto)) { + if (!Object.hasOwn(clusterHb, proto)) { clusterHb[proto] = { monitors: 0, endpoints: 0, @@ -265,7 +265,7 @@ export function processResults( const functionbeatState = hit._source?.beats_state?.state?.functionbeat; if (functionbeatState !== undefined) { - if (!clusters[clusterUuid].hasOwnProperty('functionbeat')) { + if (!Object.hasOwn(clusters[clusterUuid], 'functionbeat')) { clusters[clusterUuid].functionbeat = { functions: { count: 0, diff --git a/x-pack/plugins/monitoring/server/telemetry_collection/logstash_agent_monitoring.ts b/x-pack/plugins/monitoring/server/telemetry_collection/logstash_agent_monitoring.ts index eef7637f1b837..9c40bf11b67e5 100644 --- a/x-pack/plugins/monitoring/server/telemetry_collection/logstash_agent_monitoring.ts +++ b/x-pack/plugins/monitoring/server/telemetry_collection/logstash_agent_monitoring.ts @@ -121,14 +121,14 @@ export class LogstashAgentMonitoring implements LogstashMonitoring { } const thisCollectionType = hit._source?.agent?.type || 'agent'; - if (!clusterStats.hasOwnProperty('collection_types')) { + if (!Object.hasOwn(clusterStats, 'collection_types')) { clusterStats.collection_types = {}; } clusterStats.collection_types![thisCollectionType] = (clusterStats.collection_types![thisCollectionType] || 0) + 1; const pipelines = logstashStats?.logstash?.pipelines || []; - if (!clusterStats.hasOwnProperty('pipelines')) { + if (!Object.hasOwn(clusterStats, 'pipelines')) { clusterStats.pipelines = {}; } clusterStats.pipelines!.count = pipelines.length; diff --git a/x-pack/plugins/monitoring/server/telemetry_collection/logstash_metricbeat_monitoring.ts b/x-pack/plugins/monitoring/server/telemetry_collection/logstash_metricbeat_monitoring.ts index 387daa51a67c8..c00c37ad59784 100644 --- a/x-pack/plugins/monitoring/server/telemetry_collection/logstash_metricbeat_monitoring.ts +++ b/x-pack/plugins/monitoring/server/telemetry_collection/logstash_metricbeat_monitoring.ts @@ -118,7 +118,7 @@ export class LogstashMetricbeatMonitoring implements LogstashMonitoring { clusters[clusterUuid].versions = mapToList(a, 'version'); const thisCollectionType = hit._source?.agent?.type || 'metricbeat'; - if (!clusterStats.hasOwnProperty('collection_types')) { + if (!Object.hasOwn(clusterStats, 'collection_types')) { clusterStats.collection_types = {}; } clusterStats.collection_types![thisCollectionType] = @@ -128,7 +128,7 @@ export class LogstashMetricbeatMonitoring implements LogstashMonitoring { pipelines.forEach((pipeline) => { const thisQueueType = pipeline.queue?.type; if (thisQueueType !== undefined) { - if (!clusterStats.hasOwnProperty('queues')) { + if (!Object.hasOwn(clusterStats, 'queues')) { clusterStats.queues = {}; } clusterStats.queues![thisQueueType] = (clusterStats.queues![thisQueueType] || 0) + 1; @@ -220,7 +220,7 @@ export class LogstashMetricbeatMonitoring implements LogstashMonitoring { } else { pipelineConfig = 'file'; } - if (!pipelineStats.hasOwnProperty('sources')) { + if (!Object.hasOwn(pipelineStats, 'sources')) { pipelineStats.sources = {}; } pipelineStats.sources![pipelineConfig] = true; diff --git a/x-pack/plugins/monitoring/server/telemetry_collection/logstash_self_monitoring.ts b/x-pack/plugins/monitoring/server/telemetry_collection/logstash_self_monitoring.ts index bc31c576d154c..352f764186d39 100644 --- a/x-pack/plugins/monitoring/server/telemetry_collection/logstash_self_monitoring.ts +++ b/x-pack/plugins/monitoring/server/telemetry_collection/logstash_self_monitoring.ts @@ -104,7 +104,7 @@ export class LogstashSelfMonitoring implements LogstashMonitoring { // Internal Collection has no agent field, so default to 'internal_collection' const thisCollectionType = hit._source?.agent?.type || 'internal_collection'; - if (!clusterStats.hasOwnProperty('collection_types')) { + if (!Object.hasOwn(clusterStats, 'collection_types')) { clusterStats.collection_types = {}; } clusterStats.collection_types![thisCollectionType] = @@ -114,7 +114,7 @@ export class LogstashSelfMonitoring implements LogstashMonitoring { pipelines.forEach((pipeline) => { const thisQueueType = pipeline.queue?.type; if (thisQueueType !== undefined) { - if (!clusterStats.hasOwnProperty('queues')) { + if (!Object.hasOwn(clusterStats, 'queues')) { clusterStats.queues = {}; } clusterStats.queues![thisQueueType] = (clusterStats.queues![thisQueueType] || 0) + 1; @@ -206,7 +206,7 @@ export class LogstashSelfMonitoring implements LogstashMonitoring { } else { pipelineConfig = 'file'; } - if (!pipelineStats.hasOwnProperty('sources')) { + if (!Object.hasOwn(pipelineStats, 'sources')) { pipelineStats.sources = {}; } pipelineStats.sources![pipelineConfig] = true; diff --git a/x-pack/plugins/monitoring_collection/server/plugin.ts b/x-pack/plugins/monitoring_collection/server/plugin.ts index fdfe532ced5db..828a5e5fc49b2 100644 --- a/x-pack/plugins/monitoring_collection/server/plugin.ts +++ b/x-pack/plugins/monitoring_collection/server/plugin.ts @@ -63,7 +63,7 @@ export class MonitoringCollectionPlugin implements Plugin(metric: Metric) => { - if (this.metrics.hasOwnProperty(metric.type)) { + if (Object.hasOwn(this.metrics, metric.type)) { this.logger.warn( `Skipping registration of metric type '${metric.type}'. This type has already been registered.` ); diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.tsx index 706340fb32757..dcfbe3d365102 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/settings/agent_configurations/agent_configuration_create_edit/settings_page/settings_page.tsx @@ -229,7 +229,7 @@ function renderSettings({ .filter(filterByAgent(newConfig.agent_name as AgentName)) .map((setting) => ( { for (const key in metric) { - if (metric.hasOwnProperty(key)) { + if (Object.hasOwn(metric, key)) { const metricsKey = key as MetricsKey; const value = metric[metricsKey]; diff --git a/x-pack/plugins/observability_solution/apm_data_access/kibana.jsonc b/x-pack/plugins/observability_solution/apm_data_access/kibana.jsonc index ede5cd53c9a6c..b898b465a91c1 100644 --- a/x-pack/plugins/observability_solution/apm_data_access/kibana.jsonc +++ b/x-pack/plugins/observability_solution/apm_data_access/kibana.jsonc @@ -8,7 +8,7 @@ "browser": false, "configPath": ["xpack", "apm_data_access"], "requiredPlugins": ["data"], - "optionalPlugins": [], + "optionalPlugins": ["security"], "requiredBundles": [] } } diff --git a/x-pack/plugins/observability_solution/apm_data_access/server/index.ts b/x-pack/plugins/observability_solution/apm_data_access/server/index.ts index 9dfcc5a454cc5..8ff76df2334ab 100644 --- a/x-pack/plugins/observability_solution/apm_data_access/server/index.ts +++ b/x-pack/plugins/observability_solution/apm_data_access/server/index.ts @@ -91,6 +91,9 @@ export type { APMEventESSearchRequest, APMLogEventESSearchRequest, DocumentSourcesRequest, + ApmDataAccessPrivilegesCheck, + HostNamesRequest, + GetDocumentTypeParams, } from './types'; export { APMEventClient } from './lib/helpers'; diff --git a/x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.ts b/x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.ts new file mode 100644 index 0000000000000..6b8e734a10b4e --- /dev/null +++ b/x-pack/plugins/observability_solution/apm_data_access/server/lib/check_privileges.ts @@ -0,0 +1,42 @@ +/* + * 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 { KibanaRequest } from '@kbn/core-http-server'; +import { SecurityPluginStart } from '@kbn/security-plugin-types-server'; +import { mapValues } from 'lodash'; +import { APMIndices } from '..'; + +export interface ApmDataAccessPrivilegesCheck { + request: KibanaRequest; + security?: SecurityPluginStart; + getApmIndices: () => Promise; +} + +export async function checkPrivileges({ + request, + getApmIndices, + security, +}: ApmDataAccessPrivilegesCheck) { + const authorization = security?.authz; + if (!authorization) { + return true; + } + + const [apmIndices, checkPrivilegesFn] = await Promise.all([ + getApmIndices(), + authorization.checkPrivilegesDynamicallyWithRequest(request), + ]); + + const { hasAllRequested } = await checkPrivilegesFn({ + elasticsearch: { + cluster: [], + index: mapValues(apmIndices, () => ['read']), + }, + }); + + return hasAllRequested; +} diff --git a/x-pack/plugins/observability_solution/apm_data_access/server/plugin.ts b/x-pack/plugins/observability_solution/apm_data_access/server/plugin.ts index 71b878794180f..680079d080c82 100644 --- a/x-pack/plugins/observability_solution/apm_data_access/server/plugin.ts +++ b/x-pack/plugins/observability_solution/apm_data_access/server/plugin.ts @@ -11,51 +11,73 @@ import { CoreStart, Plugin, SavedObjectsClientContract, + Logger, } from '@kbn/core/server'; import { APMDataAccessConfig } from '.'; -import { ApmDataAccessPluginSetup, ApmDataAccessPluginStart } from './types'; +import { + ApmDataAccessPluginSetup, + ApmDataAccessPluginStart, + ApmDataAccessServerDependencies, +} from './types'; import { migrateLegacyAPMIndicesToSpaceAware } from './saved_objects/migrations/migrate_legacy_apm_indices_to_space_aware'; import { apmIndicesSavedObjectDefinition, getApmIndicesSavedObject, } from './saved_objects/apm_indices'; import { getServices } from './services/get_services'; +import { ApmDataAccessPrivilegesCheck, checkPrivileges } from './lib/check_privileges'; export class ApmDataAccessPlugin implements Plugin { - constructor(private readonly initContext: PluginInitializerContext) { - this.initContext = initContext; + public server?: ApmDataAccessServerDependencies; + public config: APMDataAccessConfig; + public logger: Logger; + + constructor(initContext: PluginInitializerContext) { + this.config = initContext.config.get(); + this.logger = initContext.logger.get(); } - public setup(core: CoreSetup): ApmDataAccessPluginSetup { - // retrieve APM indices from config - const apmDataAccessConfig = this.initContext.config.get(); - const apmIndicesFromConfigFile = apmDataAccessConfig.indices; + getApmIndices = async (savedObjectsClient: SavedObjectsClientContract) => { + const apmIndicesFromSavedObject = await getApmIndicesSavedObject(savedObjectsClient); + return { ...this.config.indices, ...apmIndicesFromSavedObject }; + }; - const getApmIndices = async (savedObjectsClient: SavedObjectsClientContract) => { - const apmIndicesFromSavedObject = await getApmIndicesSavedObject(savedObjectsClient); - return { ...apmIndicesFromConfigFile, ...apmIndicesFromSavedObject }; - }; + public setup(core: CoreSetup): ApmDataAccessPluginSetup { // register saved object core.savedObjects.registerType(apmIndicesSavedObjectDefinition); // expose return { - apmIndicesFromConfigFile, - getApmIndices, + apmIndicesFromConfigFile: this.config.indices, + getApmIndices: this.getApmIndices, getServices, }; } - public start(core: CoreStart) { - const logger = this.initContext.logger.get(); + public start(core: CoreStart, plugins: ApmDataAccessServerDependencies) { // TODO: remove in 9.0 - migrateLegacyAPMIndicesToSpaceAware({ coreStart: core, logger }).catch((e) => { - logger.error('Failed to run migration making APM indices space aware'); - logger.error(e); + migrateLegacyAPMIndicesToSpaceAware({ coreStart: core, logger: this.logger }).catch((e) => { + this.logger.error('Failed to run migration making APM indices space aware'); + this.logger.error(e); }); - return {}; + + const getApmIndicesWithInternalUserFn = async () => { + const soClient = core.savedObjects.createInternalRepository(); + return this.getApmIndices(soClient); + }; + + const startServices = { + hasPrivileges: ({ request }: Pick) => + checkPrivileges({ + request, + getApmIndices: getApmIndicesWithInternalUserFn, + security: plugins.security, + }), + }; + + return { ...startServices }; } public stop() {} diff --git a/x-pack/plugins/observability_solution/apm_data_access/server/services/get_document_type_config/index.ts b/x-pack/plugins/observability_solution/apm_data_access/server/services/get_document_type_config/index.ts new file mode 100644 index 0000000000000..52bf53291fb0c --- /dev/null +++ b/x-pack/plugins/observability_solution/apm_data_access/server/services/get_document_type_config/index.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { getBucketSize, type TimeRangeMetadata } from '../../../common'; +import { getPreferredBucketSizeAndDataSource } from '../../../common/utils/get_preferred_bucket_size_and_data_source'; +import { ApmDocumentType } from '../../../common/document_type'; +import { getConfigForDocumentType } from '../../lib/helpers/create_es_client/document_type'; + +export interface GetDocumentTypeParams { + start: number; + end: number; + documentSources: TimeRangeMetadata['sources']; + documentTypes: ApmDocumentType[]; + numBuckets?: number; +} + +export function getDocumentTypeConfig({ + start, + end, + numBuckets, + documentTypes, + documentSources, +}: GetDocumentTypeParams) { + const preferredSource = getPreferredBucketSizeAndDataSource({ + sources: documentSources.filter((s) => documentTypes.includes(s.documentType)), + bucketSizeInSeconds: getBucketSize({ start, end, numBuckets }).bucketSize, + }); + const documentTypeConfig = getConfigForDocumentType(preferredSource.source.documentType); + + return { preferredSource, documentTypeConfig }; +} diff --git a/x-pack/plugins/observability_solution/apm_data_access/server/services/get_host_names/index.ts b/x-pack/plugins/observability_solution/apm_data_access/server/services/get_host_names/index.ts index 10507a0803d9a..938ec68a7fc5a 100644 --- a/x-pack/plugins/observability_solution/apm_data_access/server/services/get_host_names/index.ts +++ b/x-pack/plugins/observability_solution/apm_data_access/server/services/get_host_names/index.ts @@ -8,6 +8,7 @@ import { estypes } from '@elastic/elasticsearch'; import { rangeQuery } from '@kbn/observability-plugin/server'; import { HOST_NAME } from '@kbn/apm-types/es_fields'; +import { castArray } from 'lodash'; import { getBucketSize, type TimeRangeMetadata } from '../../../common'; import { getPreferredBucketSizeAndDataSource } from '../../../common/utils/get_preferred_bucket_size_and_data_source'; import { ApmDocumentType } from '../../../common/document_type'; @@ -16,7 +17,7 @@ import type { ApmDataAccessServicesParams } from '../get_services'; const MAX_SIZE = 1000; export interface HostNamesRequest { - query: estypes.QueryDslQueryContainer; + query?: estypes.QueryDslQueryContainer; kuery?: string; start: number; end: number; @@ -47,7 +48,7 @@ export function createGetHostNames({ apmEventClient }: ApmDataAccessServicesPara size: 0, query: { bool: { - filter: [query, ...rangeQuery(start, end)], + filter: [...castArray(query), ...rangeQuery(start, end)], }, }, aggs: { @@ -55,6 +56,9 @@ export function createGetHostNames({ apmEventClient }: ApmDataAccessServicesPara terms: { field: HOST_NAME, size: Math.min(size, MAX_SIZE), + order: { + _key: 'asc', + }, }, }, }, diff --git a/x-pack/plugins/observability_solution/apm_data_access/server/services/get_services.ts b/x-pack/plugins/observability_solution/apm_data_access/server/services/get_services.ts index 1d72a1ae8c009..03a31a1cc4534 100644 --- a/x-pack/plugins/observability_solution/apm_data_access/server/services/get_services.ts +++ b/x-pack/plugins/observability_solution/apm_data_access/server/services/get_services.ts @@ -7,6 +7,7 @@ import { APMEventClient } from '../lib/helpers/create_es_client/create_apm_event_client'; import { createGetDocumentSources } from './get_document_sources'; +import { getDocumentTypeConfig } from './get_document_type_config'; import { createGetHostNames } from './get_host_names'; export interface ApmDataAccessServicesParams { @@ -17,5 +18,6 @@ export function getServices(params: ApmDataAccessServicesParams) { return { getDocumentSources: createGetDocumentSources(params), getHostNames: createGetHostNames(params), + getDocumentTypeConfig, }; } diff --git a/x-pack/plugins/observability_solution/apm_data_access/server/types.ts b/x-pack/plugins/observability_solution/apm_data_access/server/types.ts index c6c3d316a9685..f10c23c1fd994 100644 --- a/x-pack/plugins/observability_solution/apm_data_access/server/types.ts +++ b/x-pack/plugins/observability_solution/apm_data_access/server/types.ts @@ -6,8 +6,10 @@ */ import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; -import { APMIndices } from '.'; +import type { SecurityPluginStart } from '@kbn/security-plugin-types-server'; +import type { APMIndices } from '.'; import { getServices } from './services/get_services'; +import type { ApmDataAccessPrivilegesCheck } from './lib/check_privileges'; export interface ApmDataAccessPluginSetup { apmIndicesFromConfigFile: APMIndices; @@ -15,15 +17,25 @@ export interface ApmDataAccessPluginSetup { getServices: typeof getServices; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface ApmDataAccessPluginStart {} +export interface ApmDataAccessServerDependencies { + security?: SecurityPluginStart; +} + +export interface ApmDataAccessPluginStart { + hasPrivileges: (params: Pick) => Promise; +} +export interface ApmDataAccessServerDependencies { + security?: SecurityPluginStart; +} export type ApmDataAccessServices = ReturnType; export type { ApmDataAccessServicesParams } from './services/get_services'; export type { DocumentSourcesRequest } from './services/get_document_sources'; export type { HostNamesRequest } from './services/get_host_names'; +export type { GetDocumentTypeParams } from './services/get_document_type_config'; export type { APMEventClientConfig, APMEventESSearchRequest, APMLogEventESSearchRequest, } from './lib/helpers'; +export type { ApmDataAccessPrivilegesCheck }; diff --git a/x-pack/plugins/observability_solution/apm_data_access/tsconfig.json b/x-pack/plugins/observability_solution/apm_data_access/tsconfig.json index cdcfd3ec3d023..589d08ba56b4e 100644 --- a/x-pack/plugins/observability_solution/apm_data_access/tsconfig.json +++ b/x-pack/plugins/observability_solution/apm_data_access/tsconfig.json @@ -17,6 +17,8 @@ "@kbn/es-types", "@kbn/apm-types", "@kbn/core-http-server-mocks", - "@kbn/apm-utils" + "@kbn/apm-utils", + "@kbn/core-http-server", + "@kbn/security-plugin-types-server" ] } diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/api_types.ts b/x-pack/plugins/observability_solution/dataset_quality/common/api_types.ts index a88b2d531b9bc..f6ba40b8b8bcf 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/api_types.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/api_types.ts @@ -37,15 +37,15 @@ export const dataStreamStatRt = rt.intersection([ export type DataStreamStat = rt.TypeOf; -export const dashboardRT = rt.type({ +export const integrationDashboardRT = rt.type({ id: rt.string, title: rt.string, }); -export type Dashboard = rt.TypeOf; +export type Dashboard = rt.TypeOf; export const integrationDashboardsRT = rt.type({ - dashboards: rt.array(dashboardRT), + dashboards: rt.array(integrationDashboardRT), }); export type IntegrationDashboardsResponse = rt.TypeOf; @@ -116,6 +116,7 @@ export type DegradedFieldResponse = rt.TypeOf; diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/data_stream_details/errors.ts b/x-pack/plugins/observability_solution/dataset_quality/common/data_stream_details/errors.ts deleted file mode 100644 index eb74f08ab1336..0000000000000 --- a/x-pack/plugins/observability_solution/dataset_quality/common/data_stream_details/errors.ts +++ /dev/null @@ -1,18 +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. - */ - -export class GetDataStreamsDetailsError extends Error { - readonly statusCode?: number; - - constructor(message: string, statusCode?: number) { - super(message); - Object.setPrototypeOf(this, new.target.prototype); - this.name = 'GetDataStreamsDetailsError'; - - this.statusCode = statusCode; - } -} diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/data_stream_details/index.ts b/x-pack/plugins/observability_solution/dataset_quality/common/data_stream_details/index.ts index 8761ef1b52a32..6cc0ccaa93a6d 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/data_stream_details/index.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/data_stream_details/index.ts @@ -5,4 +5,4 @@ * 2.0. */ -export * from './errors'; +export * from './types'; diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/errors.ts b/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/errors.ts deleted file mode 100644 index aa68ed0b5972f..0000000000000 --- a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/errors.ts +++ /dev/null @@ -1,17 +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. - */ - -export class GetDataStreamsStatsError extends Error { - readonly statusCode?: number; - - constructor(message: string, statusCode?: number) { - super(message); - Object.setPrototypeOf(this, new.target.prototype); - this.name = 'GetDataStreamsStatsError'; - this.statusCode = statusCode; - } -} diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/index.ts b/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/index.ts index 28c7b0a8c274f..6cc0ccaa93a6d 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/index.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/index.ts @@ -6,4 +6,3 @@ */ export * from './types'; -export * from './errors'; diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/types.ts b/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/types.ts index 9fe23f6ceef6f..1963c73d263e7 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/types.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/data_streams_stats/types.ts @@ -61,8 +61,6 @@ export type GetDataStreamDetailsResponse = export type GetNonAggregatableDataStreamsParams = APIClientRequestParamsOf<`GET /internal/dataset_quality/data_streams/non_aggregatable`>['params']['query']; -export type GetNonAggregatableDataStreamsResponse = - APIReturnType<`GET /internal/dataset_quality/data_streams/non_aggregatable`>; export type GetIntegrationDashboardsParams = APIClientRequestParamsOf<`GET /internal/dataset_quality/integrations/{integration}/dashboards`>['params']['path']; diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/errors.ts b/x-pack/plugins/observability_solution/dataset_quality/common/errors.ts new file mode 100644 index 0000000000000..aecca58aebb5c --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/common/errors.ts @@ -0,0 +1,25 @@ +/* + * 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 { ApiErrorResponse } from './fetch_options'; + +export class DatasetQualityError extends Error { + readonly statusCode?: number; + readonly originalMessage?: string; + + constructor(message: string, originalError?: ApiErrorResponse) { + super(message); + Object.setPrototypeOf(this, new.target.prototype); + this.name = 'DatasetQualityError'; + + if (originalError && originalError.body) { + const { statusCode, message: originalMessage } = originalError.body; + this.statusCode = statusCode; + this.originalMessage = originalMessage; + } + } +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/fetch_options.ts b/x-pack/plugins/observability_solution/dataset_quality/common/fetch_options.ts index 3a72a72762dee..14da6902ce95c 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/fetch_options.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/fetch_options.ts @@ -12,3 +12,12 @@ export type FetchOptions = Omit & { method?: string; body?: any; }; + +export interface ApiErrorResponse { + body: { + statusCode: number; + error: string; + message: string; + attributes: object; + }; +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/index.ts b/x-pack/plugins/observability_solution/dataset_quality/common/index.ts index b015815eeaacc..a4cb63ef339bb 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/index.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/index.ts @@ -8,3 +8,4 @@ export type { DatasetQualityConfig } from './plugin_config'; export type { FetchOptions } from './fetch_options'; export type { APIClientRequestParamsOf, APIReturnType } from './rest'; +export { indexNameToDataStreamParts } from './utils'; diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/translations.ts b/x-pack/plugins/observability_solution/dataset_quality/common/translations.ts index 6ab0fde0f033d..959932bd0c5ac 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/translations.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/translations.ts @@ -43,15 +43,15 @@ export const flyoutCancelText = i18n.translate('xpack.datasetQuality.flyoutCance defaultMessage: 'Cancel', }); -export const flyoutOpenInLogsExplorerText = i18n.translate( - 'xpack.datasetQuality.flyoutOpenInLogsExplorerText', +export const openInLogsExplorerText = i18n.translate( + 'xpack.datasetQuality.details.openInLogsExplorerText', { defaultMessage: 'Open in Logs Explorer', } ); -export const flyoutOpenInDiscoverText = i18n.translate( - 'xpack.datasetQuality.flyoutOpenInDiscoverText', +export const openInDiscoverText = i18n.translate( + 'xpack.datasetQuality.details.openInDiscoverText', { defaultMessage: 'Open in Discover', } @@ -64,20 +64,6 @@ export const flyoutDatasetDetailsText = i18n.translate( } ); -export const flyoutDatasetLastActivityText = i18n.translate( - 'xpack.datasetQuality.flyoutDatasetLastActivityText', - { - defaultMessage: 'Last Activity', - } -); - -export const flyoutDatasetCreatedOnText = i18n.translate( - 'xpack.datasetQuality.flyoutDatasetCreatedOnText', - { - defaultMessage: 'Created on', - } -); - export const flyoutIntegrationDetailsText = i18n.translate( 'xpack.datasetQuality.flyoutIntegrationDetailsText', { @@ -85,13 +71,6 @@ export const flyoutIntegrationDetailsText = i18n.translate( } ); -export const flyoutIntegrationVersionText = i18n.translate( - 'xpack.datasetQuality.flyoutIntegrationVersionText', - { - defaultMessage: 'Version', - } -); - export const flyoutIntegrationNameText = i18n.translate( 'xpack.datasetQuality.flyoutIntegrationNameText', { @@ -103,7 +82,7 @@ export const flyoutSummaryText = i18n.translate('xpack.datasetQuality.flyoutSumm defaultMessage: 'Summary', }); -export const flyoutDegradedDocsText = i18n.translate( +export const overviewDegradedDocsText = i18n.translate( 'xpack.datasetQuality.flyout.degradedDocsTitle', { defaultMessage: 'Degraded docs', @@ -147,34 +126,6 @@ export const flyoutHostsText = i18n.translate('xpack.datasetQuality.flyoutHostsT export const flyoutShowAllText = i18n.translate('xpack.datasetQuality.flyoutShowAllText', { defaultMessage: 'Show all', }); - -export const flyoutImprovementText = i18n.translate( - 'xpack.datasetQuality.flyoutDegradedFieldsSectionTitle', - { - defaultMessage: 'Degraded fields', - } -); - -export const flyoutImprovementTooltip = i18n.translate( - 'xpack.datasetQuality.flyoutDegradedFieldsSectionTooltip', - { - defaultMessage: 'A partial list of degraded fields found in your data set.', - } -); - -export const flyoutDegradedFieldsTableLoadingText = i18n.translate( - 'xpack.datasetQuality.flyoutDegradedFieldsTableLoadingText', - { - defaultMessage: 'Loading degraded fields', - } -); - -export const flyoutDegradedFieldsTableNoData = i18n.translate( - 'xpack.datasetQuality.flyoutDegradedFieldsTableNoData', - { - defaultMessage: 'No degraded fields found', - } -); /* Summary Panel */ @@ -271,3 +222,155 @@ export const fullDatasetNameDescription = i18n.translate( defaultMessage: 'Turn on to show the actual data set names used to store the documents.', } ); + +export const flyoutImprovementText = i18n.translate( + 'xpack.datasetQuality.flyoutDegradedFieldsSectionTitle', + { + defaultMessage: 'Degraded fields', + } +); + +export const flyoutImprovementTooltip = i18n.translate( + 'xpack.datasetQuality.flyoutDegradedFieldsSectionTooltip', + { + defaultMessage: 'A partial list of degraded fields found in your data set.', + } +); + +/* +Dataset Quality Details +*/ + +export const overviewHeaderTitle = i18n.translate('xpack.datasetQuality.details.overviewTitle', { + defaultMessage: 'Overview', +}); + +export const overviewTitleTooltip = i18n.translate( + 'xpack.datasetQuality.details.overviewTitleTooltip', + { + defaultMessage: 'Stats of the data set within the selected time range.', + } +); + +export const overviewPanelTitleDocuments = i18n.translate( + 'xpack.datasetQuality.details.overviewPanel.documents.title', + { + defaultMessage: 'Documents', + } +); + +export const overviewPanelDocumentsIndicatorTotalCount = i18n.translate( + 'xpack.datasetQuality.details.overviewPanel.documents.totalCount', + { + defaultMessage: 'Total count', + } +); + +export const overviewPanelDocumentsIndicatorSize = i18n.translate( + 'xpack.datasetQuality.details.overviewPanel.documents.size', + { + defaultMessage: 'Size', + } +); + +export const overviewPanelTitleResources = i18n.translate( + 'xpack.datasetQuality.details.overviewPanel.resources.title', + { + defaultMessage: 'Resources', + } +); + +export const overviewPanelResourcesIndicatorServices = i18n.translate( + 'xpack.datasetQuality.details.overviewPanel.resources.services', + { + defaultMessage: 'Services', + } +); + +export const overviewPanelResourcesIndicatorSize = i18n.translate( + 'xpack.datasetQuality.details.overviewPanel.resources.hosts', + { + defaultMessage: 'Hosts', + } +); + +export const overviewPanelTitleDatasetQuality = i18n.translate( + 'xpack.datasetQuality.details.overviewPanel.datasetQuality.title', + { + defaultMessage: 'Data set quality', + } +); + +export const overviewPanelDatasetQualityIndicatorDegradedDocs = i18n.translate( + 'xpack.datasetQuality.details.overviewPanel.datasetQuality.degradedDocs', + { + defaultMessage: 'Degraded docs', + } +); + +export const overviewDegradedFieldsTableLoadingText = i18n.translate( + 'xpack.datasetQuality.details.degradedFieldsTableLoadingText', + { + defaultMessage: 'Loading degraded fields', + } +); + +export const overviewDegradedFieldsTableNoData = i18n.translate( + 'xpack.datasetQuality.details.degradedFieldsTableNoData', + { + defaultMessage: 'No degraded fields found', + } +); + +export const overviewDegradedFieldsSectionTitle = i18n.translate( + 'xpack.datasetQuality.detail.degradedFieldsSectionTitle', + { + defaultMessage: 'Quality issues', + } +); + +export const overviewDegradedFieldsSectionTitleTooltip = i18n.translate( + 'xpack.datasetQuality.details.degradedFieldsSectionTooltip', + { + defaultMessage: 'A partial list of quality issues found in your data set.', + } +); + +export const overviewQualityIssuesAccordionTechPreviewBadge = i18n.translate( + 'xpack.datasetQuality.details.overviewQualityIssuesAccordionTechPreviewBadge', + { + defaultMessage: 'TECH PREVIEW', + } +); + +export const detailsHeaderTitle = i18n.translate('xpack.datasetQuality.details.detailsTitle', { + defaultMessage: 'Details', +}); + +export const datasetLastActivityText = i18n.translate( + 'xpack.datasetQuality.details.datasetLastActivityText', + { + defaultMessage: 'Last Activity', + } +); + +export const datasetCreatedOnText = i18n.translate( + 'xpack.datasetQuality.details.datasetCreatedOnText', + { + defaultMessage: 'Created on', + } +); + +export const integrationNameText = i18n.translate( + 'xpack.datasetQuality.details.integrationnameText', + { + defaultMessage: 'Integration', + } +); + +export const integrationVersionText = i18n.translate( + 'xpack.datasetQuality.details.integrationVersionText', + { + defaultMessage: 'Version', + } +); diff --git a/x-pack/plugins/observability_solution/dataset_quality/common/types/common.ts b/x-pack/plugins/observability_solution/dataset_quality/common/types/common.ts index 82d7b64e25f63..48d19ac0f4086 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/common/types/common.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/common/types/common.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { RefreshInterval, TimeRange } from '@kbn/data-plugin/common'; import { DataStreamStatType } from '../data_streams_stats'; import { Integration } from '../data_streams_stats/integration'; @@ -24,3 +25,16 @@ export interface BasicDataStream { namespace: string; integration?: Integration; } + +export interface TableCriteria { + page: number; + rowsPerPage: number; + sort: { + field: TSortField; + direction: SortDirection; + }; +} + +export type TimeRangeConfig = Pick & { + refresh: RefreshInterval; +}; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/common/descriptive_switch.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/common/descriptive_switch.tsx index a7db9596b8534..1bacebed91c0b 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/common/descriptive_switch.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/common/descriptive_switch.tsx @@ -13,6 +13,7 @@ interface DescriptiveSwitchProps { checked: boolean; tooltipText: string; onToggle: () => void; + testSubject: string; } export const DescriptiveSwitch = ({ @@ -20,10 +21,18 @@ export const DescriptiveSwitch = ({ checked, tooltipText, onToggle, + testSubject, }: DescriptiveSwitchProps) => { return ( - + {label} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/dataset_quality.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/dataset_quality.tsx index 8ae6f1f74bd2e..4c44effcce8bc 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/dataset_quality.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/dataset_quality.tsx @@ -12,7 +12,7 @@ import { PerformanceContextProvider } from '@kbn/ebt-tools'; import { DatasetQualityContext, DatasetQualityContextValue } from './context'; import { useKibanaContextForPluginProvider } from '../../utils'; import { DatasetQualityStartDeps } from '../../types'; -import { DatasetQualityController } from '../../controller'; +import { DatasetQualityController } from '../../controller/dataset_quality'; import { ITelemetryClient } from '../../services/telemetry'; export interface DatasetQualityProps { diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/columns.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/columns.tsx index 515307df1a200..bea56c8957fa4 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/columns.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/columns.tsx @@ -18,6 +18,7 @@ import { EuiText, formatNumber, EuiSkeletonRectangle, + EuiTableHeader, } from '@elastic/eui'; import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import { ES_FIELD_TYPES, KBN_FIELD_TYPES } from '@kbn/field-types'; @@ -37,6 +38,7 @@ import { PrivilegesWarningIconWrapper, IntegrationIcon } from '../../common'; import { useRedirectLink } from '../../../hooks'; import { FlyoutDataset } from '../../../state_machines/dataset_quality_controller'; import { DegradedDocsPercentageLink } from './degraded_docs_percentage_link'; +import { TimeRangeConfig } from '../../../../common/types'; const expandDatasetAriaLabel = i18n.translate('xpack.datasetQuality.expandLabel', { defaultMessage: 'Expand', @@ -167,6 +169,7 @@ export const getDatasetQualityTableColumns = ({ showFullDatasetNames, isSizeStatsAvailable, isActiveDataset, + timeRange, }: { fieldFormats: FieldFormatsStart; canUserMonitorDataset: boolean; @@ -178,6 +181,7 @@ export const getDatasetQualityTableColumns = ({ isSizeStatsAvailable: boolean; openFlyout: (selectedDataset: FlyoutDataset) => void; isActiveDataset: (lastActivity: number) => boolean; + timeRange: TimeRangeConfig; }): Array> => { return [ { @@ -205,7 +209,9 @@ export const getDatasetQualityTableColumns = ({ `, }, { - name: nameColumnName, + name: ( + {nameColumnName} + ), field: 'title', sortable: true, render: (title: string, dataStreamStat: DataStreamStat) => { @@ -227,7 +233,11 @@ export const getDatasetQualityTableColumns = ({ }, }, { - name: namespaceColumnName, + name: ( + + {namespaceColumnName} + + ), field: 'namespace', sortable: true, render: (_, dataStreamStat: DataStreamStat) => ( @@ -238,7 +248,11 @@ export const getDatasetQualityTableColumns = ({ ...(isSizeStatsAvailable && canUserMonitorDataset && canUserMonitorAnyDataStream ? [ { - name: sizeColumnName, + name: ( + + {sizeColumnName} + + ), field: 'sizeBytes', sortable: true, render: (_: any, dataStreamStat: DataStreamStat) => { @@ -267,12 +281,14 @@ export const getDatasetQualityTableColumns = ({ : []), { name: ( - - - {`${datasetQualityColumnName} `} - - - + + + + {`${datasetQualityColumnName} `} + + + + ), field: 'degradedDocs.percentage', sortable: true, @@ -283,12 +299,14 @@ export const getDatasetQualityTableColumns = ({ }, { name: ( - - - {`${degradedDocsColumnName} `} - - - + + + + {`${degradedDocsColumnName} `} + + + + ), field: 'degradedDocs.percentage', sortable: true, @@ -296,6 +314,7 @@ export const getDatasetQualityTableColumns = ({ ), width: '140px', @@ -303,7 +322,11 @@ export const getDatasetQualityTableColumns = ({ ...(canUserMonitorDataset && canUserMonitorAnyDataStream ? [ { - name: lastActivityColumnName, + name: ( + + {lastActivityColumnName} + + ), field: 'lastActivity', render: (timestamp: number, { userPrivileges, title }: DataStreamStat) => ( ( - + ), width: '100px', }, @@ -349,13 +376,16 @@ export const getDatasetQualityTableColumns = ({ const RedirectLink = ({ dataStreamStat, title, + timeRange, }: { dataStreamStat: DataStreamStat; title: string; + timeRange: TimeRangeConfig; }) => { const redirectLinkProps = useRedirectLink({ dataStreamStat, telemetry: { page: 'main', navigationSource: NavigationSource.Table }, + timeRangeConfig: timeRange, }); return ( diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/degraded_docs_percentage_link.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/degraded_docs_percentage_link.tsx index 9e8fb79168fd4..54c393323ccfd 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/degraded_docs_percentage_link.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/degraded_docs_percentage_link.tsx @@ -12,13 +12,16 @@ import { NavigationSource } from '../../../services/telemetry'; import { useRedirectLink } from '../../../hooks'; import { QualityPercentageIndicator } from '../../quality_indicator'; import { DataStreamStat } from '../../../../common/data_streams_stats/data_stream_stat'; +import { TimeRangeConfig } from '../../../../common/types'; export const DegradedDocsPercentageLink = ({ isLoading, dataStreamStat, + timeRange, }: { isLoading: boolean; dataStreamStat: DataStreamStat; + timeRange: TimeRangeConfig; }) => { const { degradedDocs: { percentage, count }, @@ -31,6 +34,7 @@ export const DegradedDocsPercentageLink = ({ page: 'main', navigationSource: NavigationSource.Table, }, + timeRangeConfig: timeRange, }); return ( diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/table.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/table.tsx index 9316573e237e0..5bd8783fd0684 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/table.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality/table/table.tsx @@ -62,6 +62,7 @@ export const Table = () => { { /> {canUserMonitorDataset && canUserMonitorAnyDataStream && ( + ) : ( + + +

      + + + +
      + + + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/dataset_summary.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/dataset_summary.tsx new file mode 100644 index 0000000000000..17032d7866d05 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/dataset_summary.tsx @@ -0,0 +1,95 @@ +/* + * 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, { Fragment } from 'react'; +import { ES_FIELD_TYPES, KBN_FIELD_TYPES } from '@kbn/field-types'; +import { EuiBadge, EuiFlexGroup, EuiPanel, EuiText } from '@elastic/eui'; +import { css } from '@emotion/react'; +import { IntegrationActionsMenu } from './integration_actions_menu'; +import { + datasetCreatedOnText, + datasetLastActivityText, + integrationNameText, + integrationVersionText, +} from '../../../../common/translations'; +import { FieldsList } from './fields_list'; +import { useDatasetQualityDetailsState } from '../../../hooks'; +import { IntegrationIcon } from '../../common'; + +export function DatasetSummary() { + const { fieldFormats, dataStreamSettings, dataStreamDetails, loadingState, integrationDetails } = + useDatasetQualityDetailsState(); + const dataFormatter = fieldFormats.getDefaultInstance(KBN_FIELD_TYPES.DATE, [ + ES_FIELD_TYPES.DATE, + ]); + const { + dataStreamDetailsLoading, + dataStreamSettingsLoading, + integrationDetailsLoadings, + integrationDashboardsLoading, + } = loadingState; + const formattedLastActivity = dataStreamDetails?.lastActivity + ? dataFormatter.convert(dataStreamDetails?.lastActivity) + : '-'; + const formattedCreatedOn = dataStreamSettings?.createdOn + ? dataFormatter.convert(dataStreamSettings.createdOn) + : '-'; + + return ( + + + + + + {integrationDetails.integration?.name} + + + ), + actionsMenu: ( + + ), + isLoading: integrationDetailsLoadings, + }, + { + fieldTitle: integrationVersionText, + fieldValue: integrationDetails.integration?.version, + isLoading: integrationDetailsLoadings, + }, + ] + : []), + { + fieldTitle: datasetLastActivityText, + fieldValue: formattedLastActivity, + isLoading: dataStreamDetailsLoading, + }, + { + fieldTitle: datasetCreatedOnText, + fieldValue: formattedCreatedOn, + isLoading: dataStreamSettingsLoading, + }, + ]} + /> + + + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/fields_list.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/fields_list.tsx new file mode 100644 index 0000000000000..f48ad1d932357 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/fields_list.tsx @@ -0,0 +1,54 @@ +/* + * 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, { ReactNode, Fragment } from 'react'; +import { + EuiFlexGroup, + EuiPanel, + EuiFlexItem, + EuiTitle, + EuiHorizontalRule, + EuiSkeletonRectangle, +} from '@elastic/eui'; + +export function FieldsList({ + fields, + dataTestSubj = 'datasetQualityDetailsFieldsList', +}: { + fields: Array<{ + fieldTitle: string; + fieldValue: ReactNode; + isLoading: boolean; + actionsMenu?: ReactNode; + }>; + dataTestSubj?: string; +}) { + return ( + + + {fields.map(({ fieldTitle, fieldValue, isLoading: isFieldLoading, actionsMenu }, index) => ( + + + + + {fieldTitle} + + + + + {fieldValue} + + + {actionsMenu} + + {index < fields.length - 1 ? : null} + + ))} + + + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/header.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/header.tsx new file mode 100644 index 0000000000000..a286751818a0a --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/header.tsx @@ -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 React from 'react'; +import { EuiTitle } from '@elastic/eui'; +import { detailsHeaderTitle } from '../../../../common/translations'; + +export function DetailsHeader() { + return ( + + {detailsHeaderTitle} + + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/index.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/index.tsx new file mode 100644 index 0000000000000..2c68a5fe46d54 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/index.tsx @@ -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 React from 'react'; +import { EuiSpacer } from '@elastic/eui'; +import { DetailsHeader } from './header'; +import { DatasetSummary } from './dataset_summary'; + +export function Details() { + return ( + <> + + + + + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/integration_actions_menu.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/integration_actions_menu.tsx new file mode 100644 index 0000000000000..4d9591be1bd58 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/details/integration_actions_menu.tsx @@ -0,0 +1,206 @@ +/* + * 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, { useMemo } from 'react'; +import { i18n } from '@kbn/i18n'; +import { + EuiButtonEmpty, + EuiButtonIcon, + EuiContextMenu, + EuiContextMenuPanelDescriptor, + EuiContextMenuPanelItemDescriptor, + EuiPopover, + EuiSkeletonRectangle, +} from '@elastic/eui'; +import { css } from '@emotion/react'; +import type { RouterLinkProps } from '@kbn/router-utils/src/get_router_link_props'; +import { Integration } from '../../../../common/data_streams_stats/integration'; +import { Dashboard } from '../../../../common/api_types'; +import { useDatasetQualityDetailsState, useIntegrationActions } from '../../../hooks'; + +const integrationActionsText = i18n.translate( + 'xpack.datasetQuality.details.integrationActionsText', + { + defaultMessage: 'Integration actions', + } +); + +const seeIntegrationText = i18n.translate('xpack.datasetQuality.details.seeIntegrationActionText', { + defaultMessage: 'See integration', +}); + +const indexTemplateText = i18n.translate('xpack.datasetQuality.details.indexTemplateActionText', { + defaultMessage: 'Index template', +}); + +const viewDashboardsText = i18n.translate('xpack.datasetQuality.details.viewDashboardsActionText', { + defaultMessage: 'View dashboards', +}); + +export function IntegrationActionsMenu({ + integration, + dashboards, + dashboardsLoading, +}: { + integration: Integration; + dashboards?: Dashboard[]; + dashboardsLoading: boolean; +}) { + const { canUserAccessDashboards, canUserViewIntegrations, datasetDetails } = + useDatasetQualityDetailsState(); + const { version, name: integrationName } = integration; + const { type, name } = datasetDetails; + const { + isOpen, + handleCloseMenu, + handleToggleMenu, + getIntegrationOverviewLinkProps, + getIndexManagementLinkProps, + getDashboardLinkProps, + } = useIntegrationActions(); + + const actionButton = ( + + ); + + const MenuActionItem = ({ + dataTestSubject, + buttonText, + routerLinkProps, + iconType, + disabled = false, + }: { + dataTestSubject: string; + buttonText: string | React.ReactNode; + routerLinkProps: RouterLinkProps; + iconType: string; + disabled?: boolean; + }) => ( + + {buttonText} + + ); + + const panelItems = useMemo(() => { + const firstLevelItems: EuiContextMenuPanelItemDescriptor[] = [ + ...(canUserViewIntegrations + ? [ + { + renderItem: () => ( + + ), + }, + ] + : []), + { + renderItem: () => ( + + ), + }, + { + isSeparator: true, + key: 'sep', + }, + ]; + + if (dashboards?.length && canUserAccessDashboards) { + firstLevelItems.push({ + icon: 'dashboardApp', + panel: 1, + name: viewDashboardsText, + 'data-test-subj': 'datasetQualityDetailsIntegrationActionViewDashboards', + disabled: false, + }); + } else if (dashboardsLoading) { + firstLevelItems.push({ + icon: 'dashboardApp', + name: , + 'data-test-subj': 'datasetQualityDetailsIntegrationActionDashboardsLoading', + disabled: true, + }); + } + + const panel: EuiContextMenuPanelDescriptor[] = [ + { + id: 0, + items: firstLevelItems, + }, + { + id: 1, + title: viewDashboardsText, + items: dashboards?.map((dashboard) => { + return { + renderItem: () => ( + + ), + }; + }), + }, + ]; + + return panel; + }, [ + dashboards, + getDashboardLinkProps, + getIndexManagementLinkProps, + getIntegrationOverviewLinkProps, + integrationName, + name, + type, + version, + dashboardsLoading, + canUserAccessDashboards, + canUserViewIntegrations, + ]); + + return ( + + + + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/header.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/header.tsx new file mode 100644 index 0000000000000..2a0e3e93e32ac --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/header.tsx @@ -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 { + EuiButton, + EuiFlexGroup, + EuiFlexItem, + EuiSkeletonTitle, + EuiTextColor, + EuiTitle, + useEuiShadow, + useEuiTheme, +} from '@elastic/eui'; +import { css } from '@emotion/react'; +import React from 'react'; +import { openInDiscoverText, openInLogsExplorerText } from '../../../common/translations'; +import { useDatasetQualityDetailsRedirectLink, useDatasetQualityDetailsState } from '../../hooks'; +import { IntegrationIcon } from '../common'; + +export function Header() { + const { datasetDetails, timeRange, integrationDetails, loadingState } = + useDatasetQualityDetailsState(); + + const { rawName, name: title } = datasetDetails; + const euiShadow = useEuiShadow('s'); + const { euiTheme } = useEuiTheme(); + const redirectLinkProps = useDatasetQualityDetailsRedirectLink({ + dataStreamStat: datasetDetails, + timeRangeConfig: timeRange, + }); + + const pageTitle = integrationDetails?.integration?.datasets?.[datasetDetails.name] ?? title; + + return !loadingState.integrationDetailsLoaded ? ( + + ) : ( + + + + + +

      {pageTitle}

      +
      +
      + +
      +
      +

      + {rawName} +

      +
      +
      + + + + {redirectLinkProps.isLogsExplorerAvailable + ? openInLogsExplorerText + : openInDiscoverText} + + + +
      + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/index.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/index.tsx new file mode 100644 index 0000000000000..dbeb0c874d666 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/index.tsx @@ -0,0 +1,57 @@ +/* + * 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, { useMemo } from 'react'; +import { CoreStart } from '@kbn/core-lifecycle-browser'; +import { dynamic } from '@kbn/shared-ux-utility'; +import { PerformanceContextProvider } from '@kbn/ebt-tools'; +import { DatasetQualityDetailsController } from '../../controller/dataset_quality_details'; +import { DatasetQualityStartDeps } from '../../types'; +import { ITelemetryClient } from '../../services/telemetry'; +import { useKibanaContextForPluginProvider } from '../../utils'; + +import { DatasetQualityDetailsContext, DatasetQualityDetailsContextValue } from './context'; + +const DatasetQualityDetails = dynamic(() => import('./dataset_quality_details')); + +export interface DatasetQualityDetailsProps { + controller: DatasetQualityDetailsController; +} + +export interface CreateDatasetQualityArgs { + core: CoreStart; + plugins: DatasetQualityStartDeps; + telemetryClient: ITelemetryClient; +} + +export const createDatasetQualityDetails = ({ + core, + plugins, + telemetryClient, +}: CreateDatasetQualityArgs) => { + return ({ controller }: DatasetQualityDetailsProps) => { + const KibanaContextProviderForPlugin = useKibanaContextForPluginProvider(core, plugins); + + const datasetQualityDetailsProviderValue: DatasetQualityDetailsContextValue = useMemo( + () => ({ + service: controller.service, + telemetryClient, + }), + [controller.service] + ); + + return ( + + + + + + + + ); + }; +}; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/index_not_found_prompt.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/index_not_found_prompt.tsx new file mode 100644 index 0000000000000..72b896a41a8db --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/index_not_found_prompt.tsx @@ -0,0 +1,29 @@ +/* + * 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 { EuiEmptyPrompt } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; + +const emptyPromptTitle = i18n.translate('xpack.datasetQuality.details.emptypromptTitle', { + defaultMessage: 'Unable to load your data stream', +}); + +const emptyPromptBody = (dataStream: string) => + i18n.translate('xpack.datasetQuality.details.emptyPromptBody', { + defaultMessage: 'Data stream not found: {dataStream}', + values: { + dataStream, + }, + }); + +export function DataStreamNotFoundPrompt({ dataStream }: { dataStream: string }) { + const promptTitle =

      {emptyPromptTitle}

      ; + const promptBody =

      {emptyPromptBody(dataStream)}

      ; + + return ; +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/aggregation_not_supported.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/aggregation_not_supported.tsx new file mode 100644 index 0000000000000..e9ec36c763454 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/aggregation_not_supported.tsx @@ -0,0 +1,75 @@ +/* + * 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 { EuiCallOut, EuiCode, EuiFlexGroup, EuiFlexItem, EuiLink } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; + +const aggregationNotSupportedTitle = i18n.translate('xpack.datasetQuality.nonAggregatable.title', { + defaultMessage: 'Your request may take longer to complete', +}); + +const aggregationNotSupportedDescription = (dataset: string) => ( + + {dataset} + + ), + howToFixIt: ( + + {i18n.translate( + 'xpack.datasetQuality.flyout.nonAggregatableDatasets.link.title', + { + defaultMessage: 'rollover', + } + )} + + ), + }} + /> + ), + }} + /> + ), + }} + /> +); + +export function AggregationNotSupported({ dataStream }: { dataStream: string }) { + return ( + + + +

      {aggregationNotSupportedDescription(dataStream)}

      +
      +
      +
      + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/columns.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/columns.tsx new file mode 100644 index 0000000000000..cfdf3b8d4a521 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/columns.tsx @@ -0,0 +1,61 @@ +/* + * 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 { i18n } from '@kbn/i18n'; +import type { EuiBasicTableColumn } from '@elastic/eui'; +import type { FieldFormat } from '@kbn/field-formats-plugin/common'; +import { formatNumber } from '@elastic/eui'; + +import { DegradedField } from '../../../../../common/api_types'; +import { SparkPlot } from './spark_plot'; +import { NUMBER_FORMAT } from '../../../../../common/constants'; + +const fieldColumnName = i18n.translate('xpack.datasetQuality.details.degradedField.field', { + defaultMessage: 'Field', +}); + +const countColumnName = i18n.translate('xpack.datasetQuality.details.degradedField.count', { + defaultMessage: 'Docs count', +}); + +const lastOccurrenceColumnName = i18n.translate( + 'xpack.datasetQuality.details.degradedField.lastOccurrence', + { + defaultMessage: 'Last occurrence', + } +); + +export const getDegradedFieldsColumns = ({ + dateFormatter, + isLoading, +}: { + dateFormatter: FieldFormat; + isLoading: boolean; +}): Array> => [ + { + name: fieldColumnName, + field: 'name', + }, + { + name: countColumnName, + sortable: true, + field: 'count', + render: (_, { count, timeSeries }) => { + const countValue = formatNumber(count, NUMBER_FORMAT); + return ; + }, + }, + { + name: lastOccurrenceColumnName, + sortable: true, + field: 'lastOccurrence', + render: (lastOccurrence: number) => { + return dateFormatter.convert(lastOccurrence); + }, + }, +]; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/degraded_fields.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/degraded_fields.tsx new file mode 100644 index 0000000000000..01956405074e3 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/degraded_fields.tsx @@ -0,0 +1,67 @@ +/* + * 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 { + EuiFlexGroup, + EuiPanel, + EuiTitle, + EuiIconTip, + EuiAccordion, + useGeneratedHtmlId, + EuiBadge, + EuiBetaBadge, +} from '@elastic/eui'; +import { + overviewDegradedFieldsSectionTitle, + overviewDegradedFieldsSectionTitleTooltip, + overviewQualityIssuesAccordionTechPreviewBadge, +} from '../../../../../common/translations'; +import { DegradedFieldTable } from './table'; +import { useDegradedFields } from '../../../../hooks'; + +export function DegradedFields() { + const accordionId = useGeneratedHtmlId({ + prefix: overviewDegradedFieldsSectionTitle, + }); + + const { totalItemCount } = useDegradedFields(); + + const accordionTitle = ( + + +
      {overviewDegradedFieldsSectionTitle}
      +
      + + + {totalItemCount} + + +
      + ); + return ( + + + + + + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/index.ts b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/index.ts new file mode 100644 index 0000000000000..7254285dc69ba --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/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 './degraded_fields'; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/spark_plot.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/spark_plot.tsx new file mode 100644 index 0000000000000..dcf1d4032c886 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/spark_plot.tsx @@ -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 React from 'react'; +import { + EuiFlexGroup, + EuiFlexItem, + EuiIcon, + EuiLoadingChart, + euiPaletteColorBlind, + useEuiTheme, +} from '@elastic/eui'; +import { ScaleType, Settings, Tooltip, Chart, BarSeries } from '@elastic/charts'; +import { i18n } from '@kbn/i18n'; +import { Coordinate } from '../../../../../common/types'; + +export function SparkPlot({ + valueLabel, + isLoading, + series, +}: { + valueLabel: React.ReactNode; + isLoading: boolean; + series?: Coordinate[] | null; +}) { + return ( + + + + + {valueLabel} + + ); +} + +function SparkPlotItem({ + isLoading, + series, +}: { + isLoading: boolean; + series?: Coordinate[] | null; +}) { + const { euiTheme } = useEuiTheme(); + const chartSize = { + height: euiTheme.size.l, + width: '80px', + }; + + const commonStyle = { + ...chartSize, + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + }; + const palette = euiPaletteColorBlind({ rotations: 2 }); + + if (isLoading) { + return ( +
      + +
      + ); + } + + if (hasValidTimeSeries(series)) { + return ( +
      + + + + + +
      + ); + } + + return ( +
      + +
      + ); +} + +function hasValidTimeSeries(series?: Coordinate[] | null): series is Coordinate[] { + return !!series?.some((point) => point.y !== 0); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/table.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/table.tsx new file mode 100644 index 0000000000000..c8a6e623febab --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/degraded_fields/table.tsx @@ -0,0 +1,54 @@ +/* + * 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 { EuiBasicTable, EuiEmptyPrompt } from '@elastic/eui'; +import { ES_FIELD_TYPES, KBN_FIELD_TYPES } from '@kbn/field-types'; +import { getDegradedFieldsColumns } from './columns'; +import { + overviewDegradedFieldsTableLoadingText, + overviewDegradedFieldsTableNoData, +} from '../../../../../common/translations'; +import { useDegradedFields } from '../../../../hooks/use_degraded_fields'; + +export const DegradedFieldTable = () => { + const { isLoading, pagination, renderedItems, onTableChange, sort, fieldFormats } = + useDegradedFields(); + const dateFormatter = fieldFormats.getDefaultInstance(KBN_FIELD_TYPES.DATE, [ + ES_FIELD_TYPES.DATE, + ]); + const columns = getDegradedFieldsColumns({ dateFormatter, isLoading }); + + return ( + {overviewDegradedFieldsTableNoData}} + hasBorder={false} + titleSize="m" + /> + ) + } + /> + ); +}; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/degraded_docs_chart.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/document_trends/degraded_docs/degraded_docs_chart.tsx similarity index 89% rename from x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/degraded_docs_chart.tsx rename to x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/document_trends/degraded_docs/degraded_docs_chart.tsx index 9d13d0e3b26ba..ff311032fe69f 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/degraded_docs_chart.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/document_trends/degraded_docs/degraded_docs_chart.tsx @@ -11,10 +11,10 @@ import { EuiFlexGroup, EuiLoadingChart, OnTimeChangeProps } from '@elastic/eui'; import { ViewMode } from '@kbn/embeddable-plugin/common'; import { KibanaErrorBoundary } from '@kbn/shared-ux-error-boundary'; -import { flyoutDegradedDocsTrendText } from '../../../../common/translations'; -import { TimeRangeConfig } from '../../../state_machines/dataset_quality_controller'; -import { useKibanaContextForPlugin } from '../../../utils'; -import { useDegradedDocsChart } from '../../../hooks'; +import { flyoutDegradedDocsTrendText } from '../../../../../../common/translations'; +import { useKibanaContextForPlugin } from '../../../../../utils'; +import { TimeRangeConfig } from '../../../../../../common/types'; +import { useDegradedDocs } from '../../../../../hooks/use_degraded_docs'; const CHART_HEIGHT = 180; const DISABLED_ACTIONS = [ @@ -26,7 +26,7 @@ const DISABLED_ACTIONS = [ interface DegradedDocsChartProps extends Pick< - ReturnType, + ReturnType, 'attributes' | 'isChartLoading' | 'onChartLoading' | 'extraActions' > { timeRange: TimeRangeConfig; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/document_trends/degraded_docs/index.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/document_trends/degraded_docs/index.tsx new file mode 100644 index 0000000000000..985a748e792b1 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/document_trends/degraded_docs/index.tsx @@ -0,0 +1,147 @@ +/* + * 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, useEffect, useState } from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { + EuiAccordion, + EuiButtonIcon, + EuiCode, + EuiFlexGroup, + EuiFlexItem, + EuiIcon, + EuiPanel, + EuiSkeletonRectangle, + EuiSpacer, + EuiTitle, + EuiToolTip, + OnTimeChangeProps, + useGeneratedHtmlId, +} from '@elastic/eui'; +import type { DataViewField } from '@kbn/data-views-plugin/common'; +import { css } from '@emotion/react'; +import { UnifiedBreakdownFieldSelector } from '@kbn/unified-histogram-plugin/public'; +import { + openInLogsExplorerText, + overviewDegradedDocsText, +} from '../../../../../../common/translations'; +import { useDegradedDocs } from '../../../../../hooks/use_degraded_docs'; +import { DegradedDocsChart } from './degraded_docs_chart'; +import { + useDatasetQualityDetailsRedirectLink, + useDatasetQualityDetailsState, +} from '../../../../../hooks'; +import { _IGNORED } from '../../../../../../common/es_fields'; + +const degradedDocsTooltip = ( + + _ignored + + ), + }} + /> +); + +// Allow for lazy loading +// eslint-disable-next-line import/no-default-export +export default function DegradedDocs({ lastReloadTime }: { lastReloadTime: number }) { + const { timeRange, updateTimeRange, datasetDetails } = useDatasetQualityDetailsState(); + const { dataView, breakdown, ...chartProps } = useDegradedDocs(); + + const accordionId = useGeneratedHtmlId({ + prefix: overviewDegradedDocsText, + }); + + const [breakdownDataViewField, setBreakdownDataViewField] = useState( + undefined + ); + + const degradedDocLinkLogsExplorer = useDatasetQualityDetailsRedirectLink({ + dataStreamStat: datasetDetails, + timeRangeConfig: timeRange, + query: { language: 'kuery', query: `${_IGNORED}: *` }, + }); + + useEffect(() => { + if (breakdown.dataViewField && breakdown.fieldSupportsBreakdown) { + setBreakdownDataViewField(breakdown.dataViewField); + } else { + setBreakdownDataViewField(undefined); + } + }, [setBreakdownDataViewField, breakdown]); + + const onTimeRangeChange = useCallback( + ({ start, end }: Pick) => { + updateTimeRange({ start, end, refreshInterval: timeRange.refresh.value }); + }, + [updateTimeRange, timeRange.refresh] + ); + + const accordionTitle = ( + + +
      {overviewDegradedDocsText}
      +
      + + + +
      + ); + + return ( + + + + + + + + + + + + + + + + + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/lens_attributes.ts b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/document_trends/degraded_docs/lens_attributes.ts similarity index 97% rename from x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/lens_attributes.ts rename to x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/document_trends/degraded_docs/lens_attributes.ts index a44b9a562a428..f089ef5d74c24 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/lens_attributes.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/document_trends/degraded_docs/lens_attributes.ts @@ -6,13 +6,13 @@ */ import { i18n } from '@kbn/i18n'; -import { GenericIndexPatternColumn, TypedLensByValueInput } from '@kbn/lens-plugin/public'; +import type { GenericIndexPatternColumn, TypedLensByValueInput } from '@kbn/lens-plugin/public'; import { v4 as uuidv4 } from 'uuid'; import { flyoutDegradedDocsPercentageText, flyoutDegradedDocsTrendText, -} from '../../../../common/translations'; +} from '../../../../../../common/translations'; enum DatasetQualityLensColumn { Date = 'date_column', @@ -268,7 +268,7 @@ function getChartColumns(breakdownField?: string): Record - i18n.translate('xpack.datasetQuality.flyoutDegradedDocsTopNValues', { + i18n.translate('xpack.datasetQuality.details.degradedDocsTopNValues', { defaultMessage: 'Top {count} values of {fieldName}', values: { count, fieldName }, description: diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/header.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/header.tsx new file mode 100644 index 0000000000000..a47ed1764049c --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/header.tsx @@ -0,0 +1,78 @@ +/* + * 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 { + EuiFlexGroup, + EuiIcon, + EuiSuperDatePicker, + EuiTitle, + EuiToolTip, + OnRefreshProps, + OnTimeChangeProps, +} from '@elastic/eui'; +import { css } from '@emotion/react'; +import React, { useCallback } from 'react'; +import { useDatasetQualityDetailsState } from '../../../hooks'; +import { overviewHeaderTitle, overviewTitleTooltip } from '../../../../common/translations'; + +// Allow for lazy loading +// eslint-disable-next-line import/no-default-export +export default function OverviewHeader({ + handleRefresh, +}: { + handleRefresh: (refreshProps: OnRefreshProps) => void; +}) { + const { timeRange, updateTimeRange } = useDatasetQualityDetailsState(); + + const onTimeChange = useCallback( + ({ isInvalid, ...timeRangeProps }: OnTimeChangeProps) => { + if (!isInvalid) { + updateTimeRange({ refreshInterval: timeRange.refresh.value, ...timeRangeProps }); + } + }, + [updateTimeRange, timeRange.refresh] + ); + + return ( + + + + {overviewHeaderTitle} + + + + + + + + + + + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/index.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/index.tsx new file mode 100644 index 0000000000000..380dd6bf09b95 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/index.tsx @@ -0,0 +1,42 @@ +/* + * 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, useState } from 'react'; +import { dynamic } from '@kbn/shared-ux-utility'; +import { EuiSpacer, OnRefreshProps } from '@elastic/eui'; +import { useDatasetQualityDetailsState } from '../../../hooks'; +import { AggregationNotSupported } from './aggregation_not_supported'; +import { DegradedFields } from './degraded_fields'; + +const OverviewHeader = dynamic(() => import('./header')); +const Summary = dynamic(() => import('./summary')); +const DegradedDocs = dynamic(() => import('./document_trends/degraded_docs')); + +export function Overview() { + const { dataStream, isNonAggregatable, updateTimeRange } = useDatasetQualityDetailsState(); + const [lastReloadTime, setLastReloadTime] = useState(Date.now()); + + const handleRefresh = useCallback( + (refreshProps: OnRefreshProps) => { + updateTimeRange(refreshProps); + setLastReloadTime(Date.now()); + }, + [updateTimeRange] + ); + return ( + <> + {isNonAggregatable && } + + + + + + + + + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/summary/index.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/summary/index.tsx new file mode 100644 index 0000000000000..707c900a248a1 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/summary/index.tsx @@ -0,0 +1,74 @@ +/* + * 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 { EuiFlexGroup } from '@elastic/eui'; +import { Panel, PanelIndicator } from './panel'; +import { + overviewPanelDatasetQualityIndicatorDegradedDocs, + overviewPanelDocumentsIndicatorSize, + overviewPanelDocumentsIndicatorTotalCount, + overviewPanelResourcesIndicatorServices, + overviewPanelResourcesIndicatorSize, + overviewPanelTitleDatasetQuality, + overviewPanelTitleDocuments, + overviewPanelTitleResources, +} from '../../../../../common/translations'; +import { useOverviewSummaryPanel } from '../../../../hooks/use_overview_summary_panel'; + +// Allow for lazy loading +// eslint-disable-next-line import/no-default-export +export default function Summary() { + const { + isSummaryPanelLoading, + totalDocsCount, + sizeInBytesAvailable, + sizeInBytes, + isUserAllowedToSeeSizeInBytes, + totalServicesCount, + totalHostsCount, + totalDegradedDocsCount, + } = useOverviewSummaryPanel(); + return ( + + + + {sizeInBytesAvailable && ( + + )} + + + + + + + + + + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/summary/panel.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/summary/panel.tsx new file mode 100644 index 0000000000000..b40f563a4dff4 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/dataset_quality_details/overview/summary/panel.tsx @@ -0,0 +1,106 @@ +/* + * 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 { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiSkeletonTitle, EuiText } from '@elastic/eui'; +import { css } from '@emotion/react'; +import { euiThemeVars } from '@kbn/ui-theme'; +import { PrivilegesWarningIconWrapper } from '../../../common'; + +const verticalRule = css` + width: 1px; + height: 65px; + background-color: ${euiThemeVars.euiColorLightShade}; +`; + +const verticalRuleHidden = css` + width: 1px; + height: 65px; + visibility: hidden; +`; + +export function Panel({ + title, + secondaryTitle, + children, +}: { + title: string; + secondaryTitle?: React.ReactNode; + children: React.ReactNode | React.ReactNode[]; +}) { + const renderChildrenWithSeparator = (panelChildren: React.ReactNode | React.ReactNode[]) => { + if (Array.isArray(panelChildren)) { + return panelChildren.map((panelChild, index) => ( + + {panelChild} + {index < panelChildren.length - 1 && } + + )); + } + return ( + <> + {panelChildren} + + + ); + }; + return ( + + + + + +
      {title}
      +
      +
      + {secondaryTitle && {secondaryTitle}} +
      +
      + + {renderChildrenWithSeparator(children)} + +
      + ); +} + +export function PanelIndicator({ + label, + value, + isLoading, + userHasPrivilege = true, +}: { + label: string; + value: string | number; + isLoading: boolean; + userHasPrivilege?: boolean; +}) { + return ( + + {isLoading ? ( + + ) : ( + <> + + {label} + + + <> + + {userHasPrivilege && ( + +

      {value}

      +
      + )} + + )} +
      + ); +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/dataset_summary.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/dataset_summary.tsx index 052f4b63f0da6..cb35e9c74d334 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/dataset_summary.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/dataset_summary.tsx @@ -10,9 +10,9 @@ import { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; import { ES_FIELD_TYPES, KBN_FIELD_TYPES } from '@kbn/field-types'; import { DataStreamDetails, DataStreamSettings } from '../../../common/data_streams_stats'; import { - flyoutDatasetCreatedOnText, + datasetCreatedOnText, flyoutDatasetDetailsText, - flyoutDatasetLastActivityText, + datasetLastActivityText, } from '../../../common/translations'; import { FieldsList, FieldsListLoading } from './fields_list'; @@ -46,12 +46,12 @@ export function DatasetSummary({ title={flyoutDatasetDetailsText} fields={[ { - fieldTitle: flyoutDatasetLastActivityText, + fieldTitle: datasetLastActivityText, fieldValue: formattedLastActivity, isLoading: dataStreamDetailsLoading, }, { - fieldTitle: flyoutDatasetCreatedOnText, + fieldTitle: datasetCreatedOnText, fieldValue: formattedCreatedOn, isLoading: dataStreamSettingsLoading, }, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/degraded_docs.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/degraded_docs.tsx index c1c6bdf23f7c4..5335d5de8692d 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/degraded_docs.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_docs_trend/degraded_docs.tsx @@ -25,9 +25,9 @@ import type { DataViewField } from '@kbn/data-views-plugin/common'; import { useDegradedDocsChart } from '../../../hooks'; import { DEFAULT_TIME_RANGE, DEFAULT_DATEPICKER_REFRESH } from '../../../../common/constants'; -import { flyoutDegradedDocsText } from '../../../../common/translations'; -import { TimeRangeConfig } from '../../../state_machines/dataset_quality_controller'; -import { DegradedDocsChart } from './degraded_docs_chart'; +import { overviewDegradedDocsText } from '../../../../common/translations'; +import { DegradedDocsChart } from '../../dataset_quality_details/overview/document_trends/degraded_docs/degraded_docs_chart'; +import { TimeRangeConfig } from '../../../../common/types'; export function DegradedDocs({ dataStream, @@ -70,7 +70,7 @@ export function DegradedDocs({ `} > -
      {flyoutDegradedDocsText}
      +
      {overviewDegradedDocsText}
      diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_fields/table.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_fields/table.tsx index 9820e1722d0fc..1a1baa8aae7cd 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_fields/table.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/degraded_fields/table.tsx @@ -11,8 +11,8 @@ import { ES_FIELD_TYPES, KBN_FIELD_TYPES } from '@kbn/field-types'; import { useDatasetQualityDegradedField } from '../../../hooks'; import { getDegradedFieldsColumns } from './columns'; import { - flyoutDegradedFieldsTableLoadingText, - flyoutDegradedFieldsTableNoData, + overviewDegradedFieldsTableLoadingText, + overviewDegradedFieldsTableNoData, } from '../../../../common/translations'; export const DegradedFieldTable = () => { @@ -38,12 +38,12 @@ export const DegradedFieldTable = () => { }} noItemsMessage={ isLoading ? ( - flyoutDegradedFieldsTableLoadingText + overviewDegradedFieldsTableLoadingText ) : ( {flyoutDegradedFieldsTableNoData}} + title={

      {overviewDegradedFieldsTableNoData}

      } hasBorder={false} titleSize="m" /> diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout.tsx index 7dc455b280444..cb6944057a2d6 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout.tsx @@ -19,15 +19,17 @@ import { EuiPanel, EuiSkeletonRectangle, } from '@elastic/eui'; +import { dynamic } from '@kbn/shared-ux-utility'; import { flyoutCancelText } from '../../../common/translations'; import { useDatasetQualityFlyout, useDatasetDetailsTelemetry } from '../../hooks'; import { DatasetSummary, DatasetSummaryLoading } from './dataset_summary'; import { Header } from './header'; -import { IntegrationSummary } from './integration_summary'; import { FlyoutProps } from './types'; -import { FlyoutSummary } from './flyout_summary/flyout_summary'; import { BasicDataStream } from '../../../common/types'; +const FlyoutSummary = dynamic(() => import('./flyout_summary/flyout_summary')); +const IntegrationSummary = dynamic(() => import('./integration_summary')); + // Allow for lazy loading // eslint-disable-next-line import/no-default-export export default function Flyout({ dataset, closeFlyout }: FlyoutProps) { @@ -74,6 +76,7 @@ export default function Flyout({ dataset, closeFlyout }: FlyoutProps) { linkDetails={linkDetails} loading={!loadingState.datasetIntegrationDone} title={title} + timeRange={timeRange} /> diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary.tsx index 353e7f353b6db..5b89c43ad92d1 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary.tsx @@ -23,10 +23,11 @@ import { DegradedDocs } from '../degraded_docs_trend/degraded_docs'; import { DataStreamDetails } from '../../../../common/api_types'; import { DEFAULT_TIME_RANGE, DEFAULT_DATEPICKER_REFRESH } from '../../../../common/constants'; import { useDatasetQualityContext } from '../../dataset_quality/context'; -import { FlyoutDataset, TimeRangeConfig } from '../../../state_machines/dataset_quality_controller'; import { FlyoutSummaryHeader } from './flyout_summary_header'; import { FlyoutSummaryKpis, FlyoutSummaryKpisLoading } from './flyout_summary_kpis'; import { DegradedFields } from '../degraded_fields/degraded_fields'; +import { TimeRangeConfig } from '../../../../common/types'; +import { FlyoutDataset } from '../../../state_machines/dataset_quality_controller'; const nonAggregatableWarningTitle = i18n.translate('xpack.datasetQuality.nonAggregatable.title', { defaultMessage: 'Your request may take longer to complete', @@ -77,7 +78,9 @@ const nonAggregatableWarningDescription = (dataset: string) => ( /> ); -export function FlyoutSummary({ +// Allow for lazy loading +// eslint-disable-next-line import/no-default-export +export default function FlyoutSummary({ dataStream, dataStreamStat, dataStreamDetails, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary_header.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary_header.tsx index d449eb3553647..c0ee7303b51a5 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary_header.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary_header.tsx @@ -19,7 +19,7 @@ import { import { FormattedMessage } from '@kbn/i18n-react'; import { flyoutSummaryText } from '../../../../common/translations'; -import { TimeRangeConfig } from '../../../state_machines/dataset_quality_controller'; +import { TimeRangeConfig } from '../../../../common/types'; export function FlyoutSummaryHeader({ timeRange, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary_kpis.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary_kpis.tsx index 9b0ca4dfd1277..47b41712dc7f5 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary_kpis.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/flyout_summary_kpis.tsx @@ -14,9 +14,10 @@ import { DataStreamDetails } from '../../../../common/api_types'; import { useKibanaContextForPlugin } from '../../../utils'; import { NavigationSource } from '../../../services/telemetry'; import { useDatasetDetailsTelemetry, useRedirectLink } from '../../../hooks'; -import { FlyoutDataset, TimeRangeConfig } from '../../../state_machines/dataset_quality_controller'; +import { FlyoutDataset } from '../../../state_machines/dataset_quality_controller'; import { FlyoutSummaryKpiItem, FlyoutSummaryKpiItemLoading } from './flyout_summary_kpi_item'; import { getSummaryKpis } from './get_summary_kpis'; +import { TimeRangeConfig } from '../../../../common/types'; export function FlyoutSummaryKpis({ dataStreamStat, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.test.ts b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.test.ts index 5807c21a6a251..28f5334e2f199 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.test.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.test.ts @@ -8,7 +8,6 @@ import { formatNumber } from '@elastic/eui'; import type { useKibanaContextForPlugin } from '../../../utils'; import type { useDatasetDetailsTelemetry } from '../../../hooks'; -import { TimeRangeConfig } from '../../../state_machines/dataset_quality_controller'; import { BYTE_NUMBER_FORMAT, @@ -17,7 +16,7 @@ import { MAX_HOSTS_METRIC_VALUE, } from '../../../../common/constants'; import { - flyoutDegradedDocsText, + overviewDegradedDocsText, flyoutDocsCountTotalText, flyoutHostsText, flyoutServicesText, @@ -25,6 +24,7 @@ import { flyoutSizeText, } from '../../../../common/translations'; import { getSummaryKpis } from './get_summary_kpis'; +import { TimeRangeConfig } from '../../../../common/types'; const dataStreamDetails = { services: { @@ -83,7 +83,7 @@ describe('getSummaryKpis', () => { { title: flyoutSizeText, value: formatNumber(dataStreamDetails.sizeBytes ?? 0, BYTE_NUMBER_FORMAT), - userHasPrivilege: true, + userHasPrivilege: false, }, { title: flyoutServicesText, @@ -98,7 +98,7 @@ describe('getSummaryKpis', () => { userHasPrivilege: true, }, { - title: flyoutDegradedDocsText, + title: overviewDegradedDocsText, value: '200', link: { label: flyoutShowAllText, @@ -143,7 +143,7 @@ describe('getSummaryKpis', () => { { title: flyoutSizeText, value: formatNumber(dataStreamDetails.sizeBytes ?? 0, BYTE_NUMBER_FORMAT), - userHasPrivilege: true, + userHasPrivilege: false, }, { title: flyoutServicesText, @@ -158,7 +158,7 @@ describe('getSummaryKpis', () => { userHasPrivilege: true, }, { - title: flyoutDegradedDocsText, + title: overviewDegradedDocsText, value: '200', link: { label: flyoutShowAllText, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.ts b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.ts index 563c7d06cea48..b574e1e8a8160 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/flyout_summary/get_summary_kpis.ts @@ -15,7 +15,7 @@ import { NUMBER_FORMAT, } from '../../../../common/constants'; import { - flyoutDegradedDocsText, + overviewDegradedDocsText, flyoutDocsCountTotalText, flyoutHostsText, flyoutServicesText, @@ -26,7 +26,7 @@ import { DataStreamDetails } from '../../../../common/api_types'; import { NavigationTarget, NavigationSource } from '../../../services/telemetry'; import { useKibanaContextForPlugin } from '../../../utils'; import type { useRedirectLink, useDatasetDetailsTelemetry } from '../../../hooks'; -import { TimeRangeConfig } from '../../../state_machines/dataset_quality_controller'; +import { TimeRangeConfig } from '../../../../common/types'; export function getSummaryKpis({ dataStreamDetails, @@ -77,7 +77,7 @@ export function getSummaryKpis({ { title: flyoutSizeText, value: formatNumber(dataStreamDetails?.sizeBytes ?? 0, BYTE_NUMBER_FORMAT), - userHasPrivilege: dataStreamDetails?.userPrivileges?.canMonitor ?? true, + userHasPrivilege: Boolean(dataStreamDetails?.userPrivileges?.canMonitor), }, ] : []), @@ -89,7 +89,7 @@ export function getSummaryKpis({ }, getHostsKpi(dataStreamDetails?.hosts, timeRange, telemetry, hostsLocator), { - title: flyoutDegradedDocsText, + title: overviewDegradedDocsText, value: formatNumber(dataStreamDetails?.degradedDocsCount ?? 0, NUMBER_FORMAT), link: degradedDocsLinkProps && degradedDocsLinkProps.linkProps.href diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/header.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/header.tsx index 10d0c96a057bd..1117c7da12a1b 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/header.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/header.tsx @@ -17,23 +17,22 @@ import { } from '@elastic/eui'; import { css } from '@emotion/react'; import React from 'react'; -import { - flyoutOpenInDiscoverText, - flyoutOpenInLogsExplorerText, -} from '../../../common/translations'; +import { openInDiscoverText, openInLogsExplorerText } from '../../../common/translations'; import { NavigationSource } from '../../services/telemetry'; import { useRedirectLink } from '../../hooks'; import { IntegrationIcon } from '../common'; -import { BasicDataStream } from '../../../common/types'; +import { BasicDataStream, TimeRangeConfig } from '../../../common/types'; export function Header({ linkDetails, loading, title, + timeRange, }: { linkDetails: BasicDataStream; loading: boolean; title: string; + timeRange: TimeRangeConfig; }) { const { integration } = linkDetails; const euiShadow = useEuiShadow('s'); @@ -44,6 +43,7 @@ export function Header({ page: 'details', navigationSource: NavigationSource.Header, }, + timeRangeConfig: timeRange, }); return ( @@ -90,8 +90,8 @@ export function Header({ } > {redirectLinkProps.isLogsExplorerAvailable - ? flyoutOpenInLogsExplorerText - : flyoutOpenInDiscoverText} + ? openInLogsExplorerText + : openInDiscoverText} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/integration_summary.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/integration_summary.tsx index 6ac94411098a6..53262c7821ce7 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/integration_summary.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/components/flyout/integration_summary.tsx @@ -11,7 +11,7 @@ import { css } from '@emotion/react'; import { flyoutIntegrationDetailsText, flyoutIntegrationNameText, - flyoutIntegrationVersionText, + integrationVersionText, } from '../../../common/translations'; import { IntegrationIcon } from '../common'; import { FieldsList } from './fields_list'; @@ -19,7 +19,9 @@ import { IntegrationActionsMenu } from './integration_actions_menu'; import { Integration } from '../../../common/data_streams_stats/integration'; import { Dashboard } from '../../../common/api_types'; -export function IntegrationSummary({ +// Allow for lazy loading +// eslint-disable-next-line import/no-default-export +export default function IntegrationSummary({ integration, dashboards, dashboardsLoading, @@ -60,7 +62,7 @@ export function IntegrationSummary({ isLoading: false, }, { - fieldTitle: flyoutIntegrationVersionText, + fieldTitle: integrationVersionText, fieldValue: version, isLoading: false, }, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/controller/create_controller.ts b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/create_controller.ts similarity index 88% rename from x-pack/plugins/observability_solution/dataset_quality/public/controller/create_controller.ts rename to x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/create_controller.ts index 3d8e808adfcfb..7424e13b0f93c 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/controller/create_controller.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/create_controller.ts @@ -10,13 +10,13 @@ import { getDevToolsOptions } from '@kbn/xstate-utils'; import equal from 'fast-deep-equal'; import { distinctUntilChanged, from, map } from 'rxjs'; import { interpret } from 'xstate'; -import { IDataStreamsStatsClient } from '../services/data_streams_stats'; -import { IDataStreamDetailsClient } from '../services/data_stream_details'; +import { IDataStreamsStatsClient } from '../../services/data_streams_stats'; +import { IDataStreamDetailsClient } from '../../services/data_stream_details'; import { createDatasetQualityControllerStateMachine, DEFAULT_CONTEXT, -} from '../state_machines/dataset_quality_controller'; -import { DatasetQualityStartDeps } from '../types'; +} from '../../state_machines/dataset_quality_controller'; +import { DatasetQualityStartDeps } from '../../types'; import { getContextFromPublicState, getPublicStateFromContext } from './public_state'; import { DatasetQualityController, DatasetQualityPublicStateUpdate } from './types'; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/controller/index.ts b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/index.ts similarity index 100% rename from x-pack/plugins/observability_solution/dataset_quality/public/controller/index.ts rename to x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/index.ts diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/controller/lazy_create_controller.ts b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/lazy_create_controller.ts similarity index 100% rename from x-pack/plugins/observability_solution/dataset_quality/public/controller/lazy_create_controller.ts rename to x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/lazy_create_controller.ts diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/controller/public_state.ts b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/public_state.ts similarity index 96% rename from x-pack/plugins/observability_solution/dataset_quality/public/controller/public_state.ts rename to x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/public_state.ts index 9500b473c95ed..1bf0088bc7a48 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/controller/public_state.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/public_state.ts @@ -5,11 +5,11 @@ * 2.0. */ -import { DatasetTableSortField, DegradedFieldSortField } from '../hooks'; +import { DatasetTableSortField, DegradedFieldSortField } from '../../hooks'; import { DatasetQualityControllerContext, DEFAULT_CONTEXT, -} from '../state_machines/dataset_quality_controller'; +} from '../../state_machines/dataset_quality_controller'; import { DatasetQualityPublicState, DatasetQualityPublicStateUpdate } from './types'; export const getPublicStateFromContext = ( diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/controller/types.ts b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/types.ts similarity index 96% rename from x-pack/plugins/observability_solution/dataset_quality/public/controller/types.ts rename to x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/types.ts index 66757d3409567..decb7454bd193 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/controller/types.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality/types.ts @@ -12,7 +12,7 @@ import { WithFlyoutOptions, WithTableOptions, DegradedFields, -} from '../state_machines/dataset_quality_controller'; +} from '../../state_machines/dataset_quality_controller'; export interface DatasetQualityController { state$: Observable; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/create_controller.ts b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/create_controller.ts new file mode 100644 index 0000000000000..d51f60ef93c71 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/create_controller.ts @@ -0,0 +1,63 @@ +/* + * 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 { CoreStart } from '@kbn/core/public'; +import { getDevToolsOptions } from '@kbn/xstate-utils'; +import equal from 'fast-deep-equal'; +import { distinctUntilChanged, from, map } from 'rxjs'; +import { interpret } from 'xstate'; +import { createDatasetQualityDetailsControllerStateMachine } from '../../state_machines/dataset_quality_details_controller/state_machine'; +import { IDataStreamsStatsClient } from '../../services/data_streams_stats'; +import { IDataStreamDetailsClient } from '../../services/data_stream_details'; +import { DatasetQualityStartDeps } from '../../types'; +import { getContextFromPublicState, getPublicStateFromContext } from './public_state'; +import { DatasetQualityDetailsController, DatasetQualityDetailsPublicStateUpdate } from './types'; + +interface Dependencies { + core: CoreStart; + plugins: DatasetQualityStartDeps; + dataStreamStatsClient: IDataStreamsStatsClient; + dataStreamDetailsClient: IDataStreamDetailsClient; +} + +export const createDatasetQualityDetailsControllerFactory = + ({ core, plugins, dataStreamStatsClient, dataStreamDetailsClient }: Dependencies) => + async ({ + initialState, + }: { + initialState: DatasetQualityDetailsPublicStateUpdate; + }): Promise => { + const initialContext = getContextFromPublicState(initialState); + + const machine = createDatasetQualityDetailsControllerStateMachine({ + initialContext, + plugins, + toasts: core.notifications.toasts, + dataStreamStatsClient, + dataStreamDetailsClient, + }); + + const service = interpret(machine, { + devTools: getDevToolsOptions(), + }); + + const state$ = from(service).pipe( + map(({ context }) => getPublicStateFromContext(context)), + distinctUntilChanged(equal) + ); + + return { + state$, + service, + }; + }; + +export type CreateDatasetQualityDetailsControllerFactory = + typeof createDatasetQualityDetailsControllerFactory; +export type CreateDatasetQualityDetailsController = ReturnType< + typeof createDatasetQualityDetailsControllerFactory +>; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/index.ts b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/index.ts new file mode 100644 index 0000000000000..d0e19da1736db --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/index.ts @@ -0,0 +1,9 @@ +/* + * 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 './create_controller'; +export * from './types'; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/lazy_create_controller.ts b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/lazy_create_controller.ts new file mode 100644 index 0000000000000..d134ce09b9398 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/lazy_create_controller.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 { CreateDatasetQualityDetailsControllerFactory } from './create_controller'; + +export const createDatasetQualityDetailsControllerLazyFactory: CreateDatasetQualityDetailsControllerFactory = + (dependencies) => async (args) => { + const { createDatasetQualityDetailsControllerFactory } = await import('./create_controller'); + + return createDatasetQualityDetailsControllerFactory(dependencies)(args); + }; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/public_state.ts b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/public_state.ts new file mode 100644 index 0000000000000..75f3337103e6f --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/public_state.ts @@ -0,0 +1,52 @@ +/* + * 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 { DegradedFieldSortField } from '../../hooks'; +import { + DatasetQualityDetailsControllerContext, + DEFAULT_CONTEXT, +} from '../../state_machines/dataset_quality_details_controller'; +import { DatasetQualityDetailsPublicState, DatasetQualityDetailsPublicStateUpdate } from './types'; + +export const getPublicStateFromContext = ( + context: DatasetQualityDetailsControllerContext +): DatasetQualityDetailsPublicState => { + return { + dataStream: context.dataStream, + degradedFields: context.degradedFields, + timeRange: context.timeRange, + breakdownField: context.breakdownField, + integration: context.integration, + }; +}; + +export const getContextFromPublicState = ( + publicState: DatasetQualityDetailsPublicStateUpdate +): DatasetQualityDetailsControllerContext => ({ + ...DEFAULT_CONTEXT, + degradedFields: { + table: { + ...DEFAULT_CONTEXT.degradedFields.table, + ...publicState.degradedFields?.table, + sort: publicState.degradedFields?.table?.sort + ? { + ...publicState.degradedFields.table.sort, + field: publicState.degradedFields.table.sort.field as DegradedFieldSortField, + } + : DEFAULT_CONTEXT.degradedFields.table.sort, + }, + }, + timeRange: { + ...DEFAULT_CONTEXT.timeRange, + ...publicState.timeRange, + refresh: { + ...DEFAULT_CONTEXT.timeRange.refresh, + ...publicState.timeRange?.refresh, + }, + }, + dataStream: publicState.dataStream, +}); diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/types.ts b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/types.ts new file mode 100644 index 0000000000000..65ca53c073d42 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/controller/dataset_quality_details/types.ts @@ -0,0 +1,43 @@ +/* + * 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 { + DatasetQualityDetailsControllerStateService, + DegradedFieldsTableConfig, + WithDefaultControllerState, +} from '../../state_machines/dataset_quality_details_controller'; + +type DegradedFieldTableSortOptions = Omit & { + field: string; +}; + +export type DatasetQualityDegradedFieldTableOptions = Partial< + Omit & { + sort?: DegradedFieldTableSortOptions; + } +>; + +export type DatasetQualityDetailsPublicState = WithDefaultControllerState; + +// This type is used by external consumers where it enforces datastream to be +// a must and everything else can be optional. The table inside the +// degradedFields must accept field property as string +export type DatasetQualityDetailsPublicStateUpdate = Partial< + Pick +> & { + dataStream: string; +} & { + degradedFields?: { + table?: DatasetQualityDegradedFieldTableOptions; + }; +}; + +export interface DatasetQualityDetailsController { + state$: Observable; + service: DatasetQualityDetailsControllerStateService; +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/index.ts b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/index.ts index 0fc332e68bf8d..5c746e2f1177b 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/index.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/index.ts @@ -13,3 +13,7 @@ export * from './use_summary_panel'; export * from './use_create_dataview'; export * from './use_dataset_quality_degraded_field'; export * from './use_telemetry'; +export * from './use_dataset_quality_details_state'; +export * from './use_dataset_quality_details_redirect_link'; +export * from './use_degraded_fields'; +export * from './use_integration_actions'; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_degraded_field.ts b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_degraded_field.ts index ed95a0cd7fec9..d92aa5be153f6 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_degraded_field.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_degraded_field.ts @@ -16,8 +16,9 @@ import { } from '../../common/constants'; import { useKibanaContextForPlugin } from '../utils'; -export type DegradedFieldSortField = keyof DegradedField; +type DegradedFieldSortField = keyof DegradedField; +// TODO: DELETE this hook in favour of new hook post migration export function useDatasetQualityDegradedField() { const { service } = useDatasetQualityContext(); const { diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_details_redirect_link.ts b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_details_redirect_link.ts new file mode 100644 index 0000000000000..3000d05aa34de --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_details_redirect_link.ts @@ -0,0 +1,188 @@ +/* + * 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 { + SINGLE_DATASET_LOCATOR_ID, + type SingleDatasetLocatorParams, +} from '@kbn/deeplinks-observability'; +import { type DiscoverAppLocatorParams, DISCOVER_APP_LOCATOR } from '@kbn/discover-plugin/common'; +import { type Query, type AggregateQuery, buildPhraseFilter } from '@kbn/es-query'; +import { getRouterLinkProps } from '@kbn/router-utils'; +import type { RouterLinkProps } from '@kbn/router-utils/src/get_router_link_props'; +import type { LocatorPublic } from '@kbn/share-plugin/common'; +import type { LocatorClient } from '@kbn/shared-ux-prompt-no-data-views-types'; +import { useKibanaContextForPlugin } from '../utils'; +import { BasicDataStream, TimeRangeConfig } from '../../common/types'; + +export const useDatasetQualityDetailsRedirectLink = ({ + dataStreamStat, + query, + timeRangeConfig, + breakdownField, +}: { + dataStreamStat: T; + query?: Query | AggregateQuery; + timeRangeConfig: TimeRangeConfig; + breakdownField?: string; +}) => { + const { + services: { share }, + } = useKibanaContextForPlugin(); + + const { from, to } = timeRangeConfig; + + const logsExplorerLocator = + share.url.locators.get(SINGLE_DATASET_LOCATOR_ID); + + const config = logsExplorerLocator + ? buildLogsExplorerConfig({ + locator: logsExplorerLocator, + dataStreamStat, + query, + from, + to, + breakdownField, + }) + : buildDiscoverConfig({ + locatorClient: share.url.locators, + dataStreamStat, + query, + from, + to, + breakdownField, + }); + + return { + linkProps: { + ...config.routerLinkProps, + }, + navigate: config.navigate, + isLogsExplorerAvailable: !!logsExplorerLocator, + }; +}; + +const buildLogsExplorerConfig = ({ + locator, + dataStreamStat, + query, + from, + to, + breakdownField, +}: { + locator: LocatorPublic; + dataStreamStat: T; + query?: Query | AggregateQuery; + from: string; + to: string; + breakdownField?: string; +}): { + navigate: () => void; + routerLinkProps: RouterLinkProps; +} => { + const params: SingleDatasetLocatorParams = { + dataset: dataStreamStat.name, + timeRange: { + from, + to, + }, + integration: dataStreamStat.integration?.name, + query, + filterControls: { + namespace: { + mode: 'include', + values: [dataStreamStat.namespace], + }, + }, + breakdownField, + }; + + const urlToLogsExplorer = locator.getRedirectUrl(params); + + const navigateToLogsExplorer = () => { + locator.navigate(params) as Promise; + }; + + const logsExplorerLinkProps = getRouterLinkProps({ + href: urlToLogsExplorer, + onClick: navigateToLogsExplorer, + }); + + return { routerLinkProps: logsExplorerLinkProps, navigate: navigateToLogsExplorer }; +}; + +const buildDiscoverConfig = ({ + locatorClient, + dataStreamStat, + query, + from, + to, + breakdownField, +}: { + locatorClient: LocatorClient; + dataStreamStat: T; + query?: Query | AggregateQuery; + from: string; + to: string; + breakdownField?: string; +}): { + navigate: () => void; + routerLinkProps: RouterLinkProps; +} => { + const dataViewId = `${dataStreamStat.type}-${dataStreamStat.name}-*`; + const dataViewTitle = dataStreamStat.integration + ? `[${dataStreamStat.integration.title}] ${dataStreamStat.name}` + : `${dataViewId}`; + + const params: DiscoverAppLocatorParams = { + timeRange: { + from, + to, + }, + refreshInterval: { + pause: true, + value: 60000, + }, + dataViewId, + dataViewSpec: { + id: dataViewId, + title: dataViewTitle, + }, + query, + breakdownField, + columns: ['@timestamp', 'message'], + filters: [ + buildPhraseFilter( + { + name: 'data_stream.namespace', + type: 'string', + }, + dataStreamStat.namespace, + { + id: dataViewId, + title: dataViewTitle, + } + ), + ], + interval: 'auto', + sort: [['@timestamp', 'desc']], + }; + + const locator = locatorClient.get(DISCOVER_APP_LOCATOR); + + const urlToDiscover = locator?.getRedirectUrl(params); + + const navigateToDiscover = () => { + locator?.navigate(params) as Promise; + }; + + const discoverLinkProps = getRouterLinkProps({ + href: urlToDiscover, + onClick: navigateToDiscover, + }); + + return { routerLinkProps: discoverLinkProps, navigate: navigateToDiscover }; +}; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_details_state.ts b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_details_state.ts new file mode 100644 index 0000000000000..4b0626f951580 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_details_state.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 { useCallback } from 'react'; +import { useSelector } from '@xstate/react'; +import { OnRefreshProps } from '@elastic/eui'; +import { DEFAULT_DATEPICKER_REFRESH } from '../../common/constants'; +import { useDatasetQualityDetailsContext } from '../components/dataset_quality_details/context'; +import { indexNameToDataStreamParts } from '../../common/utils'; +import { BasicDataStream } from '../../common/types'; +import { useKibanaContextForPlugin } from '../utils'; + +export const useDatasetQualityDetailsState = () => { + const { service } = useDatasetQualityDetailsContext(); + + const { + services: { fieldFormats }, + } = useKibanaContextForPlugin(); + + const { dataStream, degradedFields, timeRange, breakdownField, isIndexNotFoundError } = + useSelector(service, (state) => state.context) ?? {}; + + const isNonAggregatable = useSelector(service, (state) => + state.matches('initializing.nonAggregatableDataset.done') + ? state.context.isNonAggregatable + : false + ); + + const isBreakdownFieldEcs = useSelector(service, (state) => + state.matches('initializing.checkBreakdownFieldIsEcs.done') + ? state.context.isBreakdownFieldEcs + : false + ); + + const dataStreamSettings = useSelector(service, (state) => + state.matches('initializing.dataStreamSettings.initializeIntegrations') + ? state.context.dataStreamSettings + : undefined + ); + + const integrationDetails = { + integration: useSelector(service, (state) => + state.matches( + 'initializing.dataStreamSettings.initializeIntegrations.integrationDetails.done' + ) + ? state.context.integration + : undefined + ), + dashboard: useSelector(service, (state) => + state.matches( + 'initializing.dataStreamSettings.initializeIntegrations.integrationDashboards.done' + ) + ? state.context.integrationDashboards + : undefined + ), + }; + + const canUserAccessDashboards = useSelector( + service, + (state) => + !state.matches( + 'initializing.dataStreamSettings.initializeIntegrations.integrationDashboards.unauthorized' + ) + ); + + const canUserViewIntegrations = dataStreamSettings?.datasetUserPrivileges?.canViewIntegrations; + + const dataStreamDetails = useSelector(service, (state) => + state.matches('initializing.dataStreamDetails.done') + ? state.context.dataStreamDetails + : undefined + ); + + const { type, dataset, namespace } = indexNameToDataStreamParts(dataStream); + + const datasetDetails: BasicDataStream = { + type, + name: dataset, + namespace, + rawName: dataStream, + }; + + const loadingState = useSelector(service, (state) => ({ + nonAggregatableDatasetLoading: state.matches('initializing.nonAggregatableDataset.fetching'), + dataStreamDetailsLoading: state.matches('initializing.dataStreamDetails.fetching'), + dataStreamSettingsLoading: state.matches('initializing.dataStreamSettings.fetching'), + integrationDetailsLoadings: state.matches( + 'initializing.dataStreamSettings.initializeIntegrations.integrationDetails.fetching' + ), + integrationDetailsLoaded: state.matches( + 'initializing.dataStreamSettings.initializeIntegrations.integrationDetails.done' + ), + integrationDashboardsLoading: state.matches( + 'initializing.dataStreamSettings.initializeIntegrations.integrationDashboards.fetching' + ), + })); + + const updateTimeRange = useCallback( + ({ start, end, refreshInterval }: OnRefreshProps) => { + service.send({ + type: 'UPDATE_TIME_RANGE', + timeRange: { + from: start, + to: end, + refresh: { ...DEFAULT_DATEPICKER_REFRESH, value: refreshInterval }, + }, + }); + }, + [service] + ); + + return { + service, + fieldFormats, + isIndexNotFoundError, + dataStream, + datasetDetails, + degradedFields, + dataStreamDetails, + breakdownField, + isBreakdownFieldEcs, + isNonAggregatable, + timeRange, + loadingState, + updateTimeRange, + dataStreamSettings, + integrationDetails, + canUserAccessDashboards, + canUserViewIntegrations, + }; +}; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_flyout.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_flyout.tsx index 88bf869a5a2a9..0f9d7981e619c 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_flyout.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_flyout.tsx @@ -18,7 +18,7 @@ export const useDatasetQualityFlyout = () => { const { dataset: dataStreamStat, - datasetSettings: dataStreamSettings, + dataStreamSettings, datasetDetails: dataStreamDetails, insightsTimeRange, breakdownField, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_table.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_table.tsx index 347f817f7bf0f..b205a58dfb98f 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_table.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_dataset_quality_table.tsx @@ -134,6 +134,7 @@ export const useDatasetQualityTable = () => { showFullDatasetNames, isSizeStatsAvailable, isActiveDataset: isActive, + timeRange, }), [ fieldFormats, @@ -146,6 +147,7 @@ export const useDatasetQualityTable = () => { showFullDatasetNames, isSizeStatsAvailable, isActive, + timeRange, ] ); diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs.ts b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs.ts new file mode 100644 index 0000000000000..7842fe81966f3 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs.ts @@ -0,0 +1,189 @@ +/* + * 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 { useCallback, useState, useMemo, useEffect } from 'react'; +import type { Action } from '@kbn/ui-actions-plugin/public'; +import { fieldSupportsBreakdown } from '@kbn/unified-histogram-plugin/public'; +import { i18n } from '@kbn/i18n'; +import { useEuiTheme } from '@elastic/eui'; +import type { DataView, DataViewField } from '@kbn/data-views-plugin/common'; +import { DEFAULT_LOGS_DATA_VIEW } from '../../common/constants'; +import { useCreateDataView } from './use_create_dataview'; +import { useKibanaContextForPlugin } from '../utils'; +import { useDatasetQualityDetailsState } from './use_dataset_quality_details_state'; +import { getLensAttributes } from '../components/dataset_quality_details/overview/document_trends/degraded_docs/lens_attributes'; +import { useDatasetQualityDetailsRedirectLink } from './use_dataset_quality_details_redirect_link'; + +const exploreDataInLogsExplorerText = i18n.translate( + 'xpack.datasetQuality.details.chartExploreDataInLogsExplorerText', + { + defaultMessage: 'Explore data in Logs Explorer', + } +); + +const exploreDataInDiscoverText = i18n.translate( + 'xpack.datasetQuality.details.chartExploreDataInDiscoverText', + { + defaultMessage: 'Explore data in Discover', + } +); + +const openInLensText = i18n.translate('xpack.datasetQuality.details.chartOpenInLensText', { + defaultMessage: 'Open in Lens', +}); + +const ACTION_EXPLORE_IN_LOGS_EXPLORER = 'ACTION_EXPLORE_IN_LOGS_EXPLORER'; +const ACTION_OPEN_IN_LENS = 'ACTION_OPEN_IN_LENS'; + +export const useDegradedDocs = () => { + const { euiTheme } = useEuiTheme(); + const { + services: { lens }, + } = useKibanaContextForPlugin(); + const { service, dataStream, datasetDetails, timeRange, breakdownField, integrationDetails } = + useDatasetQualityDetailsState(); + + const [isChartLoading, setIsChartLoading] = useState(undefined); + const [attributes, setAttributes] = useState | undefined>( + undefined + ); + + const { dataView } = useCreateDataView({ + indexPatternString: getDataViewIndexPattern(dataStream), + }); + + const breakdownDataViewField = useMemo( + () => getDataViewField(dataView, breakdownField), + [breakdownField, dataView] + ); + + const handleChartLoading = (isLoading: boolean) => { + setIsChartLoading(isLoading); + }; + + const handleBreakdownFieldChange = useCallback( + (field: DataViewField | undefined) => { + service.send({ + type: 'BREAKDOWN_FIELD_CHANGE', + breakdownField: field?.name, + }); + }, + [service] + ); + + useEffect(() => { + const dataStreamName = dataStream ?? DEFAULT_LOGS_DATA_VIEW; + const datasetTitle = + integrationDetails?.integration?.datasets?.[datasetDetails.name] ?? datasetDetails.name; + + const lensAttributes = getLensAttributes({ + color: euiTheme.colors.danger, + dataStream: dataStreamName, + datasetTitle, + breakdownFieldName: breakdownDataViewField?.name, + }); + setAttributes(lensAttributes); + }, [ + breakdownDataViewField?.name, + euiTheme.colors.danger, + setAttributes, + dataStream, + integrationDetails?.integration?.datasets, + datasetDetails.name, + ]); + + const openInLensCallback = useCallback(() => { + if (attributes) { + lens.navigateToPrefilledEditor({ + id: '', + timeRange, + attributes, + }); + } + }, [attributes, lens, timeRange]); + + const getOpenInLensAction = useMemo(() => { + return { + id: ACTION_OPEN_IN_LENS, + type: 'link', + order: 17, + getDisplayName(): string { + return openInLensText; + }, + getIconType(): string { + return 'visArea'; + }, + async isCompatible(): Promise { + return true; + }, + async execute(): Promise { + return openInLensCallback(); + }, + }; + }, [openInLensCallback]); + + const redirectLinkProps = useDatasetQualityDetailsRedirectLink({ + dataStreamStat: datasetDetails, + query: { language: 'kuery', query: '_ignored:*' }, + timeRangeConfig: timeRange, + breakdownField: breakdownDataViewField?.name, + }); + + const getOpenInLogsExplorerAction = useMemo(() => { + return { + id: ACTION_EXPLORE_IN_LOGS_EXPLORER, + type: 'link', + getDisplayName(): string { + return redirectLinkProps?.isLogsExplorerAvailable + ? exploreDataInLogsExplorerText + : exploreDataInDiscoverText; + }, + getHref: async () => { + return redirectLinkProps.linkProps.href; + }, + getIconType(): string | undefined { + return 'visTable'; + }, + async isCompatible(): Promise { + return true; + }, + async execute(): Promise { + return redirectLinkProps.navigate(); + }, + order: 18, + }; + }, [redirectLinkProps]); + + const extraActions: Action[] = [getOpenInLensAction, getOpenInLogsExplorerAction]; + + return { + attributes, + dataView, + breakdown: { + dataViewField: breakdownDataViewField, + fieldSupportsBreakdown: breakdownDataViewField + ? fieldSupportsBreakdown(breakdownDataViewField) + : true, + onChange: handleBreakdownFieldChange, + }, + extraActions, + isChartLoading, + onChartLoading: handleChartLoading, + setAttributes, + setIsChartLoading, + }; +}; + +function getDataViewIndexPattern(dataStream: string | undefined) { + return dataStream ?? DEFAULT_LOGS_DATA_VIEW; +} + +function getDataViewField(dataView: DataView | undefined, fieldName: string | undefined) { + return fieldName && dataView + ? dataView.fields.find((field) => field.name === fieldName) + : undefined; +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.tsx index 682f0205c7438..6840f2a4088a9 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_docs_chart.tsx @@ -14,12 +14,12 @@ import { useEuiTheme } from '@elastic/eui'; import { type DataView, DataViewField } from '@kbn/data-views-plugin/common'; import { useDatasetQualityContext } from '../components/dataset_quality/context'; import { DEFAULT_LOGS_DATA_VIEW } from '../../common/constants'; -import { getLensAttributes } from '../components/flyout/degraded_docs_trend/lens_attributes'; import { useCreateDataView } from './use_create_dataview'; import { useRedirectLink } from './use_redirect_link'; import { useDatasetQualityFlyout } from './use_dataset_quality_flyout'; import { useKibanaContextForPlugin } from '../utils'; import { useDatasetDetailsTelemetry } from './use_telemetry'; +import { getLensAttributes } from '../components/dataset_quality_details/overview/document_trends/degraded_docs/lens_attributes'; const exploreDataInLogsExplorerText = i18n.translate( 'xpack.datasetQuality.flyoutChartExploreDataInLogsExplorerText', diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_fields.ts b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_fields.ts new file mode 100644 index 0000000000000..86aed2df77120 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_degraded_fields.ts @@ -0,0 +1,78 @@ +/* + * 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 { useSelector } from '@xstate/react'; +import { useCallback, useMemo } from 'react'; +import { orderBy } from 'lodash'; +import { DegradedField } from '../../common/data_streams_stats'; +import { SortDirection } from '../../common/types'; +import { + DEFAULT_DEGRADED_FIELD_SORT_DIRECTION, + DEFAULT_DEGRADED_FIELD_SORT_FIELD, +} from '../../common/constants'; +import { useKibanaContextForPlugin } from '../utils'; +import { useDatasetQualityDetailsState } from './use_dataset_quality_details_state'; + +export type DegradedFieldSortField = keyof DegradedField; + +export function useDegradedFields() { + const { service } = useDatasetQualityDetailsState(); + const { + services: { fieldFormats }, + } = useKibanaContextForPlugin(); + + const degradedFields = useSelector(service, (state) => state.context.degradedFields) ?? {}; + const { data, table } = degradedFields; + const { page, rowsPerPage, sort } = table; + + const totalItemCount = data?.length ?? 0; + + const pagination = { + pageIndex: page, + pageSize: rowsPerPage, + totalItemCount, + hidePerPageOptions: true, + }; + + const onTableChange = useCallback( + (options: { + page: { index: number; size: number }; + sort?: { field: DegradedFieldSortField; direction: SortDirection }; + }) => { + service.send({ + type: 'UPDATE_DEGRADED_FIELDS_TABLE_CRITERIA', + degraded_field_criteria: { + page: options.page.index, + rowsPerPage: options.page.size, + sort: { + field: options.sort?.field || DEFAULT_DEGRADED_FIELD_SORT_FIELD, + direction: options.sort?.direction || DEFAULT_DEGRADED_FIELD_SORT_DIRECTION, + }, + }, + }); + }, + [service] + ); + + const renderedItems = useMemo(() => { + const sortedItems = orderBy(data, sort.field, sort.direction); + return sortedItems.slice(page * rowsPerPage, (page + 1) * rowsPerPage); + }, [data, sort.field, sort.direction, page, rowsPerPage]); + + const isLoading = useSelector(service, (state) => + state.matches('initializing.dataStreamDegradedFields.fetching') + ); + + return { + isLoading, + pagination, + onTableChange, + renderedItems, + sort: { sort }, + fieldFormats, + totalItemCount, + }; +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_integration_actions.ts b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_integration_actions.ts new file mode 100644 index 0000000000000..0fce743875a60 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_integration_actions.ts @@ -0,0 +1,84 @@ +/* + * 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 { getRouterLinkProps } from '@kbn/router-utils'; +import { useMemo, useCallback } from 'react'; +import useToggle from 'react-use/lib/useToggle'; +import { MANAGEMENT_APP_LOCATOR } from '@kbn/deeplinks-management/constants'; +import { DASHBOARD_APP_LOCATOR } from '@kbn/deeplinks-analytics'; +import { useKibanaContextForPlugin } from '../utils'; +import { Dashboard } from '../../common/api_types'; + +export const useIntegrationActions = () => { + const { + services: { + application: { navigateToUrl }, + http: { basePath }, + share, + }, + } = useKibanaContextForPlugin(); + + const [isOpen, toggleIsOpen] = useToggle(false); + + const dashboardLocator = useMemo( + () => share.url.locators.get(DASHBOARD_APP_LOCATOR), + [share.url.locators] + ); + const indexManagementLocator = useMemo( + () => share.url.locators.get(MANAGEMENT_APP_LOCATOR), + [share.url.locators] + ); + + const handleCloseMenu = useCallback(() => { + toggleIsOpen(); + }, [toggleIsOpen]); + const handleToggleMenu = useCallback(() => { + toggleIsOpen(); + }, [toggleIsOpen]); + + const getIntegrationOverviewLinkProps = useCallback( + (name: string, version: string) => { + const href = basePath.prepend(`/app/integrations/detail/${name}-${version}/overview`); + return getRouterLinkProps({ + href, + onClick: () => { + return navigateToUrl(href); + }, + }); + }, + [basePath, navigateToUrl] + ); + const getIndexManagementLinkProps = useCallback( + (params: { sectionId: string; appId: string }) => + getRouterLinkProps({ + href: indexManagementLocator?.getRedirectUrl(params), + onClick: () => { + return indexManagementLocator?.navigate(params); + }, + }), + [indexManagementLocator] + ); + const getDashboardLinkProps = useCallback( + (dashboard: Dashboard) => + getRouterLinkProps({ + href: dashboardLocator?.getRedirectUrl({ dashboardId: dashboard?.id } || ''), + onClick: () => { + return dashboardLocator?.navigate({ dashboardId: dashboard?.id } || ''); + }, + }), + [dashboardLocator] + ); + + return { + isOpen, + handleCloseMenu, + handleToggleMenu, + getIntegrationOverviewLinkProps, + getIndexManagementLinkProps, + getDashboardLinkProps, + }; +}; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_overview_summary_panel.ts b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_overview_summary_panel.ts new file mode 100644 index 0000000000000..5cdd820c9b4ae --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_overview_summary_panel.ts @@ -0,0 +1,77 @@ +/* + * 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 { useSelector } from '@xstate/react'; +import { formatNumber } from '@elastic/eui'; +import { BYTE_NUMBER_FORMAT, MAX_HOSTS_METRIC_VALUE, NUMBER_FORMAT } from '../../common/constants'; +import { useDatasetQualityDetailsContext } from '../components/dataset_quality_details/context'; + +export const useOverviewSummaryPanel = () => { + const { service } = useDatasetQualityDetailsContext(); + const context = useSelector(service, (state) => state.context) ?? {}; + + const isSummaryPanelLoading = useSelector(service, (state) => + state.matches('initializing.dataStreamDetails.fetching') + ); + + const dataStreamDetails = 'dataStreamDetails' in context ? context.dataStreamDetails : {}; + + const services = dataStreamDetails?.services ?? {}; + const serviceKeys = Object.keys(services); + const totalServicesCount = serviceKeys + .map((key: string) => services[key].length) + .reduce((a, b) => a + b, 0); + + const totalDocsCount = formatNumber(dataStreamDetails?.docsCount ?? 0, NUMBER_FORMAT); + + const sizeInBytesAvailable = dataStreamDetails?.sizeBytes !== null; + const sizeInBytes = formatNumber(dataStreamDetails?.sizeBytes ?? 0, BYTE_NUMBER_FORMAT); + const isUserAllowedToSeeSizeInBytes = dataStreamDetails?.userPrivileges?.canMonitor ?? true; + + const hosts = dataStreamDetails?.hosts ?? {}; + const hostKeys = Object.keys(hosts); + const countOfHosts = hostKeys + .map((key: string) => hosts[key].length) + .reduce( + ({ count, anyHostExceedsMax }, hostCount) => ({ + count: count + hostCount, + anyHostExceedsMax: anyHostExceedsMax || hostCount > MAX_HOSTS_METRIC_VALUE, + }), + { count: 0, anyHostExceedsMax: false } + ); + + const totalHostsCount = formatMetricValueForMax( + countOfHosts.anyHostExceedsMax ? countOfHosts.count + 1 : countOfHosts.count, + countOfHosts.count, + NUMBER_FORMAT + ); + + const totalDegradedDocsCount = formatNumber( + dataStreamDetails?.degradedDocsCount ?? 0, + NUMBER_FORMAT + ); + + return { + totalDocsCount, + sizeInBytesAvailable, + sizeInBytes, + isUserAllowedToSeeSizeInBytes, + totalServicesCount, + totalHostsCount, + isSummaryPanelLoading, + totalDegradedDocsCount, + }; +}; + +/** + * Formats a metric value to show a '+' sign if it's above a max value e.g. 50+ + */ +function formatMetricValueForMax(value: number, max: number, numberFormat: string): string { + const exceedsMax = value > max; + const valueToShow = exceedsMax ? max : value; + return `${formatNumber(valueToShow, numberFormat)}${exceedsMax ? '+' : ''}`; +} diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_redirect_link.ts b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_redirect_link.ts index 4a4c6772c412c..e4fbf0771ee1f 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_redirect_link.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_redirect_link.ts @@ -16,11 +16,8 @@ import { getRouterLinkProps } from '@kbn/router-utils'; import { RouterLinkProps } from '@kbn/router-utils/src/get_router_link_props'; import { LocatorPublic } from '@kbn/share-plugin/common'; import { LocatorClient } from '@kbn/shared-ux-prompt-no-data-views-types'; -import { useSelector } from '@xstate/react'; -import { useDatasetQualityContext } from '../components/dataset_quality/context'; -import { TimeRangeConfig } from '../state_machines/dataset_quality_controller'; import { useKibanaContextForPlugin } from '../utils'; -import { BasicDataStream } from '../../common/types'; +import { BasicDataStream, TimeRangeConfig } from '../../common/types'; import { useRedirectLinkTelemetry } from './use_telemetry'; export const useRedirectLink = ({ @@ -32,7 +29,7 @@ export const useRedirectLink = ({ }: { dataStreamStat: T; query?: Query | AggregateQuery; - timeRangeConfig?: TimeRangeConfig; + timeRangeConfig: TimeRangeConfig; breakdownField?: string; telemetry?: Parameters[0]['telemetry']; }) => { @@ -40,9 +37,7 @@ export const useRedirectLink = ({ services: { share }, } = useKibanaContextForPlugin(); - const { service } = useDatasetQualityContext(); - const { timeRange } = useSelector(service, (state) => state.context.filters); - const { from, to } = timeRangeConfig || timeRange; + const { from, to } = timeRangeConfig; const logsExplorerLocator = share.url.locators.get(SINGLE_DATASET_LOCATOR_ID); diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_telemetry.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_telemetry.tsx index f32deb8e3b2c2..c473495c0a661 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_telemetry.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/hooks/use_telemetry.tsx @@ -22,9 +22,10 @@ import { DatasetNavigatedEbtProps, DatasetEbtProps, } from '../services/telemetry'; -import { FlyoutDataset, TimeRangeConfig } from '../state_machines/dataset_quality_controller'; +import { FlyoutDataset } from '../state_machines/dataset_quality_controller'; import { useDatasetQualityContext } from '../components/dataset_quality/context'; import { useDatasetQualityFilters } from './use_dataset_quality_filters'; +import { TimeRangeConfig } from '../../common/types'; export const useRedirectLinkTelemetry = ({ rawName, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/plugin.tsx b/x-pack/plugins/observability_solution/dataset_quality/public/plugin.tsx index d24408a85532d..6cb4c12975412 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/plugin.tsx +++ b/x-pack/plugins/observability_solution/dataset_quality/public/plugin.tsx @@ -8,7 +8,9 @@ import { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/public'; import { TelemetryService } from './services/telemetry'; import { createDatasetQuality } from './components/dataset_quality'; -import { createDatasetQualityControllerLazyFactory } from './controller/lazy_create_controller'; +import { createDatasetQualityDetails } from './components/dataset_quality_details'; +import { createDatasetQualityControllerLazyFactory } from './controller/dataset_quality/lazy_create_controller'; +import { createDatasetQualityDetailsControllerLazyFactory } from './controller/dataset_quality_details/lazy_create_controller'; import { DataStreamsStatsService } from './services/data_streams_stats'; import { DataStreamDetailsService } from './services/data_stream_details'; import { @@ -22,6 +24,7 @@ export class DatasetQualityPlugin implements Plugin { private telemetry = new TelemetryService(); + constructor(context: PluginInitializerContext) {} public setup(core: CoreSetup, plugins: DatasetQualitySetupDeps) { @@ -54,6 +57,24 @@ export class DatasetQualityPlugin dataStreamDetailsClient, }); - return { DatasetQuality, createDatasetQualityController }; + const DatasetQualityDetails = createDatasetQualityDetails({ + core, + plugins, + telemetryClient, + }); + + const createDatasetQualityDetailsController = createDatasetQualityDetailsControllerLazyFactory({ + core, + plugins, + dataStreamStatsClient, + dataStreamDetailsClient, + }); + + return { + DatasetQuality, + createDatasetQualityController, + DatasetQualityDetails, + createDatasetQualityDetailsController, + }; } } diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_stream_details/data_stream_details_client.ts b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_stream_details/data_stream_details_client.ts index a5813b3190351..55d21286d7f60 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_stream_details/data_stream_details_client.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_stream_details/data_stream_details_client.ts @@ -25,13 +25,12 @@ import { GetDataStreamDetailsResponse, GetDataStreamSettingsParams, GetDataStreamSettingsResponse, - GetDataStreamsStatsError, GetIntegrationDashboardsParams, } from '../../../common/data_streams_stats'; import { IDataStreamDetailsClient } from './types'; -import { GetDataStreamsDetailsError } from '../../../common/data_stream_details'; import { Integration } from '../../../common/data_streams_stats/integration'; import { GetDataStreamIntegrationParams } from '../../../common/data_stream_details/types'; +import { DatasetQualityError } from '../../../common/errors'; export class DataStreamDetailsClient implements IDataStreamDetailsClient { constructor(private readonly http: HttpStart) {} @@ -42,16 +41,13 @@ export class DataStreamDetailsClient implements IDataStreamDetailsClient { `/internal/dataset_quality/data_streams/${dataStream}/settings` ) .catch((error) => { - throw new GetDataStreamsStatsError( - `Failed to fetch data stream settings": ${error}`, - error.body.statusCode - ); + throw new DatasetQualityError(`Failed to fetch data stream settings": ${error}`, error); }); const dataStreamSettings = decodeOrThrow( getDataStreamsSettingsResponseRt, (message: string) => - new GetDataStreamsStatsError(`Failed to decode data stream settings response: ${message}"`) + new DatasetQualityError(`Failed to decode data stream settings response: ${message}"`) )(response); return dataStreamSettings as DataStreamSettings; @@ -66,16 +62,13 @@ export class DataStreamDetailsClient implements IDataStreamDetailsClient { } ) .catch((error) => { - throw new GetDataStreamsStatsError( - `Failed to fetch data stream details": ${error}`, - error.body.statusCode - ); + throw new DatasetQualityError(`Failed to fetch data stream details": ${error}`, error); }); const dataStreamDetails = decodeOrThrow( getDataStreamsDetailsResponseRt, (message: string) => - new GetDataStreamsStatsError(`Failed to decode data stream details response: ${message}"`) + new DatasetQualityError(`Failed to decode data stream details response: ${message}"`) )(response); return dataStreamDetails as DataStreamDetails; @@ -94,16 +87,16 @@ export class DataStreamDetailsClient implements IDataStreamDetailsClient { } ) .catch((error) => { - throw new GetDataStreamsDetailsError( + throw new DatasetQualityError( `Failed to fetch data stream degraded fields": ${error}`, - error.body.statusCode + error ); }); return decodeOrThrow( getDataStreamDegradedFieldsResponseRt, (message: string) => - new GetDataStreamsDetailsError( + new DatasetQualityError( `Failed to decode data stream degraded fields response: ${message}"` ) )(response); @@ -115,18 +108,13 @@ export class DataStreamDetailsClient implements IDataStreamDetailsClient { `/internal/dataset_quality/integrations/${integration}/dashboards` ) .catch((error) => { - throw new GetDataStreamsStatsError( - `Failed to fetch integration dashboards": ${error}`, - error.body.statusCode - ); + throw new DatasetQualityError(`Failed to fetch integration dashboards": ${error}`, error); }); const { dashboards } = decodeOrThrow( integrationDashboardsRT, (message: string) => - new GetDataStreamsStatsError( - `Failed to decode integration dashboards response: ${message}"` - ) + new DatasetQualityError(`Failed to decode integration dashboards response: ${message}"`) )(response); return dashboards; @@ -141,16 +129,13 @@ export class DataStreamDetailsClient implements IDataStreamDetailsClient { query: { type }, }) .catch((error) => { - throw new GetDataStreamsStatsError( - `Failed to fetch integrations: ${error}`, - error.body.statusCode - ); + throw new DatasetQualityError(`Failed to fetch integrations: ${error}`, error); }); const { integrations } = decodeOrThrow( getIntegrationsResponseRt, (message: string) => - new GetDataStreamsStatsError(`Failed to decode integrations response: ${message}`) + new DatasetQualityError(`Failed to decode integrations response: ${message}`) )(response); const integration = integrations.find((i) => i.name === integrationName); diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts index bbce86404e1dd..35cd67a1724f9 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/data_streams_stats_client.ts @@ -13,21 +13,21 @@ import { getIntegrationsResponseRt, getNonAggregatableDatasetsRt, IntegrationResponse, + NonAggregatableDatasets, } from '../../../common/api_types'; import { DEFAULT_DATASET_TYPE } from '../../../common/constants'; import { DataStreamStatServiceResponse, GetDataStreamsDegradedDocsStatsQuery, GetDataStreamsDegradedDocsStatsResponse, - GetDataStreamsStatsError, GetDataStreamsStatsQuery, GetDataStreamsStatsResponse, GetIntegrationsParams, GetNonAggregatableDataStreamsParams, - GetNonAggregatableDataStreamsResponse, } from '../../../common/data_streams_stats'; import { Integration } from '../../../common/data_streams_stats/integration'; import { IDataStreamsStatsClient } from './types'; +import { DatasetQualityError } from '../../../common/errors'; export class DataStreamsStatsClient implements IDataStreamsStatsClient { constructor(private readonly http: HttpStart) {} @@ -40,16 +40,13 @@ export class DataStreamsStatsClient implements IDataStreamsStatsClient { query: params, }) .catch((error) => { - throw new GetDataStreamsStatsError( - `Failed to fetch data streams stats: ${error}`, - error.body.statusCode - ); + throw new DatasetQualityError(`Failed to fetch data streams stats: ${error}`, error); }); const { dataStreamsStats, datasetUserPrivileges } = decodeOrThrow( getDataStreamsStatsResponseRt, (message: string) => - new GetDataStreamsStatsError(`Failed to decode data streams stats response: ${message}`) + new DatasetQualityError(`Failed to decode data streams stats response: ${message}`) )(response); return { dataStreamsStats, datasetUserPrivileges }; @@ -67,16 +64,16 @@ export class DataStreamsStatsClient implements IDataStreamsStatsClient { } ) .catch((error) => { - throw new GetDataStreamsStatsError( + throw new DatasetQualityError( `Failed to fetch data streams degraded stats: ${error}`, - error.body.statusCode + error ); }); const { degradedDocs } = decodeOrThrow( getDataStreamsDegradedDocsStatsResponseRt, (message: string) => - new GetDataStreamsStatsError( + new DatasetQualityError( `Failed to decode data streams degraded docs stats response: ${message}` ) )(response); @@ -86,26 +83,20 @@ export class DataStreamsStatsClient implements IDataStreamsStatsClient { public async getNonAggregatableDatasets(params: GetNonAggregatableDataStreamsParams) { const response = await this.http - .get( - '/internal/dataset_quality/data_streams/non_aggregatable', - { - query: { - ...params, - type: DEFAULT_DATASET_TYPE, - }, - } - ) + .get('/internal/dataset_quality/data_streams/non_aggregatable', { + query: { + ...params, + type: DEFAULT_DATASET_TYPE, + }, + }) .catch((error) => { - throw new GetDataStreamsStatsError( - `Failed to fetch non aggregatable datasets: ${error}`, - error.body.statusCode - ); + throw new DatasetQualityError(`Failed to fetch non aggregatable datasets: ${error}`, error); }); const nonAggregatableDatasets = decodeOrThrow( getNonAggregatableDatasetsRt, (message: string) => - new GetDataStreamsStatsError(`Failed to fetch non aggregatable datasets: ${message}`) + new DatasetQualityError(`Failed to fetch non aggregatable datasets: ${message}`) )(response); return nonAggregatableDatasets; @@ -119,16 +110,13 @@ export class DataStreamsStatsClient implements IDataStreamsStatsClient { query: params, }) .catch((error) => { - throw new GetDataStreamsStatsError( - `Failed to fetch integrations: ${error}`, - error.body.statusCode - ); + throw new DatasetQualityError(`Failed to fetch integrations: ${error}`, error); }); const { integrations } = decodeOrThrow( getIntegrationsResponseRt, (message: string) => - new GetDataStreamsStatsError(`Failed to decode integrations response: ${message}`) + new DatasetQualityError(`Failed to decode integrations response: ${message}`) )(response); return integrations.map(Integration.create); diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/types.ts b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/types.ts index ba1f9077f45b0..785cdb4a88ccc 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/types.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/services/data_streams_stats/types.ts @@ -13,9 +13,9 @@ import { GetDataStreamsStatsQuery, GetIntegrationsParams, GetNonAggregatableDataStreamsParams, - GetNonAggregatableDataStreamsResponse, } from '../../../common/data_streams_stats'; import { Integration } from '../../../common/data_streams_stats/integration'; +import { NonAggregatableDatasets } from '../../../common/api_types'; export type DataStreamsStatsServiceSetup = void; @@ -35,5 +35,5 @@ export interface IDataStreamsStatsClient { getIntegrations(params: GetIntegrationsParams['query']): Promise; getNonAggregatableDatasets( params: GetNonAggregatableDataStreamsParams - ): Promise; + ): Promise; } diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/common/notifications.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/common/notifications.ts new file mode 100644 index 0000000000000..9ec9f71e122cf --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/common/notifications.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 type { IToasts } from '@kbn/core-notifications-browser'; +import { i18n } from '@kbn/i18n'; + +export const fetchNonAggregatableDatasetsFailedNotifier = (toasts: IToasts, error: Error) => { + toasts.addDanger({ + title: i18n.translate('xpack.datasetQuality.fetchNonAggregatableDatasetsFailed', { + defaultMessage: "We couldn't get non aggregatable datasets information.", + }), + text: error.message, + }); +}; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/notifications.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/notifications.ts index fe83caafce250..f10ea32da3af6 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/notifications.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/notifications.ts @@ -26,15 +26,6 @@ export const fetchDatasetDetailsFailedNotifier = (toasts: IToasts, error: Error) }); }; -export const fetchDatasetSettingsFailedNotifier = (toasts: IToasts, error: Error) => { - toasts.addDanger({ - title: i18n.translate('xpack.datasetQuality.fetchDatasetSettingsFailed', { - defaultMessage: "Data set settings couldn't be loaded.", - }), - text: error.message, - }); -}; - export const fetchDegradedStatsFailedNotifier = (toasts: IToasts, error: Error) => { toasts.addDanger({ title: i18n.translate('xpack.datasetQuality.fetchDegradedStatsFailed', { @@ -53,15 +44,6 @@ export const fetchNonAggregatableDatasetsFailedNotifier = (toasts: IToasts, erro }); }; -export const fetchIntegrationDashboardsFailedNotifier = (toasts: IToasts, error: Error) => { - toasts.addDanger({ - title: i18n.translate('xpack.datasetQuality.fetchIntegrationDashboardsFailed', { - defaultMessage: "We couldn't get your integration dashboards.", - }), - text: error.message, - }); -}; - export const fetchIntegrationsFailedNotifier = (toasts: IToasts, error: Error) => { toasts.addDanger({ title: i18n.translate('xpack.datasetQuality.fetchIntegrationsFailed', { @@ -71,22 +53,6 @@ export const fetchIntegrationsFailedNotifier = (toasts: IToasts, error: Error) = }); }; -export const fetchDataStreamIntegrationFailedNotifier = ( - toasts: IToasts, - error: Error, - integrationName?: string -) => { - toasts.addDanger({ - title: i18n.translate('xpack.datasetQuality.flyout.fetchIntegrationsFailed', { - defaultMessage: "We couldn't get {integrationName} integration info.", - values: { - integrationName, - }, - }), - text: error.message, - }); -}; - export const noDatasetSelected = i18n.translate( 'xpack.datasetQuality.fetchDatasetDetailsFailed.noDatasetSelected', { @@ -96,7 +62,7 @@ export const noDatasetSelected = i18n.translate( export const assertBreakdownFieldEcsFailedNotifier = (toasts: IToasts, error: Error) => { toasts.addDanger({ - title: i18n.translate('xpack.datasetQuality. assertBreakdownFieldEcsFailed', { + title: i18n.translate('xpack.datasetQuality.assertBreakdownFieldEcsFailed', { defaultMessage: "We couldn't retrieve breakdown field metadata.", }), text: error.message, diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/state_machine.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/state_machine.ts index e2a6eda4d0e6e..fb6c03fae153a 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/state_machine.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/state_machine.ts @@ -9,7 +9,12 @@ import { IToasts } from '@kbn/core/public'; import { getDateISORange } from '@kbn/timerange'; import { assign, createMachine, DoneInvokeEvent, InterpreterFrom } from 'xstate'; import { DatasetQualityStartDeps } from '../../../types'; -import { Dashboard, DataStreamStat, DegradedFieldResponse } from '../../../../common/api_types'; +import { + Dashboard, + DataStreamStat, + DegradedFieldResponse, + NonAggregatableDatasets, +} from '../../../../common/api_types'; import { Integration } from '../../../../common/data_streams_stats/integration'; import { IDataStreamDetailsClient } from '../../../services/data_stream_details'; import { @@ -18,7 +23,6 @@ import { GetDataStreamsStatsQuery, GetIntegrationsParams, GetNonAggregatableDataStreamsParams, - GetNonAggregatableDataStreamsResponse, DataStreamStatServiceResponse, } from '../../../../common/data_streams_stats'; import { DegradedDocsStat } from '../../../../common/data_streams_stats/malformed_docs_stat'; @@ -28,17 +32,14 @@ import { IDataStreamsStatsClient } from '../../../services/data_streams_stats'; import { generateDatasets } from '../../../utils'; import { DEFAULT_CONTEXT } from './defaults'; import { - fetchDatasetSettingsFailedNotifier, fetchDatasetDetailsFailedNotifier, fetchDatasetStatsFailedNotifier, fetchDegradedStatsFailedNotifier, - fetchIntegrationDashboardsFailedNotifier, fetchIntegrationsFailedNotifier, noDatasetSelected, - fetchNonAggregatableDatasetsFailedNotifier, - fetchDataStreamIntegrationFailedNotifier, assertBreakdownFieldEcsFailedNotifier, } from './notifications'; +import { fetchNonAggregatableDatasetsFailedNotifier } from '../../common/notifications'; import { DatasetQualityControllerContext, DatasetQualityControllerEvent, @@ -46,6 +47,11 @@ import { DefaultDatasetQualityControllerState, FlyoutDataset, } from './types'; +import { + fetchDataStreamSettingsFailedNotifier, + fetchIntegrationDashboardsFailedNotifier, + fetchDataStreamIntegrationFailedNotifier, +} from '../../dataset_quality_details_controller/notifications'; export const createPureDatasetQualityControllerStateMachine = ( initialContext: DatasetQualityControllerContext @@ -269,7 +275,7 @@ export const createPureDatasetQualityControllerStateMachine = ( }, onError: { target: 'done', - actions: ['notifyFetchDatasetSettingsFailed'], + actions: ['notifyFetchDataStreamSettingsFailed'], }, }, }, @@ -628,7 +634,7 @@ export const createPureDatasetQualityControllerStateMachine = ( storeNonAggregatableDatasets: assign( ( _context: DefaultDatasetQualityControllerState, - event: DoneInvokeEvent + event: DoneInvokeEvent ) => { return 'data' in event ? { @@ -642,7 +648,7 @@ export const createPureDatasetQualityControllerStateMachine = ( ? { flyout: { ...context.flyout, - datasetSettings: (event.data ?? {}) as DataStreamSettings, + dataStreamSettings: (event.data ?? {}) as DataStreamSettings, }, } : {}; @@ -660,7 +666,7 @@ export const createPureDatasetQualityControllerStateMachine = ( storeDatasetIsNonAggregatable: assign( ( context: DefaultDatasetQualityControllerState, - event: DoneInvokeEvent + event: DoneInvokeEvent ) => { return 'data' in event ? { @@ -758,8 +764,8 @@ export const createDatasetQualityControllerStateMachine = ({ fetchDegradedStatsFailedNotifier(toasts, event.data), notifyFetchNonAggregatableDatasetsFailed: (_context, event: DoneInvokeEvent) => fetchNonAggregatableDatasetsFailedNotifier(toasts, event.data), - notifyFetchDatasetSettingsFailed: (_context, event: DoneInvokeEvent) => - fetchDatasetSettingsFailedNotifier(toasts, event.data), + notifyFetchDataStreamSettingsFailed: (_context, event: DoneInvokeEvent) => + fetchDataStreamSettingsFailedNotifier(toasts, event.data), notifyFetchDatasetDetailsFailed: (_context, event: DoneInvokeEvent) => fetchDatasetDetailsFailedNotifier(toasts, event.data), notifyFetchIntegrationDashboardsFailed: (_context, event: DoneInvokeEvent) => @@ -767,7 +773,7 @@ export const createDatasetQualityControllerStateMachine = ({ notifyFetchIntegrationsFailed: (_context, event: DoneInvokeEvent) => fetchIntegrationsFailedNotifier(toasts, event.data), notifyFetchDatasetIntegrationsFailed: (context, event: DoneInvokeEvent) => { - const integrationName = context.flyout.datasetSettings?.integration; + const integrationName = context.flyout.dataStreamSettings?.integration; return fetchDataStreamIntegrationFailedNotifier(toasts, event.data, integrationName); }, notifyAssertBreakdownFieldEcsFailed: (_context, event: DoneInvokeEvent) => @@ -826,7 +832,7 @@ export const createDatasetQualityControllerStateMachine = ({ }, loadDataStreamSettings: (context) => { if (!context.flyout.dataset) { - fetchDatasetSettingsFailedNotifier(toasts, new Error(noDatasetSelected)); + fetchDataStreamSettingsFailedNotifier(toasts, new Error(noDatasetSelected)); return Promise.resolve({}); } @@ -842,11 +848,11 @@ export const createDatasetQualityControllerStateMachine = ({ }); }, loadDataStreamIntegration: (context) => { - if (context.flyout.datasetSettings?.integration && context.flyout.dataset) { + if (context.flyout.dataStreamSettings?.integration && context.flyout.dataset) { const { type } = context.flyout.dataset; return dataStreamDetailsClient.getDataStreamIntegration({ type: type as DataStreamType, - integrationName: context.flyout.datasetSettings.integration, + integrationName: context.flyout.dataStreamSettings.integration, }); } return Promise.resolve(); @@ -874,9 +880,9 @@ export const createDatasetQualityControllerStateMachine = ({ }); }, loadIntegrationDashboards: (context) => { - if (context.flyout.datasetSettings?.integration) { + if (context.flyout.dataStreamSettings?.integration) { return dataStreamDetailsClient.getIntegrationDashboards({ - integration: context.flyout.datasetSettings.integration, + integration: context.flyout.dataStreamSettings.integration, }); } @@ -932,7 +938,3 @@ export const createDatasetQualityControllerStateMachine = ({ export type DatasetQualityControllerStateService = InterpreterFrom< typeof createDatasetQualityControllerStateMachine >; - -export type DatasetQualityControllerStateMachine = ReturnType< - typeof createDatasetQualityControllerStateMachine ->; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/types.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/types.ts index c258962f56b8d..d6bfaaad216b9 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/types.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_controller/src/types.ts @@ -6,9 +6,12 @@ */ import { DoneInvokeEvent } from 'xstate'; -import { RefreshInterval, TimeRange } from '@kbn/data-plugin/common'; -import { QualityIndicators, SortDirection } from '../../../../common/types'; -import { Dashboard, DatasetUserPrivileges } from '../../../../common/api_types'; +import { QualityIndicators, TableCriteria, TimeRangeConfig } from '../../../../common/types'; +import { + Dashboard, + DatasetUserPrivileges, + NonAggregatableDatasets, +} from '../../../../common/api_types'; import { Integration } from '../../../../common/data_streams_stats/integration'; import { DatasetTableSortField, DegradedFieldSortField } from '../../../hooks'; import { DegradedDocsStat } from '../../../../common/data_streams_stats/malformed_docs_stat'; @@ -19,7 +22,6 @@ import { DataStreamStatServiceResponse, DataStreamStat, DataStreamStatType, - GetNonAggregatableDataStreamsResponse, DegradedField, DegradedFieldResponse, } from '../../../../common/data_streams_stats'; @@ -29,24 +31,11 @@ export type FlyoutDataset = Omit< 'type' | 'size' | 'sizeBytes' | 'lastActivity' | 'degradedDocs' > & { type: string }; -interface TableCriteria { - page: number; - rowsPerPage: number; - sort: { - field: TSortField; - direction: SortDirection; - }; -} - export interface DegradedFields { table: TableCriteria; data?: DegradedField[]; } -export type TimeRangeConfig = Pick & { - refresh: RefreshInterval; -}; - interface FiltersCriteria { inactive: boolean; fullNames: boolean; @@ -69,7 +58,7 @@ export interface WithTableOptions { export interface WithFlyoutOptions { flyout: { dataset?: FlyoutDataset; - datasetSettings?: DataStreamSettings; + dataStreamSettings?: DataStreamSettings; datasetDetails?: DataStreamDetails; insightsTimeRange?: TimeRangeConfig; breakdownField?: string; @@ -135,10 +124,6 @@ export type DatasetQualityControllerTypeState = value: 'degradedDocs.fetching'; context: DefaultDatasetQualityStateContext; } - | { - value: 'datasets.loaded'; - context: DefaultDatasetQualityStateContext; - } | { value: 'integrations.fetching'; context: DefaultDatasetQualityStateContext; @@ -250,7 +235,7 @@ export type DatasetQualityControllerEvent = query: string; } | DoneInvokeEvent - | DoneInvokeEvent + | DoneInvokeEvent | DoneInvokeEvent | DoneInvokeEvent | DoneInvokeEvent diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/defaults.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/defaults.ts new file mode 100644 index 0000000000000..024e49a9b83f4 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/defaults.ts @@ -0,0 +1,32 @@ +/* + * 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 { + DEFAULT_DATEPICKER_REFRESH, + DEFAULT_DEGRADED_FIELD_SORT_DIRECTION, + DEFAULT_DEGRADED_FIELD_SORT_FIELD, + DEFAULT_TIME_RANGE, +} from '../../../common/constants'; +import { DefaultDatasetQualityDetailsContext } from './types'; + +export const DEFAULT_CONTEXT: DefaultDatasetQualityDetailsContext = { + degradedFields: { + table: { + page: 0, + rowsPerPage: 10, + sort: { + field: DEFAULT_DEGRADED_FIELD_SORT_FIELD, + direction: DEFAULT_DEGRADED_FIELD_SORT_DIRECTION, + }, + }, + }, + isIndexNotFoundError: false, + timeRange: { + ...DEFAULT_TIME_RANGE, + refresh: DEFAULT_DATEPICKER_REFRESH, + }, +}; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/index.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/index.ts new file mode 100644 index 0000000000000..069d40a3e8cdd --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/index.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. + */ + +// export * from './state_machine'; +export * from './types'; +export * from './defaults'; +export * from './state_machine'; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/notifications.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/notifications.ts new file mode 100644 index 0000000000000..b501fd02bdcf3 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/notifications.ts @@ -0,0 +1,61 @@ +/* + * 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 { IToasts } from '@kbn/core-notifications-browser'; +import { i18n } from '@kbn/i18n'; + +export const fetchDataStreamDetailsFailedNotifier = (toasts: IToasts, error: Error) => { + toasts.addDanger({ + title: i18n.translate('xpack.datasetQuality.details.fetchDataStreamDetailsFailed', { + defaultMessage: "We couldn't get your datastream details.", + }), + text: error.message, + }); +}; + +export const assertBreakdownFieldEcsFailedNotifier = (toasts: IToasts, error: Error) => { + toasts.addDanger({ + title: i18n.translate('xpack.datasetQuality.details.checkBreakdownFieldEcsFailed', { + defaultMessage: "We couldn't retrieve breakdown field metadata.", + }), + text: error.message, + }); +}; + +export const fetchDataStreamSettingsFailedNotifier = (toasts: IToasts, error: Error) => { + toasts.addDanger({ + title: i18n.translate('xpack.datasetQuality.details.fetchDataStreamSettingsFailed', { + defaultMessage: "Data stream settings couldn't be loaded.", + }), + text: error.message, + }); +}; + +export const fetchIntegrationDashboardsFailedNotifier = (toasts: IToasts, error: Error) => { + toasts.addDanger({ + title: i18n.translate('xpack.datasetQuality.details.fetchIntegrationDashboardsFailed', { + defaultMessage: "We couldn't get your integration dashboards.", + }), + text: error.message, + }); +}; + +export const fetchDataStreamIntegrationFailedNotifier = ( + toasts: IToasts, + error: Error, + integrationName?: string +) => { + toasts.addDanger({ + title: i18n.translate('xpack.datasetQuality.details.fetchIntegrationsFailed', { + defaultMessage: "We couldn't get {integrationName} integration info.", + values: { + integrationName, + }, + }), + text: error.message, + }); +}; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/state_machine.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/state_machine.ts new file mode 100644 index 0000000000000..74dca94990190 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/state_machine.ts @@ -0,0 +1,504 @@ +/* + * 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 { assign, createMachine, DoneInvokeEvent, InterpreterFrom } from 'xstate'; +import { getDateISORange } from '@kbn/timerange'; +import type { IToasts } from '@kbn/core-notifications-browser'; +import { + DatasetQualityDetailsControllerContext, + DatasetQualityDetailsControllerEvent, + DatasetQualityDetailsControllerTypeState, +} from './types'; +import { DatasetQualityStartDeps } from '../../types'; +import { IDataStreamsStatsClient } from '../../services/data_streams_stats'; +import { IDataStreamDetailsClient } from '../../services/data_stream_details'; +import { indexNameToDataStreamParts } from '../../../common/utils'; +import { + Dashboard, + DataStreamDetails, + DataStreamSettings, + DegradedFieldResponse, + NonAggregatableDatasets, +} from '../../../common/api_types'; +import { fetchNonAggregatableDatasetsFailedNotifier } from '../common/notifications'; +import { + fetchDataStreamDetailsFailedNotifier, + assertBreakdownFieldEcsFailedNotifier, + fetchDataStreamSettingsFailedNotifier, + fetchDataStreamIntegrationFailedNotifier, + fetchIntegrationDashboardsFailedNotifier, +} from './notifications'; +import { Integration } from '../../../common/data_streams_stats/integration'; + +export const createPureDatasetQualityDetailsControllerStateMachine = ( + initialContext: DatasetQualityDetailsControllerContext +) => + createMachine< + DatasetQualityDetailsControllerContext, + DatasetQualityDetailsControllerEvent, + DatasetQualityDetailsControllerTypeState + >( + { + id: 'DatasetQualityDetailsController', + context: initialContext, + predictableActionArguments: true, + initial: 'uninitialized', + states: { + uninitialized: { + always: { + target: 'initializing', + }, + }, + initializing: { + type: 'parallel', + states: { + nonAggregatableDataset: { + initial: 'fetching', + states: { + fetching: { + invoke: { + src: 'checkDatasetIsAggregatable', + onDone: { + target: 'done', + actions: ['storeDatasetAggregatableStatus'], + }, + onError: [ + { + target: '#DatasetQualityDetailsController.indexNotFound', + cond: 'isIndexNotFoundError', + }, + { + target: 'done', + actions: ['notifyFailedFetchForAggregatableDatasets'], + }, + ], + }, + }, + done: { + on: { + UPDATE_TIME_RANGE: { + target: 'fetching', + actions: ['storeTimeRange'], + }, + }, + }, + }, + }, + dataStreamDetails: { + initial: 'fetching', + states: { + fetching: { + invoke: { + src: 'loadDataStreamDetails', + onDone: { + target: 'done', + actions: ['storeDataStreamDetails'], + }, + onError: [ + { + target: '#DatasetQualityDetailsController.indexNotFound', + cond: 'isIndexNotFoundError', + }, + { + target: 'done', + actions: ['notifyFetchDataStreamDetailsFailed'], + }, + ], + }, + }, + done: { + on: { + UPDATE_TIME_RANGE: { + target: 'fetching', + actions: ['storeTimeRange'], + }, + BREAKDOWN_FIELD_CHANGE: { + target: + '#DatasetQualityDetailsController.initializing.checkBreakdownFieldIsEcs.fetching', + actions: ['storeBreakDownField'], + }, + }, + }, + }, + }, + checkBreakdownFieldIsEcs: { + initial: 'fetching', + states: { + fetching: { + invoke: { + src: 'checkBreakdownFieldIsEcs', + onDone: { + target: 'done', + actions: ['storeBreakdownFieldEcsStatus'], + }, + onError: { + target: 'done', + actions: ['notifyCheckBreakdownFieldIsEcsFailed'], + }, + }, + }, + done: {}, + }, + }, + dataStreamDegradedFields: { + initial: 'fetching', + states: { + fetching: { + invoke: { + src: 'loadDegradedFields', + onDone: { + target: 'done', + actions: ['storeDegradedFields'], + }, + onError: [ + { + target: '#DatasetQualityDetailsController.indexNotFound', + cond: 'isIndexNotFoundError', + }, + { + target: 'done', + }, + ], + }, + }, + done: { + on: { + UPDATE_TIME_RANGE: { + target: 'fetching', + actions: ['resetDegradedFieldPageAndRowsPerPage'], + }, + UPDATE_DEGRADED_FIELDS_TABLE_CRITERIA: { + target: 'done', + actions: ['storeDegradedFieldTableOptions'], + }, + }, + }, + }, + }, + dataStreamSettings: { + initial: 'fetching', + states: { + fetching: { + invoke: { + src: 'loadDataStreamSettings', + onDone: { + target: 'initializeIntegrations', + actions: ['storeDataStreamSettings'], + }, + onError: [ + { + target: '#DatasetQualityDetailsController.indexNotFound', + cond: 'isIndexNotFoundError', + }, + { + target: 'done', + actions: ['notifyFetchDataStreamSettingsFailed'], + }, + ], + }, + }, + initializeIntegrations: { + type: 'parallel', + states: { + integrationDetails: { + initial: 'fetching', + states: { + fetching: { + invoke: { + src: 'loadDataStreamIntegration', + onDone: { + target: 'done', + actions: ['storeDataStreamIntegration'], + }, + onError: { + target: 'done', + actions: ['notifyFetchDatasetIntegrationsFailed'], + }, + }, + }, + done: { + type: 'final', + }, + }, + }, + integrationDashboards: { + initial: 'fetching', + states: { + fetching: { + invoke: { + src: 'loadIntegrationDashboards', + onDone: { + target: 'done', + actions: ['storeIntegrationDashboards'], + }, + onError: [ + { + target: 'unauthorized', + cond: 'checkIfActionForbidden', + }, + { + target: 'done', + actions: ['notifyFetchIntegrationDashboardsFailed'], + }, + ], + }, + }, + done: { + type: 'final', + }, + unauthorized: { + type: 'final', + }, + }, + }, + }, + }, + done: { + on: { + UPDATE_TIME_RANGE: { + target: 'fetching', + actions: ['resetDegradedFieldPageAndRowsPerPage'], + }, + }, + }, + }, + }, + }, + }, + indexNotFound: { + entry: 'handleIndexNotFoundError', + }, + }, + }, + { + actions: { + storeDatasetAggregatableStatus: assign( + (_context, event: DoneInvokeEvent) => { + return 'data' in event + ? { + isNonAggregatable: !event.data.aggregatable, + } + : {}; + } + ), + storeTimeRange: assign((context, event) => { + return { + timeRange: 'timeRange' in event ? event.timeRange : context.timeRange, + }; + }), + storeDataStreamDetails: assign((_context, event: DoneInvokeEvent) => { + return 'data' in event + ? { + dataStreamDetails: event.data, + } + : {}; + }), + storeBreakDownField: assign((_context, event) => { + return 'breakdownField' in event ? { breakdownField: event.breakdownField } : {}; + }), + storeBreakdownFieldEcsStatus: assign((_context, event: DoneInvokeEvent) => { + return 'data' in event + ? { + isBreakdownFieldEcs: event.data, + } + : {}; + }), + storeDegradedFields: assign((context, event: DoneInvokeEvent) => { + return 'data' in event + ? { + degradedFields: { + ...context.degradedFields, + data: event.data.degradedFields, + }, + } + : {}; + }), + storeDegradedFieldTableOptions: assign((context, event) => { + return 'degraded_field_criteria' in event + ? { + degradedFields: { + ...context.degradedFields, + table: event.degraded_field_criteria, + }, + } + : {}; + }), + resetDegradedFieldPageAndRowsPerPage: assign((context, _event) => ({ + degradedFields: { + ...context.degradedFields, + table: { + ...context.degradedFields.table, + page: 0, + rowsPerPage: 10, + }, + }, + })), + storeDataStreamSettings: assign((_context, event: DoneInvokeEvent) => { + return 'data' in event + ? { + dataStreamSettings: event.data, + } + : {}; + }), + storeDataStreamIntegration: assign((context, event: DoneInvokeEvent) => { + return 'data' in event + ? { + integration: event.data, + } + : {}; + }), + storeIntegrationDashboards: assign((context, event: DoneInvokeEvent) => { + return 'data' in event + ? { + integrationDashboards: event.data, + } + : {}; + }), + handleIndexNotFoundError: assign(() => { + return { + isIndexNotFoundError: true, + }; + }), + }, + guards: { + checkIfActionForbidden: (context, event) => { + return ( + 'data' in event && + typeof event.data === 'object' && + 'statusCode' in event.data! && + event.data.statusCode === 403 + ); + }, + isIndexNotFoundError: (_, event) => { + return ( + ('data' in event && + typeof event.data === 'object' && + 'statusCode' in event.data && + event.data.statusCode === 500 && + 'originalMessage' in event.data && + (event.data.originalMessage as string)?.includes('index_not_found_exception')) ?? + false + ); + }, + }, + } + ); + +export interface DatasetQualityDetailsControllerStateMachineDependencies { + initialContext: DatasetQualityDetailsControllerContext; + plugins: DatasetQualityStartDeps; + toasts: IToasts; + dataStreamStatsClient: IDataStreamsStatsClient; + dataStreamDetailsClient: IDataStreamDetailsClient; +} + +export const createDatasetQualityDetailsControllerStateMachine = ({ + initialContext, + plugins, + toasts, + dataStreamStatsClient, + dataStreamDetailsClient, +}: DatasetQualityDetailsControllerStateMachineDependencies) => + createPureDatasetQualityDetailsControllerStateMachine(initialContext).withConfig({ + actions: { + notifyFailedFetchForAggregatableDatasets: (_context, event: DoneInvokeEvent) => + fetchNonAggregatableDatasetsFailedNotifier(toasts, event.data), + notifyFetchDataStreamDetailsFailed: (_context, event: DoneInvokeEvent) => + fetchDataStreamDetailsFailedNotifier(toasts, event.data), + notifyCheckBreakdownFieldIsEcsFailed: (_context, event: DoneInvokeEvent) => + assertBreakdownFieldEcsFailedNotifier(toasts, event.data), + notifyFetchDataStreamSettingsFailed: (_context, event: DoneInvokeEvent) => + fetchDataStreamSettingsFailedNotifier(toasts, event.data), + notifyFetchIntegrationDashboardsFailed: (_context, event: DoneInvokeEvent) => + fetchIntegrationDashboardsFailedNotifier(toasts, event.data), + notifyFetchDatasetIntegrationsFailed: (context, event: DoneInvokeEvent) => { + const integrationName = + 'dataStreamSettings' in context ? context.dataStreamSettings?.integration : undefined; + return fetchDataStreamIntegrationFailedNotifier(toasts, event.data, integrationName); + }, + }, + services: { + checkDatasetIsAggregatable: (context) => { + const { type } = indexNameToDataStreamParts(context.dataStream); + const { startDate: start, endDate: end } = getDateISORange(context.timeRange); + + return dataStreamStatsClient.getNonAggregatableDatasets({ + type, + start, + end, + dataStream: context.dataStream, + }); + }, + loadDataStreamDetails: (context) => { + const { startDate: start, endDate: end } = getDateISORange(context.timeRange); + + return dataStreamDetailsClient.getDataStreamDetails({ + dataStream: context.dataStream, + start, + end, + }); + }, + checkBreakdownFieldIsEcs: async (context) => { + if (context.breakdownField) { + const allowedFieldSources = ['ecs', 'metadata']; + + // This timeout is to avoid a runtime error that randomly happens on breakdown field change + // TypeError: Cannot read properties of undefined (reading 'timeFieldName') + await new Promise((res) => setTimeout(res, 300)); + + const client = await plugins.fieldsMetadata.getClient(); + const { fields } = await client.find({ + attributes: ['source'], + fieldNames: [context.breakdownField], + }); + + const breakdownFieldSource = fields[context.breakdownField]?.source; + + return !!(breakdownFieldSource && allowedFieldSources.includes(breakdownFieldSource)); + } + + return false; + }, + loadDegradedFields: (context) => { + const { startDate: start, endDate: end } = getDateISORange(context.timeRange); + + return dataStreamDetailsClient.getDataStreamDegradedFields({ + dataStream: context.dataStream, + start, + end, + }); + }, + loadDataStreamSettings: (context) => { + return dataStreamDetailsClient.getDataStreamSettings({ + dataStream: context.dataStream, + }); + }, + loadDataStreamIntegration: (context) => { + if ('dataStreamSettings' in context && context.dataStreamSettings?.integration) { + const { type } = indexNameToDataStreamParts(context.dataStream); + return dataStreamDetailsClient.getDataStreamIntegration({ + type, + integrationName: context.dataStreamSettings.integration, + }); + } + return Promise.resolve(); + }, + loadIntegrationDashboards: (context) => { + if ('dataStreamSettings' in context && context.dataStreamSettings?.integration) { + return dataStreamDetailsClient.getIntegrationDashboards({ + integration: context.dataStreamSettings.integration, + }); + } + + return Promise.resolve(); + }, + }, + }); + +export type DatasetQualityDetailsControllerStateService = InterpreterFrom< + typeof createDatasetQualityDetailsControllerStateMachine +>; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/types.ts b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/types.ts new file mode 100644 index 0000000000000..2cd344248b969 --- /dev/null +++ b/x-pack/plugins/observability_solution/dataset_quality/public/state_machines/dataset_quality_details_controller/types.ts @@ -0,0 +1,151 @@ +/* + * 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 { DoneInvokeEvent } from 'xstate'; +import type { DegradedFieldSortField } from '../../hooks'; +import { + Dashboard, + DataStreamDetails, + DataStreamSettings, + DegradedField, + DegradedFieldResponse, + NonAggregatableDatasets, +} from '../../../common/api_types'; +import { TableCriteria, TimeRangeConfig } from '../../../common/types'; +import { Integration } from '../../../common/data_streams_stats/integration'; + +export interface DataStream { + name: string; + type: string; + namespace: string; + rawName: string; +} + +export interface DegradedFieldsTableConfig { + table: TableCriteria; + data?: DegradedField[]; +} + +export interface DegradedFieldsWithData { + table: TableCriteria; + data: DegradedField[]; +} + +export interface WithDefaultControllerState { + dataStream: string; + degradedFields: DegradedFieldsTableConfig; + timeRange: TimeRangeConfig; + breakdownField?: string; + isBreakdownFieldEcs?: boolean; + isIndexNotFoundError?: boolean; + integration?: Integration; +} + +export interface WithDataStreamDetails { + dataStreamDetails: DataStreamDetails; +} + +export interface WithBreakdownField { + breakdownField: string | undefined; +} + +export interface WithBreakdownInEcsCheck { + isBreakdownFieldEcs: boolean; +} + +export interface WithDegradedFieldsData { + degradedFields: DegradedFieldsWithData; +} + +export interface WithNonAggregatableDatasetStatus { + isNonAggregatable: boolean; +} + +export interface WithDataStreamSettings { + dataStreamSettings: DataStreamSettings; +} + +export interface WithIntegration { + integration: Integration; + integrationDashboards?: Dashboard[]; +} + +export type DefaultDatasetQualityDetailsContext = Pick< + WithDefaultControllerState, + 'degradedFields' | 'timeRange' | 'isIndexNotFoundError' +>; + +export type DatasetQualityDetailsControllerTypeState = + | { + value: + | 'initializing' + | 'uninitialized' + | 'initializing.nonAggregatableDataset.fetching' + | 'initializing.dataStreamDegradedFields.fetching' + | 'initializing.dataStreamSettings.fetching' + | 'initializing.dataStreamDetails.fetching'; + context: WithDefaultControllerState; + } + | { + value: 'initializing.nonAggregatableDataset.done'; + context: WithDefaultControllerState & WithNonAggregatableDatasetStatus; + } + | { + value: 'initializing.dataStreamDetails.done'; + context: WithDefaultControllerState & WithDataStreamDetails; + } + | { + value: 'initializing.checkBreakdownFieldIsEcs.fetching'; + context: WithDefaultControllerState & WithBreakdownField; + } + | { + value: 'initializing.checkBreakdownFieldIsEcs.done'; + context: WithDefaultControllerState & WithBreakdownInEcsCheck; + } + | { + value: 'initializing.dataStreamDegradedFields.done'; + context: WithDefaultControllerState & WithDegradedFieldsData; + } + | { + value: + | 'initializing.dataStreamSettings.initializeIntegrations' + | 'initializing.dataStreamSettings.initializeIntegrations.integrationDetails.fetching' + | 'initializing.dataStreamSettings.initializeIntegrations.integrationDashboards.fetching' + | 'initializing.dataStreamSettings.initializeIntegrations.integrationDashboards.unauthorized'; + context: WithDefaultControllerState & WithDataStreamSettings; + } + | { + value: + | 'initializing.dataStreamSettings.initializeIntegrations.integrationDetails.done' + | 'initializing.dataStreamSettings.initializeIntegrations.integrationDashboards.done'; + context: WithDefaultControllerState & WithDataStreamSettings & WithIntegration; + }; + +export type DatasetQualityDetailsControllerContext = + DatasetQualityDetailsControllerTypeState['context']; + +export type DatasetQualityDetailsControllerEvent = + | { + type: 'UPDATE_TIME_RANGE'; + timeRange: TimeRangeConfig; + } + | { + type: 'BREAKDOWN_FIELD_CHANGE'; + breakdownField: string | undefined; + } + | { + type: 'UPDATE_DEGRADED_FIELDS_TABLE_CRITERIA'; + degraded_field_criteria: TableCriteria; + } + | DoneInvokeEvent + | DoneInvokeEvent + | DoneInvokeEvent + | DoneInvokeEvent + | DoneInvokeEvent + | DoneInvokeEvent + | DoneInvokeEvent + | DoneInvokeEvent; diff --git a/x-pack/plugins/observability_solution/dataset_quality/public/types.ts b/x-pack/plugins/observability_solution/dataset_quality/public/types.ts index bcdd001cb6843..9b97ce12a194f 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/public/types.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/public/types.ts @@ -15,8 +15,10 @@ import type { LensPublicStart } from '@kbn/lens-plugin/public'; import type { ObservabilitySharedPluginSetup } from '@kbn/observability-shared-plugin/public'; import type { FieldsMetadataPublicStart } from '@kbn/fields-metadata-plugin/public'; -import type { CreateDatasetQualityController } from './controller'; import type { DatasetQualityProps } from './components/dataset_quality'; +import { DatasetQualityDetailsProps } from './components/dataset_quality_details'; +import type { CreateDatasetQualityController } from './controller/dataset_quality'; +import type { CreateDatasetQualityDetailsController } from './controller/dataset_quality_details'; // eslint-disable-next-line @typescript-eslint/no-empty-interface export interface DatasetQualityPluginSetup {} @@ -24,6 +26,8 @@ export interface DatasetQualityPluginSetup {} export interface DatasetQualityPluginStart { DatasetQuality: ComponentType; createDatasetQualityController: CreateDatasetQualityController; + DatasetQualityDetails: ComponentType; + createDatasetQualityDetailsController: CreateDatasetQualityDetailsController; } export interface DatasetQualityStartDeps { diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/index.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/index.ts index d89bb83867d10..e2067dedd26d2 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/index.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/server/routes/data_streams/get_data_stream_details/index.ts @@ -30,15 +30,17 @@ export async function getDataStreamSettings({ }): Promise { throwIfInvalidDataStreamParams(dataStream); - const createdOn = await getDataStreamCreatedOn(esClient, dataStream); - - // Getting the 1st item from the data streams endpoint as we will be passing the exact DS name - const [dataStreamInfo] = await dataStreamService.getMatchingDataStreams(esClient, dataStream); + const [createdOn, [dataStreamInfo], datasetUserPrivileges] = await Promise.all([ + getDataStreamCreatedOn(esClient, dataStream), + dataStreamService.getMatchingDataStreams(esClient, dataStream), + datasetQualityPrivileges.getDatasetPrivileges(esClient, dataStream), + ]); const integration = dataStreamInfo?._meta?.package?.name; return { createdOn, integration, + datasetUserPrivileges, }; } diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/routes/register_routes.ts b/x-pack/plugins/observability_solution/dataset_quality/server/routes/register_routes.ts index 94eb3103c39d4..4e1970d7fc887 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/server/routes/register_routes.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/server/routes/register_routes.ts @@ -8,10 +8,12 @@ import { errors } from '@elastic/elasticsearch'; import Boom from '@hapi/boom'; import { CoreSetup, Logger, RouteRegistrar } from '@kbn/core/server'; import { + IoTsParamsObject, ServerRouteRepository, decodeRequestParams, + stripNullishRequestParameters, parseEndpoint, - routeValidationObject, + passThroughValidationObject, } from '@kbn/server-route-repository'; import * as t from 'io-ts'; import { DatasetQualityRequestHandlerContext } from '../types'; @@ -43,18 +45,18 @@ export function registerRoutes({ (router[method] as RouteRegistrar)( { path: pathname, - validate: routeValidationObject, + validate: passThroughValidationObject, options, }, async (context, request, response) => { try { const decodedParams = decodeRequestParams( - { + stripNullishRequestParameters({ params: request.params, body: request.body, query: request.query, - }, - params ?? t.strict({}) + }), + (params as IoTsParamsObject) ?? t.strict({}) ); const data = (await handler({ diff --git a/x-pack/plugins/observability_solution/dataset_quality/server/services/data_stream.ts b/x-pack/plugins/observability_solution/dataset_quality/server/services/data_stream.ts index a1b701e524c92..0446e27953af1 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/server/services/data_stream.ts +++ b/x-pack/plugins/observability_solution/dataset_quality/server/services/data_stream.ts @@ -11,8 +11,6 @@ import type { } from '@elastic/elasticsearch/lib/api/types'; import type { ElasticsearchClient } from '@kbn/core/server'; -import { streamPartsToIndexPattern } from '../../common/utils'; - class DataStreamService { public async getMatchingDataStreams( esClient: ElasticsearchClient, @@ -32,31 +30,6 @@ class DataStreamService { } } - public async getMatchingDataStreamsStats( - esClient: ElasticsearchClient, - dataStreamParts: { - dataset: string; - type: string; - } - ): Promise { - try { - const { data_streams: dataStreamsStats } = await esClient.indices.dataStreamsStats({ - name: streamPartsToIndexPattern({ - typePattern: dataStreamParts.type, - datasetPattern: dataStreamParts.dataset, - }), - human: true, - }); - - return dataStreamsStats; - } catch (e) { - if (e.statusCode === 404) { - return []; - } - throw e; - } - } - public async getStreamsStats( esClient: ElasticsearchClient, dataStreams: string[] diff --git a/x-pack/plugins/observability_solution/dataset_quality/tsconfig.json b/x-pack/plugins/observability_solution/dataset_quality/tsconfig.json index 0397a6f185bf1..04d5362bb9861 100644 --- a/x-pack/plugins/observability_solution/dataset_quality/tsconfig.json +++ b/x-pack/plugins/observability_solution/dataset_quality/tsconfig.json @@ -53,7 +53,9 @@ "@kbn/ebt-tools", "@kbn/fields-metadata-plugin", "@kbn/server-route-repository-utils", - "@kbn/core-analytics-browser" + "@kbn/core-analytics-browser", + "@kbn/core-lifecycle-browser", + "@kbn/core-notifications-browser" ], "exclude": [ "target/**/*" diff --git a/x-pack/plugins/observability_solution/entity_manager/common/errors.ts b/x-pack/plugins/observability_solution/entity_manager/common/errors.ts index 0c141b71b6b7e..9ef591dab89bc 100644 --- a/x-pack/plugins/observability_solution/entity_manager/common/errors.ts +++ b/x-pack/plugins/observability_solution/entity_manager/common/errors.ts @@ -10,3 +10,4 @@ export const ERROR_API_KEY_NOT_VALID = 'api_key_not_valid'; export const ERROR_API_KEY_SERVICE_DISABLED = 'api_key_service_disabled'; export const ERROR_PARTIAL_BUILTIN_INSTALLATION = 'partial_builtin_installation'; export const ERROR_DEFINITION_STOPPED = 'error_definition_stopped'; +export const ERROR_BUILTIN_UPGRADE_REQUIRED = 'builtin_upgrade_required'; diff --git a/x-pack/plugins/observability_solution/entity_manager/common/helpers.test.ts b/x-pack/plugins/observability_solution/entity_manager/common/helpers.test.ts deleted file mode 100644 index 50ce0caeba0a3..0000000000000 --- a/x-pack/plugins/observability_solution/entity_manager/common/helpers.test.ts +++ /dev/null @@ -1,22 +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 { getEntityHistoryIndexTemplateV1, getEntityLatestIndexTemplateV1 } from './helpers'; - -describe('helpers', () => { - it('getEntityHistoryIndexTemplateV1 should return the correct value', () => { - const definitionId = 'test'; - const result = getEntityHistoryIndexTemplateV1(definitionId); - expect(result).toEqual('entities_v1_history_test_index_template'); - }); - - it('getEntityLatestIndexTemplateV1 should return the correct value', () => { - const definitionId = 'test'; - const result = getEntityLatestIndexTemplateV1(definitionId); - expect(result).toEqual('entities_v1_latest_test_index_template'); - }); -}); diff --git a/x-pack/plugins/observability_solution/entity_manager/common/helpers.ts b/x-pack/plugins/observability_solution/entity_manager/common/helpers.ts deleted file mode 100644 index f18e8526c0c21..0000000000000 --- a/x-pack/plugins/observability_solution/entity_manager/common/helpers.ts +++ /dev/null @@ -1,19 +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 { - ENTITY_BASE_PREFIX, - ENTITY_SCHEMA_VERSION_V1, - ENTITY_HISTORY, - ENTITY_LATEST, -} from '@kbn/entities-schema'; - -export const getEntityHistoryIndexTemplateV1 = (definitionId: string) => - `${ENTITY_BASE_PREFIX}_${ENTITY_SCHEMA_VERSION_V1}_${ENTITY_HISTORY}_${definitionId}_index_template` as const; - -export const getEntityLatestIndexTemplateV1 = (definitionId: string) => - `${ENTITY_BASE_PREFIX}_${ENTITY_SCHEMA_VERSION_V1}_${ENTITY_LATEST}_${definitionId}_index_template` as const; diff --git a/x-pack/plugins/observability_solution/entity_manager/kibana.jsonc b/x-pack/plugins/observability_solution/entity_manager/kibana.jsonc index 0b292b322c74b..efd6d3a445b3f 100644 --- a/x-pack/plugins/observability_solution/entity_manager/kibana.jsonc +++ b/x-pack/plugins/observability_solution/entity_manager/kibana.jsonc @@ -6,7 +6,7 @@ "plugin": { "id": "entityManager", "configPath": ["xpack", "entityManager"], - "requiredPlugins": ["security", "encryptedSavedObjects"], + "requiredPlugins": ["security", "encryptedSavedObjects", "licensing"], "browser": true, "server": true, "requiredBundles": [] diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts index c733860793ca1..87b876249f33f 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/built_in/services.ts @@ -20,14 +20,19 @@ const serviceTransactionFilter = (additionalFilters: string[] = []) => { export const builtInServicesFromLogsEntityDefinition: EntityDefinition = entityDefinitionSchema.parse({ - version: '0.1.0', + version: '1.0.0', id: `${BUILT_IN_ID_PREFIX}services_from_ecs_data`, name: 'Services from ECS data', description: 'This definition extracts service entities from common data streams by looking for the ECS field service.name', type: 'service', managed: true, - indexPatterns: ['logs-*', 'filebeat*', 'metrics-apm.service_transaction.1m*'], + indexPatterns: [ + 'logs-*', + 'filebeat*', + 'metrics-apm.service_transaction.1m*', + 'metrics-apm.service_summary.1m*', + ], history: { timestampField: '@timestamp', interval: '1m', diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/delete_entity_definition.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/delete_entity_definition.ts index ff47af01f7ed2..93f1f045b16d6 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/delete_entity_definition.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/delete_entity_definition.ts @@ -5,27 +5,22 @@ * 2.0. */ -import { Logger, SavedObjectsClientContract } from '@kbn/core/server'; +import { SavedObjectsClientContract, SavedObjectsErrorHelpers } from '@kbn/core/server'; import { EntityDefinition } from '@kbn/entities-schema'; import { SO_ENTITY_DEFINITION_TYPE } from '../../saved_objects'; import { EntityDefinitionNotFound } from './errors/entity_not_found'; export async function deleteEntityDefinition( soClient: SavedObjectsClientContract, - definition: EntityDefinition, - logger: Logger + definition: EntityDefinition ) { - const response = await soClient.find({ - type: SO_ENTITY_DEFINITION_TYPE, - page: 1, - perPage: 1, - filter: `${SO_ENTITY_DEFINITION_TYPE}.attributes.id:(${definition.id})`, - }); + try { + await soClient.delete(SO_ENTITY_DEFINITION_TYPE, definition.id); + } catch (err) { + if (SavedObjectsErrorHelpers.isNotFoundError(err)) { + throw new EntityDefinitionNotFound(`Entity definition with [${definition.id}] not found.`); + } - if (response.total === 0) { - logger.error(`Unable to delete entity definition [${definition.id}] because it doesn't exist.`); - throw new EntityDefinitionNotFound(`Entity definition with [${definition.id}] not found.`); + throw err; } - - await soClient.delete(SO_ENTITY_DEFINITION_TYPE, response.saved_objects[0].id); } diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/delete_index.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/delete_index.ts index 985ca9f3c7a72..433b6e392c27e 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/delete_index.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/delete_index.ts @@ -15,8 +15,12 @@ export async function deleteIndices( logger: Logger ) { try { + const { indices: historyIndices } = await esClient.indices.resolveIndex({ + name: `${generateHistoryIndexName(definition)}.*`, + expand_wildcards: 'all', + }); const indices = [ - `${generateHistoryIndexName(definition)}.*`, + ...historyIndices.map(({ name }) => name), generateLatestIndexName(definition), ]; await esClient.indices.delete({ index: indices, ignore_unavailable: true }); diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/find_entity_definition.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/find_entity_definition.ts index ccc28db103153..d683c39a44890 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/find_entity_definition.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/find_entity_definition.ts @@ -11,12 +11,16 @@ import { EntityDefinition } from '@kbn/entities-schema'; import { SO_ENTITY_DEFINITION_TYPE } from '../../saved_objects'; import { generateHistoryTransformId, + generateHistoryBackfillTransformId, generateHistoryIngestPipelineId, + generateHistoryIndexTemplateId, generateLatestTransformId, generateLatestIngestPipelineId, + generateLatestIndexTemplateId, } from './helpers/generate_component_id'; import { BUILT_IN_ID_PREFIX } from './built_in'; import { EntityDefinitionWithState } from './types'; +import { isBackfillEnabled } from './helpers/is_backfill_enabled'; export async function findEntityDefinitions({ soClient, @@ -60,19 +64,32 @@ async function getEntityDefinitionState( ) { const historyIngestPipelineId = generateHistoryIngestPipelineId(definition); const latestIngestPipelineId = generateLatestIngestPipelineId(definition); - const [ingestPipelines, transforms] = await Promise.all([ - esClient.ingest.getPipeline({ - id: `${historyIngestPipelineId},${latestIngestPipelineId}`, + const transformIds = [ + generateHistoryTransformId(definition), + generateLatestTransformId(definition), + ...(isBackfillEnabled(definition) ? [generateHistoryBackfillTransformId(definition)] : []), + ]; + const [ingestPipelines, indexTemplatesInstalled, transforms] = await Promise.all([ + esClient.ingest.getPipeline( + { + id: `${historyIngestPipelineId},${latestIngestPipelineId}`, + }, + { ignore: [404] } + ), + esClient.indices.existsIndexTemplate({ + name: `${ + (generateLatestIndexTemplateId(definition), generateHistoryIndexTemplateId(definition)) + }`, }), esClient.transform.getTransformStats({ - transform_id: [generateHistoryTransformId(definition), generateLatestTransformId(definition)], + transform_id: transformIds, }), ]); const ingestPipelinesInstalled = !!( ingestPipelines[historyIngestPipelineId] && ingestPipelines[latestIngestPipelineId] ); - const transformsInstalled = transforms.count === 2; + const transformsInstalled = transforms.count === transformIds.length; const transformsRunning = transformsInstalled && transforms.transforms.every( @@ -80,7 +97,7 @@ async function getEntityDefinitionState( ); return { - installed: ingestPipelinesInstalled && transformsInstalled, + installed: ingestPipelinesInstalled && transformsInstalled && indexTemplatesInstalled, running: transformsRunning, }; } diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/builtin_entity_definition.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/builtin_entity_definition.ts new file mode 100644 index 0000000000000..5092e2caa5d78 --- /dev/null +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/builtin_entity_definition.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 { entityDefinitionSchema } from '@kbn/entities-schema'; +export const builtInEntityDefinition = entityDefinitionSchema.parse({ + id: 'builtin_mock_entity_definition', + version: '1.0.0', + name: 'Mock builtin definition', + type: 'service', + indexPatterns: ['kbn-data-forge-fake_stack.*'], + managed: true, + history: { + timestampField: '@timestamp', + interval: '1m', + }, + identityFields: ['log.logger', { field: 'event.category', optional: true }], + displayNameTemplate: '{{log.logger}}{{#event.category}}:{{.}}{{/event.category}}', + metadata: ['tags', 'host.name', 'host.os.name', { source: '_index', destination: 'sourceIndex' }], + metrics: [], +}); diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/entity_definition.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/entity_definition.ts index 2d6bceda8b077..727f73a044c4f 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/entity_definition.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/entity_definition.ts @@ -8,7 +8,7 @@ import { entityDefinitionSchema } from '@kbn/entities-schema'; export const rawEntityDefinition = { id: 'admin-console-services', - version: '999.999.999', + version: '1.0.0', name: 'Services for Admin Console', type: 'service', indexPatterns: ['kbn-data-forge-fake_stack.*'], diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/index.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/index.ts index eae0e8e8afc9a..c24dcee1f8cf7 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/index.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/fixtures/index.ts @@ -7,3 +7,4 @@ export { entityDefinition } from './entity_definition'; export { entityDefinitionWithBackfill } from './entity_definition_with_backfill'; +export { builtInEntityDefinition } from './builtin_entity_definition'; diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/generate_component_id.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/generate_component_id.ts index 2aa3fb992c9ca..3afb6034e6a17 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/generate_component_id.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/helpers/generate_component_id.ts @@ -6,6 +6,7 @@ */ import { + ENTITY_BASE_PREFIX, ENTITY_HISTORY, ENTITY_LATEST, ENTITY_SCHEMA_VERSION_V1, @@ -38,6 +39,10 @@ export function generateHistoryIndexName(definition: EntityDefinition) { }); } +export function generateHistoryIndexTemplateId(definition: EntityDefinition) { + return `${ENTITY_BASE_PREFIX}_${ENTITY_SCHEMA_VERSION_V1}_${ENTITY_HISTORY}_${definition.id}_index_template` as const; +} + // Latest function generateLatestId(definition: EntityDefinition) { return `${ENTITY_LATEST_PREFIX_V1}-${definition.id}` as const; @@ -53,3 +58,6 @@ export function generateLatestIndexName(definition: EntityDefinition) { definitionId: definition.id, }); } + +export const generateLatestIndexTemplateId = (definition: EntityDefinition) => + `${ENTITY_BASE_PREFIX}_${ENTITY_SCHEMA_VERSION_V1}_${ENTITY_LATEST}_${definition.id}_index_template` as const; diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_history_processors.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_history_processors.test.ts.snap index 9e62633a0a7d6..a013388882a3f 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_history_processors.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_history_processors.test.ts.snap @@ -23,7 +23,7 @@ Array [ Object { "set": Object { "field": "entity.definitionVersion", - "value": "999.999.999", + "value": "1.0.0", }, }, Object { diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_latest_processors.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_latest_processors.test.ts.snap index c5fd8986c35db..f866e34fbb69b 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_latest_processors.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/ingest_pipeline/__snapshots__/generate_latest_processors.test.ts.snap @@ -23,7 +23,7 @@ Array [ Object { "set": Object { "field": "entity.definitionVersion", - "value": "999.999.999", + "value": "1.0.0", }, }, Object { diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.test.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.test.ts index 80bea34d2ed02..e09496762d921 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.test.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.test.ts @@ -5,23 +5,32 @@ * 2.0. */ +import semver from 'semver'; +import moment from 'moment'; import { elasticsearchClientMock } from '@kbn/core-elasticsearch-client-server-mocks'; import { savedObjectsClientMock } from '@kbn/core-saved-objects-api-server-mocks'; import { loggerMock } from '@kbn/logging-mocks'; import { EntityDefinition } from '@kbn/entities-schema'; import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; -import { installBuiltInEntityDefinitions } from './install_entity_definition'; -import { builtInServicesFromLogsEntityDefinition } from './built_in/services'; +import { + installBuiltInEntityDefinitions, + installEntityDefinition, +} from './install_entity_definition'; import { SO_ENTITY_DEFINITION_TYPE } from '../../saved_objects'; import { + generateHistoryIndexTemplateId, generateHistoryIngestPipelineId, generateHistoryTransformId, + generateLatestIndexTemplateId, generateLatestIngestPipelineId, generateLatestTransformId, } from './helpers/generate_component_id'; import { generateHistoryTransform } from './transform/generate_history_transform'; import { generateLatestTransform } from './transform/generate_latest_transform'; +import { entityDefinition as mockEntityDefinition } from './helpers/fixtures/entity_definition'; +import { EntityDefinitionIdInvalid } from './errors/entity_definition_id_invalid'; +import { EntityIdConflict } from './errors/entity_id_conflict_error'; const assertHasCreatedDefinition = ( definition: EntityDefinition, @@ -29,10 +38,22 @@ const assertHasCreatedDefinition = ( esClient: ElasticsearchClient ) => { expect(soClient.create).toBeCalledTimes(1); - expect(soClient.create).toBeCalledWith(SO_ENTITY_DEFINITION_TYPE, definition, { - id: definition.id, - overwrite: true, - managed: definition.managed, + expect(soClient.create).toBeCalledWith( + SO_ENTITY_DEFINITION_TYPE, + { + ...definition, + installStatus: 'installing', + installStartedAt: expect.any(String), + }, + { + id: definition.id, + overwrite: true, + managed: definition.managed, + } + ); + expect(soClient.update).toBeCalledTimes(1); + expect(soClient.update).toBeCalledWith(SO_ENTITY_DEFINITION_TYPE, definition.id, { + installStatus: 'installed', }); expect(esClient.indices.putIndexTemplate).toBeCalledTimes(2); @@ -49,50 +70,118 @@ const assertHasCreatedDefinition = ( expect(esClient.ingest.putPipeline).toBeCalledTimes(2); expect(esClient.ingest.putPipeline).toBeCalledWith({ - id: generateHistoryIngestPipelineId(builtInServicesFromLogsEntityDefinition), + id: generateHistoryIngestPipelineId(definition), processors: expect.anything(), _meta: { - definitionVersion: '0.1.0', - managed: true, + definitionVersion: definition.version, + managed: definition.managed, }, }); expect(esClient.ingest.putPipeline).toBeCalledWith({ - id: generateLatestIngestPipelineId(builtInServicesFromLogsEntityDefinition), + id: generateLatestIngestPipelineId(definition), processors: expect.anything(), _meta: { - definitionVersion: '0.1.0', - managed: true, + definitionVersion: definition.version, + managed: definition.managed, }, }); expect(esClient.transform.putTransform).toBeCalledTimes(2); - expect(esClient.transform.putTransform).toBeCalledWith( - generateHistoryTransform(builtInServicesFromLogsEntityDefinition) + expect(esClient.transform.putTransform).toBeCalledWith(generateHistoryTransform(definition)); + expect(esClient.transform.putTransform).toBeCalledWith(generateLatestTransform(definition)); +}; + +const assertHasUpgradedDefinition = ( + definition: EntityDefinition, + soClient: SavedObjectsClientContract, + esClient: ElasticsearchClient +) => { + expect(soClient.update).toBeCalledTimes(2); + expect(soClient.update).toBeCalledWith(SO_ENTITY_DEFINITION_TYPE, definition.id, { + ...definition, + installStatus: 'upgrading', + installStartedAt: expect.any(String), + }); + expect(soClient.update).toBeCalledWith(SO_ENTITY_DEFINITION_TYPE, definition.id, { + installStatus: 'installed', + }); + + expect(esClient.indices.putIndexTemplate).toBeCalledTimes(2); + expect(esClient.indices.putIndexTemplate).toBeCalledWith( + expect.objectContaining({ + name: `entities_v1_history_${definition.id}_index_template`, + }) ); - expect(esClient.transform.putTransform).toBeCalledWith( - generateLatestTransform(builtInServicesFromLogsEntityDefinition) + expect(esClient.indices.putIndexTemplate).toBeCalledWith( + expect.objectContaining({ + name: `entities_v1_latest_${definition.id}_index_template`, + }) ); + + expect(esClient.ingest.putPipeline).toBeCalledTimes(2); + expect(esClient.ingest.putPipeline).toBeCalledWith({ + id: generateHistoryIngestPipelineId(definition), + processors: expect.anything(), + _meta: { + definitionVersion: definition.version, + managed: definition.managed, + }, + }); + expect(esClient.ingest.putPipeline).toBeCalledWith({ + id: generateLatestIngestPipelineId(definition), + processors: expect.anything(), + _meta: { + definitionVersion: definition.version, + managed: definition.managed, + }, + }); + + expect(esClient.transform.putTransform).toBeCalledTimes(2); + expect(esClient.transform.putTransform).toBeCalledWith(generateHistoryTransform(definition)); + expect(esClient.transform.putTransform).toBeCalledWith(generateLatestTransform(definition)); }; -const assertHasStartedTransform = (definition: EntityDefinition, esClient: ElasticsearchClient) => { - expect(esClient.transform.startTransform).toBeCalledTimes(2); - expect(esClient.transform.startTransform).toBeCalledWith( +const assertHasDeletedDefinition = ( + definition: EntityDefinition, + soClient: SavedObjectsClientContract, + esClient: ElasticsearchClient +) => { + assertHasDeletedTransforms(definition, esClient); + + expect(esClient.ingest.deletePipeline).toBeCalledTimes(2); + expect(esClient.ingest.deletePipeline).toBeCalledWith( { - transform_id: generateHistoryTransformId(builtInServicesFromLogsEntityDefinition), + id: generateHistoryIngestPipelineId(definition), }, - expect.anything() + { ignore: [404] } ); - expect(esClient.transform.startTransform).toBeCalledWith( + expect(esClient.ingest.deletePipeline).toBeCalledWith( { - transform_id: generateLatestTransformId(builtInServicesFromLogsEntityDefinition), + id: generateLatestIngestPipelineId(definition), }, - expect.anything() + { ignore: [404] } ); + + expect(esClient.indices.deleteIndexTemplate).toBeCalledTimes(2); + expect(esClient.indices.deleteIndexTemplate).toBeCalledWith( + { + name: generateHistoryIndexTemplateId(definition), + }, + { ignore: [404] } + ); + expect(esClient.indices.deleteIndexTemplate).toBeCalledWith( + { + name: generateLatestIndexTemplateId(definition), + }, + { ignore: [404] } + ); + + expect(soClient.delete).toBeCalledTimes(1); + expect(soClient.delete).toBeCalledWith(SO_ENTITY_DEFINITION_TYPE, definition.id); }; -const assertHasUninstalledDefinition = ( +const assertHasDeletedTransforms = ( definition: EntityDefinition, - soClient: SavedObjectsClientContract, esClient: ElasticsearchClient ) => { expect(esClient.transform.stopTransform).toBeCalledTimes(2); @@ -122,28 +211,92 @@ const assertHasUninstalledDefinition = ( ); expect(esClient.transform.deleteTransform).toBeCalledTimes(2); - expect(esClient.ingest.deletePipeline).toBeCalledTimes(2); - expect(soClient.delete).toBeCalledTimes(1); - - expect(esClient.indices.deleteIndexTemplate).toBeCalledTimes(2); - expect(esClient.indices.deleteIndexTemplate).toBeCalledWith( - { - name: `entities_v1_history_${definition.id}_index_template`, - }, - { ignore: [404] } - ); - expect(esClient.indices.deleteIndexTemplate).toBeCalledWith( - { - name: `entities_v1_latest_${definition.id}_index_template`, - }, - { ignore: [404] } - ); }; describe('install_entity_definition', () => { + describe('installEntityDefinition', () => { + it('should reject invalid ids', async () => { + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + const soClient = savedObjectsClientMock.create(); + + await expect( + installEntityDefinition({ + esClient, + soClient, + definition: { id: 'a'.repeat(40) } as EntityDefinition, + logger: loggerMock.create(), + }) + ).rejects.toThrow(EntityDefinitionIdInvalid); + }); + + it('should reject if id already exists', async () => { + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + const soClient = savedObjectsClientMock.create(); + soClient.find.mockResolvedValueOnce({ + saved_objects: [ + { + id: mockEntityDefinition.id, + type: 'entity-definition', + references: [], + score: 0, + attributes: { + ...mockEntityDefinition, + installStatus: 'installed', + }, + }, + ], + total: 1, + page: 1, + per_page: 10, + }); + + await expect( + installEntityDefinition({ + esClient, + soClient, + definition: mockEntityDefinition, + logger: loggerMock.create(), + }) + ).rejects.toThrow(EntityIdConflict); + }); + + it('should install a definition', async () => { + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + const soClient = savedObjectsClientMock.create(); + soClient.find.mockResolvedValue({ saved_objects: [], total: 0, page: 1, per_page: 10 }); + + await installEntityDefinition({ + esClient, + soClient, + definition: mockEntityDefinition, + logger: loggerMock.create(), + }); + + assertHasCreatedDefinition(mockEntityDefinition, soClient, esClient); + }); + + it('should rollback the installation on failure', async () => { + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + const soClient = savedObjectsClientMock.create(); + soClient.find.mockResolvedValue({ saved_objects: [], total: 0, page: 1, per_page: 10 }); + esClient.transform.putTransform.mockRejectedValue(new Error('cannot install transform')); + + await expect( + installEntityDefinition({ + esClient, + soClient, + definition: mockEntityDefinition, + logger: loggerMock.create(), + }) + ).rejects.toThrow(/cannot install transform/); + + assertHasDeletedDefinition(mockEntityDefinition, soClient, esClient); + }); + }); + describe('installBuiltInEntityDefinitions', () => { - it('should install and start definition when not found', async () => { - const builtInDefinitions = [builtInServicesFromLogsEntityDefinition]; + it('should install definition when not found', async () => { + const builtInDefinitions = [mockEntityDefinition]; const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; const soClient = savedObjectsClientMock.create(); soClient.find.mockResolvedValue({ saved_objects: [], total: 0, page: 1, per_page: 10 }); @@ -151,94 +304,158 @@ describe('install_entity_definition', () => { await installBuiltInEntityDefinitions({ esClient, soClient, - builtInDefinitions, + definitions: builtInDefinitions, logger: loggerMock.create(), }); - assertHasCreatedDefinition(builtInServicesFromLogsEntityDefinition, soClient, esClient); - assertHasStartedTransform(builtInServicesFromLogsEntityDefinition, esClient); + assertHasCreatedDefinition(mockEntityDefinition, soClient, esClient); }); it('should reinstall when partial state found', async () => { - const builtInDefinitions = [builtInServicesFromLogsEntityDefinition]; + const builtInDefinitions = [mockEntityDefinition]; const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; // mock partially installed definition esClient.ingest.getPipeline.mockResolvedValue({}); esClient.transform.getTransformStats.mockResolvedValue({ transforms: [], count: 0 }); const soClient = savedObjectsClientMock.create(); - const definitionSOResult = { + + soClient.find.mockResolvedValueOnce({ saved_objects: [ { - id: builtInServicesFromLogsEntityDefinition.id, + id: mockEntityDefinition.id, type: 'entity-definition', references: [], score: 0, - attributes: builtInServicesFromLogsEntityDefinition, + attributes: { + ...mockEntityDefinition, + installStatus: 'installed', + }, }, ], total: 1, page: 1, per_page: 10, + }); + + await installBuiltInEntityDefinitions({ + esClient, + soClient, + definitions: builtInDefinitions, + logger: loggerMock.create(), + }); + + assertHasDeletedTransforms(mockEntityDefinition, esClient); + assertHasUpgradedDefinition(mockEntityDefinition, soClient, esClient); + }); + + it('should reinstall when outdated version', async () => { + const updatedDefinition = { + ...mockEntityDefinition, + version: semver.inc(mockEntityDefinition.version, 'major') ?? '0.0.0', }; - soClient.find - .mockResolvedValueOnce(definitionSOResult) - .mockResolvedValueOnce(definitionSOResult) - .mockResolvedValueOnce({ - saved_objects: [], - total: 0, - page: 1, - per_page: 10, - }); + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; + const soClient = savedObjectsClientMock.create(); + + soClient.find.mockResolvedValueOnce({ + saved_objects: [ + { + id: mockEntityDefinition.id, + type: 'entity-definition', + references: [], + score: 0, + attributes: { + ...mockEntityDefinition, + installStatus: 'installed', + }, + }, + ], + total: 1, + page: 1, + per_page: 10, + }); await installBuiltInEntityDefinitions({ esClient, soClient, - builtInDefinitions, + definitions: [updatedDefinition], logger: loggerMock.create(), }); - assertHasUninstalledDefinition(builtInServicesFromLogsEntityDefinition, soClient, esClient); - assertHasCreatedDefinition(builtInServicesFromLogsEntityDefinition, soClient, esClient); - assertHasStartedTransform(builtInServicesFromLogsEntityDefinition, esClient); + assertHasDeletedTransforms(mockEntityDefinition, esClient); + assertHasUpgradedDefinition(updatedDefinition, soClient, esClient); }); - it('should start a stopped definition', async () => { - const builtInDefinitions = [builtInServicesFromLogsEntityDefinition]; + it('should reinstall when stale upgrade', async () => { + const updatedDefinition = { + ...mockEntityDefinition, + version: semver.inc(mockEntityDefinition.version, 'major') ?? '0.0.0', + }; const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; - // mock installed but stopped definition - esClient.ingest.getPipeline.mockResolvedValue({ - [generateHistoryIngestPipelineId(builtInServicesFromLogsEntityDefinition)]: {}, - [generateLatestIngestPipelineId(builtInServicesFromLogsEntityDefinition)]: {}, + const soClient = savedObjectsClientMock.create(); + + soClient.find.mockResolvedValueOnce({ + saved_objects: [ + { + id: mockEntityDefinition.id, + type: 'entity-definition', + references: [], + score: 0, + attributes: { + ...mockEntityDefinition, + // upgrading for 1h + installStatus: 'upgrading', + installStartedAt: moment().subtract(1, 'hour').toISOString(), + }, + }, + ], + total: 1, + page: 1, + per_page: 10, }); - esClient.transform.getTransformStats.mockResolvedValue({ - // @ts-expect-error - transforms: [{ state: 'stopped' }, { state: 'stopped' }], - count: 2, + + await installBuiltInEntityDefinitions({ + esClient, + soClient, + definitions: [updatedDefinition], + logger: loggerMock.create(), }); + + assertHasDeletedTransforms(mockEntityDefinition, esClient); + assertHasUpgradedDefinition(updatedDefinition, soClient, esClient); + }); + + it('should reinstall when failed installation', async () => { + const esClient = elasticsearchClientMock.createScopedClusterClient().asCurrentUser; const soClient = savedObjectsClientMock.create(); - soClient.find.mockResolvedValue({ + + soClient.find.mockResolvedValueOnce({ saved_objects: [ { - id: builtInServicesFromLogsEntityDefinition.id, + id: mockEntityDefinition.id, type: 'entity-definition', references: [], score: 0, - attributes: builtInServicesFromLogsEntityDefinition, + attributes: { + ...mockEntityDefinition, + installStatus: 'failed', + installStartedAt: new Date().toISOString(), + }, }, ], total: 1, page: 1, per_page: 10, }); + await installBuiltInEntityDefinitions({ esClient, soClient, - builtInDefinitions, + definitions: [mockEntityDefinition], logger: loggerMock.create(), }); - expect(soClient.create).toHaveBeenCalledTimes(0); - assertHasStartedTransform(builtInServicesFromLogsEntityDefinition, esClient); + assertHasDeletedTransforms(mockEntityDefinition, esClient); + assertHasUpgradedDefinition(mockEntityDefinition, soClient, esClient); }); }); }); diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.ts index 83b4671490ff7..cbebbb804d538 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/install_entity_definition.ts @@ -5,14 +5,15 @@ * 2.0. */ +import semver from 'semver'; import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { EntityDefinition } from '@kbn/entities-schema'; import { Logger } from '@kbn/logging'; import { - getEntityHistoryIndexTemplateV1, - getEntityLatestIndexTemplateV1, -} from '../../../common/helpers'; + generateHistoryIndexTemplateId, + generateLatestIndexTemplateId, +} from './helpers/generate_component_id'; import { createAndInstallHistoryIngestPipeline, createAndInstallLatestIngestPipeline, @@ -26,18 +27,23 @@ import { validateDefinitionCanCreateValidTransformIds } from './transform/valida import { deleteEntityDefinition } from './delete_entity_definition'; import { deleteHistoryIngestPipeline, deleteLatestIngestPipeline } from './delete_ingest_pipeline'; import { findEntityDefinitions } from './find_entity_definition'; -import { saveEntityDefinition } from './save_entity_definition'; -import { startTransform } from './start_transform'; +import { + entityDefinitionExists, + saveEntityDefinition, + updateEntityDefinition, +} from './save_entity_definition'; import { stopAndDeleteHistoryBackfillTransform, stopAndDeleteHistoryTransform, stopAndDeleteLatestTransform, } from './stop_and_delete_transform'; -import { uninstallEntityDefinition } from './uninstall_entity_definition'; import { isBackfillEnabled } from './helpers/is_backfill_enabled'; import { deleteTemplate, upsertTemplate } from '../manage_index_templates'; -import { getEntitiesLatestIndexTemplateConfig } from './templates/entities_latest_template'; -import { getEntitiesHistoryIndexTemplateConfig } from './templates/entities_history_template'; +import { generateEntitiesLatestIndexTemplateConfig } from './templates/entities_latest_template'; +import { generateEntitiesHistoryIndexTemplateConfig } from './templates/entities_history_template'; +import { EntityIdConflict } from './errors/entity_id_conflict_error'; +import { EntityDefinitionNotFound } from './errors/entity_not_found'; +import { EntityDefinitionWithState } from './types'; export interface InstallDefinitionParams { esClient: ElasticsearchClient; @@ -46,110 +52,77 @@ export interface InstallDefinitionParams { logger: Logger; } +const throwIfRejected = (values: Array | PromiseRejectedResult>) => { + const rejectedPromise = values.find( + (value) => value.status === 'rejected' + ) as PromiseRejectedResult; + if (rejectedPromise) { + throw new Error(rejectedPromise.reason); + } + return values; +}; + +// install an entity definition from scratch with all its required components +// after verifying that the definition id is valid and available. +// attempt to remove all installed components if the installation fails. export async function installEntityDefinition({ esClient, soClient, definition, logger, }: InstallDefinitionParams): Promise { - const installState = { - ingestPipelines: { - history: false, - latest: false, - }, - transforms: { - history: false, - backfill: false, - latest: false, - }, - definition: false, - indexTemplates: { - history: false, - latest: false, - }, - }; + validateDefinitionCanCreateValidTransformIds(definition); try { - logger.debug(() => `Installing definition ${JSON.stringify(definition)}`); - - validateDefinitionCanCreateValidTransformIds(definition); - - const entityDefinition = await saveEntityDefinition(soClient, definition); - installState.definition = true; + if (await entityDefinitionExists(soClient, definition.id)) { + throw new EntityIdConflict( + `Entity definition with [${definition.id}] already exists.`, + definition + ); + } - // install scoped index template - await upsertTemplate({ - esClient, - logger, - template: getEntitiesHistoryIndexTemplateConfig(definition), - }); - installState.indexTemplates.history = true; - await upsertTemplate({ - esClient, - logger, - template: getEntitiesLatestIndexTemplateConfig(definition), + const entityDefinition = await saveEntityDefinition(soClient, { + ...definition, + installStatus: 'installing', + installStartedAt: new Date().toISOString(), }); - installState.indexTemplates.latest = true; - - // install ingest pipelines - logger.debug(`Installing ingest pipelines for definition ${definition.id}`); - await createAndInstallHistoryIngestPipeline(esClient, entityDefinition, logger); - installState.ingestPipelines.history = true; - await createAndInstallLatestIngestPipeline(esClient, entityDefinition, logger); - installState.ingestPipelines.latest = true; - - // install transforms - logger.debug(`Installing transforms for definition ${definition.id}`); - await createAndInstallHistoryTransform(esClient, entityDefinition, logger); - installState.transforms.history = true; - if (isBackfillEnabled(entityDefinition)) { - await createAndInstallHistoryBackfillTransform(esClient, entityDefinition, logger); - installState.transforms.backfill = true; - } - await createAndInstallLatestTransform(esClient, entityDefinition, logger); - installState.transforms.latest = true; - return entityDefinition; + return await install({ esClient, soClient, logger, definition: entityDefinition }); } catch (e) { logger.error(`Failed to install entity definition ${definition.id}: ${e}`); - // Clean up anything that was successful. - if (installState.definition) { - await deleteEntityDefinition(soClient, definition, logger); - } - if (installState.ingestPipelines.history) { - await deleteHistoryIngestPipeline(esClient, definition, logger); - } - if (installState.ingestPipelines.latest) { - await deleteLatestIngestPipeline(esClient, definition, logger); - } - - if (installState.transforms.history) { - await stopAndDeleteHistoryTransform(esClient, definition, logger); - } + await Promise.all([ + stopAndDeleteHistoryTransform(esClient, definition, logger), + isBackfillEnabled(definition) + ? stopAndDeleteHistoryBackfillTransform(esClient, definition, logger) + : Promise.resolve(), + stopAndDeleteLatestTransform(esClient, definition, logger), + ]); - if (installState.transforms.backfill) { - await stopAndDeleteHistoryBackfillTransform(esClient, definition, logger); - } + await Promise.all([ + deleteHistoryIngestPipeline(esClient, definition, logger), + deleteLatestIngestPipeline(esClient, definition, logger), + ]); - if (installState.transforms.latest) { - await stopAndDeleteLatestTransform(esClient, definition, logger); - } - - if (installState.indexTemplates.history) { - await deleteTemplate({ + await Promise.all([ + deleteTemplate({ esClient, logger, - name: getEntityHistoryIndexTemplateV1(definition.id), - }); - } - if (installState.indexTemplates.latest) { - await deleteTemplate({ + name: generateHistoryIndexTemplateId(definition), + }), + deleteTemplate({ esClient, logger, - name: getEntityLatestIndexTemplateV1(definition.id), - }); - } + name: generateLatestIndexTemplateId(definition), + }), + ]); + + await deleteEntityDefinition(soClient, definition).catch((err) => { + if (err instanceof EntityDefinitionNotFound) { + return; + } + throw err; + }); throw e; } @@ -159,62 +132,158 @@ export async function installBuiltInEntityDefinitions({ esClient, soClient, logger, - builtInDefinitions, - installOnly, + definitions, }: Omit & { - builtInDefinitions: EntityDefinition[]; - installOnly?: boolean; + definitions: EntityDefinition[]; }): Promise { - if (builtInDefinitions.length === 0) return []; + if (definitions.length === 0) return []; - logger.debug(`Starting installation of ${builtInDefinitions.length} built-in definitions`); - const installPromises = builtInDefinitions.map(async (builtInDefinition) => { - const definitions = await findEntityDefinitions({ + logger.debug(`Starting installation of ${definitions.length} built-in definitions`); + const installPromises = definitions.map(async (builtInDefinition) => { + const installedDefinitions = await findEntityDefinitions({ esClient, soClient, id: builtInDefinition.id, }); - if (definitions.length === 0) { - return await installAndStartDefinition({ + if (installedDefinitions.length === 0) { + return await installEntityDefinition({ definition: builtInDefinition, esClient, soClient, logger, - installOnly, }); } - const definition = definitions[0]; - // verify current installation - if (!definition.state.installed) { - logger.debug(`Detected partial installation of definition [${definition.id}], reinstalling`); - await uninstallEntityDefinition({ esClient, soClient, logger, definition }); - return await installAndStartDefinition({ - definition: builtInDefinition, - esClient, - soClient, - logger, - installOnly, - }); + // verify existing installation + const installedDefinition = installedDefinitions[0]; + if (!shouldReinstall(installedDefinition, builtInDefinition)) { + return installedDefinition; } - if (!definition.state.running) { - logger.debug(`Starting transforms for definition [${definition.id}]`); - await startTransform(esClient, definition, logger); - } - return definition; + logger.debug( + `Detected failed or outdated installation of definition [${installedDefinition.id}] v${installedDefinition.version}, installing v${builtInDefinition.version}` + ); + return await reinstall({ + soClient, + esClient, + logger, + definition: installedDefinition, + latestDefinition: builtInDefinition, + }); }); return await Promise.all(installPromises); } -async function installAndStartDefinition( - params: InstallDefinitionParams & { installOnly?: boolean } -) { - const definition = await installEntityDefinition(params); - if (!params.installOnly) { - await startTransform(params.esClient, definition, params.logger); +// perform installation of an entity definition components. +// assume definition saved object is already persisted +async function install({ + esClient, + soClient, + definition, + logger, +}: InstallDefinitionParams): Promise { + logger.debug( + () => + `Installing definition ${definition.id} v${definition.version}\n${JSON.stringify( + definition, + null, + 2 + )}` + ); + + logger.debug(`Installing index templates for definition ${definition.id}`); + await Promise.allSettled([ + upsertTemplate({ + esClient, + logger, + template: generateEntitiesHistoryIndexTemplateConfig(definition), + }), + upsertTemplate({ + esClient, + logger, + template: generateEntitiesLatestIndexTemplateConfig(definition), + }), + ]).then(throwIfRejected); + + logger.debug(`Installing ingest pipelines for definition ${definition.id}`); + await Promise.allSettled([ + createAndInstallHistoryIngestPipeline(esClient, definition, logger), + createAndInstallLatestIngestPipeline(esClient, definition, logger), + ]).then(throwIfRejected); + + logger.debug(`Installing transforms for definition ${definition.id}`); + await Promise.allSettled([ + createAndInstallHistoryTransform(esClient, definition, logger), + isBackfillEnabled(definition) + ? createAndInstallHistoryBackfillTransform(esClient, definition, logger) + : Promise.resolve(), + createAndInstallLatestTransform(esClient, definition, logger), + ]).then(throwIfRejected); + + await updateEntityDefinition(soClient, definition.id, { installStatus: 'installed' }); + + return { ...definition, installStatus: 'installed' }; +} + +// stop and delete the current transforms and reinstall all the components +async function reinstall({ + esClient, + soClient, + definition, + latestDefinition, + logger, +}: InstallDefinitionParams & { latestDefinition: EntityDefinition }): Promise { + logger.debug( + `Reinstalling definition ${definition.id} from v${definition.version} to v${latestDefinition.version}` + ); + + try { + await updateEntityDefinition(soClient, latestDefinition.id, { + ...latestDefinition, + installStatus: 'upgrading', + installStartedAt: new Date().toISOString(), + }); + + logger.debug(`Stopping transforms for definition ${definition.id} v${definition.version}`); + await Promise.all([ + stopAndDeleteHistoryTransform(esClient, definition, logger), + isBackfillEnabled(definition) + ? stopAndDeleteHistoryBackfillTransform(esClient, definition, logger) + : Promise.resolve(), + stopAndDeleteLatestTransform(esClient, definition, logger), + ]); + + return await install({ + esClient, + soClient, + logger, + definition: latestDefinition, + }); + } catch (err) { + await updateEntityDefinition(soClient, latestDefinition.id, { + installStatus: 'failed', + }); + + throw err; } - return definition; } + +const INSTALLATION_TIMEOUT = 5 * 60 * 1000; +const shouldReinstall = ( + definition: EntityDefinitionWithState, + latestDefinition: EntityDefinition +) => { + const { installStatus, installStartedAt } = definition; + + const isStale = + (installStatus === 'installing' || installStatus === 'upgrading') && + Date.now() - Date.parse(installStartedAt!) >= INSTALLATION_TIMEOUT; + const isOutdated = + installStatus === 'installed' && semver.neq(definition.version, latestDefinition.version); + const isFailed = installStatus === 'failed'; + const isPartial = installStatus === 'installed' && !definition.state.installed; + + return isStale || isOutdated || isFailed || isPartial; +}; diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/save_entity_definition.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/save_entity_definition.ts index 5b6d5fe0e933b..2dff5178aeeaf 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/save_entity_definition.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/save_entity_definition.ts @@ -8,26 +8,11 @@ import { SavedObjectsClientContract } from '@kbn/core/server'; import { EntityDefinition } from '@kbn/entities-schema'; import { SO_ENTITY_DEFINITION_TYPE } from '../../saved_objects'; -import { EntityIdConflict } from './errors/entity_id_conflict_error'; export async function saveEntityDefinition( soClient: SavedObjectsClientContract, definition: EntityDefinition ): Promise { - const response = await soClient.find({ - type: SO_ENTITY_DEFINITION_TYPE, - page: 1, - perPage: 1, - filter: `${SO_ENTITY_DEFINITION_TYPE}.attributes.id:(${definition.id})`, - }); - - if (response.total === 1) { - throw new EntityIdConflict( - `Entity definition with [${definition.id}] already exists.`, - definition - ); - } - await soClient.create(SO_ENTITY_DEFINITION_TYPE, definition, { id: definition.id, managed: definition.managed, @@ -36,3 +21,25 @@ export async function saveEntityDefinition( return definition; } + +export async function entityDefinitionExists( + soClient: SavedObjectsClientContract, + id: string +): Promise { + const response = await soClient.find({ + type: SO_ENTITY_DEFINITION_TYPE, + page: 1, + perPage: 1, + filter: `${SO_ENTITY_DEFINITION_TYPE}.attributes.id:(${id})`, + }); + + return response.total === 1; +} + +export async function updateEntityDefinition( + soClient: SavedObjectsClientContract, + id: string, + definition: Partial +) { + await soClient.update(SO_ENTITY_DEFINITION_TYPE, id, definition); +} diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/__snapshots__/entities_history_template.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/__snapshots__/entities_history_template.test.ts.snap index 464293cc1bca8..2d0aa66c662e6 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/__snapshots__/entities_history_template.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/__snapshots__/entities_history_template.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`getEntitiesHistoryIndexTemplateConfig(definitionId) should generate a valid index template 1`] = ` +exports[`generateEntitiesHistoryIndexTemplateConfig(definition) should generate a valid index template 1`] = ` Object { "_meta": Object { "description": "Index template for indices managed by the Elastic Entity Model's entity discovery framework for the history dataset", diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/__snapshots__/entities_latest_template.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/__snapshots__/entities_latest_template.test.ts.snap index 448286b16d84a..a3ed6ea45f53d 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/__snapshots__/entities_latest_template.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/__snapshots__/entities_latest_template.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`getEntitiesLatestIndexTemplateConfig(definitionId) should generate a valid index template 1`] = ` +exports[`generateEntitiesLatestIndexTemplateConfig(definition) should generate a valid index template 1`] = ` Object { "_meta": Object { "description": "Index template for indices managed by the Elastic Entity Model's entity discovery framework for the latest dataset", diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_history_template.test.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_history_template.test.ts index 055ebe75cd608..33a934032c686 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_history_template.test.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_history_template.test.ts @@ -6,11 +6,11 @@ */ import { entityDefinition } from '../helpers/fixtures/entity_definition'; -import { getEntitiesHistoryIndexTemplateConfig } from './entities_history_template'; +import { generateEntitiesHistoryIndexTemplateConfig } from './entities_history_template'; -describe('getEntitiesHistoryIndexTemplateConfig(definitionId)', () => { +describe('generateEntitiesHistoryIndexTemplateConfig(definition)', () => { it('should generate a valid index template', () => { - const template = getEntitiesHistoryIndexTemplateConfig(entityDefinition); + const template = generateEntitiesHistoryIndexTemplateConfig(entityDefinition); expect(template).toMatchSnapshot(); }); }); diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_history_template.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_history_template.ts index d6007e8287138..5fa88367c04d1 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_history_template.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_history_template.ts @@ -13,7 +13,7 @@ import { entitiesAliasPattern, ENTITY_SCHEMA_VERSION_V1, } from '@kbn/entities-schema'; -import { getEntityHistoryIndexTemplateV1 } from '../../../../common/helpers'; +import { generateHistoryIndexTemplateId } from '../helpers/generate_component_id'; import { ENTITY_ENTITY_COMPONENT_TEMPLATE_V1, ENTITY_EVENT_COMPONENT_TEMPLATE_V1, @@ -21,10 +21,10 @@ import { } from '../../../../common/constants_entities'; import { getCustomHistoryTemplateComponents } from '../../../templates/components/helpers'; -export const getEntitiesHistoryIndexTemplateConfig = ( +export const generateEntitiesHistoryIndexTemplateConfig = ( definition: EntityDefinition ): IndicesPutIndexTemplateRequest => ({ - name: getEntityHistoryIndexTemplateV1(definition.id), + name: generateHistoryIndexTemplateId(definition), _meta: { description: "Index template for indices managed by the Elastic Entity Model's entity discovery framework for the history dataset", diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_latest_template.test.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_latest_template.test.ts index f1012d0bcb7f7..44dc91b72da44 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_latest_template.test.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_latest_template.test.ts @@ -6,11 +6,11 @@ */ import { entityDefinition } from '../helpers/fixtures/entity_definition'; -import { getEntitiesLatestIndexTemplateConfig } from './entities_latest_template'; +import { generateEntitiesLatestIndexTemplateConfig } from './entities_latest_template'; -describe('getEntitiesLatestIndexTemplateConfig(definitionId)', () => { +describe('generateEntitiesLatestIndexTemplateConfig(definition)', () => { it('should generate a valid index template', () => { - const template = getEntitiesLatestIndexTemplateConfig(entityDefinition); + const template = generateEntitiesLatestIndexTemplateConfig(entityDefinition); expect(template).toMatchSnapshot(); }); }); diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_latest_template.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_latest_template.ts index e97be68e696d1..b4eeb18d9435c 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_latest_template.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/templates/entities_latest_template.ts @@ -13,7 +13,7 @@ import { entitiesIndexPattern, entitiesAliasPattern, } from '@kbn/entities-schema'; -import { getEntityLatestIndexTemplateV1 } from '../../../../common/helpers'; +import { generateLatestIndexTemplateId } from '../helpers/generate_component_id'; import { ENTITY_ENTITY_COMPONENT_TEMPLATE_V1, ENTITY_EVENT_COMPONENT_TEMPLATE_V1, @@ -21,10 +21,10 @@ import { } from '../../../../common/constants_entities'; import { getCustomLatestTemplateComponents } from '../../../templates/components/helpers'; -export const getEntitiesLatestIndexTemplateConfig = ( +export const generateEntitiesLatestIndexTemplateConfig = ( definition: EntityDefinition ): IndicesPutIndexTemplateRequest => ({ - name: getEntityLatestIndexTemplateV1(definition.id), + name: generateLatestIndexTemplateId(definition), _meta: { description: "Index template for indices managed by the Elastic Entity Model's entity discovery framework for the latest dataset", diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_history_transform.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_history_transform.test.ts.snap index 30b8912a532d7..93c440038c3e6 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_history_transform.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_history_transform.test.ts.snap @@ -155,7 +155,7 @@ Object { exports[`generateHistoryTransform(definition) should generate a valid history transform 1`] = ` Object { "_meta": Object { - "definitionVersion": "999.999.999", + "definitionVersion": "1.0.0", "managed": false, }, "defer_validation": true, diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_latest_transform.test.ts.snap b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_latest_transform.test.ts.snap index cc5ee058baf79..ca4cda934328e 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_latest_transform.test.ts.snap +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/__snapshots__/generate_latest_transform.test.ts.snap @@ -3,7 +3,7 @@ exports[`generateLatestTransform(definition) should generate a valid latest transform 1`] = ` Object { "_meta": Object { - "definitionVersion": "999.999.999", + "definitionVersion": "1.0.0", "managed": false, }, "defer_validation": true, @@ -97,7 +97,7 @@ Object { }, "filter": Object { "range": Object { - "event.ingested": Object { + "@timestamp": Object { "gte": "now-1m", }, }, @@ -114,7 +114,7 @@ Object { }, "filter": Object { "range": Object { - "event.ingested": Object { + "@timestamp": Object { "gte": "now-1m", }, }, @@ -131,7 +131,7 @@ Object { }, "filter": Object { "range": Object { - "event.ingested": Object { + "@timestamp": Object { "gte": "now-1m", }, }, @@ -148,7 +148,7 @@ Object { }, "filter": Object { "range": Object { - "event.ingested": Object { + "@timestamp": Object { "gte": "now-1m", }, }, diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_metadata_aggregations.test.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_metadata_aggregations.test.ts index 0ae3c4a81c870..ef54abe305a69 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_metadata_aggregations.test.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_metadata_aggregations.test.ts @@ -85,7 +85,7 @@ describe('Generate Metadata Aggregations for history and latest', () => { 'entity.metadata.host.name': { filter: { range: { - 'event.ingested': { + '@timestamp': { gte: 'now-1m', }, }, @@ -111,7 +111,7 @@ describe('Generate Metadata Aggregations for history and latest', () => { 'entity.metadata.host.name': { filter: { range: { - 'event.ingested': { + '@timestamp': { gte: 'now-1m', }, }, @@ -137,7 +137,7 @@ describe('Generate Metadata Aggregations for history and latest', () => { 'entity.metadata.host.name': { filter: { range: { - 'event.ingested': { + '@timestamp': { gte: 'now-1m', }, }, @@ -163,7 +163,7 @@ describe('Generate Metadata Aggregations for history and latest', () => { 'entity.metadata.hostName': { filter: { range: { - 'event.ingested': { + '@timestamp': { gte: 'now-1m', }, }, diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_metadata_aggregations.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_metadata_aggregations.ts index 264d5da12ee04..79aa4312c2955 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_metadata_aggregations.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/generate_metadata_aggregations.ts @@ -37,7 +37,7 @@ export function generateLatestMetadataAggregations(definition: EntityDefinition) [`entity.metadata.${metadata.destination}`]: { filter: { range: { - 'event.ingested': { + '@timestamp': { gte: `now-${definition.history.interval}`, }, }, diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/validate_transform_ids.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/validate_transform_ids.ts index c124870da8591..c16b7f126dded 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/validate_transform_ids.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/transform/validate_transform_ids.ts @@ -8,6 +8,7 @@ import { EntityDefinition } from '@kbn/entities-schema'; import { EntityDefinitionIdInvalid } from '../errors/entity_definition_id_invalid'; import { + generateHistoryBackfillTransformId, generateHistoryTransformId, generateLatestTransformId, } from '../helpers/generate_component_id'; @@ -17,9 +18,15 @@ const TRANSFORM_ID_MAX_LENGTH = 64; export function validateDefinitionCanCreateValidTransformIds(definition: EntityDefinition) { const historyTransformId = generateHistoryTransformId(definition); const latestTransformId = generateLatestTransformId(definition); + const historyBackfillTransformId = generateHistoryBackfillTransformId(definition); const spareChars = - TRANSFORM_ID_MAX_LENGTH - Math.max(historyTransformId.length, latestTransformId.length); + TRANSFORM_ID_MAX_LENGTH - + Math.max( + historyTransformId.length, + latestTransformId.length, + historyBackfillTransformId.length + ); if (spareChars < 0) { throw new EntityDefinitionIdInvalid( diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/types.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/types.ts index 1f3498a9354a5..2cb4eb43791c2 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/types.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/types.ts @@ -7,6 +7,10 @@ import { EntityDefinition } from '@kbn/entities-schema'; +// state is the *live* state of the definition. since a definition +// is composed of several elasticsearch components that can be +// modified or deleted outside of the entity manager apis, this can +// be used to verify the actual installation is complete and running export type EntityDefinitionWithState = EntityDefinition & { state: { installed: boolean; running: boolean }; }; diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/uninstall_entity_definition.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/uninstall_entity_definition.ts index 11f772ce2e938..64871084333c3 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/uninstall_entity_definition.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/uninstall_entity_definition.ts @@ -9,10 +9,6 @@ import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; import { EntityDefinition } from '@kbn/entities-schema'; import { Logger } from '@kbn/logging'; -import { - getEntityHistoryIndexTemplateV1, - getEntityLatestIndexTemplateV1, -} from '../../../common/helpers'; import { deleteEntityDefinition } from './delete_entity_definition'; import { deleteIndices } from './delete_index'; import { deleteHistoryIngestPipeline, deleteLatestIngestPipeline } from './delete_ingest_pipeline'; @@ -23,6 +19,10 @@ import { stopAndDeleteLatestTransform, } from './stop_and_delete_transform'; import { isBackfillEnabled } from './helpers/is_backfill_enabled'; +import { + generateHistoryIndexTemplateId, + generateLatestIndexTemplateId, +} from './helpers/generate_component_id'; import { deleteTemplate } from '../manage_index_templates'; export async function uninstallEntityDefinition({ @@ -38,20 +38,29 @@ export async function uninstallEntityDefinition({ logger: Logger; deleteData?: boolean; }) { - await stopAndDeleteHistoryTransform(esClient, definition, logger); - if (isBackfillEnabled(definition)) { - await stopAndDeleteHistoryBackfillTransform(esClient, definition, logger); - } - await stopAndDeleteLatestTransform(esClient, definition, logger); - await deleteHistoryIngestPipeline(esClient, definition, logger); - await deleteLatestIngestPipeline(esClient, definition, logger); - await deleteEntityDefinition(soClient, definition, logger); - await deleteTemplate({ esClient, logger, name: getEntityHistoryIndexTemplateV1(definition.id) }); - await deleteTemplate({ esClient, logger, name: getEntityLatestIndexTemplateV1(definition.id) }); + await Promise.all([ + stopAndDeleteHistoryTransform(esClient, definition, logger), + stopAndDeleteLatestTransform(esClient, definition, logger), + isBackfillEnabled(definition) + ? stopAndDeleteHistoryBackfillTransform(esClient, definition, logger) + : Promise.resolve(), + ]); + + await Promise.all([ + deleteHistoryIngestPipeline(esClient, definition, logger), + deleteLatestIngestPipeline(esClient, definition, logger), + ]); if (deleteData) { await deleteIndices(esClient, definition, logger); } + + await Promise.all([ + deleteTemplate({ esClient, logger, name: generateHistoryIndexTemplateId(definition) }), + deleteTemplate({ esClient, logger, name: generateLatestIndexTemplateId(definition) }), + ]); + + await deleteEntityDefinition(soClient, definition); } export async function uninstallBuiltInEntityDefinitions({ diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/upgrade_entity_definition.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/upgrade_entity_definition.ts new file mode 100644 index 0000000000000..aa94160039b04 --- /dev/null +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/entities/upgrade_entity_definition.ts @@ -0,0 +1,53 @@ +/* + * 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 { EntityDefinition } from '@kbn/entities-schema'; +import { installBuiltInEntityDefinitions } from './install_entity_definition'; +import { startTransform } from './start_transform'; +import { EntityManagerServerSetup } from '../../types'; +import { checkIfEntityDiscoveryAPIKeyIsValid, readEntityDiscoveryAPIKey } from '../auth'; +import { getClientsFromAPIKey } from '../utils'; +import { ERROR_API_KEY_NOT_FOUND } from '../../../common/errors'; + +export async function upgradeBuiltInEntityDefinitions({ + definitions, + server, +}: { + definitions: EntityDefinition[]; + server: EntityManagerServerSetup; +}): Promise< + { success: true; definitions: EntityDefinition[] } | { success: false; reason: string } +> { + const { logger } = server; + const apiKey = await readEntityDiscoveryAPIKey(server); + if (!apiKey) { + return { success: false, reason: ERROR_API_KEY_NOT_FOUND }; + } + + const isValid = await checkIfEntityDiscoveryAPIKeyIsValid(server, apiKey); + if (!isValid) { + throw new Error( + 'Stored API key is not valid, skipping built-in definition upgrade. You can re-enable Entity Discovery to update the key.' + ); + } + + const { esClient, soClient } = getClientsFromAPIKey({ apiKey, server }); + + logger.debug(`Starting built-in definitions upgrade`); + const upgradedDefinitions = await installBuiltInEntityDefinitions({ + esClient, + soClient, + definitions, + logger, + }); + + await Promise.all( + upgradedDefinitions.map((definition) => startTransform(esClient, definition, logger)) + ); + + return { success: true, definitions: upgradedDefinitions }; +} diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/manage_index_templates.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/manage_index_templates.ts index f300df4a92c1d..b0789b6cf2769 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/manage_index_templates.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/manage_index_templates.ts @@ -10,6 +10,10 @@ import { IndicesPutIndexTemplateRequest, } from '@elastic/elasticsearch/lib/api/types'; import { ElasticsearchClient, Logger } from '@kbn/core/server'; +import { entitiesHistoryBaseComponentTemplateConfig } from '../templates/components/base_history'; +import { entitiesLatestBaseComponentTemplateConfig } from '../templates/components/base_latest'; +import { entitiesEntityComponentTemplateConfig } from '../templates/components/entity'; +import { entitiesEventComponentTemplateConfig } from '../templates/components/event'; import { retryTransientEsErrors } from './entities/helpers/retry'; interface TemplateManagementOptions { @@ -24,6 +28,37 @@ interface ComponentManagementOptions { logger: Logger; } +export const installEntityManagerTemplates = async ({ + esClient, + logger, +}: { + esClient: ElasticsearchClient; + logger: Logger; +}) => { + await Promise.all([ + upsertComponent({ + esClient, + logger, + component: entitiesHistoryBaseComponentTemplateConfig, + }), + upsertComponent({ + esClient, + logger, + component: entitiesLatestBaseComponentTemplateConfig, + }), + upsertComponent({ + esClient, + logger, + component: entitiesEventComponentTemplateConfig, + }), + upsertComponent({ + esClient, + logger, + component: entitiesEntityComponentTemplateConfig, + }), + ]); +}; + interface DeleteTemplateOptions { esClient: ElasticsearchClient; name: string; @@ -33,15 +68,11 @@ interface DeleteTemplateOptions { export async function upsertTemplate({ esClient, template, logger }: TemplateManagementOptions) { try { await retryTransientEsErrors(() => esClient.indices.putIndexTemplate(template), { logger }); + logger.debug(() => `Installed entity manager index template: ${JSON.stringify(template)}`); } catch (error: any) { logger.error(`Error updating entity manager index template: ${error.message}`); throw error; } - - logger.info( - `Entity manager index template is up to date (use debug logging to see what was installed)` - ); - logger.debug(() => `Entity manager index template: ${JSON.stringify(template)}`); } export async function deleteTemplate({ esClient, name, logger }: DeleteTemplateOptions) { @@ -61,13 +92,9 @@ export async function upsertComponent({ esClient, component, logger }: Component await retryTransientEsErrors(() => esClient.cluster.putComponentTemplate(component), { logger, }); + logger.debug(() => `Installed entity manager component template: ${JSON.stringify(component)}`); } catch (error: any) { logger.error(`Error updating entity manager component template: ${error.message}`); throw error; } - - logger.info( - `Entity manager component template is up to date (use debug logging to see what was installed)` - ); - logger.debug(() => `Entity manager component template: ${JSON.stringify(component)}`); } diff --git a/x-pack/plugins/observability_solution/entity_manager/server/plugin.ts b/x-pack/plugins/observability_solution/entity_manager/server/plugin.ts index 80154149e2402..de9e8bec2826f 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/plugin.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/plugin.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { firstValueFrom } from 'rxjs'; import { Plugin, CoreSetup, @@ -14,7 +15,7 @@ import { PluginConfigDescriptor, Logger, } from '@kbn/core/server'; -import { upsertComponent } from './lib/manage_index_templates'; +import { installEntityManagerTemplates } from './lib/manage_index_templates'; import { setupRoutes } from './routes'; import { EntityManagerPluginSetupDependencies, @@ -22,11 +23,9 @@ import { EntityManagerServerSetup, } from './types'; import { EntityManagerConfig, configSchema, exposeToBrowserConfig } from '../common/config'; -import { entitiesEventComponentTemplateConfig } from './templates/components/event'; import { entityDefinition, EntityDiscoveryApiKeyType } from './saved_objects'; -import { entitiesEntityComponentTemplateConfig } from './templates/components/entity'; -import { entitiesLatestBaseComponentTemplateConfig } from './templates/components/base_latest'; -import { entitiesHistoryBaseComponentTemplateConfig } from './templates/components/base_history'; +import { upgradeBuiltInEntityDefinitions } from './lib/entities/upgrade_entity_definition'; +import { builtInDefinitions } from './lib/entities/built_in'; export type EntityManagerServerPluginSetup = ReturnType; export type EntityManagerServerPluginStart = ReturnType; @@ -89,29 +88,21 @@ export class EntityManagerServerPlugin const esClient = core.elasticsearch.client.asInternalUser; - // Install entities component templates and index template - Promise.all([ - upsertComponent({ - esClient, - logger: this.logger, - component: entitiesHistoryBaseComponentTemplateConfig, - }), - upsertComponent({ - esClient, - logger: this.logger, - component: entitiesLatestBaseComponentTemplateConfig, - }), - upsertComponent({ - esClient, - logger: this.logger, - component: entitiesEventComponentTemplateConfig, - }), - upsertComponent({ - esClient, - logger: this.logger, - component: entitiesEntityComponentTemplateConfig, - }), - ]).catch(() => {}); + installEntityManagerTemplates({ esClient, logger: this.logger }) + .then(async () => { + // the api key validation requires a check against the cluster license + // which is lazily loaded. we ensure it gets loaded before the update + await firstValueFrom(plugins.licensing.license$); + const { success } = await upgradeBuiltInEntityDefinitions({ + definitions: builtInDefinitions, + server: this.server!, + }); + + if (success) { + this.logger.info('Builtin definitions were successfully upgraded'); + } + }) + .catch((err) => this.logger.error(err)); return {}; } 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 23343026e3332..0332e65249e38 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 @@ -5,12 +5,14 @@ * 2.0. */ +import semver from 'semver'; import { RequestHandlerContext } from '@kbn/core/server'; import { SetupRouteOptions } from '../types'; import { checkIfEntityDiscoveryAPIKeyIsValid, readEntityDiscoveryAPIKey } from '../../lib/auth'; import { ERROR_API_KEY_NOT_FOUND, ERROR_API_KEY_NOT_VALID, + ERROR_BUILTIN_UPGRADE_REQUIRED, ERROR_DEFINITION_STOPPED, ERROR_PARTIAL_BUILTIN_INSTALLATION, } from '../../../common/errors'; @@ -54,17 +56,21 @@ export function checkEntityDiscoveryEnabledRoute results.reduce( - (state, definition) => { + (state, { installedDefinition, builtInDefinition }) => { return { - installed: Boolean(state.installed && definition?.state.installed), - running: Boolean(state.running && definition?.state.running), + installed: Boolean(state.installed && installedDefinition?.state.installed), + running: Boolean(state.running && installedDefinition?.state.running), + outdated: + state.outdated || + (installedDefinition && + semver.neq(installedDefinition.version, builtInDefinition.version)), }; }, - { installed: true, running: true } + { installed: true, running: true, outdated: false } ) ); @@ -76,6 +82,10 @@ export function checkEntityDiscoveryEnabledRoute({ }, }); } + const soClient = (await context.core).savedObjects.getClient({ includedHiddenTypes: [EntityDiscoveryApiKeyType.name], }); diff --git a/x-pack/plugins/observability_solution/entity_manager/server/routes/enablement/enable.ts b/x-pack/plugins/observability_solution/entity_manager/server/routes/enablement/enable.ts index 34dac8788d6a8..6e3e7569a15a6 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/routes/enablement/enable.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/routes/enablement/enable.ts @@ -25,6 +25,7 @@ import { builtInDefinitions } from '../../lib/entities/built_in'; import { installBuiltInEntityDefinitions } from '../../lib/entities/install_entity_definition'; import { ERROR_API_KEY_SERVICE_DISABLED } from '../../../common/errors'; import { EntityDiscoveryApiKeyType } from '../../saved_objects'; +import { startTransform } from '../../lib/entities/start_transform'; export function enableEntityDiscoveryRoute({ router, @@ -89,14 +90,21 @@ export function enableEntityDiscoveryRoute({ await saveEntityDiscoveryAPIKey(soClient, apiKey); - await installBuiltInEntityDefinitions({ - logger, - builtInDefinitions, + const installedDefinitions = await installBuiltInEntityDefinitions({ esClient, soClient, - installOnly: req.query.installOnly, + logger, + definitions: builtInDefinitions, }); + if (!req.query.installOnly) { + await Promise.all( + installedDefinitions.map((installedDefinition) => + startTransform(esClient, installedDefinition, logger) + ) + ); + } + return res.ok({ body: { success: true } }); } catch (err) { logger.error(err); diff --git a/x-pack/plugins/observability_solution/entity_manager/server/saved_objects/entity_definition.ts b/x-pack/plugins/observability_solution/entity_manager/server/saved_objects/entity_definition.ts index b4bf24580d632..fdf2510e8627e 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/saved_objects/entity_definition.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/saved_objects/entity_definition.ts @@ -49,5 +49,20 @@ export const entityDefinition: SavedObjectsType = { }, ], }, + '2': { + changes: [ + { + type: 'data_backfill', + backfillFn: () => { + return { + attributes: { + installStatus: 'installed', + installStartedAt: new Date().toISOString(), + }, + }; + }, + }, + ], + }, }, }; diff --git a/x-pack/plugins/observability_solution/entity_manager/server/types.ts b/x-pack/plugins/observability_solution/entity_manager/server/types.ts index 2215b50285c82..cd7a4a49b9882 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/types.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/types.ts @@ -11,6 +11,7 @@ import { EncryptedSavedObjectsPluginSetup, EncryptedSavedObjectsPluginStart, } from '@kbn/encrypted-saved-objects-plugin/server'; +import { LicensingPluginStart } from '@kbn/licensing-plugin/server'; import { EntityManagerConfig } from '../common/config'; export interface EntityManagerServerSetup { @@ -33,4 +34,5 @@ export interface EntityManagerPluginSetupDependencies { export interface EntityManagerPluginStartDependencies { security: SecurityPluginStart; encryptedSavedObjects: EncryptedSavedObjectsPluginStart; + licensing: LicensingPluginStart; } diff --git a/x-pack/plugins/observability_solution/entity_manager/tsconfig.json b/x-pack/plugins/observability_solution/entity_manager/tsconfig.json index 4b9d394a62f12..66dbddf1a261e 100644 --- a/x-pack/plugins/observability_solution/entity_manager/tsconfig.json +++ b/x-pack/plugins/observability_solution/entity_manager/tsconfig.json @@ -28,5 +28,6 @@ "@kbn/security-plugin", "@kbn/encrypted-saved-objects-plugin", "@kbn/logging-mocks", + "@kbn/licensing-plugin", ] } diff --git a/x-pack/plugins/observability_solution/exploratory_view/public/components/shared/exploratory_view/series_editor/series.tsx b/x-pack/plugins/observability_solution/exploratory_view/public/components/shared/exploratory_view/series_editor/series.tsx index 7be69c2a0969f..08810e673a0e6 100644 --- a/x-pack/plugins/observability_solution/exploratory_view/public/components/shared/exploratory_view/series_editor/series.tsx +++ b/x-pack/plugins/observability_solution/exploratory_view/public/components/shared/exploratory_view/series_editor/series.tsx @@ -63,7 +63,8 @@ export function Series({ item, isExpanded, toggleExpanded }: Props) { aria-label={ACCORDION_LABEL} onToggle={toggleExpanded} arrowDisplay={!seriesProps.series.dataType ? 'none' : undefined} - extraAction={ + buttonElement="div" + buttonContent={ diff --git a/x-pack/plugins/observability_solution/infra/common/alerting/logs/log_threshold/types.ts b/x-pack/plugins/observability_solution/infra/common/alerting/logs/log_threshold/types.ts index 4f5b977dd3b82..b8410a478b6f8 100644 --- a/x-pack/plugins/observability_solution/infra/common/alerting/logs/log_threshold/types.ts +++ b/x-pack/plugins/observability_solution/infra/common/alerting/logs/log_threshold/types.ts @@ -382,7 +382,7 @@ export const isOptimizedGroupedSearchQueryResponse = ( response: GroupedSearchQueryResponse['aggregations']['groups']['buckets'] ): response is OptimizedGroupedSearchQueryResponse['aggregations']['groups']['buckets'] => { const result = response[0]; - return result && !result.hasOwnProperty('filtered_results'); + return result && !Object.hasOwn(result, 'filtered_results'); }; export const isOptimizableGroupedThreshold = ( diff --git a/x-pack/plugins/observability_solution/infra/common/constants.ts b/x-pack/plugins/observability_solution/infra/common/constants.ts index 71507ba78b904..0bbabffbb17ce 100644 --- a/x-pack/plugins/observability_solution/infra/common/constants.ts +++ b/x-pack/plugins/observability_solution/infra/common/constants.ts @@ -26,6 +26,7 @@ export const KUBERNETES_POD_UID_FIELD = 'kubernetes.pod.uid'; export const SYSTEM_PROCESS_CMDLINE_FIELD = 'system.process.cmdline'; export const EVENT_MODULE = 'event.module'; export const METRICSET_MODULE = 'metricset.module'; +export const METRICSET_NAME = 'metricset.name'; // integrations export const SYSTEM_INTEGRATION = 'system'; diff --git a/x-pack/plugins/observability_solution/infra/common/http_api/asset_count_api.ts b/x-pack/plugins/observability_solution/infra/common/http_api/asset_count_api.ts index 81ff0e7c43635..83e2dc4db6263 100644 --- a/x-pack/plugins/observability_solution/infra/common/http_api/asset_count_api.ts +++ b/x-pack/plugins/observability_solution/infra/common/http_api/asset_count_api.ts @@ -5,21 +5,17 @@ * 2.0. */ -import { dateRt } from '@kbn/io-ts-utils'; +import { isoToEpochRt } from '@kbn/io-ts-utils'; import * as rt from 'io-ts'; - -const AssetTypeRT = rt.type({ - assetType: rt.literal('host'), -}); +import { AssetTypeRT } from './shared/asset_type'; export const GetInfraAssetCountRequestBodyPayloadRT = rt.intersection([ rt.partial({ query: rt.UnknownRecord, }), rt.type({ - sourceId: rt.string, - from: dateRt, - to: dateRt, + from: isoToEpochRt, + to: isoToEpochRt, }), ]); @@ -35,13 +31,13 @@ export const GetInfraAssetCountResponsePayloadRT = rt.intersection([ export type GetInfraAssetCountRequestParamsPayload = rt.TypeOf< typeof GetInfraAssetCountRequestParamsPayloadRT >; -export type GetInfraAssetCountRequestBodyPayload = Omit< - rt.TypeOf, - 'from' | 'to' -> & { - from: string; - to: string; -}; +export type GetInfraAssetCountRequestBodyPayload = rt.TypeOf< + typeof GetInfraAssetCountRequestBodyPayloadRT +>; + +export type GetInfraAssetCountRequestBodyPayloadClient = rt.OutputOf< + typeof GetInfraAssetCountRequestBodyPayloadRT +>; export type GetInfraAssetCountResponsePayload = rt.TypeOf< typeof GetInfraAssetCountResponsePayloadRT 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 18e5a6de1b898..4fe04c61cacd8 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 @@ -5,8 +5,9 @@ * 2.0. */ -import { createLiteralValueFromUndefinedRT, inRangeRt, dateRt } from '@kbn/io-ts-utils'; +import { createLiteralValueFromUndefinedRT, inRangeRt, isoToEpochRt } from '@kbn/io-ts-utils'; import * as rt from 'io-ts'; +import { AssetTypeRT } from '../shared/asset_type'; export const InfraMetricTypeRT = rt.keyof({ cpu: null, @@ -21,11 +22,6 @@ export const InfraMetricTypeRT = rt.keyof({ txV2: null, }); -export const RangeRT = rt.type({ - from: dateRt, - to: dateRt, -}); - export const InfraAssetMetadataTypeRT = rt.keyof({ 'cloud.provider': null, 'host.ip': null, @@ -48,28 +44,33 @@ export const GetInfraMetricsRequestBodyPayloadRT = rt.intersection([ query: rt.UnknownRecord, }), rt.type({ - type: rt.literal('host'), - limit: rt.union([inRangeRt(1, 500), createLiteralValueFromUndefinedRT(20)]), - metrics: rt.array(rt.type({ type: InfraMetricTypeRT })), - range: RangeRT, + limit: rt.union([inRangeRt(1, 500), createLiteralValueFromUndefinedRT(500)]), + metrics: rt.array(InfraMetricTypeRT), + from: isoToEpochRt, + to: isoToEpochRt, }), ]); +export const GetInfraMetricsRequestParamsRT = AssetTypeRT; + export const InfraAssetMetricsItemRT = rt.intersection([ rt.type({ name: rt.string, metrics: rt.array(InfraAssetMetricsRT), metadata: rt.array(InfraAssetMetadataRT), + hasSystemMetrics: rt.boolean, }), rt.partial({ alertsCount: rt.number, }), ]); -export const GetInfraMetricsResponsePayloadRT = rt.type({ - type: rt.literal('host'), - nodes: rt.array(InfraAssetMetricsItemRT), -}); +export const GetInfraMetricsResponsePayloadRT = rt.intersection([ + AssetTypeRT, + rt.type({ + nodes: rt.array(InfraAssetMetricsItemRT), + }), +]); export type InfraAssetMetrics = rt.TypeOf; export type InfraAssetMetadata = rt.TypeOf; @@ -77,14 +78,12 @@ export type InfraAssetMetadataType = rt.TypeOf; export type InfraAssetMetricType = rt.TypeOf; export type InfraAssetMetricsItem = rt.TypeOf; -export type GetInfraMetricsRequestBodyPayload = Omit< - rt.TypeOf, - 'limit' | 'range' -> & { - limit?: number; - range: { - from: string; - to: string; - }; -}; +export type GetInfraMetricsRequestBodyPayload = rt.TypeOf< + typeof GetInfraMetricsRequestBodyPayloadRT +>; + +export type GetInfraMetricsRequestBodyPayloadClient = rt.OutputOf< + typeof GetInfraMetricsRequestBodyPayloadRT +>; + export type GetInfraMetricsResponsePayload = rt.TypeOf; diff --git a/x-pack/plugins/observability_solution/infra/common/http_api/shared/asset_type.ts b/x-pack/plugins/observability_solution/infra/common/http_api/shared/asset_type.ts new file mode 100644 index 0000000000000..1e4da0ffbe2a3 --- /dev/null +++ b/x-pack/plugins/observability_solution/infra/common/http_api/shared/asset_type.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 * as rt from 'io-ts'; + +export const AssetTypeRT = rt.type({ + assetType: rt.literal('host'), +}); diff --git a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metadata/utils.ts b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metadata/utils.ts index 4955f0fb5d497..495328e3714c9 100644 --- a/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metadata/utils.ts +++ b/x-pack/plugins/observability_solution/infra/public/components/asset_details/tabs/metadata/utils.ts @@ -24,7 +24,7 @@ export const getAllFields = (metadata?: InfraMetadata) => { property: string ) => { const fieldsByCategory: FieldsByCategory = metadata?.info?.[`${category}`] ?? {}; - if (fieldsByCategory.hasOwnProperty(property)) { + if (Object.hasOwn(fieldsByCategory, property)) { const value = fieldsByCategory[property]; if (typeof value === 'boolean') { diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/chart/metric_chart_wrapper.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/chart/metric_chart_wrapper.tsx index d3468548994b4..39f4b99e808f1 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/chart/metric_chart_wrapper.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/chart/metric_chart_wrapper.tsx @@ -5,17 +5,14 @@ * 2.0. */ import React, { useEffect, useRef, CSSProperties } from 'react'; -import { - Chart, - LEGACY_LIGHT_THEME, - Metric, - Settings, - type MetricWNumber, - type MetricWTrend, -} from '@elastic/charts'; +import { Chart, Metric, Settings, type MetricWNumber, type MetricWTrend } from '@elastic/charts'; import { EuiPanel, EuiToolTip, useEuiTheme } from '@elastic/eui'; import { css } from '@emotion/react'; -import { ChartPlaceholder } from '../../../../../components/lens'; +import { + ChartLoadingProgress, + ChartPlaceholder, +} from '../../../../../components/lens/chart_placeholder'; +import { useKibanaContextForPlugin } from '../../../../../hooks/use_kibana'; export interface Props extends Pick { id: string; @@ -27,16 +24,19 @@ export interface Props extends Pick { - const euiTheme = useEuiTheme(); + const { euiTheme } = useEuiTheme(); const loadedOnce = useRef(false); + const { + services: { charts }, + } = useKibanaContextForPlugin(); + + const baseTheme = charts.theme.useChartsBaseTheme(); + useEffect(() => { if (!loadedOnce.current && !loading) { loadedOnce.current = true; } - return () => { - loadedOnce.current = false; - }; }, [loading]); const metricsData: MetricWNumber = { @@ -49,7 +49,16 @@ export const MetricChartWrapper = React.memo( }; return ( - + {loading && !loadedOnce.current ? ( ) : ( @@ -63,15 +72,13 @@ export const MetricChartWrapper = React.memo( size={style} css={css` .echMetric { - border-radius: ${euiTheme.euiTheme.border.radius.medium}; + border-radius: ${euiTheme.border.radius.medium}; pointer-events: none; } `} > - + {loading && } +
      diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/hosts_table.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/hosts_table.tsx index efa72e4257355..703f58aa84cc4 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/hosts_table.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/hosts_table.tsx @@ -19,7 +19,7 @@ import { FilterAction } from './table/filter_action'; export const HostsTable = () => { const { loading } = useHostsViewContext(); - const { isRequestRunning: hostCountLoading } = useHostCountContext(); + const { loading: hostCountLoading } = useHostCountContext(); const { onPageReady } = usePerformanceContext(); const { diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/kpis/host_count_kpi.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/kpis/host_count_kpi.tsx index 2264b367f3c43..b1d3875e85a67 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/kpis/host_count_kpi.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/kpis/host_count_kpi.tsx @@ -17,7 +17,7 @@ import { TooltipContent } from '../../../../../components/lens'; export const HostCountKpi = () => { const inventoryModel = findInventoryModel('host'); - const { data: hostCountData, isRequestRunning: hostCountLoading } = useHostCountContext(); + const { count, loading } = useHostCountContext(); const { searchCriteria } = useUnifiedSearchContext(); const euiTheme = useTheme(); @@ -32,7 +32,7 @@ export const HostCountKpi = () => { }; const subtitle = - searchCriteria.limit < (hostCountData?.count.value ?? 0) + searchCriteria.limit < count ? i18n.translate('xpack.infra.hostsViewPage.kpi.subtitle.hostCount.limit', { defaultMessage: 'Limited to {limit}', values: { @@ -45,7 +45,7 @@ export const HostCountKpi = () => { { description={METRICS_TOOLTIP.hostCount} /> } - loading={hostCountLoading} + loading={loading} /> ); }; diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/kpis/kpi_charts.tsx b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/kpis/kpi_charts.tsx index 849a987b374f0..dc945af7d0d37 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/kpis/kpi_charts.tsx +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/components/kpis/kpi_charts.tsx @@ -19,7 +19,7 @@ export const KpiCharts = () => { const { searchCriteria } = useUnifiedSearchContext(); const { searchSessionId } = useSearchSessionContext(); const { hostNodes, loading: hostsLoading } = useHostsViewContext(); - const { isRequestRunning: hostCountLoading, data: hostCountData } = useHostCountContext(); + const { loading: hostCountLoading, count: hostCount } = useHostCountContext(); const { metricsView } = useMetricsDataViewContext(); const shouldUseSearchCriteria = hostNodes.length === 0; @@ -37,7 +37,7 @@ export const KpiCharts = () => { const getSubtitle = (formulaValue: string) => { if (formulaValue.startsWith('max')) { - return searchCriteria.limit < (hostCountData?.count.value ?? 0) + return searchCriteria.limit < hostCount ? i18n.translate('xpack.infra.hostsViewPage.kpi.subtitle.max.limit', { defaultMessage: 'Max (of {limit} hosts)', values: { @@ -48,7 +48,7 @@ export const KpiCharts = () => { defaultMessage: 'Max', }); } - return searchCriteria.limit < (hostCountData?.count.value ?? 0) + return searchCriteria.limit < hostCount ? i18n.translate('xpack.infra.hostsViewPage.kpi.subtitle.average.limit', { defaultMessage: 'Average (of {limit} hosts)', values: { diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_host_count.ts b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_host_count.ts index 7edc11597752a..a09e46ed2792a 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_host_count.ts +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_host_count.ts @@ -5,167 +5,44 @@ * 2.0. */ -import * as rt from 'io-ts'; -import type { IKibanaSearchResponse } from '@kbn/search-types'; -import { ES_SEARCH_STRATEGY } from '@kbn/data-plugin/common'; -import { useCallback, useEffect, useMemo } from 'react'; -import { catchError, map, Observable, of, startWith, tap } from 'rxjs'; import createContainer from 'constate'; -import type { QueryDslQueryContainer, SearchResponse } from '@elastic/elasticsearch/lib/api/types'; import { decodeOrThrow } from '@kbn/io-ts-utils'; -import { HOST_NAME_FIELD, TIMESTAMP_FIELD } from '../../../../../common/constants'; -import type { ITelemetryClient } from '../../../../services/telemetry'; -import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; -import { useDataSearch, useLatestPartialDataSearchResponse } from '../../../../utils/data_search'; -import { useMetricsDataViewContext } from '../../../../containers/metrics_source'; +import { useMemo } from 'react'; +import { GetInfraAssetCountResponsePayloadRT } from '../../../../../common/http_api'; +import { isPending, useFetcher } from '../../../../hooks/use_fetcher'; import { useUnifiedSearchContext } from './use_unified_search'; export const useHostCount = () => { - const { metricsView } = useMetricsDataViewContext(); - const { - services: { telemetry }, - } = useKibanaContextForPlugin(); - const { buildQuery, searchCriteria } = useUnifiedSearchContext(); - - const { search: fetchHostCount, requests$ } = useDataSearch({ - getRequest: useCallback(() => { - const query = buildQuery(); - - const filters: QueryDslQueryContainer = { - bool: { - ...query.bool, - filter: [ - ...query.bool.filter, - { - exists: { - field: HOST_NAME_FIELD, - }, - }, - { - range: { - [metricsView?.timeFieldName ?? TIMESTAMP_FIELD]: { - gte: searchCriteria.dateRange.from, - lte: searchCriteria.dateRange.to, - }, - }, - }, - ], - }, - }; - - return { - request: { - params: { - allow_no_indices: true, - ignore_unavailable: true, - index: metricsView?.indices, - size: 0, - track_total_hits: false, - body: { - query: filters, - aggs: { - count: { - cardinality: { - field: HOST_NAME_FIELD, - }, - }, - }, - }, - }, - }, - options: { strategy: ES_SEARCH_STRATEGY }, - }; - }, [ - buildQuery, - metricsView?.indices, - metricsView?.timeFieldName, - searchCriteria.dateRange.from, - searchCriteria.dateRange.to, - ]), - parseResponses: useMemo( - () => - normalizeDataSearchResponse({ - telemetry, - telemetryData: { - withQuery: !!searchCriteria.query.query, - withFilters: - searchCriteria.filters.length > 0 || searchCriteria.panelFilters.length > 0, - }, - }), - [ - searchCriteria.filters.length, - searchCriteria.panelFilters.length, - searchCriteria.query.query, - telemetry, - ] - ), - }); + const { buildQuery, parsedDateRange } = useUnifiedSearchContext(); + + const payload = useMemo( + () => + JSON.stringify({ + query: buildQuery(), + from: parsedDateRange.from, + to: parsedDateRange.to, + }), + [buildQuery, parsedDateRange] + ); - const { isRequestRunning, isResponsePartial, latestResponseData, latestResponseErrors } = - useLatestPartialDataSearchResponse(requests$); + const { data, status, error } = useFetcher( + async (callApi) => { + const response = await callApi('/api/infra/host/count', { + method: 'POST', + body: payload, + }); - useEffect(() => { - fetchHostCount(); - }, [fetchHostCount]); + return decodeOrThrow(GetInfraAssetCountResponsePayloadRT)(response); + }, + [payload] + ); return { - errors: latestResponseErrors, - isRequestRunning, - isResponsePartial, - data: latestResponseData ?? null, + errors: error, + loading: isPending(status), + count: data?.count ?? 0, }; }; export const HostCount = createContainer(useHostCount); export const [HostCountProvider, useHostCountContext] = HostCount; - -const INITIAL_STATE = { - data: null, - errors: [], - isPartial: true, - isRunning: true, - loaded: 0, - total: undefined, -}; - -const normalizeDataSearchResponse = - ({ - telemetry, - telemetryData, - }: { - telemetry: ITelemetryClient; - telemetryData: { withQuery: boolean; withFilters: boolean }; - }) => - (response$: Observable>>>) => { - return response$.pipe( - map((response) => ({ - data: decodeOrThrow(HostCountResponseRT)(response.rawResponse.aggregations), - errors: [], - isPartial: response.isPartial ?? false, - isRunning: response.isRunning ?? false, - loaded: response.loaded, - total: response.total, - })), - tap(({ data }) => { - telemetry.reportHostsViewTotalHostCountRetrieved({ - total: data.count.value, - with_query: telemetryData.withQuery, - with_filters: telemetryData.withFilters, - }); - }), - startWith(INITIAL_STATE), - catchError((error) => - of({ - ...INITIAL_STATE, - errors: [error.message ?? error], - isRunning: false, - }) - ) - ); - }; - -const HostCountResponseRT = rt.type({ - count: rt.type({ - value: rt.number, - }), -}); diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_hosts_table.test.ts b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_hosts_table.test.ts index 46b46037e343e..c8011d614dbff 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_hosts_table.test.ts +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_hosts_table.test.ts @@ -75,6 +75,7 @@ const mockHostNode: InfraAssetMetricsItem[] = [ ], name: 'host-0', alertsCount: 0, + hasSystemMetrics: true, }, { metrics: [ @@ -113,6 +114,7 @@ const mockHostNode: InfraAssetMetricsItem[] = [ ], name: 'host-1', alertsCount: 0, + hasSystemMetrics: true, }, ]; 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 3adc675c1c86a..7ef12da1428c9 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 @@ -19,20 +19,20 @@ import { isPending, useFetcher } from '../../../../hooks/use_fetcher'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; import { useUnifiedSearchContext } from './use_unified_search'; import { - GetInfraMetricsRequestBodyPayload, + GetInfraMetricsRequestBodyPayloadClient, GetInfraMetricsResponsePayload, InfraAssetMetricType, } from '../../../../../common/http_api'; import { StringDateRange } from './use_unified_search_url_state'; -const HOST_TABLE_METRICS: Array<{ type: InfraAssetMetricType }> = [ - { type: 'cpuV2' }, - { type: 'diskSpaceUsage' }, - { type: 'memory' }, - { type: 'memoryFree' }, - { type: 'normalizedLoad1m' }, - { type: 'rxV2' }, - { type: 'txV2' }, +const HOST_TABLE_METRICS: InfraAssetMetricType[] = [ + 'cpuV2', + 'diskSpaceUsage', + 'memory', + 'memoryFree', + 'normalizedLoad1m', + 'rxV2', + 'txV2', ]; const BASE_INFRA_METRICS_PATH = '/api/metrics/infra'; @@ -59,7 +59,7 @@ export const useHostsView = () => { async (callApi) => { const start = performance.now(); const metricsResponse = await callApi( - BASE_INFRA_METRICS_PATH, + `${BASE_INFRA_METRICS_PATH}/host`, { method: 'POST', body: payload, @@ -99,13 +99,10 @@ const createInfraMetricsRequest = ({ esQuery: { bool: BoolQuery }; dateRange: StringDateRange; limit: number; -}): GetInfraMetricsRequestBodyPayload => ({ - type: 'host', +}): GetInfraMetricsRequestBodyPayloadClient => ({ query: esQuery, - range: { - from: dateRange.from, - to: dateRange.to, - }, + from: dateRange.from, + to: dateRange.to, metrics: HOST_TABLE_METRICS, limit, }); diff --git a/x-pack/plugins/observability_solution/infra/server/infra_server.ts b/x-pack/plugins/observability_solution/infra/server/infra_server.ts index 5aa6740b3de29..56bb7e07d6558 100644 --- a/x-pack/plugins/observability_solution/infra/server/infra_server.ts +++ b/x-pack/plugins/observability_solution/infra/server/infra_server.ts @@ -5,8 +5,6 @@ * 2.0. */ -import { CoreStart } from '@kbn/core-lifecycle-server'; -import { InfraBackendLibs } from './lib/infra_types'; import { initGetHostsAnomaliesRoute, initGetK8sAnomaliesRoute } from './routes/infra_ml'; import { initInventoryMetaRoute } from './routes/inventory_metadata'; import { initInventoryViewRoutes } from './routes/inventory_views'; @@ -36,13 +34,9 @@ import { initMetricsExplorerViewRoutes } from './routes/metrics_explorer_views'; import { initProfilingRoutes } from './routes/profiling'; import { initServicesRoute } from './routes/services'; import { initCustomDashboardsRoutes } from './routes/custom_dashboards/custom_dashboards'; -import { type InfraServerPluginStartDeps } from './lib/adapters/framework'; +import { InfraBackendLibs } from './lib/infra_types'; -export const initInfraServer = ( - libs: InfraBackendLibs, - coreStart: CoreStart, - infraPluginsStart: InfraServerPluginStartDeps -) => { +export const registerRoutes = (libs: InfraBackendLibs) => { initIpToHostName(libs); initGetLogEntryCategoriesRoute(libs); initGetLogEntryCategoryDatasetsRoute(libs); diff --git a/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/lib/metric_query.test.ts b/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/lib/metric_query.test.ts index a32c924385dbc..8f1fa804e8d58 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/lib/metric_query.test.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/alerting/metric_threshold/lib/metric_query.test.ts @@ -37,7 +37,7 @@ describe("The Metric Threshold Alert's getElasticsearchMetricQuery", () => { ); test('includes a range filter', () => { expect( - searchBody.query.bool.filter.find((filter) => filter.hasOwnProperty('range')) + searchBody.query.bool.filter.find((filter) => Object.hasOwn(filter, 'range')) ).toBeTruthy(); }); @@ -65,7 +65,7 @@ describe("The Metric Threshold Alert's getElasticsearchMetricQuery", () => { ); test('includes a range filter', () => { expect( - searchBody.query.bool.filter.find((filter) => filter.hasOwnProperty('range')) + searchBody.query.bool.filter.find((filter) => Object.hasOwn(filter, 'range')) ).toBeTruthy(); }); diff --git a/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_apm_data_access_client.ts b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_apm_data_access_client.ts new file mode 100644 index 0000000000000..1936c59d7a637 --- /dev/null +++ b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_apm_data_access_client.ts @@ -0,0 +1,90 @@ +/* + * 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 { APMEventClient } from '@kbn/apm-data-access-plugin/server'; +import type { KibanaRequest } from '@kbn/core/server'; +import { + apmEnableContinuousRollups, + apmEnableServiceMetrics, +} from '@kbn/observability-plugin/common'; +import { UI_SETTINGS } from '@kbn/data-plugin/server'; +import type { InfraPluginRequestHandlerContext } from '../../types'; +import type { InfraBackendLibs } from '../infra_types'; + +export type ApmDataAccessClient = ReturnType; +export type ApmDataAccessServicesWrapper = Awaited>; + +export const getApmDataAccessClient = ({ + libs, + context, + request, +}: { + libs: InfraBackendLibs; + context: InfraPluginRequestHandlerContext; + request: KibanaRequest; +}) => { + const hasPrivileges = async () => { + const [, { apmDataAccess }] = await libs.getStartServices(); + return apmDataAccess.hasPrivileges({ request }); + }; + + const getServices = async () => { + const { apmDataAccess } = libs; + + const coreContext = await context.core; + + const { savedObjects, uiSettings, elasticsearch } = coreContext; + const savedObjectsClient = savedObjects.client; + const esClient = elasticsearch.client.asCurrentUser; + const uiSettingsClient = uiSettings.client; + + const [apmIndices, includeFrozen] = await Promise.all([ + apmDataAccess.getApmIndices(savedObjectsClient), + uiSettingsClient.get(UI_SETTINGS.SEARCH_INCLUDE_FROZEN), + ]); + + const services = apmDataAccess.getServices({ + apmEventClient: new APMEventClient({ + indices: apmIndices, + options: { + includeFrozen, + }, + debug: false, + esClient, + request, + }), + }); + + return { + ...services, + getDocumentSources: async ({ + start, + end, + kuery = '', + }: { + start: number; + end: number; + kuery?: string; + }) => { + const [enableContinuousRollups, enableServiceTransactionMetrics] = await Promise.all([ + uiSettingsClient.get(apmEnableContinuousRollups), + uiSettingsClient.get(apmEnableServiceMetrics), + ]); + + return services.getDocumentSources({ + start, + end, + kuery, + enableContinuousRollups, + enableServiceTransactionMetrics, + }); + }, + }; + }; + + return { hasPrivileges, getServices }; +}; diff --git a/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_alerts_client.ts b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_alerts_client.ts index 5a9c016c7c81f..58dfdde223ebd 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_alerts_client.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_alerts_client.ts @@ -5,10 +5,10 @@ * 2.0. */ import { isEmpty } from 'lodash'; -import { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; +import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; import { ParsedTechnicalFields } from '@kbn/rule-registry-plugin/common'; -import { KibanaRequest } from '@kbn/core/server'; -import type { InfraPluginStartServicesAccessor } from '../../types'; +import type { KibanaRequest } from '@kbn/core/server'; +import type { InfraBackendLibs } from '../infra_types'; type RequiredParams = ESSearchRequest & { size: number; @@ -18,13 +18,13 @@ type RequiredParams = ESSearchRequest & { export type InfraAlertsClient = Awaited>; export async function getInfraAlertsClient({ - getStartServices, + libs, request, }: { - getStartServices: InfraPluginStartServicesAccessor; + libs: InfraBackendLibs; request: KibanaRequest; }) { - const [, { ruleRegistry }] = await getStartServices(); + const [, { ruleRegistry }] = await libs.getStartServices(); const alertsClient = await ruleRegistry.getRacClientWithRequest(request); const infraAlertsIndices = await alertsClient.getAuthorizedAlertsIndices(['infrastructure']); 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 298cf44ec85b1..d560ffc358a5c 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,9 +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 { KibanaFramework } from '../adapters/framework/kibana_framework_adapter'; +import type { InfraBackendLibs } from '../infra_types'; type RequiredParams = Omit & { body: { @@ -20,32 +19,29 @@ type RequiredParams = Omit & { export type InfraMetricsClient = Awaited>; export async function getInfraMetricsClient({ - framework, - metricsDataAccess, - requestContext, + libs, + context, request, }: { - framework: KibanaFramework; - metricsDataAccess: MetricsDataClient; - requestContext: InfraPluginRequestHandlerContext; + libs: InfraBackendLibs; + context: InfraPluginRequestHandlerContext; request?: KibanaRequest; }) { - const coreContext = await requestContext.core; - const savedObjectsClient = coreContext.savedObjects.client; - const indices = await metricsDataAccess.getMetricIndices({ - savedObjectsClient, - }); + const { framework } = libs; + const infraContext = await context.infra; + const metricsIndices = await infraContext.getMetricsIndices(); return { search( searchParams: TParams ): Promise> { return framework.callWithRequest( - requestContext, + context, 'search', { ...searchParams, - index: indices, + ignore_unavailable: true, + index: metricsIndices, }, request ) as Promise; diff --git a/x-pack/plugins/observability_solution/infra/server/lib/infra_types.ts b/x-pack/plugins/observability_solution/infra/server/lib/infra_types.ts index 08cf030a16219..96c5cd9f311d7 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/infra_types.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/infra_types.ts @@ -12,9 +12,7 @@ import type { AlertsLocatorParams } from '@kbn/observability-plugin/common'; import { ObservabilityConfig } from '@kbn/observability-plugin/server'; import type { LocatorPublic } from '@kbn/share-plugin/common'; import type { ILogsSharedLogEntriesDomain } from '@kbn/logs-shared-plugin/server'; -import type { MetricsDataClient } from '@kbn/metrics-data-access-plugin/server'; -import { APMDataAccessConfig } from '@kbn/apm-data-access-plugin/server'; -import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; +import type { ApmDataAccessPluginSetup } from '@kbn/apm-data-access-plugin/server'; import { RulesServiceSetup } from '../services/rules'; import { InfraConfig, InfraPluginStartServicesAccessor } from '../types'; import { KibanaFramework } from './adapters/framework/kibana_framework_adapter'; @@ -40,6 +38,5 @@ export interface InfraBackendLibs extends InfraDomainLibs { handleEsError: typeof handleEsError; logger: Logger; alertsLocator?: LocatorPublic; - metricsClient: MetricsDataClient; - getApmIndices: (soClient: SavedObjectsClientContract) => Promise; + apmDataAccess: ApmDataAccessPluginSetup; } diff --git a/x-pack/plugins/observability_solution/infra/server/lib/sources/sources.test.ts b/x-pack/plugins/observability_solution/infra/server/lib/sources/sources.test.ts index c741c0d24538c..2e108be0c515b 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/sources/sources.test.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/sources/sources.test.ts @@ -6,8 +6,7 @@ */ import { SavedObject } from '@kbn/core/server'; -import { MetricsDataClient } from '@kbn/metrics-data-access-plugin/server'; -import { InfraConfig } from '../../types'; +import type { MetricsDataClient } from '@kbn/metrics-data-access-plugin/server'; import { infraSourceConfigurationSavedObjectName } from './saved_object_type'; import { InfraSources } from './sources'; @@ -15,7 +14,6 @@ describe('the InfraSources lib', () => { describe('getSourceConfiguration method', () => { test('returns a source configuration if it exists', async () => { const sourcesLib = new InfraSources({ - config: createMockStaticConfiguration(), metricsClient: createMockMetricsDataClient('METRIC_ALIAS'), }); @@ -52,7 +50,6 @@ describe('the InfraSources lib', () => { test('adds missing attributes from the default configuration to a source configuration', async () => { const sourcesLib = new InfraSources({ - config: createMockStaticConfiguration(), metricsClient: createMockMetricsDataClient(), }); @@ -80,33 +77,6 @@ describe('the InfraSources lib', () => { }); }); -const createMockStaticConfiguration = (): InfraConfig => ({ - alerting: { - inventory_threshold: { - group_by_page_size: 10000, - }, - metric_threshold: { - group_by_page_size: 10000, - }, - }, - inventory: { - compositeSize: 2000, - }, - featureFlags: { - customThresholdAlertsEnabled: false, - logsUIEnabled: true, - metricsExplorerEnabled: true, - osqueryEnabled: true, - inventoryThresholdAlertRuleEnabled: true, - metricThresholdAlertRuleEnabled: true, - logThresholdAlertRuleEnabled: true, - alertsAndRulesDropdownEnabled: true, - profilingEnabled: false, - ruleFormV2Enabled: false, - }, - enabled: true, -}); - const createMockMetricsDataClient = (metricAlias: string = 'metrics-*,metricbeat-*') => ({ getMetricIndices: jest.fn().mockResolvedValue(metricAlias), diff --git a/x-pack/plugins/observability_solution/infra/server/lib/sources/sources.ts b/x-pack/plugins/observability_solution/infra/server/lib/sources/sources.ts index e89157d40bc87..13f6a82fd5fb6 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/sources/sources.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/sources/sources.ts @@ -15,7 +15,7 @@ import { SavedObjectsClientContract, SavedObjectsErrorHelpers, } from '@kbn/core/server'; -import { MetricsDataClient } from '@kbn/metrics-data-access-plugin/server'; +import type { MetricsDataClient } from '@kbn/metrics-data-access-plugin/server'; import { InfraSavedSourceConfiguration, InfraSource, @@ -23,7 +23,6 @@ import { InfraStaticSourceConfiguration, } from '../../../common/source_configuration/source_configuration'; import { SourceConfigurationSavedObjectRT } from '.'; -import { InfraConfig } from '../..'; import { defaultSourceConfiguration } from './defaults'; import { AnomalyThresholdRangeError } from './errors'; import { @@ -32,8 +31,7 @@ import { } from './saved_object_references'; import { infraSourceConfigurationSavedObjectName } from './saved_object_type'; -interface Libs { - config: InfraConfig; +interface InfraSourcesParams { metricsClient: MetricsDataClient; } @@ -41,10 +39,10 @@ interface Libs { export type IInfraSources = Pick; export class InfraSources { - private readonly libs: Libs; + private readonly metricsClient: MetricsDataClient; - constructor(libs: Libs) { - this.libs = libs; + constructor(params: InfraSourcesParams) { + this.metricsClient = params.metricsClient; } public async getInfraSourceConfiguration( @@ -82,7 +80,7 @@ export class InfraSources { savedObjectsClient, sourceId ); - const metricAlias = await this.libs.metricsClient.getMetricIndices({ + const metricAlias = await this.metricsClient.getMetricIndices({ savedObjectsClient, }); sourceConfiguration.configuration.metricAlias = metricAlias; @@ -108,7 +106,7 @@ export class InfraSources { }) ); - await this.libs.metricsClient.updateMetricIndices({ + await this.metricsClient.updateMetricIndices({ savedObjectsClient, metricIndices: newSourceConfiguration.metricAlias, }); @@ -163,7 +161,7 @@ export class InfraSources { }) ); - await this.libs.metricsClient.updateMetricIndices({ + await this.metricsClient.updateMetricIndices({ savedObjectsClient, metricIndices: updatedSourceConfiguration.configuration.metricAlias!, }); diff --git a/x-pack/plugins/observability_solution/infra/server/plugin.ts b/x-pack/plugins/observability_solution/infra/server/plugin.ts index 61f53b4b9260d..6e6f87776fbca 100644 --- a/x-pack/plugins/observability_solution/infra/server/plugin.ts +++ b/x-pack/plugins/observability_solution/infra/server/plugin.ts @@ -22,7 +22,7 @@ import { GetMetricIndicesOptions } from '@kbn/metrics-data-access-plugin/server' import { LOGS_FEATURE_ID, METRICS_FEATURE_ID } from '../common/constants'; import { publicConfigKeys } from '../common/plugin_config_types'; import { LOGS_FEATURE, METRICS_FEATURE } from './features'; -import { initInfraServer } from './infra_server'; +import { registerRoutes } from './infra_server'; import { InfraServerPluginSetupDeps, InfraServerPluginStartDeps } from './lib/adapters/framework'; import { KibanaFramework } from './lib/adapters/framework/kibana_framework_adapter'; import { KibanaMetricsAdapter } from './lib/adapters/metrics/kibana_metrics_adapter'; @@ -174,8 +174,8 @@ export class InfraServerPlugin setup(core: InfraPluginCoreSetup, plugins: InfraServerPluginSetupDeps) { const framework = new KibanaFramework(core, this.config, plugins); + const metricsClient = plugins.metricsDataAccess.client; - const getApmIndices = plugins.apmDataAccess.getApmIndices; metricsClient.setDefaultMetricIndicesHandler(async (options: GetMetricIndicesOptions) => { const sourceConfiguration = await sources.getInfraSourceConfiguration( options.savedObjectsClient, @@ -184,9 +184,9 @@ export class InfraServerPlugin return sourceConfiguration.configuration.metricAlias; }); const sources = new InfraSources({ - config: this.config, metricsClient, }); + const sourceStatus = new InfraSourceStatus( new InfraElasticsearchSourceStatusAdapter(framework), { sources } @@ -217,8 +217,7 @@ export class InfraServerPlugin framework, sources, sourceStatus, - metricsClient, - getApmIndices, + apmDataAccess: plugins.apmDataAccess, ...domainLibs, handleEsError, logsRules: this.logsRules.setup(core, plugins), @@ -265,6 +264,7 @@ export class InfraServerPlugin const coreContext = await context.core; const savedObjectsClient = coreContext.savedObjects.client; const uiSettingsClient = coreContext.uiSettings.client; + const mlSystem = plugins.ml?.mlSystemProvider(request, savedObjectsClient); const mlAnomalyDetectors = plugins.ml?.anomalyDetectorsProvider( request, @@ -272,12 +272,19 @@ export class InfraServerPlugin ); const spaceId = plugins.spaces?.spacesService.getSpaceId(request) ?? DEFAULT_SPACE_ID; + const getMetricsIndices = async () => { + return metricsClient.getMetricIndices({ + savedObjectsClient, + }); + }; + return { mlAnomalyDetectors, mlSystem, spaceId, savedObjectsClient, uiSettingsClient, + getMetricsIndices, }; } ); @@ -291,7 +298,7 @@ export class InfraServerPlugin } as InfraPluginSetup; } - start(core: CoreStart, pluginsStart: InfraServerPluginStartDeps) { + start(core: CoreStart) { const inventoryViews = this.inventoryViews.start({ infraSources: this.libs.sources, savedObjects: core.savedObjects, @@ -302,7 +309,7 @@ export class InfraServerPlugin savedObjects: core.savedObjects, }); - initInfraServer(this.libs, core, pluginsStart); + registerRoutes(this.libs); return { inventoryViews, diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/README.md b/x-pack/plugins/observability_solution/infra/server/routes/infra/README.md index b5b32752fd8bb..b38d87071b717 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/README.md +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/README.md @@ -18,38 +18,19 @@ The response includes: - hosts: array of metrics and metadata - metrics: object containing name of the metric and value - metadata: object containing name of the metadata and value +- hasSystemMetrics: boolean - true if host comes from system integration docs; false otherwise ### Examples: Request ```bash -curl --location -u elastic:changeme 'http://0.0.0.0:5601/ftw/api/metrics/infra' \ +curl --location -u elastic:changeme 'http://0.0.0.0:5601/ftw/api/metrics/infra/host' \ --header 'kbn-xsrf: xxxx' \ --header 'Content-Type: application/json' \ --data '{ - "type": 'host', "limit": 100, - "metrics": [ - { - "type": "rx" - }, - { - "type": "tx" - }, - { - "type": "memory" - }, - { - "type": "cpu" - }, - { - type: 'diskSpaceUsage', - }, - { - type: 'memoryFree', - }, - ], + "metrics": [ "rx", "tx", "memory", "cpu", "diskSpaceUsage", "memoryFree"], "query": { "bool": { "must": [], @@ -58,11 +39,8 @@ curl --location -u elastic:changeme 'http://0.0.0.0:5601/ftw/api/metrics/infra' "must_not": [] } }, - "range": { - "from": "2023-04-18T11:15:31.407Z", - "to": "2023-04-18T11:30:31.407Z" - }, - "sourceId": "default" + "from": "2023-04-18T11:15:31.407Z", + "to": "2023-04-18T11:30:31.407Z" }' ``` @@ -70,7 +48,7 @@ Response ```json { - "type": "host", + "assetType": "host", "nodes":[ { "metadata":[ @@ -109,6 +87,7 @@ Response "value":66640704.099216014 }, ], + "hasSystemMetrics": true, "name":"host-0" } ] @@ -158,5 +137,5 @@ curl --location -u elastic:changeme 'http://0.0.0.0:5601/ftw/api/infra/host/coun Response ```json -{"type":"host","count":22} +{"assetType":"host","count":22} ``` \ No newline at end of file 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 c9d7d5676aab4..1b720eeb31869 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 @@ -7,16 +7,12 @@ import Boom from '@hapi/boom'; import { createRouteValidationFunction } from '@kbn/io-ts-utils'; - -import type { BoolQuery } from '@kbn/es-query'; import { - type GetInfraMetricsRequestBodyPayload, GetInfraMetricsRequestBodyPayloadRT, + GetInfraMetricsRequestParamsRT, GetInfraMetricsResponsePayloadRT, } from '../../../common/http_api/infra'; import { - type GetInfraAssetCountRequestBodyPayload, - type GetInfraAssetCountRequestParamsPayload, GetInfraAssetCountRequestBodyPayloadRT, GetInfraAssetCountResponsePayloadRT, GetInfraAssetCountRequestParamsPayloadRT, @@ -26,40 +22,42 @@ import { getInfraAlertsClient } from '../../lib/helpers/get_infra_alerts_client' import { getHosts } from './lib/host/get_hosts'; import { getHostsCount } from './lib/host/get_hosts_count'; import { getInfraMetricsClient } from '../../lib/helpers/get_infra_metrics_client'; +import { getApmDataAccessClient } from '../../lib/helpers/get_apm_data_access_client'; export const initInfraAssetRoutes = (libs: InfraBackendLibs) => { - const validateMetricsBody = createRouteValidationFunction(GetInfraMetricsRequestBodyPayloadRT); - const { framework } = libs; framework.registerRoute( { method: 'post', - path: '/api/metrics/infra', + path: '/api/metrics/infra/{assetType}', validate: { - body: validateMetricsBody, + body: createRouteValidationFunction(GetInfraMetricsRequestBodyPayloadRT), + params: createRouteValidationFunction(GetInfraMetricsRequestParamsRT), }, }, - async (requestContext, request, response) => { - const params: GetInfraMetricsRequestBodyPayload = request.body; + async (context, request, response) => { + const { from, to, metrics, limit, query } = request.body; try { - const infraMetricsClient = await getInfraMetricsClient({ - framework, - request, - metricsDataAccess: libs.metricsClient, - requestContext, - }); + const apmDataAccessClient = getApmDataAccessClient({ request, libs, context }); + const hasApmPrivileges = await apmDataAccessClient.hasPrivileges(); - const alertsClient = await getInfraAlertsClient({ - getStartServices: libs.getStartServices, - request, - }); + const [infraMetricsClient, alertsClient, apmDataAccessServices] = await Promise.all([ + getInfraMetricsClient({ request, libs, context }), + getInfraAlertsClient({ libs, request }), + hasApmPrivileges ? apmDataAccessClient.getServices() : undefined, + ]); const hosts = await getHosts({ - infraMetricsClient, + from, + to, + metrics, + limit, + query, alertsClient, - params, + infraMetricsClient, + apmDataAccessServices, }); return response.ok({ @@ -83,37 +81,33 @@ export const initInfraAssetRoutes = (libs: InfraBackendLibs) => { } ); - const validateCountBody = createRouteValidationFunction(GetInfraAssetCountRequestBodyPayloadRT); - const validateCountParams = createRouteValidationFunction( - GetInfraAssetCountRequestParamsPayloadRT - ); - framework.registerRoute( { method: 'post', path: '/api/infra/{assetType}/count', validate: { - body: validateCountBody, - params: validateCountParams, + body: createRouteValidationFunction(GetInfraAssetCountRequestBodyPayloadRT), + params: createRouteValidationFunction(GetInfraAssetCountRequestParamsPayloadRT), }, }, - async (requestContext, request, response) => { - const body: GetInfraAssetCountRequestBodyPayload = request.body; - const params: GetInfraAssetCountRequestParamsPayload = request.params; + async (context, request, response) => { + const { body, params } = request; const { assetType } = params; const { query, from, to } = body; try { - const infraMetricsClient = await getInfraMetricsClient({ - framework, - request, - metricsDataAccess: libs.metricsClient, - requestContext, - }); + const apmDataAccessClient = getApmDataAccessClient({ request, libs, context }); + const hasApmPrivileges = await apmDataAccessClient.hasPrivileges(); + + const [infraMetricsClient, apmDataAccessServices] = await Promise.all([ + getInfraMetricsClient({ request, libs, context }), + hasApmPrivileges ? apmDataAccessClient.getServices() : undefined, + ]); - const assetCount = await getHostsCount({ + const count = await getHostsCount({ infraMetricsClient, - query: (query?.bool as BoolQuery) ?? undefined, + apmDataAccessServices, + query, from, to, }); @@ -121,7 +115,7 @@ export const initInfraAssetRoutes = (libs: InfraBackendLibs) => { return response.ok({ body: GetInfraAssetCountResponsePayloadRT.encode({ assetType, - count: assetCount, + count, }), }); } catch (err) { diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/constants.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/constants.ts index d47b443fc5d14..d2873eccff62b 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/constants.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/constants.ts @@ -5,7 +5,6 @@ * 2.0. */ -export const BUCKET_KEY = 'host.name'; export const METADATA_AGGREGATION_NAME = 'metadata'; export const FILTER_AGGREGATION_SUB_AGG_NAME = 'result'; diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/helpers/query.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/helpers/query.ts index e93c90320babc..570c1499f3b74 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/helpers/query.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/helpers/query.ts @@ -5,42 +5,80 @@ * 2.0. */ -import { estypes } from '@elastic/elasticsearch'; import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; -import { termsQuery, rangeQuery } from '@kbn/observability-plugin/server'; +import { termQuery } from '@kbn/observability-plugin/server'; +import { ApmDocumentType, type TimeRangeMetadata } from '@kbn/apm-data-access-plugin/common'; +import { estypes } from '@elastic/elasticsearch'; +import type { ApmDataAccessServicesWrapper } from '../../../../lib/helpers/get_apm_data_access_client'; import { - GetInfraMetricsRequestBodyPayload, - InfraAssetMetricType, -} from '../../../../../common/http_api/infra'; -import { BUCKET_KEY } from '../constants'; + EVENT_MODULE, + METRICSET_MODULE, + SYSTEM_INTEGRATION, +} from '../../../../../common/constants'; +import type { InfraAssetMetricType } from '../../../../../common/http_api/infra'; + +export const getFilterByIntegration = (integration: typeof SYSTEM_INTEGRATION) => { + return { + bool: { + should: [ + ...termQuery(EVENT_MODULE, integration), + ...termQuery(METRICSET_MODULE, integration), + ], + minimum_should_match: 1, + }, + }; +}; -export const createFilters = ({ - params, - extraFilter, - hostNamesShortList = [], +const getApmDocumentsFilter = async ({ + apmDataAccessServices, + apmDocumentSources, + start, + end, }: { - params: GetInfraMetricsRequestBodyPayload; - hostNamesShortList?: string[]; - extraFilter?: estypes.QueryDslQueryContainer; + apmDataAccessServices: ApmDataAccessServicesWrapper; + apmDocumentSources: TimeRangeMetadata['sources']; + start: number; + end: number; }) => { - const extrafilterClause = extraFilter?.bool?.filter; + const { preferredSource, documentTypeConfig } = apmDataAccessServices.getDocumentTypeConfig({ + start, + end, + documentTypes: [ApmDocumentType.TransactionMetric], + documentSources: apmDocumentSources, + }); - const extraFilterList = !!extrafilterClause - ? Array.isArray(extrafilterClause) - ? extrafilterClause - : [extrafilterClause] - : []; + return 'getQuery' in documentTypeConfig + ? documentTypeConfig.getQuery(preferredSource.source.rollupInterval) + : undefined; +}; - return [ - ...extraFilterList, - ...termsQuery(BUCKET_KEY, ...hostNamesShortList), - ...rangeQuery(new Date(params.range.from).getTime(), new Date(params.range.to).getTime()), - { - exists: { - field: BUCKET_KEY, - }, - }, - ]; +export const getDocumentsFilter = async ({ + apmDataAccessServices, + apmDocumentSources, + from, + to, +}: { + apmDataAccessServices?: ApmDataAccessServicesWrapper; + apmDocumentSources?: TimeRangeMetadata['sources']; + from: number; + to: number; +}) => { + const filters: estypes.QueryDslQueryContainer[] = [getFilterByIntegration('system')]; + const apmDocumentsFilter = + apmDataAccessServices && apmDocumentSources + ? await getApmDocumentsFilter({ + apmDataAccessServices, + apmDocumentSources, + start: from, + end: to, + }) + : undefined; + + if (apmDocumentsFilter) { + filters.push(apmDocumentsFilter); + } + + return filters; }; export const getInventoryModelAggregations = ( diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_all_hosts.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_all_hosts.ts index 76d3bfe6c26f9..abeb51140d189 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_all_hosts.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_all_hosts.ts @@ -5,58 +5,48 @@ * 2.0. */ -import type { - GetInfraMetricsRequestBodyPayload, - InfraAssetMetadataType, -} from '../../../../../common/http_api/infra'; -import { BUCKET_KEY, MAX_SIZE, METADATA_AGGREGATION_NAME } from '../constants'; -import type { GetHostsArgs } from '../types'; -import { createFilters, getInventoryModelAggregations } from '../helpers/query'; +import { rangeQuery, termsQuery } from '@kbn/observability-plugin/server'; +import type { TimeRangeMetadata } from '@kbn/apm-data-access-plugin/common'; +import { HOST_NAME_FIELD } from '../../../../../common/constants'; +import type { InfraAssetMetadataType } from '../../../../../common/http_api'; +import { METADATA_AGGREGATION_NAME } from '../constants'; +import type { GetHostParameters } from '../types'; +import { + getFilterByIntegration, + getInventoryModelAggregations, + getDocumentsFilter, +} from '../helpers/query'; import { BasicMetricValueRT } from '../../../../lib/metrics/types'; -export const getAllHosts = async ( - { infraMetricsClient, params }: GetHostsArgs, - hostNamesShortList: string[] = [] -) => { - const query = createQuery(params, hostNamesShortList); - const response = await infraMetricsClient.search(query); - - const result = (response.aggregations?.nodes.buckets ?? []) - .sort((a, b) => { - const aValue = getMetricValue(a?.cpuV2) ?? 0; - const bValue = getMetricValue(b?.cpuV2) ?? 0; - return bValue - aValue; - }) - .map((bucket) => { - const metadata = (bucket?.metadata.top ?? []) - .flatMap((top) => Object.entries(top.metrics)) - .map(([key, value]) => ({ - name: key as InfraAssetMetadataType, - value: typeof value === 'string' && value.trim().length === 0 ? null : value, - })); - - const metrics = params.metrics.map((metric) => ({ - name: metric.type, - value: metric.type in bucket ? getMetricValue(bucket[metric.type]) ?? 0 : null, - })); - - return { - name: bucket?.key as string, - metadata, - metrics, - }; - }); - - return result; -}; - -const createQuery = (params: GetInfraMetricsRequestBodyPayload, hostNamesShortList: string[]) => { +export const getAllHosts = async ({ + infraMetricsClient, + apmDocumentSources, + from, + to, + limit, + metrics, + hostNames, + apmDataAccessServices, +}: Pick< + GetHostParameters, + 'infraMetricsClient' | 'apmDataAccessServices' | 'from' | 'to' | 'limit' | 'metrics' +> & { + hostNames: string[]; + apmDocumentSources?: TimeRangeMetadata['sources']; +}) => { const metricAggregations = getInventoryModelAggregations( - params.type, - params.metrics.map((p) => p.type) + 'host', + metrics.map((metric) => metric) ); - return { + const documentsFilter = await getDocumentsFilter({ + apmDataAccessServices, + apmDocumentSources, + from, + to, + }); + + const response = await infraMetricsClient.search({ allow_no_indices: true, ignore_unavailable: true, body: { @@ -64,19 +54,32 @@ const createQuery = (params: GetInfraMetricsRequestBodyPayload, hostNamesShortLi track_total_hits: false, query: { bool: { - filter: createFilters({ - params, - hostNamesShortList, - }), + filter: [...termsQuery(HOST_NAME_FIELD, ...hostNames), ...rangeQuery(from, to)], + should: [...documentsFilter], }, }, aggs: { - nodes: { + // find hosts with metrics that are monitored by the system integration. + monitoredHosts: { + filter: getFilterByIntegration('system'), + aggs: { + names: { + terms: { + field: HOST_NAME_FIELD, + size: limit, + order: { + _key: 'asc', + }, + }, + }, + }, + }, + allHostMetrics: { terms: { - field: BUCKET_KEY, - size: params.limit ?? MAX_SIZE, + field: HOST_NAME_FIELD, + size: limit, order: { - _key: 'asc' as const, + _key: 'asc', }, }, aggs: { @@ -96,7 +99,7 @@ const createQuery = (params: GetInfraMetricsRequestBodyPayload, hostNamesShortLi ], size: 1, sort: { - '@timestamp': 'desc' as const, + '@timestamp': 'desc', }, }, }, @@ -104,7 +107,47 @@ const createQuery = (params: GetInfraMetricsRequestBodyPayload, hostNamesShortLi }, }, }, - }; + }); + + const systemIntegrationHosts = new Set( + response.aggregations?.monitoredHosts.names.buckets.map((p) => p.key) ?? [] + ); + + const result = (response.aggregations?.allHostMetrics.buckets ?? []) + .sort((a, b) => { + const hasASystemMetrics = systemIntegrationHosts.has(a?.key as string); + const hasBSystemMetrics = systemIntegrationHosts.has(b?.key as string); + + if (hasASystemMetrics !== hasBSystemMetrics) { + return hasASystemMetrics ? -1 : 1; + } + + const aValue = getMetricValue(a?.cpuV2) ?? 0; + const bValue = getMetricValue(b?.cpuV2) ?? 0; + + return bValue - aValue; + }) + .map((bucket) => { + const hostName = bucket.key as string; + const metadata = (bucket?.metadata.top ?? []) + .flatMap((top) => Object.entries(top.metrics)) + .map(([key, value]) => ({ + name: key as InfraAssetMetadataType, + value: typeof value === 'string' && value.trim().length === 0 ? null : value, + })); + + return { + name: hostName, + metadata, + metrics: metrics.map((metric) => ({ + name: metric, + value: getMetricValue(bucket[metric]) || null, + })), + hasSystemMetrics: systemIntegrationHosts.has(hostName), + }; + }); + + return result; }; const getMetricValue = (valueObject: unknown): number | null => { diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_apm_hosts.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_apm_hosts.ts new file mode 100644 index 0000000000000..bb571e6393398 --- /dev/null +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_apm_hosts.ts @@ -0,0 +1,31 @@ +/* + * 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 { estypes } from '@elastic/elasticsearch'; +import type { TimeRangeMetadata } from '@kbn/apm-data-access-plugin/common'; +import { GetHostParameters } from '../types'; + +export const getApmHostNames = async ({ + apmDataAccessServices, + apmDocumentSources, + from: start, + to: end, + query, + limit, +}: Required> & { + query?: estypes.QueryDslQueryContainer; + limit?: number; + apmDocumentSources: TimeRangeMetadata['sources']; +}) => { + return apmDataAccessServices.getHostNames({ + documentSources: apmDocumentSources, + query, + start, + end, + size: limit, + }); +}; diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_filtered_hosts.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_filtered_hosts.ts index ed55b5c6d47a0..c943206853821 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_filtered_hosts.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_filtered_hosts.ts @@ -5,31 +5,37 @@ * 2.0. */ -import { GetHostsArgs } from '../types'; -import { BUCKET_KEY, MAX_SIZE } from '../constants'; -import { assertQueryStructure } from '../utils'; -import { createFilters } from '../helpers/query'; +import { rangeQuery } from '@kbn/observability-plugin/server'; +import { estypes } from '@elastic/elasticsearch'; +import { castArray } from 'lodash'; +import { HOST_NAME_FIELD } from '../../../../../common/constants'; +import { GetHostParameters } from '../types'; +import { getFilterByIntegration } from '../helpers/query'; -export const getFilteredHosts = async ({ infraMetricsClient, params }: GetHostsArgs) => { - assertQueryStructure(params.query); - - return infraMetricsClient.search({ +export const getFilteredHostNames = async ({ + infraMetricsClient, + from, + to, + limit, + query, +}: Pick & { + query?: estypes.QueryDslQueryContainer; +}) => { + const response = await infraMetricsClient.search({ allow_no_indices: true, - ignore_unavailable: true, body: { size: 0, track_total_hits: false, query: { bool: { - ...params.query.bool, - filter: createFilters({ params, extraFilter: params.query }), + filter: [...castArray(query), ...rangeQuery(from, to), getFilterByIntegration('system')], }, }, aggs: { - nodes: { + uniqueHostNames: { terms: { - size: params.limit ?? MAX_SIZE, - field: BUCKET_KEY, + field: HOST_NAME_FIELD, + size: limit, order: { _key: 'asc', }, @@ -38,4 +44,33 @@ export const getFilteredHosts = async ({ infraMetricsClient, params }: GetHostsA }, }, }); + + const { uniqueHostNames } = response.aggregations ?? {}; + return uniqueHostNames?.buckets?.map((p) => p.key as string) ?? []; +}; + +export const getHasDataFromSystemIntegration = async ({ + infraMetricsClient, + from, + to, + query, +}: Pick & { + query?: estypes.QueryDslQueryContainer; +}) => { + const hitCount = await infraMetricsClient.search({ + allow_no_indices: true, + ignore_unavailable: true, + body: { + size: 0, + terminate_after: 1, + track_total_hits: true, + query: { + bool: { + filter: [...castArray(query), ...rangeQuery(from, to), getFilterByIntegration('system')], + }, + }, + }, + }); + + return hitCount.hits.total.value > 0; }; diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts.ts index 5b988fca8b4c5..bb5bd51cfe1f9 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts.ts @@ -5,37 +5,63 @@ * 2.0. */ +import type { TimeRangeMetadata } from '@kbn/apm-data-access-plugin/common'; import type { GetInfraMetricsResponsePayload } from '../../../../../common/http_api/infra'; -import { getFilteredHosts } from './get_filtered_hosts'; -import { hasFilters } from '../utils'; -import type { GetHostsArgs } from '../types'; +import { getFilteredHostNames, getHasDataFromSystemIntegration } from './get_filtered_hosts'; +import type { GetHostParameters } from '../types'; import { getAllHosts } from './get_all_hosts'; import { getHostsAlertsCount } from './get_hosts_alerts_count'; +import { assertQueryStructure } from '../utils'; +import { getApmHostNames } from './get_apm_hosts'; -export const getHosts = async (args: GetHostsArgs): Promise => { - const runFilterQuery = hasFilters(args.params.query); - // filter first to prevent filter clauses from impacting the metrics aggregations. - const hostNamesShortList = runFilterQuery ? await getFilteredHostNames(args) : []; - if (runFilterQuery && hostNamesShortList.length === 0) { +export const getHosts = async ({ + metrics, + from, + to, + limit, + query, + alertsClient, + apmDataAccessServices, + infraMetricsClient, +}: GetHostParameters): Promise => { + const apmDocumentSources = await apmDataAccessServices?.getDocumentSources({ + start: from, + end: to, + }); + + const hostNames = await getHostNames({ + infraMetricsClient, + apmDataAccessServices, + apmDocumentSources, + from, + to, + limit, + query, + }); + + if (hostNames.length === 0) { return { - type: 'host', + assetType: 'host', nodes: [], }; } - const { - range: { from, to }, - limit, - } = args.params; - - const [hostMetrics, alertsCountResponse] = await Promise.all([ - getAllHosts(args, hostNamesShortList), + const [hostMetricsResponse, alertsCountResponse] = await Promise.all([ + getAllHosts({ + infraMetricsClient, + apmDocumentSources, + from, + to, + limit, + metrics, + hostNames, + }), getHostsAlertsCount({ - alertsClient: args.alertsClient, - hostNamesShortList, + alertsClient, + hostNames, from, to, - maxNumHosts: limit, + limit, }), ]); @@ -44,20 +70,64 @@ export const getHosts = async (args: GetHostsArgs): Promise); - const hosts = hostMetrics.map(({ name, metrics, metadata }) => { - const { alertsCount } = alertsByHostName[name] ?? {}; - return { name, metrics, metadata, alertsCount }; + const hosts = hostMetricsResponse.map((host) => { + const { alertsCount } = alertsByHostName[host.name] ?? {}; + return { + ...host, + alertsCount, + }; }); return { - type: args.params.type, + assetType: 'host', nodes: hosts, }; }; -const getFilteredHostNames = async (args: GetHostsArgs) => { - const filteredHosts = await getFilteredHosts(args); +const getHostNames = async ({ + infraMetricsClient, + apmDataAccessServices, + apmDocumentSources, + from, + to, + limit, + query, +}: Pick< + GetHostParameters, + 'apmDataAccessServices' | 'infraMetricsClient' | 'from' | 'to' | 'limit' | 'query' +> & { + apmDocumentSources?: TimeRangeMetadata['sources']; +}) => { + assertQueryStructure(query); + + const hasSystemIntegrationData = await getHasDataFromSystemIntegration({ + infraMetricsClient, + from, + to, + query, + }); + + const [monitoredHosts, apmHosts] = await Promise.all([ + hasSystemIntegrationData + ? getFilteredHostNames({ + infraMetricsClient, + query, + from, + to, + limit, + }) + : undefined, + apmDataAccessServices && apmDocumentSources + ? getApmHostNames({ + apmDataAccessServices, + apmDocumentSources, + query, + from, + to, + limit, + }) + : undefined, + ]); - const { nodes } = filteredHosts.aggregations ?? {}; - return nodes?.buckets.map((p) => p.key as string) ?? []; + return [...new Set([...(monitoredHosts ?? []), ...(apmHosts ?? [])])]; }; diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts index 5a32423d62ee1..7da36dffda715 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_alerts_count.ts @@ -5,31 +5,24 @@ * 2.0. */ -import { kqlQuery, termQuery, termsQuery } from '@kbn/observability-plugin/server'; +import { termQuery, termsQuery } from '@kbn/observability-plugin/server'; import { ALERT_RULE_PRODUCER, ALERT_STATUS, ALERT_STATUS_ACTIVE, ALERT_UUID, } from '@kbn/rule-data-utils'; -import { INFRA_ALERT_FEATURE_ID } from '../../../../../common/constants'; -import { BUCKET_KEY, MAX_SIZE } from '../constants'; -import { InfraAlertsClient } from '../../../../lib/helpers/get_infra_alerts_client'; +import { HOST_NAME_FIELD, INFRA_ALERT_FEATURE_ID } from '../../../../../common/constants'; +import { GetHostParameters } from '../types'; export async function getHostsAlertsCount({ alertsClient, - hostNamesShortList, - kuery, + hostNames, from, to, - maxNumHosts = MAX_SIZE, -}: { - alertsClient: InfraAlertsClient; - hostNamesShortList: string[]; - kuery?: string; - from: string; - to: string; - maxNumHosts?: number; + limit, +}: Pick & { + hostNames: string[]; }) { const rangeQuery = [ { @@ -37,7 +30,6 @@ export async function getHostsAlertsCount({ 'kibana.alert.time_range': { gte: from, lte: to, - format: 'strict_date_optional_time', }, }, }, @@ -50,17 +42,16 @@ export async function getHostsAlertsCount({ filter: [ ...termQuery(ALERT_RULE_PRODUCER, INFRA_ALERT_FEATURE_ID), ...termQuery(ALERT_STATUS, ALERT_STATUS_ACTIVE), - ...termsQuery(BUCKET_KEY, ...hostNamesShortList), + ...termsQuery(HOST_NAME_FIELD, ...hostNames), ...rangeQuery, - ...kqlQuery(kuery), ], }, }, aggs: { hosts: { terms: { - field: BUCKET_KEY, - size: maxNumHosts, + field: HOST_NAME_FIELD, + size: limit, order: { _key: 'asc', }, diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_count.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_count.ts index 18bb645bff44d..154fd8796520d 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_count.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/host/get_hosts_count.ts @@ -5,65 +5,52 @@ * 2.0. */ -import { rangeQuery, termQuery } from '@kbn/observability-plugin/server'; -import { BoolQuery } from '@kbn/es-query'; +import { rangeQuery } from '@kbn/observability-plugin/server'; +import type { ApmDataAccessServicesWrapper } from '../../../../lib/helpers/get_apm_data_access_client'; +import { GetInfraAssetCountRequestBodyPayload } from '../../../../../common/http_api'; import { InfraMetricsClient } from '../../../../lib/helpers/get_infra_metrics_client'; -import { - HOST_NAME_FIELD, - EVENT_MODULE, - METRICSET_MODULE, - SYSTEM_INTEGRATION, -} from '../../../../../common/constants'; +import { HOST_NAME_FIELD } from '../../../../../common/constants'; +import { assertQueryStructure } from '../utils'; +import { getDocumentsFilter } from '../helpers/query'; export async function getHostsCount({ infraMetricsClient, + apmDataAccessServices, query, from, to, -}: { +}: GetInfraAssetCountRequestBodyPayload & { infraMetricsClient: InfraMetricsClient; - query?: BoolQuery; - from: string; - to: string; + apmDataAccessServices?: ApmDataAccessServicesWrapper; }) { - const queryFilter = query?.filter ?? []; - const queryBool = query ?? {}; + assertQueryStructure(query); - const params = { + const documentsFilter = await getDocumentsFilter({ + apmDataAccessServices, + from, + to, + }); + + const response = await infraMetricsClient.search({ allow_no_indices: true, - ignore_unavailable: true, body: { size: 0, track_total_hits: false, query: { bool: { - ...queryBool, - filter: [ - ...queryFilter, - ...rangeQuery(new Date(from).getTime(), new Date(to).getTime()), - { - bool: { - should: [ - ...termQuery(EVENT_MODULE, SYSTEM_INTEGRATION), - ...termQuery(METRICSET_MODULE, SYSTEM_INTEGRATION), - ], - minimum_should_match: 1, - }, - }, - ], + filter: [query, ...rangeQuery(from, to)], + should: [...documentsFilter], }, }, aggs: { - count: { + totalCount: { cardinality: { field: HOST_NAME_FIELD, }, }, }, }, - }; - - const result = await infraMetricsClient.search(params); + }); - return result.aggregations?.count.value ?? 0; + return response.aggregations?.totalCount.value ?? 0; } diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/types.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/types.ts index c4d0b6dd32996..87679f24271d6 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/types.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/types.ts @@ -5,12 +5,13 @@ * 2.0. */ +import { ApmDataAccessServicesWrapper } from '../../../lib/helpers/get_apm_data_access_client'; import { GetInfraMetricsRequestBodyPayload } from '../../../../common/http_api/infra'; import { InfraAlertsClient } from '../../../lib/helpers/get_infra_alerts_client'; import { InfraMetricsClient } from '../../../lib/helpers/get_infra_metrics_client'; -export interface GetHostsArgs { +export interface GetHostParameters extends GetInfraMetricsRequestBodyPayload { infraMetricsClient: InfraMetricsClient; alertsClient: InfraAlertsClient; - params: GetInfraMetricsRequestBodyPayload; + apmDataAccessServices?: ApmDataAccessServicesWrapper; } diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/utils.test.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/utils.test.ts index 504585db478cd..590e84a7f4279 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/utils.test.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/utils.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { assertQueryStructure, hasFilters } from './utils'; +import { assertQueryStructure } from './utils'; const query = { bool: { must_not: [], filter: [], should: [], must: [] } }; @@ -36,26 +36,4 @@ describe('utils', () => { expect(() => assertQueryStructure(anyObject)).toThrow(); }); }); - describe('hasFilters', () => { - test('should return true if there is any filter', () => { - const result = hasFilters({ - ...query, - bool: { - filter: [ - { - term: { - 'host.name': 'host', - }, - }, - ], - }, - }); - expect(result).toEqual(true); - }); - - test('should return false when there is not filter', () => { - const result = hasFilters(query); - expect(result).toEqual(false); - }); - }); }); diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/utils.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/utils.ts index 7ea5a3d0b4fee..96938f9fc4e47 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/utils.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/lib/utils.ts @@ -8,9 +8,6 @@ import { estypes } from '@elastic/elasticsearch'; import Boom from '@hapi/boom'; -type FilterClauses = keyof estypes.QueryDslBoolQuery; -const validClauses: FilterClauses[] = ['must', 'filter', 'must_not', 'should']; - interface BoolQuery { bool: estypes.QueryDslBoolQuery; } @@ -27,23 +24,8 @@ const isValidFilter = (query: any): query is BoolQuery => { .every((clause) => Array.isArray(clause) || clause === undefined); }; -export const assertQueryStructure: (query: any) => asserts query is BoolQuery = (query) => { - if (!isValidFilter(query)) { +export const assertQueryStructure: (query?: any) => asserts query is BoolQuery = (query) => { + if (!!query && !isValidFilter(query)) { throw Boom.badRequest('Invalid query'); } }; - -export const hasFilters = (query?: any) => { - if (!query) { - return false; - } - - assertQueryStructure(query); - - // ignores minimum_should_match - return Object.entries(query.bool) - .filter(([key, _]) => validClauses.includes(key as FilterClauses)) - .some(([_, filter]) => { - return Array.isArray(filter) ? filter.length > 0 : !!filter; - }); -}; 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 3540dac3d311c..20dcbc1b7e20b 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 @@ -206,7 +206,7 @@ export const initMetricsSourceConfigurationRoutes = (libs: InfraBackendLibs) => query: createRouteValidationFunction(getHasDataQueryParamsRT), }, }, - async (requestContext, request, response) => { + async (context, request, response) => { try { const modules = castArray(request.query.modules); @@ -217,10 +217,9 @@ export const initMetricsSourceConfigurationRoutes = (libs: InfraBackendLibs) => } const infraMetricsClient = await getInfraMetricsClient({ - framework, request, - metricsDataAccess: libs.metricsClient, - requestContext, + libs, + context, }); const results = await infraMetricsClient.search({ diff --git a/x-pack/plugins/observability_solution/infra/server/routes/services/index.ts b/x-pack/plugins/observability_solution/infra/server/routes/services/index.ts index 4d8d3c1ad9473..e962a11f9a396 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/services/index.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/services/index.ts @@ -39,7 +39,7 @@ export const initServicesRoute = (libs: InfraBackendLibs) => { const client = createSearchClient(requestContext, framework, request); const soClient = savedObjects.getScopedClient(request); - const apmIndices = await libs.getApmIndices(soClient); + const apmIndices = await libs.apmDataAccess.getApmIndices(soClient); const services = await getServices(client, apmIndices, { from, to, diff --git a/x-pack/plugins/observability_solution/infra/server/types.ts b/x-pack/plugins/observability_solution/infra/server/types.ts index 6b270f8dd1998..ed48814a0cb30 100644 --- a/x-pack/plugins/observability_solution/infra/server/types.ts +++ b/x-pack/plugins/observability_solution/infra/server/types.ts @@ -44,6 +44,7 @@ export interface InfraRequestHandlerContext { spaceId: string; savedObjectsClient: SavedObjectsClientContract; uiSettingsClient: IUiSettingsClient; + getMetricsIndices: () => Promise; } /** diff --git a/x-pack/plugins/observability_solution/infra/tsconfig.json b/x-pack/plugins/observability_solution/infra/tsconfig.json index e0e6750550fbb..45a03b23b4b9b 100644 --- a/x-pack/plugins/observability_solution/infra/tsconfig.json +++ b/x-pack/plugins/observability_solution/infra/tsconfig.json @@ -90,7 +90,6 @@ "@kbn/core-saved-objects-api-server", "@kbn/securitysolution-io-ts-utils", "@kbn/serverless", - "@kbn/core-lifecycle-server", "@kbn/elastic-agent-utils", "@kbn/dashboard-plugin", "@kbn/shared-svg", diff --git a/x-pack/plugins/observability_solution/investigate/common/types.ts b/x-pack/plugins/observability_solution/investigate/common/types.ts index e8a3f08cfdc2c..8fdd1968f2125 100644 --- a/x-pack/plugins/observability_solution/investigate/common/types.ts +++ b/x-pack/plugins/observability_solution/investigate/common/types.ts @@ -35,7 +35,7 @@ export interface Investigation { export interface InvestigationNote { id: string; createdAt: number; - createdBy: AuthenticatedUser; + createdBy: string; content: string; } diff --git a/x-pack/plugins/observability_solution/investigate/public/hooks/use_investigate_widget.tsx b/x-pack/plugins/observability_solution/investigate/public/hooks/use_investigate_widget.tsx index a29614f74782b..984058a1829c0 100644 --- a/x-pack/plugins/observability_solution/investigate/public/hooks/use_investigate_widget.tsx +++ b/x-pack/plugins/observability_solution/investigate/public/hooks/use_investigate_widget.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { useContext, createContext } from 'react'; +import { createContext } from 'react'; import type { InvestigateWidgetCreate } from '../../common'; export interface UseInvestigateWidgetApi< @@ -17,9 +17,3 @@ export interface UseInvestigateWidgetApi< const InvestigateWidgetApiContext = createContext(undefined); export const InvestigateWidgetApiContextProvider = InvestigateWidgetApiContext.Provider; - -export function useInvestigateWidget(): UseInvestigateWidgetApi | undefined { - const context = useContext(InvestigateWidgetApiContext); - - return context; -} diff --git a/x-pack/plugins/observability_solution/investigate/public/hooks/use_investigation/investigation_store.ts b/x-pack/plugins/observability_solution/investigate/public/hooks/use_investigation/investigation_store.ts index 0b47427e16802..4c9b7ea71cffa 100644 --- a/x-pack/plugins/observability_solution/investigate/public/hooks/use_investigation/investigation_store.ts +++ b/x-pack/plugins/observability_solution/investigate/public/hooks/use_investigation/investigation_store.ts @@ -159,7 +159,7 @@ export function createInvestigationStore({ notes: prevInvestigation.notes.concat({ id: v4(), createdAt: Date.now(), - createdBy: user, + createdBy: user.username, content: note, }), }; diff --git a/x-pack/plugins/observability_solution/investigate/public/plugin.tsx b/x-pack/plugins/observability_solution/investigate/public/plugin.tsx index 6ac60dbb20751..b54454f63b455 100644 --- a/x-pack/plugins/observability_solution/investigate/public/plugin.tsx +++ b/x-pack/plugins/observability_solution/investigate/public/plugin.tsx @@ -4,10 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { CoreSetup, CoreStart, PluginInitializerContext, Plugin } from '@kbn/core/public'; +import type { CoreSetup, CoreStart, Plugin, PluginInitializerContext } from '@kbn/core/public'; import type { Logger } from '@kbn/logging'; import { useMemo } from 'react'; -import { useInvestigateWidget } from './hooks/use_investigate_widget'; import { createUseInvestigation } from './hooks/use_investigation'; import type { ConfigSchema, @@ -73,7 +72,6 @@ export class InvestigatePlugin to, }); }, - useInvestigateWidget, }; } } diff --git a/x-pack/plugins/observability_solution/investigate/public/types.ts b/x-pack/plugins/observability_solution/investigate/public/types.ts index 8951781be99f2..50da793c5b544 100644 --- a/x-pack/plugins/observability_solution/investigate/public/types.ts +++ b/x-pack/plugins/observability_solution/investigate/public/types.ts @@ -6,13 +6,12 @@ */ /* eslint-disable @typescript-eslint/no-empty-interface*/ -import type { FromSchema } from 'json-schema-to-ts'; -import type { CompatibleJSONSchema } from '@kbn/observability-ai-assistant-plugin/public'; import type { AuthenticatedUser } from '@kbn/core/public'; +import type { CompatibleJSONSchema } from '@kbn/observability-ai-assistant-plugin/public'; +import type { FromSchema } from 'json-schema-to-ts'; import type { InvestigateWidget } from '../common'; import type { GlobalWidgetParameters, InvestigateWidgetCreate } from '../common/types'; import type { UseInvestigationApi } from './hooks/use_investigation'; -import type { UseInvestigateWidgetApi } from './hooks/use_investigate_widget'; export enum ChromeOption { disabled = 'disabled', @@ -84,5 +83,4 @@ export interface InvestigatePublicStart { from: string; to: string; }) => UseInvestigationApi; - useInvestigateWidget: () => UseInvestigateWidgetApi | undefined; } diff --git a/x-pack/plugins/observability_solution/investigate/tsconfig.json b/x-pack/plugins/observability_solution/investigate/tsconfig.json index fbbd221edb33d..c0ba6efeb978a 100644 --- a/x-pack/plugins/observability_solution/investigate/tsconfig.json +++ b/x-pack/plugins/observability_solution/investigate/tsconfig.json @@ -9,8 +9,7 @@ "public/**/*", "typings/**/*", "public/**/*.json", - "server/**/*" - ], + "server/**/*", ], "kbn_references": [ "@kbn/core", "@kbn/logging", diff --git a/x-pack/plugins/observability_solution/investigate_app/public/application.tsx b/x-pack/plugins/observability_solution/investigate_app/public/application.tsx index c277f7f081368..062d3be1f444e 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/application.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/application.tsx @@ -7,14 +7,14 @@ import type { CoreStart, CoreTheme } from '@kbn/core/public'; import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app'; -import { RouteRenderer, RouterProvider } from '@kbn/typed-react-router-config'; +import { Route, Router, Routes } from '@kbn/shared-ux-router'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import type { History } from 'history'; import React, { useMemo } from 'react'; import type { Observable } from 'rxjs'; import { InvestigateAppContextProvider } from './components/investigate_app_context_provider'; import { InvestigateAppKibanaContext } from './hooks/use_kibana'; -import { investigateRouter } from './routes/config'; +import { getRoutes } from './routes/config'; import { InvestigateAppServices } from './services/types'; import type { InvestigateAppStartDependencies } from './types'; @@ -46,6 +46,21 @@ function Application({ [coreStart, pluginsStart, services] ); + const App = () => { + const routes = getRoutes(); + return ( + + {Object.keys(routes).map((path) => { + const { handler, exact } = routes[path]; + const Wrapper = () => { + return handler(); + }; + return ; + })} + + ); + }; + const queryClient = new QueryClient(); return ( @@ -53,11 +68,11 @@ function Application({ - + - + - + diff --git a/x-pack/plugins/observability_solution/investigate_app/public/hooks/query_key_factory.ts b/x-pack/plugins/observability_solution/investigate_app/public/hooks/query_key_factory.ts index a5ff06fa24a26..5ce96f5a2061c 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/hooks/query_key_factory.ts +++ b/x-pack/plugins/observability_solution/investigate_app/public/hooks/query_key_factory.ts @@ -9,6 +9,7 @@ export const investigationKeys = { all: ['investigation'] as const, list: (params: { page: number; perPage: number }) => [...investigationKeys.all, 'list', params] as const, + fetch: (params: { id: string }) => [...investigationKeys.all, 'fetch', params] as const, }; export type InvestigationKeys = typeof investigationKeys; diff --git a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_abort_signal.ts b/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_abort_signal.ts deleted file mode 100644 index cf8f4ce787042..0000000000000 --- a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_abort_signal.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. - */ - -import { useEffect, useRef } from 'react'; - -export function useAbortSignal() { - const controllerRef = useRef(new AbortController()); - - useEffect(() => { - const controller = controllerRef.current; - return () => { - controller.abort(); - }; - }, []); - - return controllerRef.current.signal; -} diff --git a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_add_investigation_note.ts b/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_add_investigation_note.ts new file mode 100644 index 0000000000000..95a470099a9d3 --- /dev/null +++ b/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_add_investigation_note.ts @@ -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 { IHttpFetchError, ResponseErrorBody } from '@kbn/core/public'; +import { useMutation } from '@tanstack/react-query'; +import { + CreateInvestigationNoteInput, + CreateInvestigationNoteResponse, +} from '@kbn/investigation-shared'; +import { useKibana } from './use_kibana'; + +type ServerError = IHttpFetchError; + +export function useAddInvestigationNote() { + const { + core: { + http, + notifications: { toasts }, + }, + } = useKibana(); + + return useMutation< + CreateInvestigationNoteResponse, + ServerError, + { investigationId: string; note: CreateInvestigationNoteInput }, + { investigationId: string } + >( + ['addInvestigationNote'], + ({ investigationId, note }) => { + const body = JSON.stringify(note); + return http.post( + `/api/observability/investigations/${investigationId}/notes`, + { body, version: '2023-10-31' } + ); + }, + { + onSuccess: (response, {}) => { + // TODO: clear investigationNotes key from queryClient, and push new note to the internal store. + // console.log(response); + toasts.addSuccess('Note saved'); + }, + onError: (error, {}, context) => { + // console.log(error); + }, + } + ); +} diff --git a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_fetch_investigation.ts b/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_fetch_investigation.ts new file mode 100644 index 0000000000000..39f026a47af6f --- /dev/null +++ b/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_fetch_investigation.ts @@ -0,0 +1,58 @@ +/* + * 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 { GetInvestigationResponse } from '@kbn/investigation-shared'; +import { useQuery } from '@tanstack/react-query'; +import { investigationKeys } from './query_key_factory'; +import { useKibana } from './use_kibana'; + +export interface Params { + id: string; +} + +export interface UseFetchInvestigationResponse { + isInitialLoading: boolean; + isLoading: boolean; + isRefetching: boolean; + isSuccess: boolean; + isError: boolean; + data: GetInvestigationResponse | undefined; +} + +export function useFetchInvestigation({ id }: Params): UseFetchInvestigationResponse { + const { + core: { + http, + notifications: { toasts }, + }, + } = useKibana(); + + const { isInitialLoading, isLoading, isError, isSuccess, isRefetching, data } = useQuery({ + queryKey: investigationKeys.fetch({ id }), + queryFn: async ({ signal }) => { + return await http.get(`/api/observability/investigations/${id}`, { + version: '2023-10-31', + signal, + }); + }, + refetchOnWindowFocus: false, + onError: (error: Error) => { + toasts.addError(error, { + title: 'Something went wrong while fetching Investigations', + }); + }, + }); + + return { + data, + isInitialLoading, + isLoading, + isRefetching, + isSuccess, + isError, + }; +} diff --git a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_fetch_investigation_list.ts b/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_fetch_investigation_list.ts index a3ca59519211a..db9c4264bdf3e 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_fetch_investigation_list.ts +++ b/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_fetch_investigation_list.ts @@ -6,7 +6,7 @@ */ import { useQuery } from '@tanstack/react-query'; -import { FindInvestigationsResponse } from '../../common/schema/find'; +import { FindInvestigationsResponse } from '@kbn/investigation-shared'; import { investigationKeys } from './query_key_factory'; import { useKibana } from './use_kibana'; diff --git a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_get_alert_details.tsx b/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_get_alert_details.tsx new file mode 100644 index 0000000000000..0c0cda89d3eb8 --- /dev/null +++ b/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_get_alert_details.tsx @@ -0,0 +1,60 @@ +/* + * 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 { BASE_RAC_ALERTS_API_PATH, EcsFieldsResponse } from '@kbn/rule-registry-plugin/common'; +import { useKibana } from './use_kibana'; + +export interface AlertParams { + id?: string; +} + +export interface UseFetchAlertResponse { + isInitialLoading: boolean; + isLoading: boolean; + isRefetching: boolean; + isSuccess: boolean; + isError: boolean; + data: EcsFieldsResponse | undefined | null; +} + +export function useFetchAlert({ id }: AlertParams): UseFetchAlertResponse { + const { + core: { + http, + notifications: { toasts }, + }, + } = useKibana(); + + const { isInitialLoading, isLoading, isError, isSuccess, isRefetching, data } = useQuery({ + queryKey: ['fetchAlert', id], + queryFn: async ({ signal }) => { + return await http.get(BASE_RAC_ALERTS_API_PATH, { + query: { + id, + }, + signal, + }); + }, + refetchOnWindowFocus: false, + onError: (error: Error) => { + toasts.addError(error, { + title: 'Something went wrong while fetching alert', + }); + }, + enabled: Boolean(id), + }); + + return { + data, + isInitialLoading, + isLoading, + isRefetching, + isSuccess, + isError, + }; +} diff --git a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_get_investigation_details.tsx b/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_get_investigation_details.tsx new file mode 100644 index 0000000000000..f42a15dadbeb2 --- /dev/null +++ b/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_get_investigation_details.tsx @@ -0,0 +1,60 @@ +/* + * 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 { GetInvestigationResponse } from '@kbn/investigation-shared'; +import { investigationKeys } from './query_key_factory'; +import { useKibana } from './use_kibana'; + +export interface FetchInvestigationParams { + id: string; +} + +export interface UseFetchInvestigationResponse { + isInitialLoading: boolean; + isLoading: boolean; + isRefetching: boolean; + isSuccess: boolean; + isError: boolean; + data: GetInvestigationResponse | undefined; +} + +export function useFetchInvestigation({ + id, +}: FetchInvestigationParams): UseFetchInvestigationResponse { + const { + core: { + http, + notifications: { toasts }, + }, + } = useKibana(); + + const { isInitialLoading, isLoading, isError, isSuccess, isRefetching, data } = useQuery({ + queryKey: investigationKeys.fetch({ id }), + queryFn: async ({ signal }) => { + return await http.get(`/api/observability/investigations/${id}`, { + version: '2023-10-31', + signal, + }); + }, + refetchOnWindowFocus: false, + onError: (error: Error) => { + toasts.addError(error, { + title: 'Something went wrong while fetching Investigation', + }); + }, + }); + + return { + data, + isInitialLoading, + isLoading, + isRefetching, + isSuccess, + isError, + }; +} diff --git a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_investigate_params.ts b/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_investigate_params.ts deleted file mode 100644 index d29e06bea8b9c..0000000000000 --- a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_investigate_params.ts +++ /dev/null @@ -1,14 +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 PathsOf, type TypeOf, useParams } from '@kbn/typed-react-router-config'; -import type { InvestigateRoutes } from '../routes/config'; - -export function useInvestigateParams>( - path: TPath -): TypeOf { - return useParams(path)! as TypeOf; -} diff --git a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_investigate_router.ts b/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_investigate_router.ts deleted file mode 100644 index 40775d54e0605..0000000000000 --- a/x-pack/plugins/observability_solution/investigate_app/public/hooks/use_investigate_router.ts +++ /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 { PathsOf, TypeAsArgs, TypeOf } from '@kbn/typed-react-router-config'; -import { useMemo } from 'react'; -import { InvestigateRouter, InvestigateRoutes } from '../routes/config'; -import { investigateRouter } from '../routes/config'; -import { useKibana } from './use_kibana'; - -interface StatefulInvestigateRouter extends InvestigateRouter { - push>( - path: T, - ...params: TypeAsArgs> - ): void; - replace>( - path: T, - ...params: TypeAsArgs> - ): void; -} - -export function useInvestigateRouter(): StatefulInvestigateRouter { - const { - core: { - http, - application: { navigateToApp }, - }, - } = useKibana(); - - const link = (...args: any[]) => { - // @ts-expect-error - return investigateRouter.link(...args); - }; - - return useMemo( - () => ({ - ...investigateRouter, - push: (...args) => { - const next = link(...args); - navigateToApp('investigations', { path: next, replace: false }); - }, - replace: (path, ...args) => { - const next = link(path, ...args); - navigateToApp('investigations', { path: next, replace: true }); - }, - link: (path, ...args) => { - return http.basePath.prepend('/app/investigations' + link(path, ...args)); - }, - }), - [navigateToApp, http.basePath] - ); -} diff --git a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_details/index.stories.tsx b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_details/index.stories.tsx index 276d86519dfa4..8dfb18a753ac2 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_details/index.stories.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_details/index.stories.tsx @@ -20,7 +20,7 @@ export default meta; const defaultProps: ComponentStoryObj = { args: {}, - render: (props) => , + render: (props) => , }; export const InvestigateViewStory: ComponentStoryObj = { diff --git a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_details/index.tsx b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_details/index.tsx index 86a05ccdd9f34..8004e739f056f 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_details/index.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_details/index.tsx @@ -6,27 +6,41 @@ */ import datemath from '@elastic/datemath'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; -import type { InvestigateWidgetCreate } from '@kbn/investigate-plugin/public'; import { AuthenticatedUser } from '@kbn/security-plugin/common'; import { keyBy, noop } from 'lodash'; -import React, { useEffect, useMemo, useRef } from 'react'; +import React, { useMemo } from 'react'; import useAsync from 'react-use/lib/useAsync'; import { AddObservationUI } from '../../../../components/add_observation_ui'; import { InvestigateSearchBar } from '../../../../components/investigate_search_bar'; import { InvestigateWidgetGrid } from '../../../../components/investigate_widget_grid'; +import { useAddInvestigationNote } from '../../../../hooks/use_add_investigation_note'; import { useDateRange } from '../../../../hooks/use_date_range'; +import { useFetchInvestigation } from '../../../../hooks/use_fetch_investigation'; import { useKibana } from '../../../../hooks/use_kibana'; import { InvestigationNotes } from '../investigation_notes/investigation_notes'; -function InvestigationDetailsWithUser({ user }: { user: AuthenticatedUser }) { +function InvestigationDetailsWithUser({ + user, + investigationId, +}: { + user: AuthenticatedUser; + investigationId: string; +}) { const { dependencies: { start: { investigate }, }, } = useKibana(); - const widgetDefinitions = useMemo(() => investigate.getWidgetDefinitions(), [investigate]); + const widgetDefinitions = investigate.getWidgetDefinitions(); const [range, setRange] = useDateRange(); + const { data: investigationData } = useFetchInvestigation({ id: investigationId }); + const { mutateAsync: addInvestigationNote } = useAddInvestigationNote(); + const handleAddInvestigationNote = async (note: string) => { + await addInvestigationNote({ investigationId, note: { content: note } }); + await addNote(note); + }; + const { addItem, copyItem, @@ -42,33 +56,6 @@ function InvestigationDetailsWithUser({ user }: { user: AuthenticatedUser }) { to: range.end.toISOString(), }); - const createWidget = (widgetCreate: InvestigateWidgetCreate) => { - return addItem(widgetCreate); - }; - - const createWidgetRef = useRef(createWidget); - createWidgetRef.current = createWidget; - - useEffect(() => { - if ( - renderableInvestigation?.parameters.timeRange.from && - renderableInvestigation?.parameters.timeRange.to && - range.start.toISOString() !== renderableInvestigation.parameters.timeRange.from && - range.end.toISOString() !== renderableInvestigation.parameters.timeRange.to - ) { - setRange({ - from: renderableInvestigation.parameters.timeRange.from, - to: renderableInvestigation.parameters.timeRange.to, - }); - } - }, [ - renderableInvestigation?.parameters.timeRange.from, - renderableInvestigation?.parameters.timeRange.to, - range.start, - range.end, - setRange, - ]); - const gridItems = useMemo(() => { const widgetDefinitionsByType = keyBy(widgetDefinitions, 'type'); @@ -88,7 +75,7 @@ function InvestigationDetailsWithUser({ user }: { user: AuthenticatedUser }) { }); }, [renderableInvestigation, widgetDefinitions]); - if (!investigation || !renderableInvestigation || !gridItems) { + if (!investigation || !renderableInvestigation || !gridItems || !investigationData) { return ; } @@ -135,20 +122,24 @@ function InvestigationDetailsWithUser({ user }: { user: AuthenticatedUser }) { { - return createWidgetRef.current(widget); + return addItem(widget); }} /> - + ); } -export function InvestigationDetails({}: {}) { +export function InvestigationDetails({ investigationId }: { investigationId: string }) { const { core: { security }, } = useKibana(); @@ -157,5 +148,12 @@ export function InvestigationDetails({}: {}) { return security.authc.getCurrentUser(); }, [security]); - return user.value ? : null; + if (investigationId == null) { + // TODO: return 404 page + return null; + } + + return user.value ? ( + + ) : null; } diff --git a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_notes/investigation_notes.tsx b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_notes/investigation_notes.tsx index 21f5db7b768d6..09258063839e3 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_notes/investigation_notes.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_notes/investigation_notes.tsx @@ -16,8 +16,8 @@ import { } from '@elastic/eui'; import { css } from '@emotion/css'; import { i18n } from '@kbn/i18n'; -import { InvestigationNote } from '@kbn/investigate-plugin/common'; import React from 'react'; +import { InvestigationNote } from '@kbn/investigate-plugin/common'; import { useTheme } from '../../../../hooks/use_theme'; import { ResizableTextInput } from './resizable_text_input'; import { TimelineMessage } from './timeline_message'; @@ -69,7 +69,7 @@ export function InvestigationNotes({ notes, addNote, deleteNote }: Props) { return ( } + icon={} note={currNote} onDelete={() => deleteNote(currNote.id)} /> diff --git a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_notes/timeline_message.tsx b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_notes/timeline_message.tsx index 31539050f7c52..c8e95ad70c758 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_notes/timeline_message.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/components/investigation_notes/timeline_message.tsx @@ -6,9 +6,9 @@ */ import { EuiFlexGroup, EuiFlexItem, EuiMarkdownFormat, EuiText } from '@elastic/eui'; import { css } from '@emotion/css'; -import { InvestigationNote } from '@kbn/investigate-plugin/common'; // eslint-disable-next-line import/no-extraneous-dependencies import { format } from 'date-fns'; +import { InvestigationNote } from '@kbn/investigate-plugin/common'; import React from 'react'; import { InvestigateTextButton } from '../../../../components/investigate_text_button'; import { useTheme } from '../../../../hooks/use_theme'; diff --git a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/investigation_details_page.tsx b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/investigation_details_page.tsx index 008ae1a18524a..90af6b4591c69 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/investigation_details_page.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/investigation_details_page.tsx @@ -5,12 +5,18 @@ * 2.0. */ -import { EuiButton } from '@elastic/eui'; +import { EuiButton, EuiButtonEmpty, EuiText } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; +import { alertOriginSchema } from '@kbn/investigation-shared'; +import { ALERT_RULE_CATEGORY } from '@kbn/rule-data-utils/src/default_alerts_as_data'; import React from 'react'; +import { useParams } from 'react-router-dom'; import { paths } from '../../../common/paths'; +import { useFetchAlert } from '../../hooks/use_get_alert_details'; +import { useFetchInvestigation } from '../../hooks/use_get_investigation_details'; import { useKibana } from '../../hooks/use_kibana'; import { InvestigationDetails } from './components/investigation_details'; +import { InvestigationDetailsPathParams } from './types'; export function InvestigationDetailsPage() { const { @@ -22,8 +28,42 @@ export function InvestigationDetailsPage() { }, } = useKibana(); + const { investigationId } = useParams(); + const ObservabilityPageTemplate = observabilityShared.navigation.PageTemplate; + const { + data: investigationDetails, + isLoading: isFetchInvestigationLoading, + isError: isFetchInvestigationError, + } = useFetchInvestigation({ id: investigationId }); + + const alertId = alertOriginSchema.is(investigationDetails?.origin) + ? investigationDetails?.origin.id + : undefined; + + const { data: alertDetails } = useFetchAlert({ id: alertId }); + + if (isFetchInvestigationLoading) { + return ( +

      + {i18n.translate('xpack.investigateApp.fetchInvestigation.loadingLabel', { + defaultMessage: 'Loading...', + })} +

      + ); + } + + if (isFetchInvestigationError) { + return ( +

      + {i18n.translate('xpack.investigateApp.fetchInvestigation.errorLabel', { + defaultMessage: 'Error while fetching investigation', + })} +

      + ); + } + return ( + {alertDetails && ( + + + {`[Alert] ${alertDetails?.[ALERT_RULE_CATEGORY]} breached`} + + + )} + {investigationDetails &&
      {investigationDetails.title}
      } + + ), rightSideItems: [ - - {i18n.translate('xpack.investigateApp.investigateDetailsPage.escalateButtonLabel', { + + {i18n.translate('xpack.investigateApp.investigationDetails.escalateButtonLabel', { defaultMessage: 'Escalate', })} , ], }} > - +
      ); } diff --git a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/types.ts b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/types.ts new file mode 100644 index 0000000000000..1f9cb337f3d28 --- /dev/null +++ b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/types.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. + */ + +export interface InvestigationDetailsPathParams { + investigationId: string; +} 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 aaea81ec3d574..7c6d4e894a644 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,33 +4,31 @@ * 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 React from 'react'; import { InvestigationDetailsPage } from '../pages/details/investigation_details_page'; import { InvestigationListPage } from '../pages/list/investigation_list_page'; -/** - * The array of route definitions to be used when the application - * creates the routes. - */ -const investigateRoutes = { - '/': { - element: , - }, - '/new': { - element: , - }, - '/{id}': { - element: , - params: t.type({ - path: t.type({ id: t.string }), - }), - }, +export const getRoutes = (): { + [path: string]: { + handler: () => React.ReactElement; + params: Record; + exact: boolean; + }; +} => { + return { + '/': { + handler: () => { + return ; + }, + params: {}, + exact: true, + }, + '/:investigationId': { + handler: () => { + return ; + }, + params: {}, + exact: true, + }, + }; }; - -export type InvestigateRoutes = typeof investigateRoutes; - -export const investigateRouter = createRouter(investigateRoutes); - -export type InvestigateRouter = typeof investigateRouter; diff --git a/x-pack/plugins/observability_solution/investigate_app/server/models/investigation.ts b/x-pack/plugins/observability_solution/investigate_app/server/models/investigation.ts index f079d922d1a9d..9b66a71ce3a9b 100644 --- a/x-pack/plugins/observability_solution/investigate_app/server/models/investigation.ts +++ b/x-pack/plugins/observability_solution/investigate_app/server/models/investigation.ts @@ -5,16 +5,21 @@ * 2.0. */ +import { alertOriginSchema, blankOriginSchema } from '@kbn/investigation-shared'; import * as t from 'io-ts'; +import { investigationNoteSchema } from './investigation_note'; export const investigationSchema = t.type({ id: t.string, title: t.string, createdAt: t.number, createdBy: t.string, - parameters: t.type({ + params: t.type({ timeRange: t.type({ from: t.number, to: t.number }), }), + origin: t.union([alertOriginSchema, blankOriginSchema]), + status: t.union([t.literal('ongoing'), t.literal('closed')]), + notes: t.array(investigationNoteSchema), }); export type Investigation = t.TypeOf; diff --git a/x-pack/plugins/observability_solution/investigate_app/common/schema/investigation.ts b/x-pack/plugins/observability_solution/investigate_app/server/models/investigation_note.ts similarity index 53% rename from x-pack/plugins/observability_solution/investigate_app/common/schema/investigation.ts rename to x-pack/plugins/observability_solution/investigate_app/server/models/investigation_note.ts index 3046a5c4c6d8a..d94ec1a94c108 100644 --- a/x-pack/plugins/observability_solution/investigate_app/common/schema/investigation.ts +++ b/x-pack/plugins/observability_solution/investigate_app/server/models/investigation_note.ts @@ -4,19 +4,15 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ + import * as t from 'io-ts'; -const investigationResponseSchema = t.type({ +export const investigationNoteSchema = t.type({ id: t.string, - title: t.string, createdAt: t.number, createdBy: t.string, - parameters: t.type({ - timeRange: t.type({ from: t.number, to: t.number }), - }), + content: t.string, }); -type InvestigationResponse = t.OutputOf; - -export { investigationResponseSchema }; -export type { InvestigationResponse }; +export type InvestigationNote = t.TypeOf; +export type StoredInvestigationNote = t.OutputOf; diff --git a/x-pack/plugins/observability_solution/investigate_app/server/routes/get_global_investigate_app_server_route_repository.ts b/x-pack/plugins/observability_solution/investigate_app/server/routes/get_global_investigate_app_server_route_repository.ts index 7565330316fed..65f61d7f0a814 100644 --- a/x-pack/plugins/observability_solution/investigate_app/server/routes/get_global_investigate_app_server_route_repository.ts +++ b/x-pack/plugins/observability_solution/investigate_app/server/routes/get_global_investigate_app_server_route_repository.ts @@ -5,14 +5,22 @@ * 2.0. */ -import { findInvestigationsParamsSchema } from '../../common/schema/find'; -import { createInvestigationParamsSchema } from '../../common/schema/create'; +import { + createInvestigationNoteParamsSchema, + createInvestigationParamsSchema, + deleteInvestigationParamsSchema, + findInvestigationsParamsSchema, + getInvestigationNotesParamsSchema, + getInvestigationParamsSchema, +} from '@kbn/investigation-shared'; import { createInvestigation } from '../services/create_investigation'; -import { investigationRepositoryFactory } from '../services/investigation_repository'; -import { createInvestigateAppServerRoute } from './create_investigate_app_server_route'; +import { createInvestigationNote } from '../services/create_investigation_note'; +import { deleteInvestigation } from '../services/delete_investigation'; import { findInvestigations } from '../services/find_investigations'; -import { getInvestigationParamsSchema } from '../../common/schema/get'; import { getInvestigation } from '../services/get_investigation'; +import { getInvestigationNotes } from '../services/get_investigation_notes'; +import { investigationRepositoryFactory } from '../services/investigation_repository'; +import { createInvestigateAppServerRoute } from './create_investigate_app_server_route'; const createInvestigationRoute = createInvestigateAppServerRoute({ endpoint: 'POST /api/observability/investigations 2023-10-31', @@ -56,11 +64,56 @@ const getInvestigationRoute = createInvestigateAppServerRoute({ }, }); +const deleteInvestigationRoute = createInvestigateAppServerRoute({ + endpoint: 'DELETE /api/observability/investigations/{id} 2023-10-31', + options: { + tags: [], + }, + params: deleteInvestigationParamsSchema, + handler: async (params) => { + const soClient = (await params.context.core).savedObjects.client; + const repository = investigationRepositoryFactory({ soClient, logger: params.logger }); + + return await deleteInvestigation(params.params.path.id, repository); + }, +}); + +const createInvestigationNoteRoute = createInvestigateAppServerRoute({ + endpoint: 'POST /api/observability/investigations/{id}/notes 2023-10-31', + options: { + tags: [], + }, + params: createInvestigationNoteParamsSchema, + handler: async (params) => { + const soClient = (await params.context.core).savedObjects.client; + const repository = investigationRepositoryFactory({ soClient, logger: params.logger }); + + return await createInvestigationNote(params.params.path.id, params.params.body, repository); + }, +}); + +const getInvestigationNotesRoute = createInvestigateAppServerRoute({ + endpoint: 'GET /api/observability/investigations/{id}/notes 2023-10-31', + options: { + tags: [], + }, + params: getInvestigationNotesParamsSchema, + handler: async (params) => { + const soClient = (await params.context.core).savedObjects.client; + const repository = investigationRepositoryFactory({ soClient, logger: params.logger }); + + return await getInvestigationNotes(params.params.path.id, repository); + }, +}); + export function getGlobalInvestigateAppServerRouteRepository() { return { ...createInvestigationRoute, ...findInvestigationsRoute, ...getInvestigationRoute, + ...deleteInvestigationRoute, + ...createInvestigationNoteRoute, + ...getInvestigationNotesRoute, }; } diff --git a/x-pack/plugins/observability_solution/investigate_app/server/saved_objects/investigation.ts b/x-pack/plugins/observability_solution/investigate_app/server/saved_objects/investigation.ts index 47fa9f17749c1..eeb937fb16cfa 100644 --- a/x-pack/plugins/observability_solution/investigate_app/server/saved_objects/investigation.ts +++ b/x-pack/plugins/observability_solution/investigate_app/server/saved_objects/investigation.ts @@ -15,12 +15,18 @@ export const investigation: SavedObjectsType = { name: SO_INVESTIGATION_TYPE, hidden: false, namespaceType: 'multiple-isolated', - switchToModelVersionAt: '8.10.0', mappings: { dynamic: false, properties: { id: { type: 'keyword' }, title: { type: 'text' }, + origin: { + properties: { + type: { type: 'keyword' }, + id: { type: 'keyword' }, + }, + }, + status: { type: 'keyword' }, }, }, management: { diff --git a/x-pack/plugins/observability_solution/investigate_app/server/services/create_investigation.ts b/x-pack/plugins/observability_solution/investigate_app/server/services/create_investigation.ts index 9d28136c06f6c..ee79ec34e1d36 100644 --- a/x-pack/plugins/observability_solution/investigate_app/server/services/create_investigation.ts +++ b/x-pack/plugins/observability_solution/investigate_app/server/services/create_investigation.ts @@ -5,14 +5,25 @@ * 2.0. */ -import { CreateInvestigationInput, CreateInvestigationResponse } from '../../common/schema/create'; +import { CreateInvestigationInput, CreateInvestigationResponse } from '@kbn/investigation-shared'; import { InvestigationRepository } from './investigation_repository'; +enum InvestigationStatus { + ongoing = 'ongoing', + closed = 'closed', +} + export async function createInvestigation( params: CreateInvestigationInput, repository: InvestigationRepository ): Promise { - const investigation = { ...params, createdAt: Date.now(), createdBy: 'elastic' }; + const investigation = { + ...params, + createdAt: Date.now(), + createdBy: 'elastic', + status: InvestigationStatus.ongoing, + notes: [], + }; await repository.save(investigation); return investigation; diff --git a/x-pack/plugins/observability_solution/investigate_app/server/services/create_investigation_note.ts b/x-pack/plugins/observability_solution/investigate_app/server/services/create_investigation_note.ts new file mode 100644 index 0000000000000..57e1b3312dc45 --- /dev/null +++ b/x-pack/plugins/observability_solution/investigate_app/server/services/create_investigation_note.ts @@ -0,0 +1,33 @@ +/* + * 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 { + CreateInvestigationNoteInput, + CreateInvestigationNoteResponse, +} from '@kbn/investigation-shared'; +import { v4 } from 'uuid'; +import { InvestigationRepository } from './investigation_repository'; + +export async function createInvestigationNote( + investigationId: string, + params: CreateInvestigationNoteInput, + repository: InvestigationRepository +): Promise { + const investigation = await repository.findById(investigationId); + + const investigationNote = { + id: v4(), + content: params.content, + createdBy: 'TODO: get user from request', + createdAt: Date.now(), + }; + investigation.notes.push(investigationNote); + + await repository.save(investigation); + + return investigationNote; +} diff --git a/x-pack/plugins/observability_solution/investigate_app/server/services/delete_investigation.ts b/x-pack/plugins/observability_solution/investigate_app/server/services/delete_investigation.ts new file mode 100644 index 0000000000000..f615a6fb61a33 --- /dev/null +++ b/x-pack/plugins/observability_solution/investigate_app/server/services/delete_investigation.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 { InvestigationRepository } from './investigation_repository'; + +export async function deleteInvestigation( + id: string, + repository: InvestigationRepository +): Promise { + await repository.deleteById(id); +} diff --git a/x-pack/plugins/observability_solution/investigate_app/server/services/find_investigations.ts b/x-pack/plugins/observability_solution/investigate_app/server/services/find_investigations.ts index 2c08125aff734..a3ea2db46d357 100644 --- a/x-pack/plugins/observability_solution/investigate_app/server/services/find_investigations.ts +++ b/x-pack/plugins/observability_solution/investigate_app/server/services/find_investigations.ts @@ -9,14 +9,14 @@ import { FindInvestigationsParams, FindInvestigationsResponse, findInvestigationsResponseSchema, -} from '../../common/schema/find'; +} from '@kbn/investigation-shared'; import { InvestigationRepository } from './investigation_repository'; export async function findInvestigations( params: FindInvestigationsParams, repository: InvestigationRepository ): Promise { - const investigations = await repository.search(toPagination(params)); + const investigations = await repository.search(toFilter(params), toPagination(params)); return findInvestigationsResponseSchema.encode(investigations); } @@ -29,3 +29,10 @@ function toPagination(params: FindInvestigationsParams) { perPage: params.perPage ? parseInt(params.perPage, 10) : DEFAULT_PER_PAGE, }; } + +function toFilter(params: FindInvestigationsParams) { + if (params.alertId) { + return `investigation.attributes.origin.id:(${params.alertId}) AND investigation.attributes.status: ongoing`; + } + return ''; +} diff --git a/x-pack/plugins/observability_solution/investigate_app/server/services/get_investigation.ts b/x-pack/plugins/observability_solution/investigate_app/server/services/get_investigation.ts index 9bd6025f8e8a2..1aed642da756d 100644 --- a/x-pack/plugins/observability_solution/investigate_app/server/services/get_investigation.ts +++ b/x-pack/plugins/observability_solution/investigate_app/server/services/get_investigation.ts @@ -5,7 +5,11 @@ * 2.0. */ -import { GetInvestigationParams, GetInvestigationResponse } from '../../common/schema/get'; +import { + GetInvestigationParams, + GetInvestigationResponse, + getInvestigationResponseSchema, +} from '@kbn/investigation-shared'; import { InvestigationRepository } from './investigation_repository'; export async function getInvestigation( @@ -14,5 +18,5 @@ export async function getInvestigation( ): Promise { const investigation = await repository.findById(params.id); - return investigation; + return getInvestigationResponseSchema.encode(investigation); } diff --git a/x-pack/plugins/observability_solution/investigate_app/server/services/get_investigation_notes.ts b/x-pack/plugins/observability_solution/investigate_app/server/services/get_investigation_notes.ts new file mode 100644 index 0000000000000..510798e5007a5 --- /dev/null +++ b/x-pack/plugins/observability_solution/investigate_app/server/services/get_investigation_notes.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 { + GetInvestigationNotesResponse, + getInvestigationNotesResponseSchema, +} from '@kbn/investigation-shared'; +import { InvestigationRepository } from './investigation_repository'; + +export async function getInvestigationNotes( + investigationId: string, + repository: InvestigationRepository +): Promise { + const investigation = await repository.findById(investigationId); + + return getInvestigationNotesResponseSchema.encode(investigation.notes); +} diff --git a/x-pack/plugins/observability_solution/investigate_app/server/services/investigation_repository.ts b/x-pack/plugins/observability_solution/investigate_app/server/services/investigation_repository.ts index 6d9c5ddbc0d03..090930351fc14 100644 --- a/x-pack/plugins/observability_solution/investigate_app/server/services/investigation_repository.ts +++ b/x-pack/plugins/observability_solution/investigate_app/server/services/investigation_repository.ts @@ -15,7 +15,7 @@ export interface InvestigationRepository { save(investigation: Investigation): Promise; findById(id: string): Promise; deleteById(id: string): Promise; - search(pagination: Pagination): Promise>; + search(filter: string, pagination: Pagination): Promise>; } export function investigationRepositoryFactory({ @@ -89,11 +89,12 @@ export function investigationRepositoryFactory({ await soClient.delete(SO_INVESTIGATION_TYPE, response.saved_objects[0].id); }, - async search(pagination: Pagination): Promise> { + async search(filter: string, pagination: Pagination): Promise> { const response = await soClient.find({ type: SO_INVESTIGATION_TYPE, page: pagination.page, perPage: pagination.perPage, + filter, }); return { diff --git a/x-pack/plugins/observability_solution/investigate_app/tsconfig.json b/x-pack/plugins/observability_solution/investigate_app/tsconfig.json index b4b586601ebaa..174c81ba6f6df 100644 --- a/x-pack/plugins/observability_solution/investigate_app/tsconfig.json +++ b/x-pack/plugins/observability_solution/investigate_app/tsconfig.json @@ -21,7 +21,6 @@ "@kbn/react-kibana-context-theme", "@kbn/shared-ux-link-redirect-app", "@kbn/kibana-react-plugin", - "@kbn/typed-react-router-config", "@kbn/i18n", "@kbn/embeddable-plugin", "@kbn/observability-ai-assistant-plugin", @@ -52,5 +51,9 @@ "@kbn/esql-datagrid", "@kbn/server-route-repository-utils", "@kbn/core-saved-objects-server", + "@kbn/rule-registry-plugin", + "@kbn/rule-data-utils", + "@kbn/shared-ux-router", + "@kbn/investigation-shared", ], } diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/state_machines/logs_explorer_controller/src/types.ts b/x-pack/plugins/observability_solution/logs_explorer/public/state_machines/logs_explorer_controller/src/types.ts index b4ceb3a174b53..56ee5405841cc 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/state_machines/logs_explorer_controller/src/types.ts +++ b/x-pack/plugins/observability_solution/logs_explorer/public/state_machines/logs_explorer_controller/src/types.ts @@ -156,8 +156,6 @@ export type LogsExplorerControllerTypeState = export type LogsExplorerControllerContext = LogsExplorerControllerTypeState['context']; -export type LogsExplorerControllerStateValue = LogsExplorerControllerTypeState['value']; - export type LogsExplorerControllerEvent = | { type: 'RECEIVED_STATE_CONTAINER'; diff --git a/x-pack/plugins/observability_solution/logs_explorer/public/utils/proxies.ts b/x-pack/plugins/observability_solution/logs_explorer/public/utils/proxies.ts index cfe4c133ec328..487eab6241d17 100644 --- a/x-pack/plugins/observability_solution/logs_explorer/public/utils/proxies.ts +++ b/x-pack/plugins/observability_solution/logs_explorer/public/utils/proxies.ts @@ -33,4 +33,4 @@ export const createPropertyGetProxy = ( obj: T, key: string | number | symbol -): key is K => obj.hasOwnProperty(key); +): key is K => Object.hasOwn(obj, key); diff --git a/x-pack/plugins/observability_solution/logs_shared/common/http_api/deprecations/index.ts b/x-pack/plugins/observability_solution/logs_shared/common/http_api/deprecations/index.ts new file mode 100644 index 0000000000000..57f91cc799828 --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_shared/common/http_api/deprecations/index.ts @@ -0,0 +1,9 @@ +/* + * 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 const MIGRATE_LOG_VIEW_SETTINGS_URL = + '/api/logs_shared/deprecations/migrate_log_view_settings'; diff --git a/x-pack/plugins/observability_solution/logs_shared/server/deprecations/index.ts b/x-pack/plugins/observability_solution/logs_shared/server/deprecations/index.ts new file mode 100644 index 0000000000000..3e80046644144 --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_shared/server/deprecations/index.ts @@ -0,0 +1,22 @@ +/* + * 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 { LogsSharedPluginCoreSetup } from '../types'; +import { getLogSourcesSettingDeprecationInfo } from './log_sources_setting'; + +export const registerDeprecations = ({ core }: { core: LogsSharedPluginCoreSetup }) => { + core.deprecations.registerDeprecations({ + getDeprecations: async (context) => { + return [ + ...(await getLogSourcesSettingDeprecationInfo({ + context, + getStartServices: core.getStartServices, + })), + ]; + }, + }); +}; diff --git a/x-pack/plugins/observability_solution/logs_shared/server/deprecations/log_sources_setting.ts b/x-pack/plugins/observability_solution/logs_shared/server/deprecations/log_sources_setting.ts new file mode 100644 index 0000000000000..c3e891edf74c9 --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_shared/server/deprecations/log_sources_setting.ts @@ -0,0 +1,73 @@ +/* + * 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 { DeprecationsDetails } from '@kbn/core-deprecations-common'; +import { GetDeprecationsContext } from '@kbn/core-deprecations-server'; +import { i18n } from '@kbn/i18n'; +import { defaultLogViewId } from '../../common/log_views'; +import { MIGRATE_LOG_VIEW_SETTINGS_URL } from '../../common/http_api/deprecations'; +import { logSourcesKibanaAdvancedSettingRT } from '../../common'; +import { LogsSharedPluginStartServicesAccessor } from '../types'; + +export const getLogSourcesSettingDeprecationInfo = async ({ + getStartServices, + context, +}: { + context: GetDeprecationsContext; + getStartServices: LogsSharedPluginStartServicesAccessor; +}): Promise => { + const [_, pluginStartDeps, pluginStart] = await getStartServices(); + const logSourcesService = + pluginStartDeps.logsDataAccess.services.logSourcesServiceFactory.getLogSourcesService( + context.savedObjectsClient + ); + const logViewsClient = pluginStart.logViews.getClient( + context.savedObjectsClient, + context.esClient.asCurrentUser, + logSourcesService + ); + + const logView = await logViewsClient.getLogView(defaultLogViewId); + + if (logView && !logSourcesKibanaAdvancedSettingRT.is(logView.attributes.logIndices)) { + return [ + { + title: i18n.translate( + 'xpack.logsShared.deprecations.migrateLogViewSettingsToLogSourcesSetting.title', + { + defaultMessage: 'Log sources setting', + } + ), + level: 'warning', + deprecationType: 'feature', + message: i18n.translate( + 'xpack.logsShared.deprecations.migrateLogViewSettingsToLogSourcesSetting.message', + { + defaultMessage: + 'Indices and Data view options previously provided via the Logs UI settings page are now deprecated. Please migrate to using the Kibana log sources advanced setting.', + } + ), + correctiveActions: { + manualSteps: [ + i18n.translate( + 'xpack.logsShared.deprecations.migrateLogViewSettingsToLogSourcesSetting.message.manualStepMessage', + { + defaultMessage: + 'Update the Log sources Kibana advanced setting (via Management > Advanced Settings) to match the setting previously provided via the Logs UI settings page. Then via the Logs UI settings page use the Kibana log sources advanced setting option.', + } + ), + ], + api: { + method: 'PUT', + path: MIGRATE_LOG_VIEW_SETTINGS_URL, + }, + }, + }, + ]; + } else { + return []; + } +}; diff --git a/x-pack/plugins/observability_solution/logs_shared/server/logs_shared_server.ts b/x-pack/plugins/observability_solution/logs_shared/server/logs_shared_server.ts index 60dc17be61d2d..9bb643c8dd617 100644 --- a/x-pack/plugins/observability_solution/logs_shared/server/logs_shared_server.ts +++ b/x-pack/plugins/observability_solution/logs_shared/server/logs_shared_server.ts @@ -12,10 +12,12 @@ import { initLogEntriesSummaryRoute, } from './routes/log_entries'; import { initLogViewRoutes } from './routes/log_views'; +import { initMigrateLogViewSettingsRoute } from './routes/deprecations'; export const initLogsSharedServer = (libs: LogsSharedBackendLibs) => { initLogEntriesHighlightsRoute(libs); initLogEntriesSummaryRoute(libs); initLogEntriesSummaryHighlightsRoute(libs); initLogViewRoutes(libs); + initMigrateLogViewSettingsRoute(libs); }; diff --git a/x-pack/plugins/observability_solution/logs_shared/server/plugin.ts b/x-pack/plugins/observability_solution/logs_shared/server/plugin.ts index 6bc9560764a7b..7c97e175ed64f 100644 --- a/x-pack/plugins/observability_solution/logs_shared/server/plugin.ts +++ b/x-pack/plugins/observability_solution/logs_shared/server/plugin.ts @@ -24,6 +24,8 @@ import { LogsSharedLogEntriesDomain } from './lib/domains/log_entries_domain'; import { LogsSharedKibanaLogEntriesAdapter } from './lib/adapters/log_entries/kibana_log_entries_adapter'; import { LogEntriesService } from './services/log_entries'; import { LogsSharedConfig } from '../common/plugin_config'; +import { registerDeprecations } from './deprecations'; +import { defaultLogViewId } from '../common/log_views'; export class LogsSharedPlugin implements @@ -58,7 +60,7 @@ export class LogsSharedPlugin core.savedObjects.registerType(logViewSavedObjectType); } else { // Register a static internal view to use as a fallback when the log view SO is not registered - logViews.defineInternalLogView('default', {}); + logViews.defineInternalLogView(defaultLogViewId, {}); } const domainLibs: LogsSharedDomainLibs = { @@ -84,6 +86,8 @@ export class LogsSharedPlugin const logEntriesService = new LogEntriesService(); logEntriesService.setup(core, plugins); + registerDeprecations({ core }); + return { ...domainLibs, logViews, diff --git a/x-pack/plugins/observability_solution/logs_shared/server/routes/deprecations/index.ts b/x-pack/plugins/observability_solution/logs_shared/server/routes/deprecations/index.ts new file mode 100644 index 0000000000000..2478fabf328c9 --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_shared/server/routes/deprecations/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 './migrate_log_view_settings'; diff --git a/x-pack/plugins/observability_solution/logs_shared/server/routes/deprecations/migrate_log_view_settings.ts b/x-pack/plugins/observability_solution/logs_shared/server/routes/deprecations/migrate_log_view_settings.ts new file mode 100644 index 0000000000000..f3e9db4f1a765 --- /dev/null +++ b/x-pack/plugins/observability_solution/logs_shared/server/routes/deprecations/migrate_log_view_settings.ts @@ -0,0 +1,62 @@ +/* + * 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 { defaultLogViewId } from '../../../common/log_views'; +import { MIGRATE_LOG_VIEW_SETTINGS_URL } from '../../../common/http_api/deprecations'; +import { logSourcesKibanaAdvancedSettingRT } from '../../../common'; +import { LogsSharedBackendLibs } from '../../lib/logs_shared_types'; + +// This route facilitates automated one-click handling of updating log view's to use the +// Kibana advanced setting as part of the upgrade assistant. +// First, it will gather the indices currently set on the log view. +// Secondly, it will update the advanced setting to use these indices. +// Lastly, it will update the log view to use the kibana advanced setting. +export const initMigrateLogViewSettingsRoute = ({ + framework, + getStartServices, +}: LogsSharedBackendLibs) => { + framework.router.put( + { path: MIGRATE_LOG_VIEW_SETTINGS_URL, validate: false }, + async (context, request, response) => { + try { + const [_, pluginStartDeps, pluginStart] = await getStartServices(); + + const logSourcesService = + await pluginStartDeps.logsDataAccess.services.logSourcesServiceFactory.getScopedLogSourcesService( + request + ); + const logViewsClient = pluginStart.logViews.getScopedClient(request); + + const logView = await logViewsClient.getLogView(defaultLogViewId); + + if (!logView || logSourcesKibanaAdvancedSettingRT.is(logView.attributes.logIndices)) { + return response.customError({ + body: new Error( + "Unable to migrate log view settings. A log view either doesn't exist or is already using the Kibana advanced setting." + ), + statusCode: 400, + }); + } + + const indices = ( + await logViewsClient.getResolvedLogView({ + type: 'log-view-reference', + logViewId: defaultLogViewId, + }) + ).indices; + + await logSourcesService.setLogSources([{ indexPattern: indices }]); + await logViewsClient.putLogView(defaultLogViewId, { + logIndices: { type: 'kibana_advanced_setting' }, + }); + return response.ok(); + } catch (error) { + throw error; + } + } + ); +}; diff --git a/x-pack/plugins/observability_solution/logs_shared/tsconfig.json b/x-pack/plugins/observability_solution/logs_shared/tsconfig.json index f1bb2527f9311..38cbba7c252c0 100644 --- a/x-pack/plugins/observability_solution/logs_shared/tsconfig.json +++ b/x-pack/plugins/observability_solution/logs_shared/tsconfig.json @@ -42,5 +42,7 @@ "@kbn/test-jest-helpers", "@kbn/router-utils", "@kbn/logs-data-access-plugin", + "@kbn/core-deprecations-common", + "@kbn/core-deprecations-server", ] } diff --git a/x-pack/plugins/observability_solution/observability/kibana.jsonc b/x-pack/plugins/observability_solution/observability/kibana.jsonc index 997b6196def4b..8e97ea707641d 100644 --- a/x-pack/plugins/observability_solution/observability/kibana.jsonc +++ b/x-pack/plugins/observability_solution/observability/kibana.jsonc @@ -51,6 +51,7 @@ "serverless", "guidedOnboarding", "observabilityAIAssistant", + "investigate" ], "requiredBundles": [ "data", diff --git a/x-pack/plugins/observability_solution/observability/public/components/alerts_flyout/alerts_flyout.stories.tsx b/x-pack/plugins/observability_solution/observability/public/components/alerts_flyout/alerts_flyout.stories.tsx index be78ce851053c..a6aa35ea8a468 100644 --- a/x-pack/plugins/observability_solution/observability/public/components/alerts_flyout/alerts_flyout.stories.tsx +++ b/x-pack/plugins/observability_solution/observability/public/components/alerts_flyout/alerts_flyout.stories.tsx @@ -42,7 +42,6 @@ export default { - // ); }, ], diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.test.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.test.tsx index b3e28ba222c5a..d484773e0b14a 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.test.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.test.tsx @@ -34,6 +34,10 @@ const mockHttp = { }, }; +const mockNavigateToApp = { + mockNavigateToApp: jest.fn(), +}; + const mockGetEditRuleFlyout = jest.fn(() => (
      mocked component
      )); @@ -48,6 +52,7 @@ const mockKibana = () => { }, cases: mockCases, http: mockHttp, + application: mockNavigateToApp, }, }); }; diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.tsx index 3d47e34002945..6ea43b165fe7a 100644 --- a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.tsx +++ b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/components/header_actions.tsx @@ -25,13 +25,22 @@ import { ALERT_RULE_UUID, ALERT_STATUS_ACTIVE, ALERT_UUID, + ALERT_RULE_CATEGORY, + ALERT_START, + ALERT_END, + ALERT_RULE_TYPE_ID, + OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, } from '@kbn/rule-data-utils'; +import { v4 as uuidv4 } from 'uuid'; +import { getPaddedAlertTimeRange } from '@kbn/observability-get-padded-alert-time-range-util'; import { useKibana } from '../../../utils/kibana_react'; import { useFetchRule } from '../../../hooks/use_fetch_rule'; import type { TopAlert } from '../../../typings/alerts'; import { paths } from '../../../../common/locators/paths'; import { useBulkUntrackAlerts } from '../hooks/use_bulk_untrack_alerts'; +import { useCreateInvestigation } from '../hooks/use_create_investigation'; +import { useFetchInvestigationsByAlert } from '../hooks/use_fetch_investigations_by_alert'; export interface HeaderActionsProps { alert: TopAlert | null; @@ -52,12 +61,18 @@ export function HeaderActions({ }, triggersActionsUi: { getEditRuleFlyout: EditRuleFlyout, getRuleSnoozeModal: RuleSnoozeModal }, http, + application: { navigateToApp }, + investigate: investigatePlugin, } = useKibana().services; const { rule, refetch } = useFetchRule({ ruleId: alert?.fields[ALERT_RULE_UUID] || '', }); + const { data: investigations } = useFetchInvestigationsByAlert({ + alertId: alert?.fields[ALERT_UUID] ?? '', + }); + const [isPopoverOpen, setIsPopoverOpen] = useState(false); const [ruleConditionsFlyoutOpen, setRuleConditionsFlyoutOpen] = useState(false); const [snoozeModalOpen, setSnoozeModalOpen] = useState(false); @@ -109,9 +124,67 @@ export function HeaderActions({ setSnoozeModalOpen(true); }; + const { mutateAsync: createInvestigation } = useCreateInvestigation(); + + const alertStart = alert?.fields[ALERT_START]; + const alertEnd = alert?.fields[ALERT_END]; + + const createOrOpenInvestigation = async () => { + if (!alert) return; + + if (!investigations || investigations.results.length === 0) { + const paddedAlertTimeRange = getPaddedAlertTimeRange(alertStart!, alertEnd); + + const investigationResponse = await createInvestigation({ + investigation: { + id: uuidv4(), + title: `Investigate ${alert.fields[ALERT_RULE_CATEGORY]} breached`, + params: { + timeRange: { + from: new Date(paddedAlertTimeRange.from).getTime(), + to: new Date(paddedAlertTimeRange.to).getTime(), + }, + }, + origin: { + type: 'alert', + id: alert.fields[ALERT_UUID], + }, + }, + }); + + navigateToApp('investigate', { path: `/${investigationResponse.id}`, replace: false }); + } else { + navigateToApp('investigate', { + path: `/${investigations.results[0].id}`, + replace: false, + }); + } + }; + return ( <> + {Boolean(investigatePlugin) && + alert?.fields[ALERT_RULE_TYPE_ID] === OBSERVABILITY_THRESHOLD_RULE_TYPE_ID && ( + + { + createOrOpenInvestigation(); + }} + fill + data-test-subj="investigate-alert-button" + > + + {i18n.translate('xpack.observability.alertDetails.investigateAlert', { + defaultMessage: + !investigations || investigations.results.length === 0 + ? 'Start investigation' + : 'Ongoing investigation', + })} + + + + )} ; + +export function useCreateInvestigation() { + const { + http, + notifications: { toasts }, + } = useKibana().services; + + return useMutation< + CreateInvestigationResponse, + ServerError, + { investigation: CreateInvestigationInput }, + { previousData?: FindInvestigationsResponse; queryKey?: QueryKey } + >( + ['createInvestigation'], + ({ investigation }) => { + const body = JSON.stringify(investigation); + return http.post(`/api/observability/investigations`, { body }); + }, + { + onError: (error, { investigation }, context) => { + toasts.addError(new Error(error.body?.message ?? error.message), { + title: i18n.translate('xpack.observability.create.errorNotification', { + defaultMessage: 'Something went wrong while creating investigation', + }), + }); + }, + } + ); +} diff --git a/x-pack/plugins/observability_solution/observability/public/pages/alert_details/hooks/use_fetch_investigations_by_alert.tsx b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/hooks/use_fetch_investigations_by_alert.tsx new file mode 100644 index 0000000000000..67867858310f8 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability/public/pages/alert_details/hooks/use_fetch_investigations_by_alert.tsx @@ -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 { FindInvestigationsResponse } from '@kbn/investigation-shared'; +import { useQuery } from '@tanstack/react-query'; +import { useKibana } from '../../../utils/kibana_react'; + +export interface InvestigationsByAlertParams { + alertId: string; +} + +export interface UseFetchInvestigationsByAlertResponse { + isInitialLoading: boolean; + isLoading: boolean; + isRefetching: boolean; + isSuccess: boolean; + isError: boolean; + data: FindInvestigationsResponse | undefined; +} + +export function useFetchInvestigationsByAlert({ + alertId, +}: InvestigationsByAlertParams): UseFetchInvestigationsByAlertResponse { + const { + http, + notifications: { toasts }, + investigate: investigatePlugin, + } = useKibana().services; + + const { isInitialLoading, isLoading, isError, isSuccess, isRefetching, data } = useQuery({ + queryKey: ['fetchInvestigationsByAlert', alertId], + queryFn: async ({ signal }) => { + return await http.get('/api/observability/investigations', { + query: { alertId }, + version: '2023-10-31', + signal, + }); + }, + cacheTime: 0, + refetchOnWindowFocus: false, + retry: (failureCount, error) => { + if (String(error) === 'Error: Forbidden') { + return false; + } + + return failureCount < 3; + }, + onError: (error: Error) => { + toasts.addError(error, { + title: 'Something went wrong while fetching Investigations', + }); + }, + enabled: Boolean(investigatePlugin), + }); + + return { + data, + isInitialLoading, + isLoading, + isRefetching, + isSuccess, + isError, + }; +} diff --git a/x-pack/plugins/observability_solution/observability/public/plugin.ts b/x-pack/plugins/observability_solution/observability/public/plugin.ts index a97085f0c036d..b2d0e526f3c64 100644 --- a/x-pack/plugins/observability_solution/observability/public/plugin.ts +++ b/x-pack/plugins/observability_solution/observability/public/plugin.ts @@ -70,6 +70,7 @@ import type { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public' import type { PresentationUtilPluginStart } from '@kbn/presentation-util-plugin/public'; import { DataViewFieldEditorStart } from '@kbn/data-view-field-editor-plugin/public'; import { LicenseManagementUIPluginSetup } from '@kbn/license-management-plugin/public'; +import { InvestigatePublicStart } from '@kbn/investigate-plugin/public'; import { observabilityAppId, observabilityFeatureId } from '../common'; import { ALERTS_PATH, @@ -161,6 +162,7 @@ export interface ObservabilityPublicPluginsStart { theme: CoreStart['theme']; dataViewFieldEditor: DataViewFieldEditorStart; toastNotifications: ToastsStart; + investigate?: InvestigatePublicStart; } export type ObservabilityPublicStart = ReturnType; diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/lib/metric_query.test.ts b/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/lib/metric_query.test.ts index efaf7b36e3a0b..53955b7130c54 100644 --- a/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/lib/metric_query.test.ts +++ b/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/lib/metric_query.test.ts @@ -69,7 +69,7 @@ describe("The Metric Threshold Alert's getElasticsearchMetricQuery", () => { ); test('includes a range filter', () => { expect( - searchBody.query.bool.filter.find((filter) => filter.hasOwnProperty('range')) + searchBody.query.bool.filter.find((filter) => Object.hasOwn(filter, 'range')) ).toBeTruthy(); }); @@ -126,7 +126,7 @@ describe("The Metric Threshold Alert's getElasticsearchMetricQuery", () => { ); test('includes a range filter', () => { expect( - searchBody.query.bool.filter.find((filter) => filter.hasOwnProperty('range')) + searchBody.query.bool.filter.find((filter) => Object.hasOwn(filter, 'range')) ).toBeTruthy(); }); @@ -238,7 +238,7 @@ describe("The Metric Threshold Alert's getElasticsearchMetricQuery", () => { ); test('includes a range filter', () => { expect( - searchBody.query.bool.filter.find((filter) => filter.hasOwnProperty('range')) + searchBody.query.bool.filter.find((filter) => Object.hasOwn(filter, 'range')) ).toBeTruthy(); }); diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/register_custom_threshold_rule_type.ts b/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/register_custom_threshold_rule_type.ts index f198a6c707968..2fe8cbe76d294 100644 --- a/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/register_custom_threshold_rule_type.ts +++ b/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/register_custom_threshold_rule_type.ts @@ -56,10 +56,10 @@ export const MetricsRulesTypeAlertDefinition: IRuleTypeAlerts { // input, output ['', undefined], ['host.name:host-0', undefined], - [':*', 'filterQuery must be a valid KQL filter'], + ]; + const dataWithError = [ + // input, output + [ + ':*', + 'filterQuery must be a valid KQL filter (error: Expected "(", NOT, end of input, field name, value, whitespace but ":" found.', + ], ]; test.each(data)('validateKQLStringFilter(%s): %o', (input: any, output: any) => { expect(validateKQLStringFilter(input)).toEqual(output); }); + + test.each(dataWithError)('validateKQLStringFilter(%s): %o', (input: any, output: any) => { + expect(validateKQLStringFilter(input)).toContain(output); + }); }); describe('getFormattedGroupBy', () => { diff --git a/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/utils.ts b/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/utils.ts index 906c8a8a9f0a5..ca9b378d74eaa 100644 --- a/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/utils.ts +++ b/x-pack/plugins/observability_solution/observability/server/lib/rules/custom_threshold/utils.ts @@ -52,10 +52,15 @@ export const validateKQLStringFilter = (value: string) => { } try { - kbnBuildEsQuery(undefined, [{ query: value, language: 'kuery' }], []); + kbnBuildEsQuery(undefined, [{ query: value, language: 'kuery' }], [], { + allowLeadingWildcards: true, + queryStringOptions: {}, + ignoreFilterIfFieldNotInIndex: false, + }); } catch (e) { return i18n.translate('xpack.observability.customThreshold.rule.schema.invalidFilterQuery', { - defaultMessage: 'filterQuery must be a valid KQL filter', + defaultMessage: 'filterQuery must be a valid KQL filter (error: {errorMessage})', + values: { errorMessage: e?.message }, }); } }; diff --git a/x-pack/plugins/observability_solution/observability/server/routes/register_routes.ts b/x-pack/plugins/observability_solution/observability/server/routes/register_routes.ts index f0f41a70bec81..b885050eb64c7 100644 --- a/x-pack/plugins/observability_solution/observability/server/routes/register_routes.ts +++ b/x-pack/plugins/observability_solution/observability/server/routes/register_routes.ts @@ -10,9 +10,11 @@ import { RulesClientApi } from '@kbn/alerting-plugin/server/types'; import { CoreSetup, KibanaRequest, Logger, RouteRegistrar } from '@kbn/core/server'; import { RuleDataPluginService } from '@kbn/rule-registry-plugin/server'; import { + IoTsParamsObject, decodeRequestParams, + stripNullishRequestParameters, parseEndpoint, - routeValidationObject, + passThroughValidationObject, } from '@kbn/server-route-repository'; import { SpacesPluginStart } from '@kbn/spaces-plugin/server'; import axios from 'axios'; @@ -57,18 +59,18 @@ export function registerRoutes({ config, repository, core, logger, dependencies (router[method] as RouteRegistrar)( { path: pathname, - validate: routeValidationObject, + validate: passThroughValidationObject, options, }, async (context, request, response) => { try { const decodedParams = decodeRequestParams( - { + stripNullishRequestParameters({ params: request.params, body: request.body, query: request.query, - }, - params ?? t.strict({}) + }), + (params as IoTsParamsObject) ?? t.strict({}) ); const data = await handler({ diff --git a/x-pack/plugins/observability_solution/observability/tsconfig.json b/x-pack/plugins/observability_solution/observability/tsconfig.json index 28f06a81d17c0..0a65077d42a1e 100644 --- a/x-pack/plugins/observability_solution/observability/tsconfig.json +++ b/x-pack/plugins/observability_solution/observability/tsconfig.json @@ -110,6 +110,8 @@ "@kbn/license-management-plugin", "@kbn/observability-alerting-rule-utils", "@kbn/core-ui-settings-server-mocks", + "@kbn/investigate-plugin", + "@kbn/investigation-shared", ], "exclude": [ "target/**/*" diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts index 4de6c77666170..6c62cce3ebdb7 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/index.ts @@ -389,7 +389,7 @@ export class KnowledgeBaseService { categories?: string[]; user?: { name: string }; namespace: string; - esClient: { asCurrentUser: ElasticsearchClient }; + esClient: { asCurrentUser: ElasticsearchClient; asInternalUser: ElasticsearchClient }; uiSettingsClient: IUiSettingsClient; }): Promise<{ entries: RecalledEntry[]; @@ -417,6 +417,7 @@ export class KnowledgeBaseService { uiSettingsClient, queries, modelId, + logger: this.dependencies.logger, }).catch((error) => { this.dependencies.logger.debug('Error getting data from search indices'); this.dependencies.logger.debug(error); diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/recall_from_connectors.ts b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/recall_from_connectors.ts index 34c8a6208d655..27c133e7b88d0 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/recall_from_connectors.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant/server/service/knowledge_base_service/recall_from_connectors.ts @@ -8,6 +8,7 @@ import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; import { IUiSettingsClient } from '@kbn/core-ui-settings-server'; import { isEmpty } from 'lodash'; +import type { Logger } from '@kbn/logging'; import { RecalledEntry } from '.'; import { aiAssistantSearchConnectorIndexPattern } from '../../../common'; @@ -16,15 +17,17 @@ export async function recallFromConnectors({ esClient, uiSettingsClient, modelId, + logger, }: { queries: Array<{ text: string; boost?: number }>; - esClient: { asCurrentUser: ElasticsearchClient }; + esClient: { asCurrentUser: ElasticsearchClient; asInternalUser: ElasticsearchClient }; uiSettingsClient: IUiSettingsClient; modelId: string; + logger: Logger; }): Promise { const ML_INFERENCE_PREFIX = 'ml.inference.'; - - const connectorIndices = await getConnectorIndices(esClient, uiSettingsClient); + const connectorIndices = await getConnectorIndices(esClient, uiSettingsClient, logger); + logger.debug(`Found connector indices: ${connectorIndices}`); const fieldCaps = await esClient.asCurrentUser.fieldCaps({ index: connectorIndices, @@ -96,17 +99,25 @@ export async function recallFromConnectors({ } async function getConnectorIndices( - esClient: { asCurrentUser: ElasticsearchClient }, - uiSettingsClient: IUiSettingsClient + esClient: { asCurrentUser: ElasticsearchClient; asInternalUser: ElasticsearchClient }, + uiSettingsClient: IUiSettingsClient, + logger: Logger ) { // improve performance by running this in parallel with the `uiSettingsClient` request - const responsePromise = esClient.asCurrentUser.transport.request({ - method: 'GET', - path: '_connector', - querystring: { - filter_path: 'results.index_name', - }, - }); + const responsePromise = esClient.asInternalUser.transport + .request<{ + results?: Array<{ index_name: string }>; + }>({ + method: 'GET', + path: '_connector', + querystring: { + filter_path: 'results.index_name', + }, + }) + .catch((e) => { + logger.warn(`Failed to fetch connector indices due to ${e.message}`); + return { results: [] }; + }); const customSearchConnectorIndex = await uiSettingsClient.get( aiAssistantSearchConnectorIndexPattern @@ -116,7 +127,7 @@ async function getConnectorIndices( return customSearchConnectorIndex.split(','); } - const response = (await responsePromise) as { results?: Array<{ index_name: string }> }; + const response = await responsePromise; const connectorIndices = response.results?.map((result) => result.index_name); // preserve backwards compatibility with 8.14 (may not be needed in the future) diff --git a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/utils/create_initialized_object.ts b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/utils/create_initialized_object.ts index ecd3554e4923d..e06800aca07a0 100644 --- a/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/utils/create_initialized_object.ts +++ b/x-pack/plugins/observability_solution/observability_ai_assistant_app/public/utils/create_initialized_object.ts @@ -14,7 +14,7 @@ export function createInitializedObject(parameters: Params) { function traverseProperties({ properties, required }: Params) { for (const propName in properties) { - if (properties.hasOwnProperty(propName)) { + if (Object.hasOwn(properties, propName)) { const prop = properties[propName] as Params; if (prop.type === 'object') { diff --git a/x-pack/plugins/observability_solution/observability_onboarding/common/telemetry_events.ts b/x-pack/plugins/observability_solution/observability_onboarding/common/telemetry_events.ts index 060c33aca7693..cf28fde189a64 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/common/telemetry_events.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/common/telemetry_events.ts @@ -53,3 +53,25 @@ export const OBSERVABILITY_ONBOARDING_TELEMETRY_EVENT: EventTypeOpts<{ }, }, }; + +export const OBSERVABILITY_ONBOARDING_FEEDBACK_TELEMETRY_EVENT: EventTypeOpts<{ + flow: string; + feedback: string; +}> = { + eventType: 'observability_onboarding_feedback', + schema: { + flow: { + type: 'keyword', + _meta: { + description: + "The current onboarding flow user is going through (e.g. 'system_logs', 'nginx'). If not present, user is on the landing screen.", + }, + }, + feedback: { + type: 'keyword', + _meta: { + description: 'The feedback the user left (e.g. positive, negative)', + }, + }, + }, +}; diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/header/custom_header.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/header/custom_header.tsx index bbd8b8aacf705..4dbde94c2f12b 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/header/custom_header.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/header/custom_header.tsx @@ -6,6 +6,7 @@ */ import { + EuiBetaBadge, EuiFlexGroup, EuiFlexItem, EuiPageTemplate, @@ -28,9 +29,16 @@ interface Props { euiIconType?: EuiIconType; headlineCopy: string; captionCopy: string; + isTechnicalPreview?: boolean; } -export function CustomHeader({ euiIconType, logo, headlineCopy, captionCopy }: Props) { +export function CustomHeader({ + euiIconType, + logo, + headlineCopy, + captionCopy, + isTechnicalPreview = false, +}: Props) { const theme = useEuiTheme(); const shadow = useEuiShadow('s'); return ( @@ -72,9 +80,31 @@ export function CustomHeader({ euiIconType, logo, headlineCopy, captionCopy }: P - -

      {headlineCopy}

      -
      + + +

      {headlineCopy}

      +
      + {isTechnicalPreview && ( + + )} +

      {captionCopy}

      diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/onboarding_flow_form/use_custom_cards_for_category.ts b/x-pack/plugins/observability_solution/observability_onboarding/public/application/onboarding_flow_form/use_custom_cards_for_category.ts index 39f3de40450e7..2a36869574ebf 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/onboarding_flow_form/use_custom_cards_for_category.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/onboarding_flow_form/use_custom_cards_for_category.ts @@ -23,7 +23,11 @@ export function useCustomCardsForCategory( const history = useHistory(); const location = useLocation(); const { - services: { application, http }, + services: { + application, + http, + context: { isServerless }, + }, } = useKibana(); const getUrlForApp = application?.getUrlForApp; @@ -32,6 +36,9 @@ export function useCustomCardsForCategory( const { href: otelLogsUrl } = reactRouterNavigate(history, `/otel-logs/${location.search}`); const { href: kubernetesUrl } = reactRouterNavigate(history, `/kubernetes/${location.search}`); + const apmUrl = `${getUrlForApp?.('apm')}/${isServerless ? 'onboarding' : 'tutorial'}`; + const otelApmUrl = isServerless ? `${apmUrl}?agent=openTelemetry` : apmUrl; + const otelCard: VirtualCard = { id: 'otel-logs', type: 'virtual', @@ -68,7 +75,7 @@ export function useCustomCardsForCategory( src: 'apmApp', }, ], - url: `${getUrlForApp?.('apm')}/onboarding` ?? '', + url: apmUrl, version: '', integration: '', }, @@ -85,7 +92,7 @@ export function useCustomCardsForCategory( src: http?.staticAssets.getPluginAssetHref('opentelemetry.svg') ?? '', }, ], - url: `${getUrlForApp?.('apm')}/onboarding?agent=openTelemetry` ?? '', + url: otelApmUrl, version: '', integration: '', }, diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/pages/otel_logs.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/pages/otel_logs.tsx index 53183b57e4b2a..0e4a8c1ad0ea6 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/pages/otel_logs.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/pages/otel_logs.tsx @@ -25,9 +25,11 @@ export const OtelLogsPage = () => ( captionCopy={i18n.translate( 'xpack.observability_onboarding.experimentalOnboardingFlow.customHeader.otel.description', { - defaultMessage: 'Collect logs and host metrics using the OTel collector.', + defaultMessage: + 'Collect logs and host metrics using the Elastic distribution of the OTel collector.', } )} + isTechnicalPreview={true} /> } > diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/auto_detect/auto_detect_panel.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/auto_detect/auto_detect_panel.tsx index 155333c4a1806..35014eb854495 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/auto_detect/auto_detect_panel.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/auto_detect/auto_detect_panel.tsx @@ -33,6 +33,7 @@ import { CopyToClipboardButton } from '../shared/copy_to_clipboard_button'; import { LocatorButtonEmpty } from '../shared/locator_button_empty'; import { GetStartedPanel } from '../shared/get_started_panel'; import { isSupportedLogo, LogoIcon } from '../../shared/logo_icon'; +import { FeedbackButtons } from '../shared/feedback_buttons'; export const AutoDetectPanel: FunctionComponent = () => { const { status, data, error, refetch, installedIntegrations } = useOnboardingFlow(); @@ -245,6 +246,7 @@ export const AutoDetectPanel: FunctionComponent = () => { }, ]} /> + ); }; diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/custom_logs/index.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/custom_logs/index.tsx index b1cac260e69f9..603c05d45dd8b 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/custom_logs/index.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/custom_logs/index.tsx @@ -14,6 +14,7 @@ import { createWizardContext, Step } from '../../../context/create_wizard_contex import { ConfigureLogs } from './configure_logs'; import { Inspect } from './inspect'; import { InstallElasticAgent } from './install_elastic_agent'; +import { FeedbackButtons } from '../shared/feedback_buttons'; interface WizardState { integrationName?: string; @@ -79,6 +80,7 @@ export const CustomLogsPanel: React.FC = () => { const { handler, exact } = customLogsRoutes[path]; return ; })} + ); diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/kubernetes/index.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/kubernetes/index.tsx index b3573e4cb2f1c..6af3e6a9f1817 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/kubernetes/index.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/kubernetes/index.tsx @@ -20,6 +20,7 @@ import { FETCH_STATUS, useFetcher } from '../../../hooks/use_fetcher'; import { EmptyPrompt } from '../shared/empty_prompt'; import { CommandSnippet } from './command_snippet'; import { DataIngestStatus } from './data_ingest_status'; +import { FeedbackButtons } from '../shared/feedback_buttons'; export const KubernetesPanel: React.FC = () => { const [windowLostFocus, setWindowLostFocus] = useState(false); @@ -80,6 +81,7 @@ export const KubernetesPanel: React.FC = () => { return ( + ); }; diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_logs/index.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_logs/index.tsx index f3f0766b999d4..d5101790a164a 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_logs/index.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_logs/index.tsx @@ -7,19 +7,14 @@ import React, { useEffect } from 'react'; import { - EuiBetaBadge, EuiButton, EuiCodeBlock, EuiFlexGroup, EuiFlexItem, - EuiModalBody, - EuiModalHeader, - EuiModalHeaderTitle, EuiPanel, EuiSpacer, EuiSteps, EuiText, - EuiIcon, EuiButtonGroup, EuiCopy, EuiLink, @@ -186,7 +181,7 @@ data: debug: verbosity: basic elasticsearch: - endpoints: + endpoints: - \${env:ES_ENDPOINT} api_key: \${env:ES_API_KEY} logs_dynamic_index: @@ -425,7 +420,7 @@ data: pipelines: logs: exporters: - - elasticsearch + - elasticsearch - debug processors: - k8sattributes @@ -551,10 +546,10 @@ spec: firstStepTitle: HOST_COMMAND, content: `arch=$(if ([[ $(arch) == "arm" || $(arch) == "aarch64" ]]); then echo "arm64"; else echo $(arch); fi) -curl --output elastic-distro-${agentVersion}-linux-$arch.tar.gz --url https://${AGENT_CDN_BASE_URL}/elastic-agent-${agentVersion}-linux-$arch.tar.gz --proto '=https' --tlsv1.2 -fOL && mkdir -p elastic-distro-${agentVersion}-linux-$arch && tar -xvf elastic-distro-${agentVersion}-linux-$arch.tar.gz -C "elastic-distro-${agentVersion}-linux-$arch" --strip-components=1 && cd elastic-distro-${agentVersion}-linux-$arch +curl --output elastic-distro-${agentVersion}-linux-$arch.tar.gz --url https://${AGENT_CDN_BASE_URL}/elastic-agent-${agentVersion}-linux-$arch.tar.gz --proto '=https' --tlsv1.2 -fOL && mkdir -p elastic-distro-${agentVersion}-linux-$arch && tar -xvf elastic-distro-${agentVersion}-linux-$arch.tar.gz -C "elastic-distro-${agentVersion}-linux-$arch" --strip-components=1 && cd elastic-distro-${agentVersion}-linux-$arch sudo setcap 'cap_dac_read_search=ep' ./data/elastic-agent-*/elastic-agent - + rm ./otel.yml && cp ./otel_samples/platformlogs_hostmetrics.yml ./otel.yml && mkdir -p ./data/otelcol && sed -i 's#\\\${env:STORAGE_DIR}#'"$PWD"/data/otelcol'#g' ./otel.yml && sed -i 's#\\\${env:ELASTIC_ENDPOINT}#${setup?.elasticsearchUrl}#g' ./otel.yml && sed -i 's/\\\${env:ELASTIC_API_KEY}/${apiKeyData?.apiKeyEncoded}/g' ./otel.yml`, start: './otelcol --config otel.yml', type: 'copy', @@ -565,8 +560,8 @@ rm ./otel.yml && cp ./otel_samples/platformlogs_hostmetrics.yml ./otel.yml && mk firstStepTitle: HOST_COMMAND, content: `arch=$(if [[ $(arch) == "arm64" ]]; then echo "aarch64"; else echo $(arch); fi) -curl --output elastic-distro-${agentVersion}-darwin-$arch.tar.gz --url https://${AGENT_CDN_BASE_URL}/elastic-agent-${agentVersion}-darwin-$arch.tar.gz --proto '=https' --tlsv1.2 -fOL && mkdir -p "elastic-distro-${agentVersion}-darwin-$arch" && tar -xvf elastic-distro-${agentVersion}-darwin-$arch.tar.gz -C "elastic-distro-${agentVersion}-darwin-$arch" --strip-components=1 && cd elastic-distro-${agentVersion}-darwin-$arch - +curl --output elastic-distro-${agentVersion}-darwin-$arch.tar.gz --url https://${AGENT_CDN_BASE_URL}/elastic-agent-${agentVersion}-darwin-$arch.tar.gz --proto '=https' --tlsv1.2 -fOL && mkdir -p "elastic-distro-${agentVersion}-darwin-$arch" && tar -xvf elastic-distro-${agentVersion}-darwin-$arch.tar.gz -C "elastic-distro-${agentVersion}-darwin-$arch" --strip-components=1 && cd elastic-distro-${agentVersion}-darwin-$arch + rm ./otel.yml && cp ./otel_samples/platformlogs_hostmetrics.yml ./otel.yml && mkdir -p ./data/otelcol && sed -i '' 's#\\\${env:STORAGE_DIR}#'"$PWD"/data/otelcol'#g' ./otel.yml && sed -i '' 's#\\\${env:ELASTIC_ENDPOINT}#${setup?.elasticsearchUrl}#g' ./otel.yml && sed -i '' 's/\\\${env:ELASTIC_API_KEY}/${apiKeyData?.apiKeyEncoded}/g' ./otel.yml`, start: './otelcol --config otel.yml', type: 'copy', @@ -578,350 +573,285 @@ rm ./otel.yml && cp ./otel_samples/platformlogs_hostmetrics.yml ./otel.yml && mk const selectedContent = installTabContents.find((tab) => tab.id === selectedTab)!; return ( - - - - - {http && ( - - - - - - )} - - - - - {i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.otelLogsModalHeaderTitleLabel', - { defaultMessage: 'OpenTelemetry' } + + + + {error && ( + + + + )} + + ({ + id, + label: name, + }))} + type="single" + idSelected={selectedTab} + onChange={(id: string) => { + setSelectedTab(id); + }} + /> + +

      {selectedContent.firstStepTitle}

      +
      + + + {selectedContent.content} + - - - + + {selectedContent.type === 'download' ? ( + + {i18n.translate( + 'xpack.observability_onboarding.installOtelCollector.configStep.downloadConfigButton', + { defaultMessage: 'Download manifest' } + )} + + ) : ( + + {(copy) => ( + + {i18n.translate( + 'xpack.observability_onboarding.installOtelCollector.configStep.copyCommand', + { defaultMessage: 'Copy to clipboard' } + )} + + )} + )} - tooltipPosition={'right'} - /> +
      - -

      - {i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.p.collectLogsWithOpenTelemetryLabel', - { - defaultMessage: - 'Collect logs and host metrics using the Elastic distribution of the OTel collector.', - } + ), + }, + { + title: i18n.translate('xpack.observability_onboarding.otelLogsPanel.steps.start', { + defaultMessage: 'Start the collector', + }), + children: ( + + - - - - - - - - - - {error && ( - - - - )} - - ({ - id, - label: name, - }))} - type="single" - idSelected={selectedTab} - onChange={(id: string) => { - setSelectedTab(id); - }} - /> - -

      {selectedContent.firstStepTitle}

      -
      - - - {selectedContent.content} - - - - - {selectedContent.type === 'download' ? ( - - {i18n.translate( - 'xpack.observability_onboarding.installOtelCollector.configStep.downloadConfigButton', - { defaultMessage: 'Download manifest' } - )} - - ) : ( - - {(copy) => ( - - {i18n.translate( - 'xpack.observability_onboarding.installOtelCollector.configStep.copyCommand', - { defaultMessage: 'Copy to clipboard' } - )} - - )} - - )} - - -
      - ), - }, - { - title: i18n.translate('xpack.observability_onboarding.otelLogsPanel.steps.start', { - defaultMessage: 'Start the collector', - }), - children: ( - - +

      + {i18n.translate( + 'xpack.observability_onboarding.otelLogsPanel.historicalDataDescription', + { + defaultMessage: 'New log messages are collected from the setup onward.', + } )} - color="warning" - iconType="iInCircle" - > +

      + {selectedTab !== 'kubernetes' && (

      {i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.historicalDataDescription', + 'xpack.observability_onboarding.otelLogsPanel.historicalDataDescription2', { - defaultMessage: 'New log messages are collected from the setup onward.', + defaultMessage: + 'The default log path is /var/log/*. You can change this path in the otel.yml file if needed.', } )}

      - {selectedTab !== 'kubernetes' && ( + )} +
      + + {selectedContent.prompt} + {selectedContent.start && ( + <> +

      {i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.historicalDataDescription2', + 'xpack.observability_onboarding.otelLogsPanel.p.startTheCollectorLabel', { - defaultMessage: - 'The default log path is /var/log/*. You can change this path in the otel.yml file if needed.', + defaultMessage: 'Run the following command to start the collector', } )}

      +
      + + + )} +
      + ), + }, + { + title: i18n.translate( + 'xpack.observability_onboarding.otelLogsPanel.steps.visualize', + { + defaultMessage: 'Visualize your data', + } + ), + children: ( + <> + +

      + {i18n.translate( + 'xpack.observability_onboarding.otelLogsPanel.waitForTheDataLabel', + { + defaultMessage: + 'After running the previous command, come back and view your data.', + } )} - - - {selectedContent.prompt} - {selectedContent.start && ( - <> - -

      +

      +
      + + + + + + + + {deeplinks?.logs && ( + <> + + + {i18n.translate( + 'xpack.observability_onboarding.otelLogsPanel.viewAndAnalyzeYourTextLabel', + { defaultMessage: 'View and analyze your logs' } + )} + + + + + {i18n.translate( + 'xpack.observability_onboarding.otelLogsPanel.exploreLogs', + { + defaultMessage: 'Open Logs Explorer', + } + )} + + + + )} + + {deeplinks?.metrics && ( + <> + + + {i18n.translate( + 'xpack.observability_onboarding.otelLogsPanel.viewAndAnalyzeYourMetricsTextLabel', + { defaultMessage: 'View and analyze your metrics' } + )} + + + + + {i18n.translate( + 'xpack.observability_onboarding.otelLogsPanel.exploreMetrics', + { + defaultMessage: 'Open Hosts', + } + )} + + + + )} + + + + + + {i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.p.startTheCollectorLabel', - { - defaultMessage: 'Run the following command to start the collector', - } + 'xpack.observability_onboarding.otelLogsPanel.documentationLink', + { defaultMessage: 'Open documentation' } )} -

      -
      - - - )} -
      - ), - }, - { - title: i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.steps.visualize', - { - defaultMessage: 'Visualize your data', - } - ), - children: ( - <> - -

      - {i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.waitForTheDataLabel', - { - defaultMessage: - 'After running the previous command, come back and view your data.', - } - )} -

      -
      - - - - - - - - {deeplinks?.logs && ( - <> - - - {i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.viewAndAnalyzeYourTextLabel', - { defaultMessage: 'View and analyze your logs' } - )} - - - - - {i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.exploreLogs', - { - defaultMessage: 'Open Logs Explorer', - } - )} - - - - )} - - {deeplinks?.metrics && ( - <> - - - {i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.viewAndAnalyzeYourMetricsTextLabel', - { defaultMessage: 'View and analyze your metrics' } - )} - - - - - {i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.exploreMetrics', - { - defaultMessage: 'Open Hosts', - } - )} - - - - )} - - - - - - - {i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.documentationLink', - { defaultMessage: 'Open documentation' } - )} - - ), - }} - /> - - - ), - }, - ]} - /> - + + ), + }} + /> +
      + + ), + }, + ]} + /> + - - - - {i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.feedbackButtons.label', - { - defaultMessage: 'Was this helpful or were there any problems?', - } - )} - - + + + + {i18n.translate( + 'xpack.observability_onboarding.otelLogsPanel.feedbackButtons.label', + { + defaultMessage: 'Was this helpful or were there any problems?', + } + )} + + - - - {i18n.translate( - 'xpack.observability_onboarding.otelLogsPanel.feedbackButtons.title', - { - defaultMessage: 'Give feedback', - } - )} - - - + + + {i18n.translate( + 'xpack.observability_onboarding.otelLogsPanel.feedbackButtons.title', + { + defaultMessage: 'Give feedback', + } + )} + + - +
      ); }; diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/shared/feedback_buttons.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/shared/feedback_buttons.tsx new file mode 100644 index 0000000000000..bf81ab02813d0 --- /dev/null +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/shared/feedback_buttons.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 React from 'react'; +import { i18n } from '@kbn/i18n'; +import { + EuiButtonEmpty, + EuiFlexGroup, + EuiFlexItem, + EuiText, + EuiHorizontalRule, +} from '@elastic/eui'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { OBSERVABILITY_ONBOARDING_FEEDBACK_TELEMETRY_EVENT } from '../../../../common/telemetry_events'; + +export type Feedback = 'positive' | 'negative'; + +const THANK_YOU_MESSAGE = i18n.translate( + 'xpack.observability_onboarding.feedbackButtons.em.thanksForYourFeedbackLabel', + { defaultMessage: 'Thanks for your feedback!' } +); + +export function FeedbackButtons({ flow }: { flow: string }) { + const { notifications, analytics } = useKibana().services; + + const handleClick = (feedback: Feedback) => { + analytics?.reportEvent(OBSERVABILITY_ONBOARDING_FEEDBACK_TELEMETRY_EVENT.eventType, { + flow, + feedback, + }); + notifications?.toasts.addSuccess(THANK_YOU_MESSAGE); + }; + + return ( + <> + + + + + + {i18n.translate('xpack.observability_onboarding.insight.feedbackButtons.title', { + defaultMessage: 'Was this helpful?', + })} + + + + + + + + handleClick('positive')} + > + {i18n.translate('xpack.observability_onboarding.insight.feedbackButtons.positive', { + defaultMessage: 'Yes', + })} + + + + + handleClick('negative')} + > + {i18n.translate('xpack.observability_onboarding.insight.feedbackButtons.negative', { + defaultMessage: 'No', + })} + + + + + + + ); +} 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 abc3e5af26765..ba745514c99c6 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/plugin.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/plugin.ts @@ -33,7 +33,10 @@ import { PLUGIN_ID } from '../common'; import { ObservabilityOnboardingLocatorDefinition } from './locators/onboarding_locator/locator_definition'; import { ObservabilityOnboardingPluginLocators } from './locators'; import { ConfigSchema } from '.'; -import { OBSERVABILITY_ONBOARDING_TELEMETRY_EVENT } from '../common/telemetry_events'; +import { + OBSERVABILITY_ONBOARDING_FEEDBACK_TELEMETRY_EVENT, + OBSERVABILITY_ONBOARDING_TELEMETRY_EVENT, +} from '../common/telemetry_events'; export type ObservabilityOnboardingPluginSetup = void; export type ObservabilityOnboardingPluginStart = void; @@ -122,6 +125,7 @@ export class ObservabilityOnboardingPlugin }; core.analytics.registerEventType(OBSERVABILITY_ONBOARDING_TELEMETRY_EVENT); + core.analytics.registerEventType(OBSERVABILITY_ONBOARDING_FEEDBACK_TELEMETRY_EVENT); return { locators: this.locators, diff --git a/x-pack/plugins/observability_solution/observability_onboarding/server/lib/get_fallback_urls.ts b/x-pack/plugins/observability_solution/observability_onboarding/server/lib/get_fallback_urls.ts index 15185521563a1..22cdcf34f99fe 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/server/lib/get_fallback_urls.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/server/lib/get_fallback_urls.ts @@ -11,9 +11,11 @@ import { EsLegacyConfigService } from '../services/es_legacy_config_service'; export function getKibanaUrl(coreSetup: CoreSetup, cloudSetup?: CloudSetup) { return ( + // falls back to local network binding + // then cloud id coreSetup.http.basePath.publicBaseUrl ?? // priority given to server.publicBaseUrl - cloudSetup?.kibanaUrl ?? // then cloud id - getFallbackKibanaUrl(coreSetup) // falls back to local network binding + cloudSetup?.kibanaUrl ?? + getFallbackKibanaUrl(coreSetup) ); } diff --git a/x-pack/plugins/observability_solution/observability_onboarding/server/routes/register_routes.ts b/x-pack/plugins/observability_solution/observability_onboarding/server/routes/register_routes.ts index 9603d97e63faa..8fe51623510eb 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/server/routes/register_routes.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/server/routes/register_routes.ts @@ -9,10 +9,12 @@ import Boom from '@hapi/boom'; import type { IKibanaResponse } from '@kbn/core/server'; import { CoreSetup, Logger, RouteRegistrar } from '@kbn/core/server'; import { + IoTsParamsObject, ServerRouteRepository, decodeRequestParams, + stripNullishRequestParameters, parseEndpoint, - routeValidationObject, + passThroughValidationObject, } from '@kbn/server-route-repository'; import * as t from 'io-ts'; import { ObservabilityOnboardingConfig } from '..'; @@ -52,18 +54,18 @@ export function registerRoutes({ (router[method] as RouteRegistrar)( { path: pathname, - validate: routeValidationObject, + validate: passThroughValidationObject, options, }, async (context, request, response) => { try { const decodedParams = decodeRequestParams( - { + stripNullishRequestParameters({ params: request.params, body: request.body, query: request.query, - }, - params ?? t.strict({}) + }), + (params as IoTsParamsObject) ?? t.strict({}) ); const data = (await handler({ diff --git a/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/hooks/use_group_name.ts b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/hooks/use_group_name.ts index ca6ddff88fb19..ba19459d4dded 100644 --- a/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/hooks/use_group_name.ts +++ b/x-pack/plugins/observability_solution/slo/public/pages/slos/components/grouped_slos/hooks/use_group_name.ts @@ -54,7 +54,7 @@ export function useGroupName(groupBy: GroupByField, group: string, summary?: Gro function flattenObject(obj: Record, parentKey = '', result: Record = {}) { for (const key in obj) { - if (obj.hasOwnProperty(key)) { + if (Object.hasOwn(obj, key)) { const newKey = parentKey ? `${parentKey}.${key}` : key; if (typeof obj[key] === 'object' && obj[key] !== null) { flattenObject(obj[key], newKey, result); diff --git a/x-pack/plugins/observability_solution/slo/server/routes/register_routes.ts b/x-pack/plugins/observability_solution/slo/server/routes/register_routes.ts index 8ddabede0d190..6a7d2d08bdd1b 100644 --- a/x-pack/plugins/observability_solution/slo/server/routes/register_routes.ts +++ b/x-pack/plugins/observability_solution/slo/server/routes/register_routes.ts @@ -14,9 +14,11 @@ import { RuleRegistryPluginSetupContract, } from '@kbn/rule-registry-plugin/server'; import { + IoTsParamsObject, decodeRequestParams, + stripNullishRequestParameters, parseEndpoint, - routeValidationObject, + passThroughValidationObject, } from '@kbn/server-route-repository'; import { SpacesPluginStart } from '@kbn/spaces-plugin/server'; import axios from 'axios'; @@ -59,18 +61,18 @@ export function registerRoutes({ config, repository, core, logger, dependencies (router[method] as RouteRegistrar)( { path: pathname, - validate: routeValidationObject, + validate: passThroughValidationObject, options, }, async (context, request, response) => { try { const decodedParams = decodeRequestParams( - { + stripNullishRequestParameters({ params: request.params, body: request.body, query: request.query, - }, - params ?? t.strict({}) + }), + (params as IoTsParamsObject) ?? t.strict({}) ); const data = await handler({ diff --git a/x-pack/plugins/observability_solution/synthetics/common/constants/synthetics_alerts.ts b/x-pack/plugins/observability_solution/synthetics/common/constants/synthetics_alerts.ts index 620c5c88033a7..4f525bda17564 100644 --- a/x-pack/plugins/observability_solution/synthetics/common/constants/synthetics_alerts.ts +++ b/x-pack/plugins/observability_solution/synthetics/common/constants/synthetics_alerts.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { ActionGroup } from '@kbn/alerting-plugin/common'; +import type { ActionGroup } from '@kbn/alerting-plugin/common'; import { i18n } from '@kbn/i18n'; export type MonitorStatusActionGroup = diff --git a/x-pack/plugins/observability_solution/synthetics/common/runtime_types/monitor_management/state.ts b/x-pack/plugins/observability_solution/synthetics/common/runtime_types/monitor_management/state.ts index 9fbda10dfba56..0c546eb431dea 100644 --- a/x-pack/plugins/observability_solution/synthetics/common/runtime_types/monitor_management/state.ts +++ b/x-pack/plugins/observability_solution/synthetics/common/runtime_types/monitor_management/state.ts @@ -34,6 +34,7 @@ export const FetchMonitorOverviewQueryArgsCodec = t.partial({ projects: t.array(t.string), schedules: t.array(t.string), monitorTypes: t.array(t.string), + monitorQueryIds: t.array(t.string), sortField: t.string, sortOrder: t.string, }); diff --git a/x-pack/plugins/observability_solution/synthetics/common/runtime_types/ping/ping.ts b/x-pack/plugins/observability_solution/synthetics/common/runtime_types/ping/ping.ts index 5d481038b0869..2e9e36460c7be 100644 --- a/x-pack/plugins/observability_solution/synthetics/common/runtime_types/ping/ping.ts +++ b/x-pack/plugins/observability_solution/synthetics/common/runtime_types/ping/ping.ts @@ -16,7 +16,7 @@ export const PingErrorType = t.intersection([ t.partial({ code: t.string, id: t.string, - stack_trace: t.string, + stack_trace: t.union([t.string, t.null]), type: t.string, }), t.type({ diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/field_selector.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/field_selector.tsx new file mode 100644 index 0000000000000..0bb37e6c4e736 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/field_selector.tsx @@ -0,0 +1,128 @@ +/* + * 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, { ReactNode, useState } from 'react'; +import { EuiComboBox, EuiComboBoxOptionOption, EuiFlexItem, EuiFormRow } from '@elastic/eui'; +import { debounce } from 'lodash'; +import { Controller, FieldPath, useFormContext } from 'react-hook-form'; +import { + Suggestion, + useFetchSyntheticsSuggestions, +} from '../hooks/use_fetch_synthetics_suggestions'; +import { OptionalText } from './optional_text'; +import { MonitorFilters } from '../monitors_overview/types'; + +interface Option { + label: string; + value: string; +} + +export interface Props { + dataTestSubj: string; + label: string; + name: FieldPath; + placeholder: string; + tooltip?: ReactNode; + suggestions?: Suggestion[]; + isLoading?: boolean; + required?: boolean; +} + +export function FieldSelector({ + dataTestSubj, + label, + name, + placeholder, + tooltip, + required, +}: Props) { + const { control, getFieldState } = useFormContext(); + const [search, setSearch] = useState(''); + + const { suggestions = [], isLoading } = useFetchSyntheticsSuggestions({ + search, + fieldName: name, + }); + + const debouncedSearch = debounce((value) => setSearch(value), 200); + + return ( + + + {label} {tooltip} +
      + ) : ( + label + ) + } + isInvalid={getFieldState(name).invalid} + fullWidth + labelAppend={!required ? : undefined} + > + { + const selectedOptions = + !!Array.isArray(field.value) && field.value.length + ? createSelectedOptions(field.value, suggestions) + : []; + + return ( + { + if (selected.length) { + field.onChange( + selected.map((option) => ({ + label: option.label, + value: option.value, + })) + ); + return; + } + field.onChange([]); + }} + onSearchChange={(value: string) => debouncedSearch(value)} + options={createOptions(suggestions)} + placeholder={placeholder} + selectedOptions={selectedOptions} + /> + ); + }} + /> + + + ); +} + +function createOptions(suggestions: Suggestion[] = []): Option[] { + return suggestions + .map((suggestion) => ({ label: suggestion.label, value: suggestion.value })) + .sort((a, b) => String(a.label).localeCompare(b.label)); +} + +function createSelectedOptions(selected: Option[] = [], suggestions: Suggestion[] = []): Option[] { + return selected.map((value) => { + const suggestion = suggestions.find((s) => s.value === value.value); + if (!suggestion) { + return { label: value.value, value: value.value }; + } + return { label: suggestion.label, value: suggestion.value }; + }); +} diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/monitor_configuration.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/monitor_configuration.tsx new file mode 100644 index 0000000000000..24995e898b3a1 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/monitor_configuration.tsx @@ -0,0 +1,120 @@ +/* + * 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 { + EuiButton, + EuiButtonEmpty, + EuiFlexGroup, + EuiFlexItem, + EuiFlyout, + EuiFlyoutHeader, + EuiFlyoutBody, + EuiFlyoutFooter, + EuiTitle, +} from '@elastic/eui'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { i18n } from '@kbn/i18n'; +import { FormProvider, useForm } from 'react-hook-form'; +import { MonitorFilters } from '../monitors_overview/types'; +import { MonitorFiltersForm } from './monitor_filters_form'; + +interface MonitorConfigurationProps { + initialInput?: { + filters: MonitorFilters; + }; + onCreate: (props: { filters: MonitorFilters }) => void; + onCancel: () => void; +} + +export function MonitorConfiguration({ + initialInput, + onCreate, + onCancel, +}: MonitorConfigurationProps) { + const methods = useForm({ + defaultValues: { + monitorIds: [], + projects: [], + tags: [], + monitorTypes: [], + locations: [], + }, + values: initialInput?.filters, + mode: 'all', + }); + const { getValues, formState } = methods; + + const onConfirmClick = () => { + const newFilters = getValues(); + onCreate({ + filters: newFilters, + }); + }; + + return ( + + + + + +

      + {i18n.translate( + 'xpack.synthetics.overviewEmbeddable.config.sloSelector.headerTitle', + { + defaultMessage: 'Overview configuration', + } + )} +

      +
      +
      +
      +
      + + <> + + + + + + + + + + + + + + + + + + + + + + + + + +
      + ); +} diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/monitor_filters_form.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/monitor_filters_form.tsx new file mode 100644 index 0000000000000..80d2f3aa072cd --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/monitor_filters_form.tsx @@ -0,0 +1,94 @@ +/* + * 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 { EuiFlexGroup, EuiIconTip } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React from 'react'; +import { FieldSelector } from './field_selector'; + +export function MonitorFiltersForm() { + return ( + + + + } + /> + + + + + + + ); +} diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/monitors_open_configuration.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/monitors_open_configuration.tsx new file mode 100644 index 0000000000000..48dbcb085b806 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/monitors_open_configuration.tsx @@ -0,0 +1,59 @@ +/* + * 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 type { CoreStart } from '@kbn/core/public'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { toMountPoint } from '@kbn/react-kibana-mount'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { MonitorFilters } from '../monitors_overview/types'; +import { ClientPluginsStart } from '../../../plugin'; +import { MonitorConfiguration } from './monitor_configuration'; + +export async function openMonitorConfiguration({ + coreStart, + pluginStart, + initialState, +}: { + coreStart: CoreStart; + pluginStart: ClientPluginsStart; + initialState?: { filters: MonitorFilters }; +}): Promise<{ filters: MonitorFilters }> { + const { overlays } = coreStart; + const queryClient = new QueryClient(); + return new Promise(async (resolve, reject) => { + try { + const flyoutSession = overlays.openFlyout( + toMountPoint( + + + { + flyoutSession.close(); + resolve(update); + }} + onCancel={() => { + flyoutSession.close(); + reject(); + }} + /> + + , + coreStart + ) + ); + } catch (error) { + reject(error); + } + }); +} diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/optional_text.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/optional_text.tsx new file mode 100644 index 0000000000000..28bd67301af16 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/optional_text.tsx @@ -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 { EuiText } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React from 'react'; + +export function OptionalText() { + return ( + + {i18n.translate('xpack.synthetics.formEdit.optionalLabel', { + defaultMessage: 'Optional', + })} + + ); +} diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/show_selected_filters.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/show_selected_filters.tsx new file mode 100644 index 0000000000000..0a6f6ab515d94 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/common/show_selected_filters.tsx @@ -0,0 +1,53 @@ +/* + * 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 { i18n } from '@kbn/i18n'; +import { EuiBadgeGroup, EuiBadge } from '@elastic/eui'; +import { MonitorFilters } from '../monitors_overview/types'; + +export const ShowSelectedFilters = ({ filters }: { filters: MonitorFilters }) => { + return ( + + {Object.entries(filters).map(([key, filter]) => { + if (!filter || !filter.length) { + return null; + } + const values = filter + .map((f: { label: string; value: string }) => f.label || f.value) + .join(', '); + + return ( + + {i18n.translate('xpack.synthetics.showSelectedFilters.monitorBadgeLabel', { + defaultMessage: '{label}: {value}', + values: { label: labels[key], value: values }, + })} + + ); + })} + + ); +}; + +const labels: Record = { + monitorIds: i18n.translate('xpack.synthetics.showSelectedFilters.monitorIdLabel', { + defaultMessage: 'Monitor', + }), + tags: i18n.translate('xpack.synthetics.showSelectedFilters.tagsLabel', { + defaultMessage: 'Tags', + }), + locations: i18n.translate('xpack.synthetics.showSelectedFilters.locationsLabel', { + defaultMessage: 'Location', + }), + monitorTypes: i18n.translate('xpack.synthetics.showSelectedFilters.monitorTypeLabel', { + defaultMessage: 'Type', + }), + projects: i18n.translate('xpack.synthetics.showSelectedFilters.presetLabel', { + defaultMessage: 'Project', + }), +}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/constants.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/constants.ts index b471d46ac3832..5afcf2d3026b4 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/constants.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/constants.ts @@ -5,4 +5,22 @@ * 2.0. */ -export const SYNTHETICS_OVERVIEW_EMBEDDABLE = 'SYNTHETICS_OVERVIEW_EMBEDDABLE'; +import { i18n } from '@kbn/i18n'; + +export const SYNTHETICS_STATS_OVERVIEW_EMBEDDABLE = 'SYNTHETICS_STATS_OVERVIEW_EMBEDDABLE'; +export const SYNTHETICS_MONITORS_EMBEDDABLE = 'SYNTHETICS_MONITORS_EMBEDDABLE'; + +export const COMMON_SYNTHETICS_GROUPING = [ + { + id: 'synthetics', + getDisplayName: () => + i18n.translate('xpack.synthetics.common.constants.grouping.legacy', { + defaultMessage: 'Synthetics', + }), + getIconType: () => { + return 'online'; + }, + }, +]; + +export const ALL_VALUE = '*'; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/hooks/use_fetch_synthetics_suggestions.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/hooks/use_fetch_synthetics_suggestions.ts new file mode 100644 index 0000000000000..b9f838675bce4 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/hooks/use_fetch_synthetics_suggestions.ts @@ -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 { useFetcher } from '@kbn/observability-shared-plugin/public'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { ClientPluginsStart } from '../../../plugin'; + +export interface Suggestion { + label: string; + value: string; + count: number; +} + +export interface Params { + fieldName: string; + filters?: { + locations?: string[]; + monitorIds?: string[]; + tags?: string[]; + projects?: string[]; + }; + search: string; +} + +type ApiResponse = Record; + +export function useFetchSyntheticsSuggestions({ filters, fieldName, search }: Params) { + const { http } = useKibana().services; + const { locations, monitorIds, tags, projects } = filters || {}; + + const { loading, data } = useFetcher(async () => { + return await http.get('/internal/synthetics/suggestions', { + query: { + locations: locations || [], + monitorQueryIds: monitorIds || [], + tags: tags || [], + projects: projects || [], + query: search, + }, + }); + }, [http, locations, monitorIds, projects, search, tags]); + + return { + suggestions: data?.[fieldName] ?? [], + isLoading: Boolean(loading), + }; +} diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/status_overview/status_overview_embeddable_factory.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/monitors_overview/monitors_embeddable_factory.tsx similarity index 57% rename from x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/status_overview/status_overview_embeddable_factory.tsx rename to x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/monitors_overview/monitors_embeddable_factory.tsx index 3f7b3fcf13699..e23de3cc67a14 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/status_overview/status_overview_embeddable_factory.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/monitors_overview/monitors_embeddable_factory.tsx @@ -5,9 +5,8 @@ * 2.0. */ -import { i18n } from '@kbn/i18n'; - import React, { useEffect } from 'react'; +import { i18n } from '@kbn/i18n'; import { DefaultEmbeddableApi, ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; import { initializeTitles, @@ -16,25 +15,30 @@ import { PublishesWritablePanelTitle, PublishesPanelTitle, SerializedTitles, + HasEditCapabilities, } from '@kbn/presentation-publishing'; import { BehaviorSubject, Subject } from 'rxjs'; import type { StartServicesAccessor } from '@kbn/core-lifecycle-browser'; -import { SYNTHETICS_OVERVIEW_EMBEDDABLE } from '../constants'; +import { MonitorFilters } from './types'; +import { StatusGridComponent } from './monitors_grid_component'; +import { SYNTHETICS_MONITORS_EMBEDDABLE } from '../constants'; import { ClientPluginsStart } from '../../../plugin'; -import { StatusOverviewComponent } from './status_overview_component'; export const getOverviewPanelTitle = () => - i18n.translate('xpack.synthetics.statusOverview.displayName', { - defaultMessage: 'Synthetics Status Overview', + i18n.translate('xpack.synthetics.monitors.displayName', { + defaultMessage: 'Synthetics Monitors', }); -export type OverviewEmbeddableState = SerializedTitles; +export type OverviewEmbeddableState = SerializedTitles & { + filters: MonitorFilters; +}; export type StatusOverviewApi = DefaultEmbeddableApi & PublishesWritablePanelTitle & - PublishesPanelTitle; + PublishesPanelTitle & + HasEditCapabilities; -export const getStatusOverviewEmbeddableFactory = ( +export const getMonitorsEmbeddableFactory = ( getStartServices: StartServicesAccessor ) => { const factory: ReactEmbeddableFactory< @@ -42,29 +46,57 @@ export const getStatusOverviewEmbeddableFactory = ( OverviewEmbeddableState, StatusOverviewApi > = { - type: SYNTHETICS_OVERVIEW_EMBEDDABLE, + type: SYNTHETICS_MONITORS_EMBEDDABLE, deserializeState: (state) => { return state.rawState as OverviewEmbeddableState; }, buildEmbeddable: async (state, buildApi, uuid, parentApi) => { + const [coreStart, pluginStart] = await getStartServices(); + const { titlesApi, titleComparators, serializeTitles } = initializeTitles(state); const defaultTitle$ = new BehaviorSubject(getOverviewPanelTitle()); const reload$ = new Subject(); + const filters$ = new BehaviorSubject(state.filters); const api = buildApi( { ...titlesApi, defaultPanelTitle: defaultTitle$, + getTypeDisplayName: () => + i18n.translate('xpack.synthetics.editSloOverviewEmbeddableTitle.typeDisplayName', { + defaultMessage: 'filters', + }), + isEditingEnabled: () => true, serializeState: () => { return { rawState: { ...serializeTitles(), + filters: filters$.getValue(), }, }; }, + onEdit: async () => { + try { + const { openMonitorConfiguration } = await import( + '../common/monitors_open_configuration' + ); + + const result = await openMonitorConfiguration({ + coreStart, + pluginStart, + initialState: { + filters: filters$.getValue(), + }, + }); + filters$.next(result.filters); + } catch (e) { + return Promise.reject(); + } + }, }, { ...titleComparators, + filters: [filters$, (value) => filters$.next(value)], } ); @@ -77,7 +109,7 @@ export const getStatusOverviewEmbeddableFactory = ( return { api, Component: () => { - const [] = useBatchedPublishingSubjects(); + const [filters] = useBatchedPublishingSubjects(filters$); useEffect(() => { return () => { @@ -86,9 +118,14 @@ export const getStatusOverviewEmbeddableFactory = ( }, []); return (
      - +
      ); }, diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/monitors_overview/monitors_grid_component.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/monitors_overview/monitors_grid_component.tsx new file mode 100644 index 0000000000000..c3801bb98ca9a --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/monitors_overview/monitors_grid_component.tsx @@ -0,0 +1,60 @@ +/* + * 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, { useEffect, useRef } from 'react'; +import { Subject } from 'rxjs'; +import { i18n } from '@kbn/i18n'; +import { useDispatch } from 'react-redux'; +import { getOverviewStore } from './redux_store'; +import { ShowSelectedFilters } from '../common/show_selected_filters'; +import { setOverviewPageStateAction } from '../../synthetics/state'; +import { MonitorFilters } from './types'; +import { EmbeddablePanelWrapper } from '../../synthetics/components/common/components/embeddable_panel_wrapper'; +import { SyntheticsEmbeddableContext } from '../synthetics_embeddable_context'; +import { OverviewGrid } from '../../synthetics/components/monitors_page/overview/overview/overview_grid'; + +export const StatusGridComponent = ({ + reload$, + filters, +}: { + reload$: Subject; + filters: MonitorFilters; +}) => { + const overviewStore = useRef(getOverviewStore()); + + return ( + } + > + + + + + ); +}; + +const MonitorsOverviewList = ({ filters }: { filters: MonitorFilters }) => { + const dispatch = useDispatch(); + useEffect(() => { + if (!filters) return; + dispatch( + setOverviewPageStateAction({ + tags: filters.tags.map((tag) => tag.value), + locations: filters.locations.map((location) => location.value), + monitorTypes: filters.monitorTypes.map((monitorType) => monitorType.value), + monitorQueryIds: filters.monitorIds.map((monitorId) => monitorId.value), + projects: filters.projects.map((project) => project.value), + }) + ); + }, [dispatch, filters]); + + return ; +}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/monitors_overview/redux_store.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/monitors_overview/redux_store.ts new file mode 100644 index 0000000000000..86bdd93311674 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/monitors_overview/redux_store.ts @@ -0,0 +1,25 @@ +/* + * 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 { configureStore } from '@reduxjs/toolkit'; +import createSagaMiddleware from 'redux-saga'; +import { rootReducer } from '../../synthetics/state/root_reducer'; +import { rootEffect } from '../../synthetics/state/root_effect'; + +export const getOverviewStore = () => { + const sagaMW = createSagaMiddleware(); + + const store = configureStore({ + reducer: rootReducer, + middleware: (getDefaultMiddleware) => getDefaultMiddleware({ thunk: false }).concat(sagaMW), + devTools: process.env.NODE_ENV !== 'production', + preloadedState: {}, + enhancers: [], + }); + sagaMW.run(rootEffect); + return store; +}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/monitors_overview/types.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/monitors_overview/types.ts new file mode 100644 index 0000000000000..e8d1c71ee7d11 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/monitors_overview/types.ts @@ -0,0 +1,19 @@ +/* + * 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. + */ + +interface Option { + label: string; + value: string; +} + +export interface MonitorFilters { + projects: Option[]; + tags: Option[]; + monitorIds: Option[]; + monitorTypes: Option[]; + locations: Option[]; +} diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/register_embeddables.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/register_embeddables.ts index fbc516a6f611b..3491df4dfc96f 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/register_embeddables.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/register_embeddables.ts @@ -7,42 +7,54 @@ import { CoreSetup } from '@kbn/core-lifecycle-browser'; -import { ADD_PANEL_TRIGGER } from '@kbn/ui-actions-browser/src'; -import { createStatusOverviewPanelAction } from './ui_actions/create_overview_panel_action'; import { ClientPluginsSetup, ClientPluginsStart } from '../../plugin'; -import { SYNTHETICS_OVERVIEW_EMBEDDABLE } from './constants'; +import { SYNTHETICS_MONITORS_EMBEDDABLE, SYNTHETICS_STATS_OVERVIEW_EMBEDDABLE } from './constants'; export const registerSyntheticsEmbeddables = ( core: CoreSetup, pluginsSetup: ClientPluginsSetup ) => { pluginsSetup.embeddable.registerReactEmbeddableFactory( - SYNTHETICS_OVERVIEW_EMBEDDABLE, + SYNTHETICS_STATS_OVERVIEW_EMBEDDABLE, async () => { - const { getStatusOverviewEmbeddableFactory } = await import( - './status_overview/status_overview_embeddable_factory' + const { getStatsOverviewEmbeddableFactory } = await import( + './stats_overview/stats_overview_embeddable_factory' ); - return getStatusOverviewEmbeddableFactory(core.getStartServices); + return getStatsOverviewEmbeddableFactory(core.getStartServices); } ); - const { uiActions, cloud, serverless } = pluginsSetup; - - // Initialize actions - const addOverviewPanelAction = createStatusOverviewPanelAction(); + pluginsSetup.embeddable.registerReactEmbeddableFactory( + SYNTHETICS_MONITORS_EMBEDDABLE, + async () => { + const { getMonitorsEmbeddableFactory } = await import( + './monitors_overview/monitors_embeddable_factory' + ); + return getMonitorsEmbeddableFactory(core.getStartServices); + } + ); core.getStartServices().then(([_, pluginsStart]) => { pluginsStart.dashboard.registerDashboardPanelPlacementSetting( - SYNTHETICS_OVERVIEW_EMBEDDABLE, + SYNTHETICS_STATS_OVERVIEW_EMBEDDABLE, () => { return { width: 10, height: 8 }; } ); + pluginsStart.dashboard.registerDashboardPanelPlacementSetting( + SYNTHETICS_MONITORS_EMBEDDABLE, + () => { + return { width: 30, height: 12 }; + } + ); }); - // Assign triggers - // Only register these actions in stateful kibana, and the serverless observability project - if (Boolean((serverless && cloud?.serverless.projectType === 'observability') || !serverless)) { - uiActions.addTriggerAction(ADD_PANEL_TRIGGER, addOverviewPanelAction); - } + const registerAsyncUiActions = async () => { + if (pluginsSetup.uiActions) { + const { registerSyntheticsUiActions } = await import('./ui_actions/register_ui_actions'); + registerSyntheticsUiActions(core, pluginsSetup); + } + }; + // can be done async + registerAsyncUiActions(); }; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/stats_overview/redux_store.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/stats_overview/redux_store.ts new file mode 100644 index 0000000000000..8192b9a787ac7 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/stats_overview/redux_store.ts @@ -0,0 +1,26 @@ +/* + * 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 { configureStore } from '@reduxjs/toolkit'; +import createSagaMiddleware from 'redux-saga'; +import { rootReducer } from '../../synthetics/state/root_reducer'; +import { rootEffect } from '../../synthetics/state/root_effect'; + +export const getStatsOverviewStore = () => { + const sagaMW = createSagaMiddleware(); + + const store = configureStore({ + reducer: rootReducer, + middleware: (getDefaultMiddleware) => getDefaultMiddleware({ thunk: false }).concat(sagaMW), + devTools: process.env.NODE_ENV !== 'production', + preloadedState: {}, + enhancers: [], + }); + sagaMW.run(rootEffect); + + return store; +}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/stats_overview/stats_overview_component.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/stats_overview/stats_overview_component.tsx new file mode 100644 index 0000000000000..579596615ae72 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/stats_overview/stats_overview_component.tsx @@ -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 React, { useEffect, useRef } from 'react'; +import { Subject } from 'rxjs'; +import { useDispatch } from 'react-redux'; +import { getStatsOverviewStore } from './redux_store'; +import { ShowSelectedFilters } from '../common/show_selected_filters'; +import { MonitorFilters } from '../monitors_overview/types'; +import { setOverviewPageStateAction } from '../../synthetics/state'; +import { SyntheticsEmbeddableContext } from '../synthetics_embeddable_context'; +import { OverviewStatus } from '../../synthetics/components/monitors_page/overview/overview/overview_status'; + +export const StatsOverviewComponent = ({ + reload$, + filters, +}: { + reload$: Subject; + filters: MonitorFilters; +}) => { + const statsOverviewStore = useRef(getStatsOverviewStore()); + + return ( + + + + ); +}; + +const WithFiltersComponent = ({ filters }: { filters: MonitorFilters }) => { + const dispatch = useDispatch(); + useEffect(() => { + dispatch( + setOverviewPageStateAction({ + tags: filters.tags.map((tag) => tag.value), + locations: filters.locations.map((location) => location.value), + monitorTypes: filters.monitorTypes.map((monitorType) => monitorType.value), + monitorQueryIds: filters.monitorIds.map((monitorId) => monitorId.value), + projects: filters.projects.map((project) => project.value), + }) + ); + }, [dispatch, filters]); + + return } />; +}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/stats_overview/stats_overview_embeddable_factory.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/stats_overview/stats_overview_embeddable_factory.tsx new file mode 100644 index 0000000000000..07f1e72fa1e98 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/stats_overview/stats_overview_embeddable_factory.tsx @@ -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 { i18n } from '@kbn/i18n'; + +import React, { useEffect } from 'react'; +import { DefaultEmbeddableApi, ReactEmbeddableFactory } from '@kbn/embeddable-plugin/public'; +import { + initializeTitles, + useBatchedPublishingSubjects, + fetch$, + PublishesWritablePanelTitle, + PublishesPanelTitle, + SerializedTitles, + HasEditCapabilities, +} from '@kbn/presentation-publishing'; +import { BehaviorSubject, Subject } from 'rxjs'; +import type { StartServicesAccessor } from '@kbn/core-lifecycle-browser'; +import { MonitorFilters } from '../monitors_overview/types'; +import { SYNTHETICS_STATS_OVERVIEW_EMBEDDABLE } from '../constants'; +import { ClientPluginsStart } from '../../../plugin'; +import { StatsOverviewComponent } from './stats_overview_component'; + +export const getOverviewPanelTitle = () => + i18n.translate('xpack.synthetics.statusOverview.list.displayName', { + defaultMessage: 'Synthetics Stats Overview', + }); + +export type OverviewEmbeddableState = SerializedTitles & { + filters: MonitorFilters; +}; + +export type StatsOverviewApi = DefaultEmbeddableApi & + PublishesWritablePanelTitle & + PublishesPanelTitle & + HasEditCapabilities; + +export const getStatsOverviewEmbeddableFactory = ( + getStartServices: StartServicesAccessor +) => { + const factory: ReactEmbeddableFactory< + OverviewEmbeddableState, + OverviewEmbeddableState, + StatsOverviewApi + > = { + type: SYNTHETICS_STATS_OVERVIEW_EMBEDDABLE, + deserializeState: (state) => { + return state.rawState as OverviewEmbeddableState; + }, + buildEmbeddable: async (state, buildApi, uuid, parentApi) => { + const [coreStart, pluginStart] = await getStartServices(); + + const { titlesApi, titleComparators, serializeTitles } = initializeTitles(state); + const defaultTitle$ = new BehaviorSubject(getOverviewPanelTitle()); + const reload$ = new Subject(); + const filters$ = new BehaviorSubject(state.filters); + + const api = buildApi( + { + ...titlesApi, + defaultPanelTitle: defaultTitle$, + getTypeDisplayName: () => + i18n.translate('xpack.synthetics.editSloOverviewEmbeddableTitle.typeDisplayName', { + defaultMessage: 'filters', + }), + isEditingEnabled: () => true, + onEdit: async () => { + try { + const { openMonitorConfiguration } = await import( + '../common/monitors_open_configuration' + ); + + const result = await openMonitorConfiguration({ + coreStart, + pluginStart, + initialState: { + filters: filters$.getValue(), + }, + }); + filters$.next(result.filters); + } catch (e) { + return Promise.reject(); + } + }, + serializeState: () => { + return { + rawState: { + ...serializeTitles(), + filters: filters$.getValue(), + }, + }; + }, + }, + { + ...titleComparators, + filters: [filters$, (value) => filters$.next(value)], + } + ); + + const fetchSubscription = fetch$(api) + .pipe() + .subscribe((next) => { + reload$.next(next.isReload); + }); + + return { + api, + Component: () => { + const [filters] = useBatchedPublishingSubjects(filters$); + + useEffect(() => { + return () => { + fetchSubscription.unsubscribe(); + }; + }, []); + return ( +
      + +
      + ); + }, + }; + }, + }; + return factory; +}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/status_overview/status_overview_component.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/status_overview/status_overview_component.tsx deleted file mode 100644 index 1034f9ea959ec..0000000000000 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/status_overview/status_overview_component.tsx +++ /dev/null @@ -1,19 +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 React from 'react'; -import { Subject } from 'rxjs'; -import { OverviewStatus } from '../../synthetics/components/monitors_page/overview/overview/overview_status'; -import { SyntheticsEmbeddableContext } from '../synthetics_embeddable_context'; - -export const StatusOverviewComponent = ({ reload$ }: { reload$: Subject }) => { - return ( - - - - ); -}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/synthetics_embeddable_context.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/synthetics_embeddable_context.tsx index 0953fb79961b1..6e4cbd4748e95 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/synthetics_embeddable_context.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/synthetics_embeddable_context.tsx @@ -9,23 +9,32 @@ import React from 'react'; import { createBrowserHistory } from 'history'; import { EuiPanel } from '@elastic/eui'; import { Router } from '@kbn/shared-ux-router'; +import { Subject } from 'rxjs'; +import { Store } from 'redux'; import { SyntheticsSharedContext } from '../synthetics/contexts/synthetics_shared_context'; import { SyntheticsEmbeddableStateContextProvider } from '../synthetics/contexts/synthetics_embeddable_context'; import { getSyntheticsAppProps } from '../synthetics/render_app'; import { SyntheticsSettingsContextProvider } from '../synthetics/contexts'; -export const SyntheticsEmbeddableContext: React.FC<{ search?: string }> = ({ - search, - children, -}) => { +export const SyntheticsEmbeddableContext: React.FC<{ + reload$: Subject; + reduxStore?: Store; +}> = ({ reload$, children, reduxStore }) => { const props = getSyntheticsAppProps(); return ( - + - {children} + + {children} + diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/create_monitors_overview_panel_action.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/create_monitors_overview_panel_action.tsx new file mode 100644 index 0000000000000..aa7355c4e1fec --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/create_monitors_overview_panel_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 { i18n } from '@kbn/i18n'; +import { apiIsPresentationContainer } from '@kbn/presentation-containers'; +import { + IncompatibleActionError, + type UiActionsActionDefinition, +} from '@kbn/ui-actions-plugin/public'; +import { EmbeddableApiContext } from '@kbn/presentation-publishing'; +import type { StartServicesAccessor } from '@kbn/core-lifecycle-browser'; +import { ClientPluginsStart } from '../../../plugin'; +import { COMMON_SYNTHETICS_GROUPING, SYNTHETICS_MONITORS_EMBEDDABLE } from '../constants'; + +export const ADD_SYNTHETICS_MONITORS_OVERVIEW_ACTION_ID = + 'CREATE_SYNTHETICS_MONITORS_OVERVIEW_EMBEDDABLE'; + +export function createMonitorsOverviewPanelAction( + getStartServices: StartServicesAccessor +): UiActionsActionDefinition { + return { + id: ADD_SYNTHETICS_MONITORS_OVERVIEW_ACTION_ID, + grouping: COMMON_SYNTHETICS_GROUPING, + order: 30, + getIconType: () => 'play', + isCompatible: async ({ embeddable }) => { + return apiIsPresentationContainer(embeddable); + }, + execute: async ({ embeddable }) => { + if (!apiIsPresentationContainer(embeddable)) throw new IncompatibleActionError(); + const [coreStart, pluginStart] = await getStartServices(); + const { openMonitorConfiguration } = await import('../common/monitors_open_configuration'); + + const initialState = await openMonitorConfiguration({ + coreStart, + pluginStart, + }); + try { + embeddable.addNewPanel({ + panelType: SYNTHETICS_MONITORS_EMBEDDABLE, + initialState, + }); + } catch (e) { + return Promise.reject(); + } + }, + getDisplayName: () => + i18n.translate('xpack.synthetics.syntheticsEmbeddable.monitors.ariaLabel', { + defaultMessage: 'Monitors overview', + }), + }; +} 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_stats_overview_panel_action.tsx similarity index 57% rename from x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/create_overview_panel_action.tsx rename to x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/create_stats_overview_panel_action.tsx index 79c6a6c1195a9..a3b2c67be88fe 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_stats_overview_panel_action.tsx @@ -10,23 +10,15 @@ import { type UiActionsActionDefinition, } from '@kbn/ui-actions-plugin/public'; import { EmbeddableApiContext } from '@kbn/presentation-publishing'; -import { SYNTHETICS_OVERVIEW_EMBEDDABLE } from '../constants'; +import type { StartServicesAccessor } from '@kbn/core-lifecycle-browser'; +import { ClientPluginsStart } from '../../../plugin'; +import { COMMON_SYNTHETICS_GROUPING, SYNTHETICS_STATS_OVERVIEW_EMBEDDABLE } from '../constants'; -export const COMMON_SYNTHETICS_GROUPING = [ - { - id: 'synthetics', - getDisplayName: () => - i18n.translate('xpack.synthetics.common.constants.grouping.legacy', { - defaultMessage: 'Synthetics', - }), - getIconType: () => { - return 'online'; - }, - }, -]; -export const ADD_SYNTHETICS_OVERVIEW_ACTION_ID = 'CREATE_SYNTHETICS_OVERVIEW_EMBEDDABLE'; +export const ADD_SYNTHETICS_OVERVIEW_ACTION_ID = 'CREATE_SYNTHETICS_STATS_OVERVIEW_EMBEDDABLE'; -export function createStatusOverviewPanelAction(): UiActionsActionDefinition { +export function createStatusOverviewPanelAction( + getStartServices: StartServicesAccessor +): UiActionsActionDefinition { return { id: ADD_SYNTHETICS_OVERVIEW_ACTION_ID, grouping: COMMON_SYNTHETICS_GROUPING, @@ -40,16 +32,24 @@ export function createStatusOverviewPanelAction(): UiActionsActionDefinition - i18n.translate('xpack.synthetics.syntheticsEmbeddable.ariaLabel', { - defaultMessage: 'Synthetics Overview', + i18n.translate('xpack.synthetics.syntheticsEmbeddable.stats.ariaLabel', { + defaultMessage: 'Monitors stats', }), }; } diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/register_ui_actions.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/register_ui_actions.ts new file mode 100644 index 0000000000000..6edc4bb40a028 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/register_ui_actions.ts @@ -0,0 +1,30 @@ +/* + * 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 { ADD_PANEL_TRIGGER } from '@kbn/ui-actions-browser/src'; +import { CoreSetup } from '@kbn/core-lifecycle-browser'; +import { createStatusOverviewPanelAction } from './create_stats_overview_panel_action'; +import { createMonitorsOverviewPanelAction } from './create_monitors_overview_panel_action'; +import { ClientPluginsSetup, ClientPluginsStart } from '../../../plugin'; + +export const registerSyntheticsUiActions = async ( + core: CoreSetup, + pluginsSetup: ClientPluginsSetup +) => { + const { uiActions, cloud, serverless } = pluginsSetup; + + // Initialize actions + const addStatsOverviewPanelAction = createStatusOverviewPanelAction(core.getStartServices); + const addMonitorsOverviewPanelAction = createMonitorsOverviewPanelAction(core.getStartServices); + + // Assign triggers + // Only register these actions in stateful kibana, and the serverless observability project + if (Boolean((serverless && cloud?.serverless.projectType === 'observability') || !serverless)) { + uiActions.addTriggerAction(ADD_PANEL_TRIGGER, addStatsOverviewPanelAction); + uiActions.addTriggerAction(ADD_PANEL_TRIGGER, addMonitorsOverviewPanelAction); + } +}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/add_to_dashboard.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/add_to_dashboard.tsx new file mode 100644 index 0000000000000..2a910855aa245 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/add_to_dashboard.tsx @@ -0,0 +1,142 @@ +/* + * 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, + EuiButtonIcon, + EuiContextMenuItem, + EuiContextMenuPanel, + EuiPopover, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React, { useCallback } from 'react'; +import { + LazySavedObjectSaveModalDashboard, + SaveModalDashboardProps, + withSuspense, +} from '@kbn/presentation-util-plugin/public'; +import { useKibana } from '@kbn/kibana-react-plugin/public'; +import { ClientPluginsStart } from '../../../../../plugin'; +import { + SYNTHETICS_MONITORS_EMBEDDABLE, + SYNTHETICS_STATS_OVERVIEW_EMBEDDABLE, +} from '../../../../embeddables/constants'; + +const SavedObjectSaveModalDashboard = withSuspense(LazySavedObjectSaveModalDashboard); + +export const AddToDashboard = ({ + type, + asButton = false, +}: { + type: typeof SYNTHETICS_STATS_OVERVIEW_EMBEDDABLE | typeof SYNTHETICS_MONITORS_EMBEDDABLE; + asButton?: boolean; +}) => { + const [isPopoverOpen, setIsPopoverOpen] = React.useState(false); + const [isDashboardAttachmentReady, setDashboardAttachmentReady] = React.useState(false); + const closePopover = () => { + setIsPopoverOpen(false); + }; + + const { embeddable } = useKibana().services; + + const handleAttachToDashboardSave: SaveModalDashboardProps['onSave'] = useCallback( + ({ dashboardId, newTitle, newDescription }) => { + const stateTransfer = embeddable.getStateTransfer(); + const embeddableInput = {}; + + const state = { + input: embeddableInput, + type, + }; + + const path = dashboardId === 'new' ? '#/create' : `#/view/${dashboardId}`; + + stateTransfer.navigateToWithEmbeddablePackage('dashboards', { + state, + path, + }); + }, + [embeddable, type] + ); + const isSyntheticsApp = window.location.pathname.includes('/app/synthetics'); + + if (!isSyntheticsApp) { + return null; + } + + return ( + <> + {asButton ? ( + setDashboardAttachmentReady(true)} + > + {i18n.translate('xpack.synthetics.embeddablePanelWrapper.shareButtonLabel', { + defaultMessage: 'Add to dashboard', + })} + + ) : ( + setIsPopoverOpen(!isPopoverOpen)} + /> + } + isOpen={isPopoverOpen} + closePopover={closePopover} + > + { + setDashboardAttachmentReady(true); + closePopover(); + }} + > + {i18n.translate( + 'xpack.synthetics.embeddablePanelWrapper.shareContextMenuItemLabel', + { + defaultMessage: 'Add to dashboard', + } + )} + , + ]} + /> + + )} + {isDashboardAttachmentReady ? ( + { + setDashboardAttachmentReady(false); + }} + onSave={handleAttachToDashboardSave} + /> + ) : null} + + ); +}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/embeddable_panel_wrapper.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/embeddable_panel_wrapper.tsx index cd73097c956a6..bb8ec04105167 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/embeddable_panel_wrapper.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/common/components/embeddable_panel_wrapper.tsx @@ -5,66 +5,18 @@ * 2.0. */ -import React, { FC, useCallback } from 'react'; -import { i18n } from '@kbn/i18n'; -import { - EuiButtonIcon, - EuiContextMenuItem, - EuiContextMenuPanel, - EuiFlexGroup, - EuiFlexItem, - EuiPanel, - EuiPopover, - EuiProgress, - EuiTitle, -} from '@elastic/eui'; -import { - LazySavedObjectSaveModalDashboard, - SaveModalDashboardProps, - withSuspense, -} from '@kbn/presentation-util-plugin/public'; -import { useKibana } from '@kbn/kibana-react-plugin/public'; -import { SYNTHETICS_OVERVIEW_EMBEDDABLE } from '../../../../embeddables/constants'; -import { ClientPluginsStart } from '../../../../../plugin'; - -const SavedObjectSaveModalDashboard = withSuspense(LazySavedObjectSaveModalDashboard); +import React, { FC } from 'react'; +import { EuiFlexGroup, EuiFlexItem, EuiPanel, EuiProgress, EuiTitle } from '@elastic/eui'; +import { AddToDashboard } from './add_to_dashboard'; +import { SYNTHETICS_STATS_OVERVIEW_EMBEDDABLE } from '../../../../embeddables/constants'; export const EmbeddablePanelWrapper: FC<{ title: string; loading?: boolean; -}> = ({ children, title, loading }) => { - const [isPopoverOpen, setIsPopoverOpen] = React.useState(false); - - const [isDashboardAttachmentReady, setDashboardAttachmentReady] = React.useState(false); - - const closePopover = () => { - setIsPopoverOpen(false); - }; - - const { embeddable } = useKibana().services; - + titleAppend?: React.ReactNode; +}> = ({ children, title, loading, titleAppend }) => { const isSyntheticsApp = window.location.pathname.includes('/app/synthetics'); - const handleAttachToDashboardSave: SaveModalDashboardProps['onSave'] = useCallback( - ({ dashboardId, newTitle, newDescription }) => { - const stateTransfer = embeddable.getStateTransfer(); - const embeddableInput = {}; - - const state = { - input: embeddableInput, - type: SYNTHETICS_OVERVIEW_EMBEDDABLE, - }; - - const path = dashboardId === 'new' ? '#/create' : `#/view/${dashboardId}`; - - stateTransfer.navigateToWithEmbeddablePackage('dashboards', { - state, - path, - }); - }, - [embeddable] - ); - return ( <> @@ -77,63 +29,14 @@ export const EmbeddablePanelWrapper: FC<{ {isSyntheticsApp && ( - setIsPopoverOpen(!isPopoverOpen)} - /> - } - isOpen={isPopoverOpen} - closePopover={closePopover} - > - { - setDashboardAttachmentReady(true); - closePopover(); - }} - > - {i18n.translate( - 'xpack.synthetics.embeddablePanelWrapper.shareContextMenuItemLabel', - { defaultMessage: 'Add to dashboard' } - )} - , - ]} - /> - + )} + {titleAppend && {titleAppend}} {children} - {isDashboardAttachmentReady ? ( - { - setDashboardAttachmentReady(false); - }} - onSave={handleAttachToDashboardSave} - /> - ) : null} ); }; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/form/field_config.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/form/field_config.tsx index 7e24a0726a829..a55a93853344b 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/form/field_config.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/form/field_config.tsx @@ -30,6 +30,7 @@ import { EuiBadge, EuiToolTip, } from '@elastic/eui'; +import { kibanaService } from '../../../../../utils/kibana_service'; import { PROFILE_OPTIONS, ThrottlingConfigFieldProps, @@ -60,7 +61,6 @@ import { TextArea, ThrottlingWrapper, } from './field_wrappers'; -import { getDocLinks } from '../../../../../kibana_services'; import { useMonitorName } from '../../../hooks/use_monitor_name'; import { ConfigKey, @@ -1332,7 +1332,7 @@ export const FIELD = (readOnly?: boolean): FieldMap => ({ })} {i18n.translate('xpack.synthetics.monitorConfig.playwrightOptions.learnMore', { diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/grid_by_group/grid_group_item.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/grid_by_group/grid_group_item.tsx index 8f92887da6ba8..7fea62b348edd 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/grid_by_group/grid_group_item.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/grid_by_group/grid_group_item.tsx @@ -17,6 +17,7 @@ import { EuiTablePagination, } from '@elastic/eui'; import React, { useState } from 'react'; +import { i18n } from '@kbn/i18n'; import { useSelector } from 'react-redux'; import { useKey } from 'react-use'; import { OverviewLoader } from '../overview_loader'; @@ -49,7 +50,7 @@ export const GroupGridItem = ({ const downMonitors = groupMonitors.filter((monitor) => { const downConfigs = overviewStatus?.downConfigs; if (downConfigs) { - return downConfigs[`${monitor.configId}-${monitor.location?.label}`]?.status === 'down'; + return downConfigs[`${monitor.configId}-${monitor.location?.id}`]?.status === 'down'; } }); @@ -96,14 +97,17 @@ export const GroupGridItem = ({ } extraAction={ - + { if (fullScreenGroup) { setFullScreenGroup(''); @@ -117,7 +121,30 @@ export const GroupGridItem = ({ - {groupMonitors.length} Monitors + + {i18n.translate('xpack.synthetics.groupGridItem.monitorsBadgeLabel.downCount', { + defaultMessage: '{downCount} Down', + values: { downCount: downMonitorsCount }, + })} + + + + + + {i18n.translate('xpack.synthetics.groupGridItem.monitorsBadgeLabel.upCount', { + defaultMessage: '{upCount} Up', + values: { upCount: groupMonitors.length - downMonitorsCount }, + })} + + + + + + {i18n.translate('xpack.synthetics.groupGridItem.monitorsBadgeLabel.count', { + defaultMessage: '{count, number} {count, plural, one {monitor} other {monitors}}', + values: { count: groupMonitors.length }, + })} + } @@ -145,7 +172,10 @@ export const GroupGridItem = ({ )} { if (!urlGroupField && groupField !== 'none' && !isUrlHydratedFromRedux.current) { // Hydrate url only during initialization updateUrlParams({ groupBy: groupField, groupOrderBy: groupOrder }); - } else { - dispatch( - setOverviewGroupByAction({ - field: urlGroupField ?? 'none', - order: urlGroupOrderBy ?? 'asc', - }) - ); } } isUrlHydratedFromRedux.current = true; @@ -48,6 +41,21 @@ export const GroupFields = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, [dispatch, groupField, groupOrder, urlGroupField, urlGroupOrderBy]); + const isUReduxHydratedFromUrl = useRef(false); + + useEffect(() => { + if (urlGroupField && urlGroupField !== groupField && !isUReduxHydratedFromUrl.current) { + dispatch( + setOverviewGroupByAction({ + field: urlGroupField ?? 'none', + order: urlGroupOrderBy ?? 'asc', + }) + ); + } + isUReduxHydratedFromUrl.current = true; + // Only depend on the serialized snapshot + }, [dispatch, groupField, groupOrder, urlGroupField, urlGroupOrderBy]); + const handleChange = (groupByState: GroupByState) => { dispatch(setOverviewGroupByAction(groupByState)); updateUrlParams({ groupBy: groupByState.field, groupOrderBy: groupByState.order }); diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item_icon.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item_icon.tsx index 7dacc511c2e70..8945726bc443b 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item_icon.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/metric_item_icon.tsx @@ -18,6 +18,8 @@ import { EuiCallOut, EuiFlexGroup, EuiFlexItem, + EuiLink, + EuiSpacer, } from '@elastic/eui'; import { useDispatch, useSelector } from 'react-redux'; import styled from 'styled-components'; @@ -148,6 +150,21 @@ export const MetricItemIcon = ({
      + {ping?.url?.full && ( + <> + {i18n.translate('xpack.synthetics.metricItemIcon.div.urlLabel', { + defaultMessage: 'URL: ', + })} + + {ping.url.full} + + + + )}
      @@ -164,6 +181,23 @@ export const MetricItemIcon = ({ ); } else { + if (ping?.url) { + return ( + + + + ); + } return null; } }; @@ -184,8 +218,10 @@ const StyledIcon = euiStyled.div<{ boxShadow: string }>` gap: 10px; width: 32px; height: 32px; - background: #ffffff; - border: 1px solid #d3dae6; + background: ${({ theme }) => + theme.darkMode ? theme.eui.euiColorDarkestShade : theme.eui.euiColorLightestShade}; + border: 1px solid ${({ theme }) => + theme.darkMode ? theme.eui.euiColorDarkShade : theme.eui.euiColorLightShade}; ${({ boxShadow }) => boxShadow} border-radius: 16px; flex: none; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.tsx index 49f21acc20f10..3da7b03f3ad9e 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_grid.tsx @@ -14,7 +14,10 @@ import { EuiSpacer, EuiButtonEmpty, EuiText, + EuiProgress, } from '@elastic/eui'; +import { SYNTHETICS_MONITORS_EMBEDDABLE } from '../../../../../embeddables/constants'; +import { AddToDashboard } from '../../../common/components/add_to_dashboard'; import { useOverviewStatus } from '../../hooks/use_overview_status'; import { useInfiniteScroll } from './use_infinite_scroll'; import { GridItemsByGroup } from './grid_by_group/grid_items_by_group'; @@ -40,6 +43,7 @@ export const OverviewGrid = memo(() => { data: { monitors }, flyoutConfig, loaded, + loading, pageState, groupBy: { field: groupField }, } = useSelector(selectOverviewState); @@ -76,7 +80,7 @@ export const OverviewGrid = memo(() => { <> @@ -87,6 +91,10 @@ export const OverviewGrid = memo(() => { total={status ? monitorsSortedByStatus.length : undefined} /> + + + + setPage(1)} /> @@ -94,7 +102,9 @@ export const OverviewGrid = memo(() => { - + + {loading && } + <> {groupField === 'none' ? ( loaded && currentMonitors.length ? ( diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_status.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_status.tsx index 28eaf97a37c5f..4f089b2464ed9 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_status.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitors_page/overview/overview/overview_status.tsx @@ -9,8 +9,6 @@ import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiStat } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React, { useEffect, useState } from 'react'; import { useDispatch } from 'react-redux'; -import { Subject } from 'rxjs'; -import { useSyntheticsRefreshContext } from '../../../../contexts'; import { EmbeddablePanelWrapper } from '../../../common/components/embeddable_panel_wrapper'; import { clearOverviewStatusErrorAction } from '../../../../state/overview_status'; import { kibanaService } from '../../../../../../utils/kibana_service'; @@ -21,11 +19,9 @@ function title(t?: number) { return t ?? '-'; } -export function OverviewStatus({ reload$ }: { reload$?: Subject }) { +export function OverviewStatus({ titleAppend }: { titleAppend?: React.ReactNode }) { const { statusFilter } = useGetUrlParams(); - const { refreshApp } = useSyntheticsRefreshContext(); - const { status, error: statusError, @@ -39,14 +35,6 @@ export function OverviewStatus({ reload$ }: { reload$?: Subject }) { disabledCount: status?.disabledCount, }); - useEffect(() => { - const sub = reload$?.subscribe(() => { - refreshApp(); - }); - - return () => sub?.unsubscribe(); - }, [refreshApp, reload$]); - useEffect(() => { if (statusError) { dispatch(clearOverviewStatusErrorAction()); @@ -104,9 +92,9 @@ export function OverviewStatus({ reload$ }: { reload$?: Subject }) { }, [status, statusFilter]); return ( - + - + > = ({ children }) => { +export const SyntheticsRefreshContextProvider: FC<{ + reload$?: Subject; +}> = ({ children, reload$ }) => { const [lastRefresh, setLastRefresh] = useState(Date.now()); const refreshPaused = useSelector(selectRefreshPaused); @@ -51,6 +53,13 @@ export const SyntheticsRefreshContextProvider: FC> = } }, [refreshApp, refreshPaused]); + useEffect(() => { + const subscription = reload$?.subscribe(() => { + refreshApp(); + }); + return () => subscription?.unsubscribe(); + }, [reload$, refreshApp]); + const value = useMemo(() => { return { lastRefresh, diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/contexts/synthetics_shared_context.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/contexts/synthetics_shared_context.tsx index b4a2702626285..da35fb89dbf3b 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/contexts/synthetics_shared_context.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/contexts/synthetics_shared_context.tsx @@ -10,18 +10,16 @@ import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { Provider as ReduxProvider } from 'react-redux'; import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app'; +import { Subject } from 'rxjs'; +import { Store } from 'redux'; import { SyntheticsRefreshContextProvider } from './synthetics_refresh_context'; import { SyntheticsDataViewContextProvider } from './synthetics_data_view_context'; import { SyntheticsAppProps } from './synthetics_settings_context'; import { storage, store } from '../state'; -export const SyntheticsSharedContext: React.FC = ({ - coreStart, - setupPlugins, - startPlugins, - children, - darkMode, -}) => { +export const SyntheticsSharedContext: React.FC< + SyntheticsAppProps & { reload$?: Subject; reduxStore?: Store } +> = ({ reduxStore, coreStart, setupPlugins, startPlugins, children, darkMode, reload$ }) => { return ( = ({ }} > - - + + = (dependencies: { - core: CoreStart; - plugins: ClientPluginsStart; -}) => TAlertTypeModel; +import type { AlertTypeInitializer } from './types'; export const syntheticsAlertTypeInitializers: AlertTypeInitializer[] = [ initMonitorStatusAlertType, diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/monitor_status.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/monitor_status.tsx index ba86407859408..5f63d6ac298c7 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/monitor_status.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/monitor_status.tsx @@ -16,7 +16,8 @@ import { STATE_ID } from '../../../../../common/field_names'; import { SyntheticsMonitorStatusTranslations } from '../../../../../common/rules/synthetics/translations'; import type { StatusRuleParams } from '../../../../../common/rules/status_rule'; import { SYNTHETICS_ALERT_RULE_TYPES } from '../../../../../common/constants/synthetics_alerts'; -import type { AlertTypeInitializer } from '.'; +import type { AlertTypeInitializer } from './types'; + const { defaultActionMessage, defaultRecoveryMessage, description } = SyntheticsMonitorStatusTranslations; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/tls.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/tls.tsx index 15c0fa90ec605..896a84cd1688c 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/tls.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/tls.tsx @@ -14,12 +14,14 @@ import { TlsTranslations } from '../../../../../common/rules/synthetics/translat import { CERTIFICATES_ROUTE } from '../../../../../common/constants/ui'; import { SYNTHETICS_ALERT_RULE_TYPES } from '../../../../../common/constants/synthetics_alerts'; import type { TLSParams } from '../../../../../common/runtime_types/alerts/tls'; -import { AlertTypeInitializer } from '.'; + +import type { AlertTypeInitializer } from './types'; let validateFunc: (ruleParams: any) => ValidationResult; const { defaultActionMessage, defaultRecoveryMessage, description } = TlsTranslations; const TLSAlert = React.lazy(() => import('./lazy_wrapper/tls_alert')); + export const initTlsAlertType: AlertTypeInitializer = ({ core, plugins, diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/types.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/types.ts new file mode 100644 index 0000000000000..baf1f6c75801c --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/lib/alert_types/types.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 { ObservabilityRuleTypeModel } from '@kbn/observability-plugin/public'; +import { CoreStart } from '@kbn/core-lifecycle-browser'; +import type { ClientPluginsStart } from '../../../../plugin'; + +export type AlertTypeInitializer = (dependencies: { + core: CoreStart; + plugins: ClientPluginsStart; +}) => TAlertTypeModel; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/state/overview/api.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/state/overview/api.ts index 7244efc4dc655..cc496074332b0 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/state/overview/api.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/state/overview/api.ts @@ -36,6 +36,7 @@ export function toStatusOverviewQueryArgs( projects: pageState.projects, schedules: pageState.schedules, monitorTypes: pageState.monitorTypes, + monitorQueryIds: pageState.monitorQueryIds, searchFields: [], }; } diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/state/overview/index.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/state/overview/index.ts index 3f8038ffc84d3..665a92aeaf773 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/state/overview/index.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/state/overview/index.ts @@ -11,6 +11,7 @@ import { MonitorOverviewState } from './models'; import { fetchMonitorOverviewAction, + quietFetchOverviewAction, setFlyoutConfig, setOverviewGroupByAction, setOverviewPageStateAction, @@ -44,6 +45,9 @@ export const monitorOverviewReducer = createReducer(initialState, (builder) => { state.loading = true; state.loaded = false; }) + .addCase(quietFetchOverviewAction.get, (state, action) => { + state.loading = true; + }) .addCase(fetchMonitorOverviewAction.success, (state, action) => { state.data = action.payload; state.loading = false; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/state/store.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/state/store.ts index 19320f0102a99..c88f126edeb52 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/state/store.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/state/store.ts @@ -20,7 +20,6 @@ export const store = configureStore({ preloadedState: {}, enhancers: [], }); - sagaMW.run(rootEffect); export const storage = new Storage(window.localStorage); diff --git a/x-pack/plugins/observability_solution/synthetics/public/kibana_services.ts b/x-pack/plugins/observability_solution/synthetics/public/kibana_services.ts deleted file mode 100644 index 9c3f641c29a80..0000000000000 --- a/x-pack/plugins/observability_solution/synthetics/public/kibana_services.ts +++ /dev/null @@ -1,19 +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 { CoreStart } from '@kbn/core/public'; - -type StartServices = Pick; - -let coreStart: CoreStart; -export function setStartServices(core: CoreStart) { - coreStart = core; -} - -export const getStartServices = (): StartServices => coreStart; - -export const getDocLinks = () => coreStart?.docLinks; diff --git a/x-pack/plugins/observability_solution/synthetics/public/plugin.ts b/x-pack/plugins/observability_solution/synthetics/public/plugin.ts index 4489d418830e5..15de2de6d5eee 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/plugin.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/plugin.ts @@ -66,7 +66,6 @@ import { kibanaService } from './utils/kibana_service'; import { PLUGIN } from '../common/constants/plugin'; import { OVERVIEW_ROUTE } from '../common/constants/ui'; import { locators } from './apps/locators'; -import { setStartServices } from './kibana_services'; import { syntheticsAlertTypeInitializers } from './apps/synthetics/lib/alert_types'; export interface ClientPluginsSetup { @@ -216,9 +215,6 @@ export class SyntheticsPlugin public start(coreStart: CoreStart, pluginsStart: ClientPluginsStart): void { const { triggersActionsUi } = pluginsStart; - setStartServices(coreStart); - - setStartServices(coreStart); syntheticsAlertTypeInitializers.forEach((init) => { const { observabilityRuleTypeRegistry } = pluginsStart.observability; diff --git a/x-pack/plugins/observability_solution/synthetics/public/utils/api_service/api_service.ts b/x-pack/plugins/observability_solution/synthetics/public/utils/api_service/api_service.ts index 682b3be6a700a..9a0b887a7d6eb 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/utils/api_service/api_service.ts +++ b/x-pack/plugins/observability_solution/synthetics/public/utils/api_service/api_service.ts @@ -9,8 +9,10 @@ import { isRight } from 'fp-ts/lib/Either'; import { formatErrors } from '@kbn/securitysolution-io-ts-utils'; import { HttpFetchQuery, HttpHeadersInit, HttpSetup } from '@kbn/core/public'; import { FETCH_STATUS, AddInspectorRequest } from '@kbn/observability-shared-plugin/public'; -import { InspectorRequestProps } from '@kbn/observability-shared-plugin/public/contexts/inspector/inspector_context'; +import type { InspectorRequestProps } from '@kbn/observability-shared-plugin/public/contexts/inspector/inspector_context'; + type Params = HttpFetchQuery & { version?: string }; + class ApiService { private static instance: ApiService; private _http!: HttpSetup; diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/common.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/common.ts index b29e3578aba87..491b67160677e 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/common.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/common.ts @@ -44,6 +44,7 @@ export const OverviewStatusSchema = schema.object({ monitorTypes: StringOrArraySchema, locations: StringOrArraySchema, projects: StringOrArraySchema, + monitorQueryIds: StringOrArraySchema, schedules: StringOrArraySchema, status: StringOrArraySchema, scopeStatusByLocation: schema.maybe(schema.boolean()), diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/add_monitor/add_monitor_api.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/add_monitor/add_monitor_api.ts index 9362efe5f656e..1c38e093237e1 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/add_monitor/add_monitor_api.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/add_monitor/add_monitor_api.ts @@ -81,7 +81,6 @@ export class AddEditMonitorAPI { const syncErrorsPromise = syntheticsMonitorClient.addMonitors( [{ monitor: monitorWithNamespace as MonitorFields, id: newMonitorId }], - savedObjectsClient, this.allPrivateLocations ?? [], spaceId ); diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/bulk_cruds/add_monitor_bulk.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/bulk_cruds/add_monitor_bulk.ts index 8fa1b52e576e7..b6a090165382b 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/bulk_cruds/add_monitor_bulk.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/bulk_cruds/add_monitor_bulk.ts @@ -10,7 +10,6 @@ import { SavedObjectsBulkResponse } from '@kbn/core-saved-objects-api-server'; import { v4 as uuidV4 } from 'uuid'; import { NewPackagePolicy } from '@kbn/fleet-plugin/common'; import { SavedObjectError } from '@kbn/core-saved-objects-common'; -import { PrivateLocationAttributes } from '../../../runtime_types/private_locations'; import { SyntheticsServerSetup } from '../../../types'; import { RouteContext } from '../../types'; import { formatTelemetryEvent, sendTelemetryEvents } from '../../telemetry/monitor_upgrade_sender'; @@ -23,6 +22,7 @@ import { MonitorFields, ServiceLocationErrors, SyntheticsMonitor, + type SyntheticsPrivateLocations, } from '../../../../common/runtime_types'; export const createNewSavedObjectMonitorBulk = async ({ @@ -60,7 +60,7 @@ export const syncNewMonitorBulk = async ({ }: { routeContext: RouteContext; normalizedMonitors: SyntheticsMonitor[]; - privateLocations: PrivateLocationAttributes[]; + privateLocations: SyntheticsPrivateLocations; spaceId: string; }) => { const { server, savedObjectsClient, syntheticsMonitorClient } = routeContext; @@ -85,12 +85,7 @@ export const syncNewMonitorBulk = async ({ monitorsToCreate, soClient: savedObjectsClient, }), - syntheticsMonitorClient.addMonitors( - monitorsToCreate, - savedObjectsClient, - privateLocations, - spaceId - ), + syntheticsMonitorClient.addMonitors(monitorsToCreate, privateLocations, spaceId), ]); let failedMonitors: FailedMonitorConfig[] = []; diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/bulk_cruds/edit_monitor_bulk.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/bulk_cruds/edit_monitor_bulk.ts index 99ab5538b3d68..833e0203e3817 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/bulk_cruds/edit_monitor_bulk.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/bulk_cruds/edit_monitor_bulk.ts @@ -6,7 +6,6 @@ */ import { SavedObject, SavedObjectsUpdateResponse } from '@kbn/core/server'; import { SavedObjectError } from '@kbn/core-saved-objects-common'; -import { PrivateLocationAttributes } from '../../../runtime_types/private_locations'; import { RouteContext } from '../../types'; import { syntheticsMonitorType } from '../../../../common/types/saved_objects'; import { FailedPolicyUpdate } from '../../../synthetics_service/private_location/synthetics_private_location'; @@ -17,6 +16,7 @@ import { MonitorFields, SyntheticsMonitor, SyntheticsMonitorWithSecretsAttributes, + type SyntheticsPrivateLocations, } from '../../../../common/runtime_types'; import { formatTelemetryUpdateEvent, @@ -25,7 +25,7 @@ import { // Simplify return promise type and type it with runtime_types -interface MonitorConfigUpdate { +export interface MonitorConfigUpdate { normalizedMonitor: SyntheticsMonitor; monitorWithRevision: SyntheticsMonitorWithSecretsAttributes; previousMonitor: SavedObject; @@ -59,7 +59,7 @@ async function syncUpdatedMonitors({ routeContext, monitorsToUpdate, }: { - privateLocations: PrivateLocationAttributes[]; + privateLocations: SyntheticsPrivateLocations; spaceId: string; routeContext: RouteContext; monitorsToUpdate: MonitorConfigUpdate[]; @@ -78,7 +78,6 @@ async function syncUpdatedMonitors({ previousMonitor, decryptedPreviousMonitor, })), - routeContext, privateLocations, spaceId ); @@ -92,7 +91,7 @@ export const syncEditedMonitorBulk = async ({ }: { monitorsToUpdate: MonitorConfigUpdate[]; routeContext: RouteContext; - privateLocations: PrivateLocationAttributes[]; + privateLocations: SyntheticsPrivateLocations; spaceId: string; }) => { const { server } = routeContext; diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/edit_monitor.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/edit_monitor.ts index e48985ba30fa5..b2871f6a9accb 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/edit_monitor.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/edit_monitor.ts @@ -248,7 +248,6 @@ export const syncEditedMonitor = async ({ decryptedPreviousMonitor, }, ], - routeContext, allPrivateLocations, spaceId ); diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/monitor_validation.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/monitor_validation.ts index ab5c2c089adb6..ee4ccb7b7bf3e 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/monitor_validation.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/monitor_cruds/monitor_validation.ts @@ -14,7 +14,6 @@ import { schema } from '@kbn/config-schema'; import { AlertConfigSchema } from '../../../common/runtime_types/monitor_management/alert_config_schema'; import { CreateMonitorPayLoad } from './add_monitor/add_monitor_api'; import { flattenAndFormatObject } from '../../synthetics_service/project_monitor/normalizers/common_fields'; -import { PrivateLocationAttributes } from '../../runtime_types/private_locations'; import { BrowserFieldsCodec, CodeEditorMode, @@ -29,6 +28,7 @@ import { ProjectMonitor, ProjectMonitorCodec, SyntheticsMonitor, + type SyntheticsPrivateLocations, TCPFieldsCodec, } from '../../../common/runtime_types'; @@ -338,7 +338,7 @@ const validateJSON = (jsonString: string | any) => { export function validateProjectMonitor( monitorFields: ProjectMonitor, publicLocations: Locations, - privateLocations: PrivateLocationAttributes[] + privateLocations: SyntheticsPrivateLocations ): ValidationResult { const locationsError = validateLocation(monitorFields, publicLocations, privateLocations); // Cast it to ICMPCodec to satisfy typing. During runtime, correct codec will be used to decode. @@ -370,7 +370,7 @@ export function validateProjectMonitor( export function validateLocation( monitorFields: ProjectMonitor, publicLocations: Locations, - privateLocations: PrivateLocationAttributes[] + privateLocations: SyntheticsPrivateLocations ) { const hasPublicLocationsConfigured = (monitorFields.locations || []).length > 0; const hasPrivateLocationsConfigured = (monitorFields.privateLocations || []).length > 0; diff --git a/x-pack/plugins/observability_solution/synthetics/server/routes/suggestions/route.ts b/x-pack/plugins/observability_solution/synthetics/server/routes/suggestions/route.ts index ae729e7361a4d..3a9c3b064bc0f 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/routes/suggestions/route.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/routes/suggestions/route.ts @@ -30,6 +30,9 @@ interface AggsResponse { projectsAggs: { buckets: Buckets; }; + monitorTypeAggs: { + buckets: Buckets; + }; monitorIdsAggs: { buckets: Array<{ key: string; @@ -82,7 +85,7 @@ export const getSyntheticsSuggestionsRoute: SyntheticsRestApiRouteFactory< searchFields: SEARCH_FIELDS, }); - const { tagsAggs, locationsAggs, projectsAggs, monitorIdsAggs } = + const { monitorTypeAggs, tagsAggs, locationsAggs, projectsAggs, monitorIdsAggs } = (data?.aggregations as AggsResponse) ?? {}; const allLocationsMap = new Map(allLocations.map((obj) => [obj.id, obj.label])); @@ -110,6 +113,12 @@ export const getSyntheticsSuggestionsRoute: SyntheticsRestApiRouteFactory< value: key, count, })) ?? [], + monitorTypes: + monitorTypeAggs?.buckets?.map(({ key, doc_count: count }) => ({ + label: key, + value: key, + count, + })) ?? [], }; } catch (error) { logger.error(`Failed to fetch synthetics suggestions: ${error}`); @@ -125,6 +134,13 @@ const aggs = { exclude: [''], }, }, + monitorTypeAggs: { + terms: { + field: `${syntheticsMonitorType}.attributes.${ConfigKey.MONITOR_TYPE}.keyword`, + size: 10000, + exclude: [''], + }, + }, locationsAggs: { terms: { field: `${syntheticsMonitorType}.attributes.${ConfigKey.LOCATIONS}.id`, diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_all_locations.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_all_locations.ts index d28ce4955edc9..c24b28c00ca99 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_all_locations.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_all_locations.ts @@ -34,14 +34,12 @@ export async function getAllLocations({ ), getServicePublicLocations(server, syntheticsMonitorClient), ]); + const pvtLocations = toClientContract({ locations: privateLocations }, agentPolicies); return { publicLocations, - privateLocations, + privateLocations: pvtLocations, throttling, - allLocations: [ - ...publicLocations, - ...toClientContract({ locations: privateLocations }, agentPolicies), - ], + allLocations: [...publicLocations, ...pvtLocations], }; } catch (e) { server.logger.error(e); diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/private_location/synthetics_private_location.test.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/private_location/synthetics_private_location.test.ts index 1517c2927b94d..21ed8e9021e14 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/private_location/synthetics_private_location.test.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/private_location/synthetics_private_location.test.ts @@ -70,6 +70,7 @@ describe('SyntheticsPrivateLocation', () => { get: jest.fn().mockReturnValue({}), buildPackagePolicyFromPackage: mockBuildPackagePolicy, bulkCreate: jest.fn(), + getByIDs: jest.fn(), }, }, spaces: { diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/private_location/synthetics_private_location.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/private_location/synthetics_private_location.ts index 75b3bc6d8baaa..52bb0eefcb84e 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/private_location/synthetics_private_location.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/private_location/synthetics_private_location.ts @@ -21,7 +21,9 @@ import { ConfigKey, HeartbeatConfig, MonitorFields, + PrivateLocation, SourceType, + type SyntheticsPrivateLocations, } from '../../../common/runtime_types'; import { stringifyString } from '../formatters/private_formatters/formatting_utils'; import { PrivateLocationAttributes } from '../../runtime_types/private_locations'; @@ -69,7 +71,7 @@ export class SyntheticsPrivateLocation { async generateNewPolicy( config: HeartbeatConfig, - privateLocation: PrivateLocationAttributes, + privateLocation: PrivateLocation, newPolicyTemplate: NewPackagePolicy, spaceId: string, globalParams: Record, @@ -132,7 +134,7 @@ export class SyntheticsPrivateLocation { async createPackagePolicies( configs: PrivateConfig[], - privateLocations: PrivateLocationAttributes[], + privateLocations: SyntheticsPrivateLocations, spaceId: string, testRunId?: string, runOnce?: boolean @@ -253,25 +255,26 @@ export class SyntheticsPrivateLocation { async editMonitors( configs: Array<{ config: HeartbeatConfig; globalParams: Record }>, - allPrivateLocations: PrivateLocationAttributes[], + allPrivateLocations: SyntheticsPrivateLocations, spaceId: string ) { if (configs.length === 0) { return {}; } - const newPolicyTemplate = await this.buildNewPolicy(); + const [newPolicyTemplate, existingPolicies] = await Promise.all([ + this.buildNewPolicy(), + this.getExistingPolicies( + configs.map(({ config }) => config), + allPrivateLocations, + spaceId + ), + ]); const policiesToUpdate: NewPackagePolicyWithId[] = []; const policiesToCreate: NewPackagePolicyWithId[] = []; const policiesToDelete: string[] = []; - const existingPolicies = await this.getExistingPolicies( - configs.map(({ config }) => config), - allPrivateLocations, - spaceId - ); - for (const { config, globalParams } of configs) { const { locations } = config; @@ -340,7 +343,7 @@ export class SyntheticsPrivateLocation { async getExistingPolicies( configs: HeartbeatConfig[], - allPrivateLocations: PrivateLocationAttributes[], + allPrivateLocations: SyntheticsPrivateLocations, spaceId: string ) { const soClient = this.server.coreStart.savedObjects.createInternalRepository(); diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/project_monitor/normalizers/common_fields.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/project_monitor/normalizers/common_fields.ts index b6e02e93b672c..d657ad376b38d 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/project_monitor/normalizers/common_fields.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/project_monitor/normalizers/common_fields.ts @@ -8,7 +8,6 @@ import { omit, uniqBy } from 'lodash'; import { i18n } from '@kbn/i18n'; import { isValidNamespace } from '@kbn/fleet-plugin/common'; -import { PrivateLocationAttributes } from '../../../runtime_types/private_locations'; import { formatLocation } from '../../../../common/utils/location_formatter'; import { BrowserFields, @@ -20,6 +19,7 @@ import { ScheduleUnit, SourceType, MonitorFields, + type SyntheticsPrivateLocations, } from '../../../../common/runtime_types'; import { DEFAULT_FIELDS } from '../../../../common/constants/monitor_defaults'; import { DEFAULT_COMMON_FIELDS } from '../../../../common/constants/monitor_defaults'; @@ -27,7 +27,7 @@ import { formatKibanaNamespace } from '../../formatters/private_formatters'; export interface NormalizedProjectProps { locations: Locations; - privateLocations: PrivateLocationAttributes[]; + privateLocations: SyntheticsPrivateLocations; monitor: ProjectMonitor; projectId: string; namespace: string; @@ -196,7 +196,7 @@ export const getMonitorLocations = ({ locations?: string[]; privateLocations?: string[]; }; - allPrivateLocations: PrivateLocationAttributes[]; + allPrivateLocations: SyntheticsPrivateLocations; allPublicLocations: Locations; }) => { const invalidPublicLocations: string[] = []; @@ -331,7 +331,7 @@ const getInvalidLocationError = ( invalidPublic: string[], invalidPrivate: string[], allPublicLocations: Locations, - allPrivateLocations: PrivateLocationAttributes[] + allPrivateLocations: SyntheticsPrivateLocations ) => { const availablePublicMsg = allPublicLocations.length === 0 diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/project_monitor/project_monitor_formatter.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/project_monitor/project_monitor_formatter.ts index 9a6640e066d4c..fd59e7a0ec40a 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/project_monitor/project_monitor_formatter.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/project_monitor/project_monitor_formatter.ts @@ -4,7 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import pMap from 'p-map'; import { SavedObjectsUpdateResponse, SavedObjectsClientContract, @@ -12,15 +11,18 @@ import { } from '@kbn/core/server'; import { i18n } from '@kbn/i18n'; import { EncryptedSavedObjectsClient } from '@kbn/encrypted-saved-objects-plugin/server'; +import { getKqlFilter } from '../../routes/common'; import { InvalidLocationError } from './normalizers/common_fields'; -import { PrivateLocationAttributes } from '../../runtime_types/private_locations'; import { SyntheticsServerSetup } from '../../types'; import { RouteContext } from '../../routes/types'; import { syntheticsMonitorType } from '../../../common/types/saved_objects'; import { getAllLocations } from '../get_all_locations'; import { syncNewMonitorBulk } from '../../routes/monitor_cruds/bulk_cruds/add_monitor_bulk'; import { SyntheticsMonitorClient } from '../synthetics_monitor/synthetics_monitor_client'; -import { syncEditedMonitorBulk } from '../../routes/monitor_cruds/bulk_cruds/edit_monitor_bulk'; +import { + MonitorConfigUpdate, + syncEditedMonitorBulk, +} from '../../routes/monitor_cruds/bulk_cruds/edit_monitor_bulk'; import { ConfigKey, SyntheticsMonitorWithSecretsAttributes, @@ -30,6 +32,7 @@ import { Locations, SyntheticsMonitor, MonitorFields, + type SyntheticsPrivateLocations, } from '../../../common/runtime_types'; import { formatSecrets, normalizeSecrets } from '../utils/secrets'; import { @@ -60,7 +63,7 @@ export class ProjectMonitorFormatter { private projectId: string; private spaceId: string; private publicLocations: Locations; - private privateLocations: PrivateLocationAttributes[]; + private privateLocations: SyntheticsPrivateLocations; private savedObjectsClient: SavedObjectsClientContract; private encryptedSavedObjectsClient: EncryptedSavedObjectsClient; private monitors: ProjectMonitor[] = []; @@ -183,7 +186,7 @@ export class ProjectMonitorFormatter { }: { monitor: ProjectMonitor; publicLocations: Locations; - privateLocations: PrivateLocationAttributes[]; + privateLocations: SyntheticsPrivateLocations; }) => { try { const { normalizedFields: normalizedMonitor, errors } = normalizeProjectMonitor({ @@ -333,18 +336,27 @@ export class ProjectMonitorFormatter { private getDecryptedMonitors = async ( monitors: Array> ) => { - return await pMap( - monitors, - async (monitor) => - this.encryptedSavedObjectsClient.getDecryptedAsInternalUser( - syntheticsMonitorType, - monitor.id, - { - namespace: monitor.namespaces?.[0], - } - ), - { concurrency: 500 } - ); + const configIds = monitors.map((monitor) => monitor.attributes[ConfigKey.CONFIG_ID]); + const monitorFilter = getKqlFilter({ field: ConfigKey.CONFIG_ID, values: configIds }); + const finder = + await this.encryptedSavedObjectsClient.createPointInTimeFinderDecryptedAsInternalUser( + { + search: monitorFilter, + type: syntheticsMonitorType, + perPage: 500, + namespaces: [this.spaceId], + } + ); + + const decryptedMonitors: Array> = + []; + for await (const result of finder.find()) { + decryptedMonitors.push(...result.saved_objects); + } + + finder.close().catch(() => {}); + + return decryptedMonitors; }; private updateMonitorsBulk = async ( @@ -372,29 +384,30 @@ export class ProjectMonitorFormatter { monitors.map((m) => m.previousMonitor) ); - const monitorsToUpdate = []; - - for (let i = 0; i < decryptedPreviousMonitors.length; i++) { - const decryptedPreviousMonitor = decryptedPreviousMonitors[i]; - const previousMonitor = monitors[i].previousMonitor; - const normalizedMonitor = monitors[i].monitor; - - const { - attributes: { [ConfigKey.REVISION]: _, ...normalizedPreviousMonitorAttributes }, - } = normalizeSecrets(decryptedPreviousMonitor); - - const monitorWithRevision = formatSecrets({ - ...normalizedPreviousMonitorAttributes, - ...normalizedMonitor, - revision: (previousMonitor.attributes[ConfigKey.REVISION] || 0) + 1, - }); - monitorsToUpdate.push({ - normalizedMonitor, - previousMonitor, - monitorWithRevision, - decryptedPreviousMonitor, - }); - } + const monitorsToUpdate: MonitorConfigUpdate[] = []; + + decryptedPreviousMonitors.forEach((decryptedPreviousMonitor) => { + const monitor = monitors.find((m) => m.previousMonitor.id === decryptedPreviousMonitor.id); + if (monitor) { + const normalizedMonitor = monitor?.monitor; + const previousMonitor = monitor?.previousMonitor; + const { + attributes: { [ConfigKey.REVISION]: _, ...normalizedPrevMonitorAttr }, + } = normalizeSecrets(decryptedPreviousMonitor); + + const monitorWithRevision = formatSecrets({ + ...normalizedPrevMonitorAttr, + ...normalizedMonitor, + revision: (previousMonitor.attributes[ConfigKey.REVISION] || 0) + 1, + }); + monitorsToUpdate.push({ + normalizedMonitor, + previousMonitor, + monitorWithRevision, + decryptedPreviousMonitor, + }); + } + }); const { editedMonitors, failedConfigs } = await syncEditedMonitorBulk({ monitorsToUpdate, diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.test.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.test.ts index daba0872f3de0..594621b3b1ab4 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.test.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.test.ts @@ -5,7 +5,7 @@ * 2.0. */ import { loggerMock } from '@kbn/logging-mocks'; -import { KibanaRequest, SavedObjectsClientContract, CoreStart } from '@kbn/core/server'; +import { SavedObjectsClientContract, CoreStart } from '@kbn/core/server'; import { coreMock } from '@kbn/core/server/mocks'; import { SyntheticsMonitorClient } from './synthetics_monitor_client'; import { SyntheticsService } from '../synthetics_service'; @@ -46,7 +46,6 @@ describe('SyntheticsMonitorClient', () => { bulkUpdate: jest.fn(), get: jest.fn(), } as unknown as SavedObjectsClientContract; - const mockRequest = {} as unknown as KibanaRequest; const logger = loggerMock.create(); @@ -130,12 +129,7 @@ describe('SyntheticsMonitorClient', () => { const client = new SyntheticsMonitorClient(syntheticsService, serverMock); client.privateLocationAPI.createPackagePolicies = jest.fn(); - await client.addMonitors( - [{ monitor, id }], - savedObjectsClientMock, - privateLocations, - 'test-space' - ); + await client.addMonitors([{ monitor, id }], privateLocations, 'test-space'); expect(syntheticsService.addConfigs).toHaveBeenCalledTimes(1); expect(client.privateLocationAPI.createPackagePolicies).toHaveBeenCalledTimes(1); @@ -156,10 +150,6 @@ describe('SyntheticsMonitorClient', () => { decryptedPreviousMonitor: previousMonitor, }, ], - { - request: mockRequest, - savedObjectsClient: savedObjectsClientMock, - } as any, privateLocations, 'test-space' ); @@ -188,10 +178,6 @@ describe('SyntheticsMonitorClient', () => { decryptedPreviousMonitor: previousMonitor, }, ], - { - request: mockRequest, - savedObjectsClient: savedObjectsClientMock, - } as any, privateLocations, 'test-space' ); diff --git a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.ts b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.ts index e9fbe8f0ef3b4..b0f9cd20211b3 100644 --- a/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.ts +++ b/x-pack/plugins/observability_solution/synthetics/server/synthetics_service/synthetics_monitor/synthetics_monitor_client.ts @@ -6,7 +6,6 @@ */ import { SavedObject, SavedObjectsClientContract, SavedObjectsFindResult } from '@kbn/core/server'; import { EncryptedSavedObjectsPluginStart } from '@kbn/encrypted-saved-objects-plugin/server'; -import { RouteContext } from '../../routes/types'; import { SyntheticsServerSetup } from '../../types'; import { syntheticsMonitorType } from '../../../common/types/saved_objects'; import { normalizeSecrets } from '../utils'; @@ -24,6 +23,7 @@ import { ScheduleUnit, SyntheticsMonitorWithId, SyntheticsMonitorWithSecretsAttributes, + type SyntheticsPrivateLocations, } from '../../../common/runtime_types'; import { ConfigData, @@ -48,8 +48,7 @@ export class SyntheticsMonitorClient { async addMonitors( monitors: Array<{ monitor: MonitorFields; id: string }>, - savedObjectsClient: SavedObjectsClientContract, - allPrivateLocations: PrivateLocationAttributes[], + allPrivateLocations: SyntheticsPrivateLocations, spaceId: string ) { const privateConfigs: PrivateConfig[] = []; @@ -91,8 +90,7 @@ export class SyntheticsMonitorClient { id: string; decryptedPreviousMonitor: SavedObject; }>, - routeContext: RouteContext, - allPrivateLocations: PrivateLocationAttributes[], + allPrivateLocations: SyntheticsPrivateLocations, spaceId: string ) { const privateConfigs: Array<{ config: HeartbeatConfig; globalParams: Record }> = diff --git a/x-pack/plugins/osquery/public/agents/agents_table.tsx b/x-pack/plugins/osquery/public/agents/agents_table.tsx index c7b6fdd432fa3..ff9b89f73543b 100644 --- a/x-pack/plugins/osquery/public/agents/agents_table.tsx +++ b/x-pack/plugins/osquery/public/agents/agents_table.tsx @@ -95,8 +95,7 @@ const AgentsTableComponent: React.FC = ({ agentSelection, onCh // filter out all the agents counted by selected policies and platforms selectedAgents.filter(checkAgent).length + // add the number of agents added via policy and platform groups - getNumAgentsInGrouping(selectedGroups) - - // subtract the number of agents double counted by policy/platform selections + getNumAgentsInGrouping(selectedGroups) - // subtract the number of agents double counted by policy/platform selections getNumOverlapped(selectedGroups, agentList?.groups?.overlap ?? {}) ); } diff --git a/x-pack/plugins/osquery/server/lib/fleet_integration.ts b/x-pack/plugins/osquery/server/lib/fleet_integration.ts index 684334c1488b4..e94fb23e043e6 100644 --- a/x-pack/plugins/osquery/server/lib/fleet_integration.ts +++ b/x-pack/plugins/osquery/server/lib/fleet_integration.ts @@ -8,7 +8,7 @@ import type { SavedObjectReference, SavedObjectsClient } from '@kbn/core/server'; import { filter, map } from 'lodash'; import type { PostPackagePolicyPostDeleteCallback } from '@kbn/fleet-plugin/server'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; import { packSavedObjectType } from '../../common/types'; import { OSQUERY_INTEGRATION_NAME } from '../../common'; @@ -25,7 +25,7 @@ export const getPackagePolicyDeleteCallback = const foundPacks = await packsClient.find({ type: packSavedObjectType, hasReference: { - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, id: deletedOsqueryManagerPolicy.policy_id, }, perPage: 1000, diff --git a/x-pack/plugins/osquery/server/lib/telemetry/helpers.ts b/x-pack/plugins/osquery/server/lib/telemetry/helpers.ts index b8e8d99ed99ca..b3aebadd83396 100644 --- a/x-pack/plugins/osquery/server/lib/telemetry/helpers.ts +++ b/x-pack/plugins/osquery/server/lib/telemetry/helpers.ts @@ -7,7 +7,7 @@ import { filter, find, isEmpty, pick, isString } from 'lodash'; import type { PackagePolicy } from '@kbn/fleet-plugin/common'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; import type { PackSavedObject, SavedQuerySavedObject } from '../../common/types'; /** @@ -33,7 +33,8 @@ export const templatePacks = (packsData: PackSavedObject[]) => { name: item.name, enabled: item.enabled, queries: item.queries, - policies: (filter(item.references, ['type', AGENT_POLICY_SAVED_OBJECT_TYPE]), 'id')?.length, + policies: (filter(item.references, ['type', LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE]), 'id') + ?.length, prebuilt: !!filter(item.references, ['type', 'osquery-pack-asset']) && item.version !== undefined, }, diff --git a/x-pack/plugins/osquery/server/lib/update_global_packs.ts b/x-pack/plugins/osquery/server/lib/update_global_packs.ts index 2b825fd883c9b..fb14092441c49 100644 --- a/x-pack/plugins/osquery/server/lib/update_global_packs.ts +++ b/x-pack/plugins/osquery/server/lib/update_global_packs.ts @@ -9,7 +9,7 @@ import type { SavedObjectsClient } from '@kbn/core/server'; import { set } from '@kbn/safer-lodash-set'; import { has, map, mapKeys } from 'lodash'; import type { NewPackagePolicy } from '@kbn/fleet-plugin/common'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; import produce from 'immer'; import { convertShardsToObject } from '../routes/utils'; import { packSavedObjectType } from '../../common/types'; @@ -58,7 +58,7 @@ export const updateGlobalPacksCreateCallback = async ( ...packagePolicy.policy_ids.map((policyId) => ({ id: policyId, name: agentPolicies[policyId]?.name, - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, })), ], } diff --git a/x-pack/plugins/osquery/server/routes/pack/create_pack_route.ts b/x-pack/plugins/osquery/server/routes/pack/create_pack_route.ts index 31f9395d2174e..91baee991c4e0 100644 --- a/x-pack/plugins/osquery/server/routes/pack/create_pack_route.ts +++ b/x-pack/plugins/osquery/server/routes/pack/create_pack_route.ts @@ -11,7 +11,7 @@ import { has, unset, some, mapKeys } from 'lodash'; import { produce } from 'immer'; import type { PackagePolicy } from '@kbn/fleet-plugin/common'; import { - AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, PACKAGE_POLICY_SAVED_OBJECT_TYPE, } from '@kbn/fleet-plugin/common'; import type { IRouter } from '@kbn/core/server'; @@ -112,7 +112,7 @@ export const createPackRoute = (router: IRouter, osqueryContext: OsqueryAppConte const references = policiesList.map((id) => ({ id, name: agentPoliciesIdMap[id]?.name, - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, })); const packSO = await savedObjectsClient.create( diff --git a/x-pack/plugins/osquery/server/routes/pack/find_pack_route.ts b/x-pack/plugins/osquery/server/routes/pack/find_pack_route.ts index 808bb1bdbb864..450f3ff805acb 100644 --- a/x-pack/plugins/osquery/server/routes/pack/find_pack_route.ts +++ b/x-pack/plugins/osquery/server/routes/pack/find_pack_route.ts @@ -7,7 +7,7 @@ import { filter, map, omit } from 'lodash'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; import type { IRouter } from '@kbn/core/server'; import type { FindPacksRequestQuerySchema } from '../../../common/api'; import { buildRouteValidation } from '../../utils/build_validation/route_validation'; @@ -51,7 +51,7 @@ export const findPackRoute = (router: IRouter) => { const packSavedObjects: PackResponseData[] = map(soClientResponse.saved_objects, (pack) => { const policyIds = map( - filter(pack.references, ['type', AGENT_POLICY_SAVED_OBJECT_TYPE]), + filter(pack.references, ['type', LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE]), 'id' ); diff --git a/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts b/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts index d42d3f95bebac..724deedf19845 100644 --- a/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts +++ b/x-pack/plugins/osquery/server/routes/pack/read_pack_route.ts @@ -6,7 +6,7 @@ */ import { filter, map } from 'lodash'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common'; import type { IRouter } from '@kbn/core/server'; import type { ReadPacksRequestParamsSchema } from '../../../common/api'; import { buildRouteValidation } from '../../utils/build_validation/route_validation'; @@ -46,7 +46,10 @@ export const readPackRoute = (router: IRouter) => { const { attributes, references, id, ...rest } = await savedObjectsClient.get(packSavedObjectType, request.params.id); - const policyIds = map(filter(references, ['type', AGENT_POLICY_SAVED_OBJECT_TYPE]), 'id'); + const policyIds = map( + filter(references, ['type', LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE]), + 'id' + ); const osqueryPackAssetReference = !!filter(references, ['type', 'osquery-pack-asset']); const data: ReadPackResponseData = { diff --git a/x-pack/plugins/osquery/server/routes/pack/update_pack_route.ts b/x-pack/plugins/osquery/server/routes/pack/update_pack_route.ts index 0109270f539d9..451a7daf4e1d6 100644 --- a/x-pack/plugins/osquery/server/routes/pack/update_pack_route.ts +++ b/x-pack/plugins/osquery/server/routes/pack/update_pack_route.ts @@ -11,7 +11,7 @@ import { unset, has, difference, filter, find, map, mapKeys, uniq, some, isEmpty import { produce } from 'immer'; import type { PackagePolicy } from '@kbn/fleet-plugin/common'; import { - AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, PACKAGE_POLICY_SAVED_OBJECT_TYPE, } from '@kbn/fleet-plugin/common'; import type { IRouter } from '@kbn/core/server'; @@ -135,7 +135,7 @@ export const updatePackRoute = (router: IRouter, osqueryContext: OsqueryAppConte const nonAgentPolicyReferences = filter( currentPackSO.references, - (reference) => reference.type !== AGENT_POLICY_SAVED_OBJECT_TYPE + (reference) => reference.type !== LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE ); const getUpdatedReferences = () => { if (!policy_ids && isEmpty(shards)) { @@ -147,7 +147,7 @@ export const updatePackRoute = (router: IRouter, osqueryContext: OsqueryAppConte ...policiesList.map((id) => ({ id, name: agentPoliciesIdMap[id]?.name, - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, })), ]; }; @@ -173,7 +173,7 @@ export const updatePackRoute = (router: IRouter, osqueryContext: OsqueryAppConte ); const currentAgentPolicyIds = map( - filter(currentPackSO.references, ['type', AGENT_POLICY_SAVED_OBJECT_TYPE]), + filter(currentPackSO.references, ['type', LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE]), 'id' ); const updatedPackSO = await savedObjectsClient.get( diff --git a/x-pack/plugins/osquery/server/routes/status/create_status_route.ts b/x-pack/plugins/osquery/server/routes/status/create_status_route.ts index 06ea214c9cf6b..8b6f75100a371 100644 --- a/x-pack/plugins/osquery/server/routes/status/create_status_route.ts +++ b/x-pack/plugins/osquery/server/routes/status/create_status_route.ts @@ -12,7 +12,7 @@ import { filter, reduce, mapKeys, each, unset, uniq, map, has, flatMap } from 'l import type { PackagePolicyInputStream } from '@kbn/fleet-plugin/common'; import { PACKAGE_POLICY_SAVED_OBJECT_TYPE, - AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, } from '@kbn/fleet-plugin/common'; import type { IRouter } from '@kbn/core/server'; import { API_VERSIONS } from '../../../common/constants'; @@ -146,7 +146,7 @@ export const createStatusRoute = (router: IRouter, osqueryContext: OsqueryAppCon references: packObject.policy_ids.map((policyId: string) => ({ id: policyId, name: agentPolicies[policyId].name, - type: AGENT_POLICY_SAVED_OBJECT_TYPE, + type: LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, })), refresh: 'wait_for', } diff --git a/x-pack/plugins/search_notebooks/server/lib/notebook_catalog.ts b/x-pack/plugins/search_notebooks/server/lib/notebook_catalog.ts index 54d2a1acd055f..6bab7c28e85ca 100644 --- a/x-pack/plugins/search_notebooks/server/lib/notebook_catalog.ts +++ b/x-pack/plugins/search_notebooks/server/lib/notebook_catalog.ts @@ -180,7 +180,7 @@ export const getNotebookMetadata = (id: string, cache: NotebooksCache) => { const nbInfo = cache.catalog.notebooks.find((nb) => nb.id === id); return nbInfo ? cleanNotebookMetadata(nbInfo) : undefined; } - if (!NOTEBOOKS_MAP.hasOwnProperty(id)) { + if (!Object.hasOwn(NOTEBOOKS_MAP, id)) { return undefined; } diff --git a/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/services/role_template_type.ts b/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/services/role_template_type.ts index 97f464ce0494f..b98d2020649b8 100644 --- a/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/services/role_template_type.ts +++ b/x-pack/plugins/security/public/management/role_mappings/edit_role_mapping/services/role_template_type.ts @@ -17,7 +17,8 @@ export function isStoredRoleTemplate( ): roleMappingTemplate is StoredRoleTemplate { return ( roleMappingTemplate.template != null && - roleMappingTemplate.template.hasOwnProperty('id') && + typeof roleMappingTemplate.template === 'object' && + Object.hasOwn(roleMappingTemplate.template, 'id') && typeof (roleMappingTemplate as unknown as StoredRoleTemplate).template.id === 'string' ); } @@ -27,7 +28,8 @@ export function isInlineRoleTemplate( ): roleMappingTemplate is InlineRoleTemplate { return ( roleMappingTemplate.template != null && - roleMappingTemplate.template.hasOwnProperty('source') && + typeof roleMappingTemplate.template === 'object' && + Object.hasOwn(roleMappingTemplate.template, 'source') && typeof (roleMappingTemplate as unknown as InlineRoleTemplate).template.source === 'string' ); } diff --git a/x-pack/plugins/security/public/management/users/edit_user/edit_user_page.tsx b/x-pack/plugins/security/public/management/users/edit_user/edit_user_page.tsx index 9926fe49883eb..cb9587dd2971c 100644 --- a/x-pack/plugins/security/public/management/users/edit_user/edit_user_page.tsx +++ b/x-pack/plugins/security/public/management/users/edit_user/edit_user_page.tsx @@ -99,9 +99,7 @@ export const EditUserPage: FunctionComponent = ({ username }) } /> - - {isDeprecatedUser ? ( <> = ({ username }) ) : undefined} - = ({ username }) onSuccess={backToUsers} disabled={readOnly} /> - {readOnly ? undefined : ( <> {action === 'changePassword' ? ( diff --git a/x-pack/plugins/security/public/management/users/edit_user/user_form.tsx b/x-pack/plugins/security/public/management/users/edit_user/user_form.tsx index b9da87e14ea3d..d5cfc09819157 100644 --- a/x-pack/plugins/security/public/management/users/edit_user/user_form.tsx +++ b/x-pack/plugins/security/public/management/users/edit_user/user_form.tsx @@ -316,7 +316,6 @@ export const UserForm: FunctionComponent = ({ ) : undefined} - {isNewUser ? ( = ({ ) : null} - diff --git a/x-pack/plugins/security/server/authentication/can_redirect_request.ts b/x-pack/plugins/security/server/authentication/can_redirect_request.ts index 37e6d6b7061f7..d2c6c8cee341f 100644 --- a/x-pack/plugins/security/server/authentication/can_redirect_request.ts +++ b/x-pack/plugins/security/server/authentication/can_redirect_request.ts @@ -20,8 +20,8 @@ const KIBANA_VERSION_HEADER = 'kbn-version'; export function canRedirectRequest(request: KibanaRequest) { const headers = request.headers; const route = request.route; - const hasVersionHeader = headers.hasOwnProperty(KIBANA_VERSION_HEADER); - const hasXsrfHeader = headers.hasOwnProperty(KIBANA_XSRF_HEADER); + const hasVersionHeader = Object.hasOwn(headers, KIBANA_VERSION_HEADER); + const hasXsrfHeader = Object.hasOwn(headers, KIBANA_XSRF_HEADER); const isApiRoute = route.options.tags.includes(ROUTE_TAG_API) || diff --git a/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts b/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts index d9a83806abf51..262bc579c34c8 100644 --- a/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts +++ b/x-pack/plugins/security/server/authorization/disable_ui_capabilities.ts @@ -144,7 +144,7 @@ export function disableUICapabilitiesFactory( // Capabilities derived from Elasticsearch features should not be // included here, as the result is used to check authorization against // Kibana Privileges, rather than Elasticsearch Privileges. - if (elasticsearchFeatureMap.hasOwnProperty(featureId)) { + if (Object.hasOwn(elasticsearchFeatureMap, featureId)) { return []; } if (typeof value === 'boolean') { @@ -207,7 +207,7 @@ export function disableUICapabilitiesFactory( const action = authz.actions.ui.get(featureId, ...uiCapabilityParts); - const isElasticsearchFeature = elasticsearchFeatureMap.hasOwnProperty(featureId); + const isElasticsearchFeature = Object.hasOwn(elasticsearchFeatureMap, featureId); const isCatalogueFeature = featureId === 'catalogue'; const isManagementFeature = featureId === 'management'; @@ -238,7 +238,7 @@ export function disableUICapabilitiesFactory( } else if (isManagementFeature) { const [managementSectionId, managementEntryId] = uiCapabilityParts; const featureGrantsManagementEntry = - (esFeature.management ?? {}).hasOwnProperty(managementSectionId) && + Object.hasOwn(esFeature.management ?? {}, managementSectionId) && esFeature.management![managementSectionId].includes(managementEntryId); return ( diff --git a/x-pack/plugins/security/server/routes/analytics/record_violations.ts b/x-pack/plugins/security/server/routes/analytics/record_violations.ts index 9ee4e1c66be3e..826a304f1656e 100644 --- a/x-pack/plugins/security/server/routes/analytics/record_violations.ts +++ b/x-pack/plugins/security/server/routes/analytics/record_violations.ts @@ -161,7 +161,7 @@ export function defineRecordViolations({ router, analyticsService }: RouteDefini * This endpoint is called by the browser in the background so `kbn-xsrf` header is not sent. */ xsrfRequired: false, - access: 'internal', + access: 'public', body: { /** * Both `application/reports+json` (CSP3 spec) and `application/csp-report` (Safari) are diff --git a/x-pack/plugins/security/server/routes/feature_check/feature_check.ts b/x-pack/plugins/security/server/routes/feature_check/feature_check.ts index 46276957b6c83..b256ee77e55ff 100644 --- a/x-pack/plugins/security/server/routes/feature_check/feature_check.ts +++ b/x-pack/plugins/security/server/routes/feature_check/feature_check.ts @@ -142,5 +142,5 @@ async function getEnabledSecurityFeatures(esClient: ElasticsearchClient, logger: function usesCustomScriptSettings( nodeResponse: NodeSettingsResponse | {} ): nodeResponse is NodeSettingsResponse { - return nodeResponse.hasOwnProperty('nodes'); + return Object.hasOwn(nodeResponse, 'nodes'); } diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index 7357f48474079..5da9b87a4e267 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -20,6 +20,7 @@ export { SecurityPageName } from '@kbn/security-solution-navigation'; export const APP_ID = 'securitySolution' as const; export const APP_UI_ID = 'securitySolutionUI' as const; export const ASSISTANT_FEATURE_ID = 'securitySolutionAssistant' as const; +export const ATTACK_DISCOVERY_FEATURE_ID = 'securitySolutionAttackDiscovery' as const; export const CASES_FEATURE_ID = 'securitySolutionCases' as const; export const SERVER_APP_ID = 'siem' as const; export const APP_NAME = 'Security' as const; diff --git a/x-pack/plugins/security_solution/common/search_strategy/eql/validation/helpers.mock.ts b/x-pack/plugins/security_solution/common/search_strategy/eql/validation/helpers.mock.ts index ca44885d164d6..86b5d246ff378 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/eql/validation/helpers.mock.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/eql/validation/helpers.mock.ts @@ -56,6 +56,32 @@ export const getEqlResponseWithValidationErrors = (): ErrorResponse => ({ }, }); +export const getEqlResponseWithMappingError = (): ErrorResponse => ({ + error: { + root_cause: [ + { + type: 'mapping_exception', + reason: "Inaccessible index 'restricted-*'", + }, + ], + type: 'mapping_exception', + reason: "Inaccessible index 'restricted-*'", + }, +}); + +export const getEqlResponseWithParsingError = (): ErrorResponse => ({ + error: { + root_cause: [ + { + type: 'parsing_exception', + reason: "line 1:5: missing 'where' at 'demo'", + }, + ], + type: 'parsing_exception', + reason: "line 1:5: missing 'where' at 'demo'", + }, +}); + export const getEqlResponseWithNonValidationError = (): TransportResult['body'] => ({ error: { root_cause: [ diff --git a/x-pack/plugins/security_solution/common/search_strategy/eql/validation/helpers.ts b/x-pack/plugins/security_solution/common/search_strategy/eql/validation/helpers.ts index 63a812cad759a..c183cd7ceb605 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/eql/validation/helpers.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/eql/validation/helpers.ts @@ -23,12 +23,27 @@ export interface ErrorResponse { const isValidationErrorType = (type: unknown): boolean => type === PARSING_ERROR_TYPE || type === VERIFICATION_ERROR_TYPE || type === MAPPING_ERROR_TYPE; +const isParsingErrorType = (type: unknown): boolean => type === PARSING_ERROR_TYPE; + +const isVerificationErrorType = (type: unknown): boolean => type === VERIFICATION_ERROR_TYPE; + +const isMappingErrorType = (type: unknown): boolean => type === MAPPING_ERROR_TYPE; + export const isErrorResponse = (response: unknown): response is ErrorResponse => has(response, 'error.type'); export const isValidationErrorResponse = (response: unknown): response is ErrorResponse => isErrorResponse(response) && isValidationErrorType(get(response, 'error.type')); +export const isParsingErrorResponse = (response: unknown): response is ErrorResponse => + isErrorResponse(response) && isParsingErrorType(get(response, 'error.type')); + +export const isVerificationErrorResponse = (response: unknown): response is ErrorResponse => + isErrorResponse(response) && isVerificationErrorType(get(response, 'error.type')); + +export const isMappingErrorResponse = (response: unknown): response is ErrorResponse => + isErrorResponse(response) && isMappingErrorType(get(response, 'error.type')); + export const getValidationErrors = (response: ErrorResponse): string[] => response.error.root_cause .filter((cause) => isValidationErrorType(cause.type)) diff --git a/x-pack/plugins/security_solution/common/test/ess_roles.json b/x-pack/plugins/security_solution/common/test/ess_roles.json index 9bf9e1b64aee3..94bd3d57a6d7b 100644 --- a/x-pack/plugins/security_solution/common/test/ess_roles.json +++ b/x-pack/plugins/security_solution/common/test/ess_roles.json @@ -29,6 +29,7 @@ "ml": ["read"], "siem": ["read", "read_alerts"], "securitySolutionAssistant": ["none"], + "securitySolutionAttackDiscovery": ["none"], "securitySolutionCases": ["read"], "actions": ["read"], "builtInAlerts": ["read"] @@ -77,6 +78,7 @@ "ml": ["read"], "siem": ["all", "read_alerts", "crud_alerts"], "securitySolutionAssistant": ["all"], + "securitySolutionAttackDiscovery": ["all"], "securitySolutionCases": ["all"], "actions": ["read"], "builtInAlerts": ["all"] @@ -125,6 +127,7 @@ "ml": ["read"], "siem": ["all", "read_alerts", "crud_alerts"], "securitySolutionAssistant": ["all"], + "securitySolutionAttackDiscovery": ["all"], "securitySolutionCases": ["all"], "builtInAlerts": ["all"] }, diff --git a/x-pack/plugins/security_solution/package.json b/x-pack/plugins/security_solution/package.json index 98575c1f48c26..62a406960ceeb 100644 --- a/x-pack/plugins/security_solution/package.json +++ b/x-pack/plugins/security_solution/package.json @@ -24,7 +24,7 @@ "cypress:dw:endpoint:open": "echo '\n** WARNING **: Run script `cypress:dw:endpoint:open` no longer valid! Use `cypress:dw:open` instead\n'", "junit:merge": "../../../node_modules/.bin/mochawesome-merge ../../../target/kibana-security-solution/cypress/results/mochawesome*.json > ../../../target/kibana-security-solution/cypress/results/output.json && ../../../node_modules/.bin/marge ../../../target/kibana-security-solution/cypress/results/output.json --reportDir ../../../target/kibana-security-solution/cypress/results && yarn junit:transform && mkdir -p ../../../target/junit && cp ../../../target/kibana-security-solution/cypress/results/*.xml ../../../target/junit/", "test:generate": "node scripts/endpoint/resolver_generator", - "test:generate:serverless-dev": "node scripts/endpoint/resolver_generator --node http://elastic_serverless:changeme@127.0.0.1:9200 --kibana http://elastic_serverless:changeme@127.0.0.1:5601", + "test:generate:serverless-dev": "NODE_TLS_REJECT_UNAUTHORIZED=0 node --no-warnings scripts/endpoint/resolver_generator --node https://elastic_serverless:changeme@127.0.0.1:9200 --kibana http://elastic_serverless:changeme@127.0.0.1:5601", "mappings:generate": "node scripts/mappings/mappings_generator", "mappings:load": "node scripts/mappings/mappings_loader", "junit:transform": "node scripts/junit_transformer --pathPattern '../../../target/kibana-security-solution/cypress/results/*.xml' --rootDirectory ../../../ --reportName 'Security Solution Cypress' --writeInPlace", diff --git a/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx b/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx index baf36e278b71f..f145deb9febc7 100644 --- a/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx @@ -107,7 +107,6 @@ const CommentActionsComponent: React.FC = ({ message }) => { )} - = ({ message }) => { /> - = ({ message }) => { /> - diff --git a/x-pack/plugins/security_solution/public/attack_discovery/links.test.ts b/x-pack/plugins/security_solution/public/attack_discovery/links.test.ts new file mode 100644 index 0000000000000..01ccdf773c081 --- /dev/null +++ b/x-pack/plugins/security_solution/public/attack_discovery/links.test.ts @@ -0,0 +1,22 @@ +/* + * 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 { ATTACK_DISCOVERY_FEATURE_ID } from '../../common/constants'; +import { SERVER_APP_ID } from '../../common'; +import { links } from './links'; + +describe('links', () => { + it('for serverless, it specifies capabilities as an AND condition, via a nested array', () => { + expect(links.capabilities).toEqual([ + [`${SERVER_APP_ID}.show`, `${ATTACK_DISCOVERY_FEATURE_ID}.attack-discovery`], + ]); + }); + + it('for self managed, it requires an enterprise license', () => { + expect(links.licenseType).toEqual('enterprise'); + }); +}); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/links.ts b/x-pack/plugins/security_solution/public/attack_discovery/links.ts index dd3e45dfefc8a..531c0a1c48610 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/links.ts +++ b/x-pack/plugins/security_solution/public/attack_discovery/links.ts @@ -8,11 +8,16 @@ import { i18n } from '@kbn/i18n'; import { ATTACK_DISCOVERY } from '../app/translations'; -import { ATTACK_DISCOVERY_PATH, SecurityPageName, SERVER_APP_ID } from '../../common/constants'; +import { + ATTACK_DISCOVERY_FEATURE_ID, + ATTACK_DISCOVERY_PATH, + SecurityPageName, + SERVER_APP_ID, +} from '../../common/constants'; import type { LinkItem } from '../common/links/types'; export const links: LinkItem = { - capabilities: [`${SERVER_APP_ID}.show`], + capabilities: [[`${SERVER_APP_ID}.show`, `${ATTACK_DISCOVERY_FEATURE_ID}.attack-discovery`]], // This is an AND condition via the nested array globalNavPosition: 4, globalSearchKeywords: [ i18n.translate('xpack.securitySolution.appLinks.attackDiscovery', { @@ -20,6 +25,7 @@ export const links: LinkItem = { }), ], id: SecurityPageName.attackDiscovery, + licenseType: 'enterprise', path: ATTACK_DISCOVERY_PATH, title: ATTACK_DISCOVERY, }; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.test.tsx index 70acc1dbb2ca8..56b2205b28726 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.test.tsx @@ -68,30 +68,6 @@ describe('EmptyPrompt', () => { }); }); - describe('when the user does NOT have the assistant privilege', () => { - it('disables the generate button when the user does NOT have the assistant privilege', () => { - (useAssistantAvailability as jest.Mock).mockReturnValue({ - hasAssistantPrivilege: false, // <-- the user does NOT have the assistant privilege - isAssistantEnabled: true, - }); - - render( - - - - ); - - const generateButton = screen.getByTestId('generate'); - - expect(generateButton).toBeDisabled(); - }); - }); - describe('when loading is true', () => { const isLoading = true; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.tsx index 3a616c299ecc5..75c8533efcc92 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/empty_prompt/index.tsx @@ -21,7 +21,6 @@ import { import { css } from '@emotion/react'; import React, { useMemo } from 'react'; -import { useAssistantAvailability } from '../../../assistant/use_assistant_availability'; import { AnimatedCounter } from './animated_counter'; import * as i18n from './translations'; @@ -39,7 +38,6 @@ const EmptyPromptComponent: React.FC = ({ onGenerate, }) => { const { euiTheme } = useEuiTheme(); - const { hasAssistantPrivilege } = useAssistantAvailability(); const title = useMemo( () => ( = ({ ); const actions = useMemo(() => { - const disabled = !hasAssistantPrivilege || isLoading || isDisabled; + const disabled = isLoading || isDisabled; return ( = ({ ); - }, [hasAssistantPrivilege, isDisabled, isLoading, onGenerate]); + }, [isDisabled, isLoading, onGenerate]); return ( { expect(onGenerate).toHaveBeenCalled(); }); - it('disables the generate button when the user does NOT have the assistant privilege', () => { - (useAssistantAvailability as jest.Mock).mockReturnValue({ - hasAssistantPrivilege: false, - isAssistantEnabled: true, - }); - - render( - -
      - - ); - - const generate = screen.getByTestId('generate'); - - expect(generate).toBeDisabled(); - }); - it('displays the cancel button when loading', () => { const isLoading = true; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx index fa4a9caa3dcb1..583bcc25d0eb6 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/header/index.tsx @@ -14,7 +14,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react'; import type { AttackDiscoveryStats } from '@kbn/elastic-assistant-common'; import { StatusBell } from './status_bell'; -import { useAssistantAvailability } from '../../../assistant/use_assistant_availability'; import * as i18n from './translations'; interface Props { @@ -38,9 +37,8 @@ const HeaderComponent: React.FC = ({ onCancel, stats, }) => { - const { hasAssistantPrivilege } = useAssistantAvailability(); const { euiTheme } = useEuiTheme(); - const disabled = !hasAssistantPrivilege || connectorId == null; + const disabled = connectorId == null; const [didCancel, setDidCancel] = useState(false); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/index.test.tsx index f27f8d448bbd3..97f98b81dc153 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/index.test.tsx @@ -9,7 +9,6 @@ import { mockCasesContext } from '@kbn/cases-plugin/public/mocks/mock_cases_cont import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { createFilterManagerMock } from '@kbn/data-plugin/public/query/filter_manager/filter_manager.mock'; import { createStubDataView } from '@kbn/data-views-plugin/common/data_view.stub'; -import type { AssistantAvailability } from '@kbn/elastic-assistant'; import { UpsellingService } from '@kbn/security-solution-upselling/service'; import { Router } from '@kbn/shared-ux-router'; import { render, screen } from '@testing-library/react'; @@ -17,7 +16,6 @@ import React from 'react'; import { useLocalStorage } from 'react-use'; import { TestProviders } from '../../common/mock'; -import { MockAssistantProvider } from '../../common/mock/mock_assistant_provider'; import { ATTACK_DISCOVERY_PATH } from '../../../common/constants'; import { mockHistory } from '../../common/utils/route/mocks'; import { AttackDiscoveryPage } from '.'; @@ -551,52 +549,4 @@ describe('AttackDiscovery', () => { expect(screen.queryByTestId('upgrade')).toBeNull(); }); }); - - describe('when the user does not have an Enterprise license', () => { - const assistantUnavailable: AssistantAvailability = { - hasAssistantPrivilege: false, - hasConnectorsAllPrivilege: true, - hasConnectorsReadPrivilege: true, - hasUpdateAIAssistantAnonymization: false, - isAssistantEnabled: false, // <-- non-Enterprise license - }; - - beforeEach(() => { - render( - - - - - - - - - - ); - }); - - it('does NOT render the animated logo', () => { - expect(screen.queryByTestId('animatedLogo')).toBeNull(); - }); - - it('does NOT render the header', () => { - expect(screen.queryByTestId('header')).toBeNull(); - }); - - it('does NOT render the summary', () => { - expect(screen.queryByTestId('summary')).toBeNull(); - }); - - it('does NOT render attack discoveries', () => { - expect(screen.queryAllByTestId('attackDiscovery')).toHaveLength(0); - }); - - it('does NOT render the loading callout', () => { - expect(screen.queryByTestId('loadingCallout')).toBeNull(); - }); - - it('renders the upgrade call to action', () => { - expect(screen.getByTestId('upgrade')).toBeInTheDocument(); - }); - }); }); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/index.tsx index 9a5c311b5494f..f3981696b3e80 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/index.tsx @@ -18,7 +18,6 @@ import { uniq } from 'lodash/fp'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { useLocalStorage } from 'react-use'; -import { SecurityRoutePageWrapper } from '../../common/components/security_route_page_wrapper'; import { SecurityPageName } from '../../../common/constants'; import { HeaderPage } from '../../common/components/header_page'; import { useSpaceId } from '../../common/hooks/use_space_id'; @@ -35,17 +34,12 @@ import { EmptyStates } from './empty_states'; import { LoadingCallout } from './loading_callout'; import { PageTitle } from './page_title'; import { Summary } from './summary'; -import { Upgrade } from './upgrade'; import { useAttackDiscovery } from '../use_attack_discovery'; const AttackDiscoveryPageComponent: React.FC = () => { const spaceId = useSpaceId() ?? 'default'; - const { - assistantAvailability: { isAssistantEnabled }, - http, - knowledgeBase, - } = useAssistantContext(); + const { http, knowledgeBase } = useAssistantContext(); const { data: aiConnectors } = useLoadConnectors({ http, }); @@ -144,18 +138,10 @@ const AttackDiscoveryPageComponent: React.FC = () => { }, [aiConnectors]); const animatedLogo = useMemo(() => , []); + const connectorsAreConfigured = aiConnectors != null && aiConnectors.length > 0; const attackDiscoveriesCount = selectedConnectorAttackDiscoveries.length; - if (!isAssistantEnabled) { - return ( - <> - - - - ); - } - return (
      { `} data-test-subj="fullHeightContainer" > - +
      { )} - +
      ); }; diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/page_title/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/page_title/index.tsx index f5bab1cbdf87a..65e07aa726d11 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/page_title/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/pages/page_title/index.tsx @@ -15,7 +15,13 @@ const PageTitleComponent: React.FC = () => { const { euiTheme } = useEuiTheme(); return ( - +

      {i18n.ATTACK_DISCOVERY_PAGE_TITLE}

      @@ -23,14 +29,10 @@ const PageTitleComponent: React.FC = () => {
      { size="m" color="hollow" css={css` - margin-bottom: ${euiTheme.size.s}; + .euiBetaBadge__icon { + position: relative; + top: 5px; + } `} /> diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/index.test.tsx deleted file mode 100644 index e72f53e9062d7..0000000000000 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/index.test.tsx +++ /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 { render, screen } from '@testing-library/react'; -import React from 'react'; - -import { Upgrade } from '.'; -import { TestProviders } from '../../../common/mock'; -import { - ATTACK_DISCOVERY_IS_AVAILABLE, - FIND_POTENTIAL_ATTACKS_WITH_AI, - PLEASE_UPGRADE, -} from './translations'; - -describe('Upgrade', () => { - beforeEach(() => { - render( - - - - ); - }); - - it('renders the assistant avatar', () => { - const assistantAvatar = screen.getByTestId('assistantAvatar'); - - expect(assistantAvatar).toBeInTheDocument(); - }); - - it('renders the expected upgrade title', () => { - const upgradeTitle = screen.getByTestId('upgradeTitle'); - - expect(upgradeTitle).toHaveTextContent(FIND_POTENTIAL_ATTACKS_WITH_AI); - }); - - it('renders the attack discovery availability text', () => { - const attackDiscoveryIsAvailable = screen.getByTestId('attackDiscoveryIsAvailable'); - - expect(attackDiscoveryIsAvailable).toHaveTextContent(ATTACK_DISCOVERY_IS_AVAILABLE); - }); - - it('renders the please upgrade text', () => { - const pleaseUpgrade = screen.getByTestId('pleaseUpgrade'); - - expect(pleaseUpgrade).toHaveTextContent(PLEASE_UPGRADE); - }); - - it('renders the upgrade subscription plans (docs) link', () => { - const upgradeDocs = screen.getByRole('link', { name: 'Subscription plans' }); - - expect(upgradeDocs).toBeInTheDocument(); - }); - - it('renders the upgrade Manage license call to action', () => { - const upgradeCta = screen.getByRole('link', { name: 'Manage license' }); - - expect(upgradeCta).toBeInTheDocument(); - }); -}); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/translations.ts b/x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/translations.ts deleted file mode 100644 index eece0fb5a6870..0000000000000 --- a/x-pack/plugins/security_solution/public/attack_discovery/pages/upgrade/translations.ts +++ /dev/null @@ -1,36 +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 { i18n } from '@kbn/i18n'; - -export const FIND_POTENTIAL_ATTACKS_WITH_AI = i18n.translate( - 'xpack.securitySolution.attackDiscovery.upgrade.findPotentialAttacksWithAiTitle', - { - defaultMessage: 'Find potential attacks with AI', - } -); - -export const ATTACK_DISCOVERY_IS_AVAILABLE = i18n.translate( - 'xpack.securitySolution.attackDiscovery.upgrade.attackDiscoveryIsAvailable', - { - defaultMessage: 'Your license does not support Attack discovery.', - } -); - -export const PLEASE_UPGRADE = i18n.translate( - 'xpack.securitySolution.attackDiscovery.upgrade.pleaseUpgradeMessage', - { - defaultMessage: 'Please upgrade your license to use this feature.', - } -); - -export const UPGRADE = i18n.translate( - 'xpack.securitySolution.attackDiscovery.upgrade.upgradeButton', - { - defaultMessage: 'Upgrade', - } -); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/routes.tsx b/x-pack/plugins/security_solution/public/attack_discovery/routes.tsx index 10c9a70e4217f..f91fda6cd6304 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/routes.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/routes.tsx @@ -6,7 +6,6 @@ */ import React from 'react'; -import { TrackApplicationView } from '@kbn/usage-collection-plugin/public'; import { AttackDiscoveryPage } from './pages'; import type { SecuritySubPluginRoutes } from '../app/types'; @@ -17,11 +16,9 @@ import { SecurityRoutePageWrapper } from '../common/components/security_route_pa export const AttackDiscoveryRoutes = () => ( - - - - - + + + ); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.test.tsx b/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.test.tsx index d21630bb4c835..6329ce5ca699a 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.test.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.test.tsx @@ -5,15 +5,24 @@ * 2.0. */ -import React from 'react'; +import { useLoadConnectors } from '@kbn/elastic-assistant'; +import { useFetchAnonymizationFields } from '@kbn/elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields'; import { renderHook, act } from '@testing-library/react-hooks'; +import React from 'react'; + import { useKibana } from '../../common/lib/kibana'; -import { useFetchAnonymizationFields } from '@kbn/elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields'; import { usePollApi } from '../hooks/use_poll_api'; import { useAttackDiscovery } from '.'; import { ERROR_GENERATING_ATTACK_DISCOVERIES } from '../pages/translations'; import { useKibana as mockUseKibana } from '../../common/lib/kibana/__mocks__'; +jest.mock('../../assistant/use_assistant_availability', () => ({ + useAssistantAvailability: jest.fn(() => ({ + hasAssistantPrivilege: true, + isAssistantEnabled: true, + })), +})); + jest.mock( '@kbn/elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields' ); @@ -40,10 +49,10 @@ jest.mock('@kbn/elastic-assistant', () => ({ latestAlerts: 20, }, }), - useLoadConnectors: () => ({ + useLoadConnectors: jest.fn(() => ({ isFetched: true, data: mockConnectors, - }), + })), })); const mockAttackDiscoveryPost = { timestamp: '2024-06-13T17:50:59.409Z', @@ -224,4 +233,26 @@ describe('useAttackDiscovery', () => { expect(result.current.isLoading).toBe(false); expect(result.current.lastUpdated).toEqual(null); }); + + describe('when zero connectors are configured', () => { + beforeEach(() => { + (useLoadConnectors as jest.Mock).mockReturnValue({ + isFetched: true, + data: [], // <-- zero connectors configured + }); + + renderHook(() => useAttackDiscovery({ connectorId: 'test-id', setLoadingConnectorId })); + }); + + afterEach(() => { + (useLoadConnectors as jest.Mock).mockReturnValue({ + isFetched: true, + data: mockConnectors, + }); + }); + + it('does NOT call pollApi when zero connectors are configured', () => { + expect(mockPollApi.pollApi).not.toHaveBeenCalled(); + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.tsx b/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.tsx index 87f0f4d9a5089..deb1c556bdb43 100644 --- a/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.tsx +++ b/x-pack/plugins/security_solution/public/attack_discovery/use_attack_discovery/index.tsx @@ -109,7 +109,12 @@ export const useAttackDiscovery = ({ ]); useEffect(() => { - if (connectorId != null && connectorId !== '') { + if ( + connectorId != null && + connectorId !== '' && + aiConnectors != null && + aiConnectors.length > 0 + ) { pollApi(); setLoadingConnectorId?.(connectorId); setAlertsContextCount(null); @@ -120,7 +125,7 @@ export const useAttackDiscovery = ({ setGenerationIntervals([]); setPollStatus(null); } - }, [pollApi, connectorId, setLoadingConnectorId, setPollStatus]); + }, [aiConnectors, connectorId, pollApi, setLoadingConnectorId, setPollStatus]); useEffect(() => { if (pollStatus === 'running') { diff --git a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx index 80d598679930f..ea81a232cff52 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx @@ -33,6 +33,7 @@ import { isEmpty } from 'lodash'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; import type { EuiTheme } from '@kbn/kibana-react-plugin/common'; import type { EuiDataGridRowHeightsOptions } from '@elastic/eui'; +import type { RunTimeMappings } from '@kbn/timelines-plugin/common/search_strategy'; import { ALERTS_TABLE_VIEW_SELECTION_KEY } from '../../../../common/constants'; import type { Sort } from '../../../timelines/components/timeline/body/sort'; import type { @@ -179,7 +180,7 @@ const StatefulEventsViewerComponent: React.FC { + const signal = new AbortController().signal; + return validateEql({ + data: mockDataService, + dataViewTitle: 'logs-*', + query: 'any where true', + signal, + runtimeMappings: undefined, + options: undefined, + }); +}; + +describe('validateEql', () => { + beforeEach(() => { + jest.clearAllMocks(); + }); + + describe('handle EqlSearchStrategyResponse', () => { + it('should return valid set to true if validation response is not an error', async () => { + searchMock.search.mockImplementation(() => of({ rawResponse: 'Successful validation!' })); + const response = await triggerValidateEql(); + + expect(response).toEqual({ valid: true }); + }); + + it('should return EQL_ERR_INVALID_EQL error in case of `verification_exception` error', async () => { + searchMock.search.mockImplementation(() => + of({ rawResponse: getEqlResponseWithValidationError() }) + ); + const response = await triggerValidateEql(); + + expect(response).toEqual({ + valid: false, + error: { + code: 'EQL_ERR_INVALID_EQL', + messages: [ + 'Found 2 problems\nline 1:1: Unknown column [event.category]\nline 1:13: Unknown column [event.name]', + ], + }, + }); + }); + + it('should return EQL_ERR_INVALID_EQL error in case of multiple `verification_exception` errors', async () => { + searchMock.search.mockImplementation(() => + of({ rawResponse: getEqlResponseWithValidationErrors() }) + ); + const response = await triggerValidateEql(); + + expect(response).toEqual({ + valid: false, + error: { + code: 'EQL_ERR_INVALID_EQL', + messages: [ + 'Found 2 problems\nline 1:1: Unknown column [event.category]\nline 1:13: Unknown column [event.name]', + "line 1:4: mismatched input '' expecting 'where'", + ], + }, + }); + }); + + it('should return EQL_ERR_INVALID_EQL error in case of `mapping_exception` error', async () => { + searchMock.search.mockImplementation(() => + of({ rawResponse: getEqlResponseWithMappingError() }) + ); + const response = await triggerValidateEql(); + + expect(response).toEqual({ + valid: false, + error: { code: 'EQL_ERR_INVALID_EQL', messages: ["Inaccessible index 'restricted-*'"] }, + }); + }); + + it('should return EQL_ERR_INVALID_SYNTAX error in case of `parsing_exception` error', async () => { + searchMock.search.mockImplementation(() => + of({ rawResponse: getEqlResponseWithParsingError() }) + ); + const response = await triggerValidateEql(); + + expect(response).toEqual({ + valid: false, + error: { + code: 'EQL_ERR_INVALID_SYNTAX', + messages: ["line 1:5: missing 'where' at 'demo'"], + }, + }); + }); + + it('should return EQL_ERR_FAILED_REQUEST error in case of non-validation error', async () => { + searchMock.search.mockImplementation(() => + of({ rawResponse: getEqlResponseWithNonValidationError() }) + ); + const response = await triggerValidateEql(); + + expect(response).toEqual({ + valid: false, + error: { + code: 'EQL_ERR_FAILED_REQUEST', + error: expect.objectContaining( + new Error(JSON.stringify(getEqlResponseWithNonValidationError())) + ), + }, + }); + }); + + it('should return EQL_ERR_MISSING_DATA_SOURCE error in case `data.search` throws an error which starts with `index_not_found_exception`', async () => { + const message = 'index_not_found_exception Found 1 problem line -1:-1: Unknown index [*,-*]'; + searchMock.search.mockImplementation(() => { + throw new Error(message); + }); + const response = await triggerValidateEql(); + + expect(response).toEqual({ + valid: false, + error: { code: 'EQL_ERR_MISSING_DATA_SOURCE', messages: [message] }, + }); + }); + + it('should return EQL_ERR_FAILED_REQUEST error in case `data.search` throws an error', async () => { + const message = 'Internal exception'; + searchMock.search.mockImplementation(() => { + throw new Error(message); + }); + const response = await triggerValidateEql(); + + expect(response).toEqual({ + valid: false, + error: { + code: 'EQL_ERR_FAILED_REQUEST', + error: expect.objectContaining(new Error(message)), + }, + }); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/common/hooks/eql/api.ts b/x-pack/plugins/security_solution/public/common/hooks/eql/api.ts index 46d01bf15d577..921d4fde4bfd0 100644 --- a/x-pack/plugins/security_solution/public/common/hooks/eql/api.ts +++ b/x-pack/plugins/security_solution/public/common/hooks/eql/api.ts @@ -15,9 +15,18 @@ import type { EqlOptionsSelected } from '../../../../common/search_strategy'; import { getValidationErrors, isErrorResponse, - isValidationErrorResponse, + isMappingErrorResponse, + isParsingErrorResponse, + isVerificationErrorResponse, } from '../../../../common/search_strategy/eql'; +export enum EQL_ERROR_CODES { + FAILED_REQUEST = 'EQL_ERR_FAILED_REQUEST', + INVALID_EQL = 'EQL_ERR_INVALID_EQL', + INVALID_SYNTAX = 'EQL_ERR_INVALID_SYNTAX', + MISSING_DATA_SOURCE = 'EQL_ERR_MISSING_DATA_SOURCE', +} + interface Params { dataViewTitle: string; query: string; @@ -34,31 +43,60 @@ export const validateEql = async ({ signal, runtimeMappings, options, -}: Params): Promise<{ valid: boolean; errors: string[] }> => { - const { rawResponse: response } = await firstValueFrom( - data.search.search( - { - params: { - index: dataViewTitle, - body: { query, runtime_mappings: runtimeMappings, size: 0 }, - timestamp_field: options?.timestampField, - tiebreaker_field: options?.tiebreakerField || undefined, - event_category_field: options?.eventCategoryField, +}: Params): Promise<{ + valid: boolean; + error?: { code: EQL_ERROR_CODES; messages?: string[]; error?: Error }; +}> => { + try { + const { rawResponse: response } = await firstValueFrom( + data.search.search( + { + params: { + index: dataViewTitle, + body: { query, runtime_mappings: runtimeMappings, size: 0 }, + timestamp_field: options?.timestampField, + tiebreaker_field: options?.tiebreakerField || undefined, + event_category_field: options?.eventCategoryField, + }, + options: { ignore: [400] }, }, - options: { ignore: [400] }, + { + strategy: EQL_SEARCH_STRATEGY, + abortSignal: signal, + } + ) + ); + if (isParsingErrorResponse(response)) { + return { + valid: false, + error: { code: EQL_ERROR_CODES.INVALID_SYNTAX, messages: getValidationErrors(response) }, + }; + } else if (isVerificationErrorResponse(response) || isMappingErrorResponse(response)) { + return { + valid: false, + error: { code: EQL_ERROR_CODES.INVALID_EQL, messages: getValidationErrors(response) }, + }; + } else if (isErrorResponse(response)) { + return { + valid: false, + error: { code: EQL_ERROR_CODES.FAILED_REQUEST, error: new Error(JSON.stringify(response)) }, + }; + } else { + return { valid: true }; + } + } catch (error) { + if (error instanceof Error && error.message.startsWith('index_not_found_exception')) { + return { + valid: false, + error: { code: EQL_ERROR_CODES.MISSING_DATA_SOURCE, messages: [error.message] }, + }; + } + return { + valid: false, + error: { + code: EQL_ERROR_CODES.FAILED_REQUEST, + error, }, - { - strategy: EQL_SEARCH_STRATEGY, - abortSignal: signal, - } - ) - ); - - if (isValidationErrorResponse(response)) { - return { valid: false, errors: getValidationErrors(response) }; - } else if (isErrorResponse(response)) { - throw new Error(JSON.stringify(response)); - } else { - return { valid: true, errors: [] }; + }; } }; diff --git a/x-pack/plugins/security_solution/public/common/mock/global_state.ts b/x-pack/plugins/security_solution/public/common/mock/global_state.ts index 7b399e8848c78..9201d57b998b8 100644 --- a/x-pack/plugins/security_solution/public/common/mock/global_state.ts +++ b/x-pack/plugins/security_solution/public/common/mock/global_state.ts @@ -40,7 +40,7 @@ import type { ManagementState } from '../../management/types'; import { initialSourcererState, SourcererScopeName } from '../../sourcerer/store/model'; import { allowedExperimentalValues } from '../../../common/experimental_features'; import { getScopePatternListSelection } from '../../sourcerer/store/helpers'; -import { mockBrowserFields, mockIndexFields, mockRuntimeMappings } from '../containers/source/mock'; +import { mockBrowserFields, mockIndexFields } from '../containers/source/mock'; import { usersModel } from '../../explore/users/store'; import { UsersFields } from '../../../common/search_strategy/security_solution/users/common'; import { initialGroupingState } from '../store/grouping/reducer'; @@ -62,7 +62,6 @@ export const mockSourcererState: SourcererState = { fields: mockFieldMap, loading: false, patternList: [...DEFAULT_INDEX_PATTERN, `${DEFAULT_SIGNALS_INDEX}-spacename`], - runtimeMappings: mockRuntimeMappings, title: [...DEFAULT_INDEX_PATTERN, `${DEFAULT_SIGNALS_INDEX}-spacename`].join(','), }, }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.mock.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.mock.ts index 83d24114e4f86..b6c9d4d71f270 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.mock.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.mock.ts @@ -5,11 +5,11 @@ * 2.0. */ +import { EQL_ERROR_CODES } from '../../../../common/hooks/eql/api'; import type { ValidationError } from '../../../../shared_imports'; -import { ERROR_CODES } from './validators'; export const getEqlValidationError = (): ValidationError => ({ - code: ERROR_CODES.INVALID_EQL, + code: EQL_ERROR_CODES.INVALID_EQL, messages: ['line 1: WRONG\nline 2: ALSO WRONG'], message: '', }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.ts index b3d6abc62d0b1..04ea9bbc43356 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/eql_query_bar/validators.ts @@ -12,15 +12,10 @@ import { isEqlRule } from '../../../../../common/detection_engine/utils'; import { KibanaServices } from '../../../../common/lib/kibana'; import type { DefineStepRule } from '../../../../detections/pages/detection_engine/rules/types'; import { DataSourceType } from '../../../../detections/pages/detection_engine/rules/types'; -import { validateEql } from '../../../../common/hooks/eql/api'; +import { validateEql, EQL_ERROR_CODES } from '../../../../common/hooks/eql/api'; import type { FieldValueQueryBar } from '../query_bar'; import * as i18n from './translations'; -export enum ERROR_CODES { - FAILED_REQUEST = 'ERR_FAILED_REQUEST', - INVALID_EQL = 'ERR_INVALID_EQL', -} - /** * Unlike lodash's debounce, which resolves intermediate calls with the most * recent value, this implementation waits to resolve intermediate calls until @@ -54,7 +49,7 @@ export const debounceAsync = -): Promise | void | undefined> => { +): Promise | void | undefined> => { const [{ value, formData }] = args; const { query: queryValue } = value as FieldValueQueryBar; const query = queryValue.query as string; @@ -93,14 +88,15 @@ export const eqlValidator = async ( if (response?.valid === false) { return { - code: ERROR_CODES.INVALID_EQL, + code: response.error?.code, message: '', - messages: response.errors, + messages: response.error?.messages, + error: response.error?.error, }; } } catch (error) { return { - code: ERROR_CODES.FAILED_REQUEST, + code: EQL_ERROR_CODES.FAILED_REQUEST, message: i18n.EQL_VALIDATION_REQUEST_ERROR, error, }; @@ -117,10 +113,10 @@ export const getValidationResults = ( const [error] = field.errors; const message = error.message; - if (error.code === ERROR_CODES.INVALID_EQL) { - return { isValid, message, messages: error.messages }; - } else { + if (error.code === EQL_ERROR_CODES.FAILED_REQUEST) { return { isValid, message, error: error.error }; + } else { + return { isValid, message, messages: error.messages }; } } else { return { isValid, message: '' }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx index 71ae7791fab0d..91ba4276a79b2 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_details_ui/pages/rule_details/index.tsx @@ -38,6 +38,7 @@ import { tableDefaults, TableId, } from '@kbn/securitysolution-data-table'; +import type { RunTimeMappings } from '@kbn/timelines-plugin/common/search_strategy'; import { EndpointExceptionsViewer } from '../../../endpoint_exceptions/endpoint_exceptions_viewer'; import { AlertsTableComponent } from '../../../../detections/components/alerts_table'; import { GroupedAlertsTable } from '../../../../detections/components/alerts_table/alerts_grouping'; @@ -232,11 +233,9 @@ const RuleDetailsPageComponent: React.FC = ({ const { loading: listsConfigLoading, needsConfiguration: needsListsConfiguration } = useListsConfig(); - const { - sourcererDataView, - runtimeMappings, - loading: isLoadingIndexPattern, - } = useSourcererDataView(SourcererScopeName.detections); + const { sourcererDataView, loading: isLoadingIndexPattern } = useSourcererDataView( + SourcererScopeName.detections + ); const loading = userInfoLoading || listsConfigLoading; const { detailName: ruleId } = useParams<{ @@ -760,7 +759,7 @@ const RuleDetailsPageComponent: React.FC = ({ hasIndexWrite={hasIndexWrite ?? false} loading={loading} renderChildComponent={renderGroupedAlertTable} - runtimeMappings={runtimeMappings} + runtimeMappings={sourcererDataView?.runtimeFieldMap as RunTimeMappings} signalIndexName={signalIndexName} tableId={TableId.alertsOnRuleDetailsPage} to={to} diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx index fdfe314094be6..c83fa2bf22211 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/actions.tsx @@ -1085,7 +1085,9 @@ export const sendAlertToTimelineAction = async ({ }); } } - } catch { + } catch (error) { + /* eslint-disable-next-line no-console */ + console.error(error); updateTimelineIsLoading({ id: TimelineId.active, isLoading: false }); return createTimeline({ from, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx index b556f81523fc5..b1fe4f939b378 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx @@ -22,6 +22,7 @@ import { tableDefaults, TableId, } from '@kbn/securitysolution-data-table'; +import type { RunTimeMappings } from '@kbn/timelines-plugin/common/search_strategy'; import { useGlobalTime } from '../../../common/containers/use_global_time'; import { useLicense } from '../../../common/hooks/use_license'; import { VIEW_SELECTION } from '../../../../common/constants'; @@ -127,7 +128,7 @@ export const AlertsTableComponent: FC = ({ const { browserFields, indexPattern: indexPatterns, - runtimeMappings, + sourcererDataView, } = useSourcererDataView(sourcererScope); const license = useLicense(); @@ -284,7 +285,7 @@ export const AlertsTableComponent: FC = ({ onUpdate: onAlertTableUpdate, cellContext, onLoaded: onLoad, - runtimeMappings, + runtimeMappings: sourcererDataView?.runtimeFieldMap as RunTimeMappings, toolbarVisibility: { showColumnSelector: !isEventRenderedView, showSortSelector: !isEventRenderedView, @@ -301,10 +302,10 @@ export const AlertsTableComponent: FC = ({ finalColumns, finalBrowserFields, onAlertTableUpdate, - runtimeMappings, - isEventRenderedView, cellContext, onLoad, + sourcererDataView?.runtimeFieldMap, + isEventRenderedView, ] ); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_bulk_to_timeline.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_bulk_to_timeline.tsx index 8cc2c89b76659..e0e11ad0251b5 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_bulk_to_timeline.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_add_bulk_to_timeline.tsx @@ -12,6 +12,7 @@ import type { Filter } from '@kbn/es-query'; import { getEsQueryConfig } from '@kbn/data-plugin/public'; import type { BulkActionsConfig } from '@kbn/triggers-actions-ui-plugin/public/types'; import { dataTableActions, TableId, tableDefaults } from '@kbn/securitysolution-data-table'; +import type { RunTimeMappings } from '@kbn/timelines-plugin/common/search_strategy'; import type { CustomBulkAction } from '../../../../../common/types'; import { combineQueries } from '../../../../common/lib/kuery'; import { useKibana } from '../../../../common/lib/kibana'; @@ -66,8 +67,8 @@ export const useAddBulkToTimelineAction = ({ const { browserFields, dataViewId, - runtimeMappings, indexPattern, + sourcererDataView, // important to get selectedPatterns from useSourcererDataView // in order to include the exclude filters in the search that are not stored in the timeline selectedPatterns, @@ -119,7 +120,7 @@ export const useAddBulkToTimelineAction = ({ sort: timelineQuerySortField, indexNames: selectedPatterns, filterQuery, - runtimeMappings, + runtimeMappings: sourcererDataView?.runtimeFieldMap as RunTimeMappings, limit: Math.min(BULK_ADD_TO_TIMELINE_LIMIT, totalCount), timerangeKind: 'absolute', }); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.test.tsx index 417774d7b2bc3..6d20ef3973337 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.test.tsx @@ -5,21 +5,30 @@ * 2.0. */ import { renderHook, act } from '@testing-library/react-hooks'; -import { fireEvent, render } from '@testing-library/react'; +import { fireEvent, render, waitFor } from '@testing-library/react'; +import { of } from 'rxjs'; import { TestProviders } from '../../../../common/mock'; -import { KibanaServices, useKibana } from '../../../../common/lib/kibana'; +import { useKibana } from '../../../../common/lib/kibana'; import type { EcsSecurityExtension as Ecs } from '@kbn/securitysolution-ecs'; import { useInvestigateInTimeline } from './use_investigate_in_timeline'; import * as actions from '../actions'; -import { coreMock } from '@kbn/core/public/mocks'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import type { AlertTableContextMenuItem } from '../types'; import React from 'react'; import { EuiPopover, EuiContextMenu } from '@elastic/eui'; +import * as timelineActions from '../../../../timelines/store/actions'; +import { getTimelineTemplate } from '../../../../timelines/containers/api'; +import type { TimelineEventsDetailsItem } from '@kbn/timelines-plugin/common'; + +jest.mock('../../../../common/lib/kibana'); +jest.mock('../../../../timelines/containers/api'); +jest.mock('../../../../common/lib/apm/use_start_transaction'); +jest.mock('../../../../common/hooks/use_app_toasts'); const ecsRowData: Ecs = { _id: '1', agent: { type: ['blah'] }, + host: { name: ['some host name'] }, kibana: { alert: { workflow_status: ['open'], @@ -31,32 +40,207 @@ const ecsRowData: Ecs = { }, }; -jest.mock('../../../../common/lib/kibana'); -jest.mock('../../../../common/lib/apm/use_start_transaction'); -jest.mock('../../../../common/hooks/use_app_toasts'); -jest.mock('../actions'); +const nonECSRowData: TimelineEventsDetailsItem[] = [ + { + category: 'agent', + isObjectArray: false, + field: 'agent.type', + values: ['blah'], + }, + { + category: 'kibana', + isObjectArray: false, + field: 'kibana.alert.workflow_status', + values: ['open'], + }, + { + category: 'kibana', + isObjectArray: false, + field: 'kibana.alert.rule.uuid', + values: ['testId'], + }, + { + category: 'host', + isObjectArray: false, + field: 'host.name', + values: ['some host name'], + }, +]; -(KibanaServices.get as jest.Mock).mockReturnValue(coreMock.createStart()); -const mockSendAlertToTimeline = jest.spyOn(actions, 'sendAlertToTimelineAction'); -(useKibana as jest.Mock).mockReturnValue({ - services: { - data: { - search: { - searchStrategyClient: jest.fn(), +const getEcsDataWithRuleTypeAndTimelineTemplate = (ruleType: string, ecsData: Ecs = ecsRowData) => { + return { + ...ecsData, + kibana: { + ...(ecsData?.kibana ?? {}), + alert: { + ...(ecsData.kibana?.alert ?? {}), + rule: { + ...(ecsData.kibana?.alert.rule ?? {}), + type: [ruleType], + timeline_id: ['dummyTimelineTemplateId'], + }, }, - query: jest.fn(), }, - }, -}); + } as Ecs; +}; + +const getNonEcsDataWithRuleTypeAndTimelineTemplate = ( + ruleType: string, + nonEcsData: TimelineEventsDetailsItem[] = nonECSRowData +) => { + return [ + ...nonEcsData, + { + category: 'kibana', + isObjectArray: false, + field: 'kibana.alert.rule.type', + values: [ruleType], + }, + { + category: 'kibana', + isObjectArray: false, + field: 'kibana.alert.rule.timeline_id', + values: ['dummyTimelineTemplateId'], + }, + ]; +}; + +const mockSendAlertToTimeline = jest.spyOn(actions, 'sendAlertToTimelineAction'); + (useAppToasts as jest.Mock).mockReturnValue({ addError: jest.fn(), }); +const mockTimelineTemplateResponse = { + data: { + getOneTimeline: { + savedObjectId: '15bc8185-06ef-4956-b7e7-be8e289b13c2', + version: 'WzIzMzUsMl0=', + columns: [ + { + columnHeaderType: 'not-filtered', + id: '@timestamp', + type: 'date', + }, + { + columnHeaderType: 'not-filtered', + id: 'host.name', + }, + { + columnHeaderType: 'not-filtered', + id: 'user.name', + }, + ], + dataProviders: [ + { + and: [], + enabled: true, + id: 'some-random-id', + name: 'host.name', + excluded: false, + kqlQuery: '', + queryMatch: { + field: 'host.name', + value: '{host.name}', + operator: ':', + }, + type: 'template', + }, + ], + dataViewId: 'security-solution-default', + description: '', + eqlOptions: { + eventCategoryField: 'event.category', + tiebreakerField: '', + timestampField: '@timestamp', + query: '', + size: 100, + }, + eventType: 'all', + excludedRowRendererIds: [ + 'alert', + 'alerts', + 'auditd', + 'auditd_file', + 'library', + 'netflow', + 'plain', + 'registry', + 'suricata', + 'system', + 'system_dns', + 'system_endgame_process', + 'system_file', + 'system_fim', + 'system_security_event', + 'system_socket', + 'threat_match', + 'zeek', + ], + favorite: [], + filters: [], + indexNames: ['.alerts-security.alerts-default', 'auditbeat-*', 'filebeat-*', 'packetbeat-*'], + kqlMode: 'filter', + kqlQuery: { + filterQuery: { + kuery: { + kind: 'kuery', + expression: '*', + }, + serializedQuery: '{"query_string":{"query":"*"}}', + }, + }, + title: 'Named Template', + templateTimelineId: 'c755cda6-8a65-4ec2-b6ff-35a5356de8b9', + templateTimelineVersion: 1, + dateRange: { + start: '2024-08-13T22:00:00.000Z', + end: '2024-08-14T21:59:59.999Z', + }, + savedQueryId: null, + created: 1723625359467, + createdBy: 'elastic', + updated: 1723625359988, + updatedBy: 'elastic', + timelineType: 'template', + status: 'active', + sort: [ + { + columnId: '@timestamp', + columnType: 'date', + sortDirection: 'desc', + esTypes: ['date'], + }, + ], + savedSearchId: null, + eventIdToNoteIds: [], + noteIds: [], + notes: [], + pinnedEventIds: [], + pinnedEventsSaveObject: [], + }, + }, +}; + const props = { ecsRowData, - onInvestigateInTimelineAlertClick: () => {}, + onInvestigateInTimelineAlertClick: jest.fn(), }; +const addTimelineSpy = jest.spyOn(timelineActions, 'addTimeline'); + +const RULE_TYPES_TO_BE_TESTED = [ + 'query', + 'esql', + 'eql', + 'machine_learning', + /* TODO: Complete test suites for below rule types */ + // 'new_terms', + // 'eql', + // 'threshold', + // 'threat_match', +]; + const renderContextMenu = (items: AlertTableContextMenuItem[]) => { const panels = [{ id: 0, items }]; return render( @@ -72,11 +256,28 @@ const renderContextMenu = (items: AlertTableContextMenuItem[]) => { ); }; -describe('use investigate in timeline hook', () => { +describe('useInvestigateInTimeline', () => { + let mockSearchStrategyClient = { + search: jest + .fn() + .mockReturnValue(of({ data: getNonEcsDataWithRuleTypeAndTimelineTemplate('query') })), + }; + beforeEach(() => { + (getTimelineTemplate as jest.Mock).mockResolvedValue(mockTimelineTemplateResponse); + // by default we return data for query rule type + (useKibana as jest.Mock).mockReturnValue({ + services: { + data: { + search: mockSearchStrategyClient, + query: jest.fn(), + }, + }, + }); + }); afterEach(() => { jest.clearAllMocks(); }); - test('it creates a component and click handler', () => { + test('creates a component and click handler', () => { const { result } = renderHook(() => useInvestigateInTimeline(props), { wrapper: TestProviders, }); @@ -98,4 +299,101 @@ describe('use investigate in timeline hook', () => { expect(mockSendAlertToTimeline).toHaveBeenCalledTimes(1); }); }); + + describe('investigate an alert with timeline template', () => { + describe.each(RULE_TYPES_TO_BE_TESTED)('Rule type : %s', (ruleType: string) => { + test('should copy columns over from template', async () => { + mockSearchStrategyClient = { + search: jest + .fn() + .mockReturnValue(of({ data: getNonEcsDataWithRuleTypeAndTimelineTemplate(ruleType) })), + }; + const ecsData = getEcsDataWithRuleTypeAndTimelineTemplate(ruleType); + const { result } = renderHook( + () => useInvestigateInTimeline({ ...props, ecsRowData: ecsData }), + { + wrapper: TestProviders, + } + ); + + const expectedColumns = [ + { + columnHeaderType: 'not-filtered', + id: '@timestamp', + type: 'date', + initialWidth: 215, + }, + { + columnHeaderType: 'not-filtered', + id: 'host.name', + initialWidth: undefined, + }, + { + columnHeaderType: 'not-filtered', + id: 'user.name', + initialWidth: undefined, + }, + ]; + + const investigateAction = result.current.investigateInTimelineAlertClick; + await investigateAction(); + + await waitFor(() => { + expect(addTimelineSpy).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ + timeline: expect.objectContaining({ + columns: expectedColumns, + }), + }) + ); + }); + }); + test('should copy dataProviders over from template', async () => { + mockSearchStrategyClient = { + search: jest + .fn() + .mockReturnValue(of({ data: getNonEcsDataWithRuleTypeAndTimelineTemplate(ruleType) })), + }; + const ecsData: Ecs = getEcsDataWithRuleTypeAndTimelineTemplate(ruleType); + const { result } = renderHook( + () => useInvestigateInTimeline({ ...props, ecsRowData: ecsData }), + { + wrapper: TestProviders, + } + ); + + const expectedDataProvider = [ + { + and: [], + enabled: true, + id: 'some-random-id', + name: 'some host name', + excluded: false, + kqlQuery: '', + queryMatch: { + field: 'host.name', + value: 'some host name', + operator: ':', + }, + type: 'default', + }, + ]; + + const investigateAction = result.current.investigateInTimelineAlertClick; + await investigateAction(); + + await waitFor(() => { + expect(addTimelineSpy).toHaveBeenNthCalledWith( + 1, + expect.objectContaining({ + timeline: expect.objectContaining({ + dataProviders: expectedDataProvider, + }), + }) + ); + }); + }); + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.tsx index 2056de93a63be..211bfd0db2dc1 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/use_investigate_in_timeline.tsx @@ -18,6 +18,7 @@ import { useApi } from '@kbn/securitysolution-list-hooks'; import type { Filter } from '@kbn/es-query'; import type { EcsSecurityExtension as Ecs } from '@kbn/securitysolution-ecs'; +import { isEmpty } from 'lodash'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { createHistoryEntry } from '../../../../common/utils/global_query_string/helpers'; import { useKibana } from '../../../../common/lib/kibana'; @@ -147,10 +148,19 @@ export const useInvestigateInTimeline = ({ const unifiedComponentsInTimelineDisabled = useIsExperimentalFeatureEnabled( 'unifiedComponentsInTimelineDisabled' ); + const updateTimeline = useUpdateTimeline(); const createTimeline = useCallback( async ({ from: fromTimeline, timeline, to: toTimeline, ruleNote }: CreateTimelineProps) => { + const newColumns = timeline.columns; + const newColumnsOverride = + !newColumns || isEmpty(newColumns) + ? !unifiedComponentsInTimelineDisabled + ? defaultUdtHeaders + : defaultHeaders + : newColumns; + await clearActiveTimeline(); updateTimelineIsLoading({ id: TimelineId.active, isLoading: false }); updateTimeline({ @@ -160,7 +170,7 @@ export const useInvestigateInTimeline = ({ notes: [], timeline: { ...timeline, - columns: !unifiedComponentsInTimelineDisabled ? defaultUdtHeaders : defaultHeaders, + columns: newColumnsOverride, indexNames: timeline.indexNames ?? [], show: true, excludedRowRendererIds: 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 e43af8d02dcb0..31116f7c5ecd9 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 @@ -33,6 +33,7 @@ import { } from '@kbn/securitysolution-data-table'; import { isEqual } from 'lodash'; import type { FilterGroupHandler } from '@kbn/alerts-ui-shared'; +import type { RunTimeMappings } from '@kbn/timelines-plugin/common/search_strategy'; import { DetectionEngineFilters } from '../../components/detection_engine_filters/detection_engine_filters'; import { FilterByAssigneesPopover } from '../../../common/components/filter_by_assignees_popover/filter_by_assignees_popover'; import type { AssigneesIdsSelection } from '../../../common/components/assignees/types'; @@ -152,7 +153,6 @@ const DetectionEnginePageComponent: React.FC = () const { sourcererDataView, - runtimeMappings, loading: isLoadingIndexPattern, indexPattern, } = useSourcererDataView(SourcererScopeName.detections); @@ -419,7 +419,7 @@ const DetectionEnginePageComponent: React.FC = () alertsDefaultFilters={alertsDefaultFilters} isLoadingIndexPattern={isChartPanelLoading} query={query} - runtimeMappings={runtimeMappings} + runtimeMappings={sourcererDataView?.runtimeFieldMap as RunTimeMappings} signalIndexName={signalIndexName} updateDateRangeCallback={updateDateRangeCallback} /> @@ -435,7 +435,7 @@ const DetectionEnginePageComponent: React.FC = () hasIndexWrite={hasIndexWrite ?? false} loading={isAlertTableLoading} renderChildComponent={renderAlertTable} - runtimeMappings={runtimeMappings} + runtimeMappings={sourcererDataView?.runtimeFieldMap as RunTimeMappings} signalIndexName={signalIndexName} tableId={TableId.alertsOnAlertsPage} to={to} diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/top_risk_score_contributors_alerts/index.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/top_risk_score_contributors_alerts/index.tsx index e7c20fa2f1847..c5c534a6bc370 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/top_risk_score_contributors_alerts/index.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/top_risk_score_contributors_alerts/index.tsx @@ -10,6 +10,7 @@ import { TableId } from '@kbn/securitysolution-data-table'; import { EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui'; import type { Filter } from '@kbn/es-query'; +import type { RunTimeMappings } from '@kbn/timelines-plugin/common/search_strategy'; import { HeaderSection } from '../../../common/components/header_section'; import * as i18n from './translations'; @@ -45,7 +46,7 @@ export const TopRiskScoreContributorsAlerts: React.FC inputsSelectors.globalFiltersQuerySelector(), [] @@ -121,7 +122,7 @@ export const TopRiskScoreContributorsAlerts: React.FC { .mockReturnValue({ isAlert: true } as unknown as GetBasicDataFromDetailsData); jest.mocked(useSourcererDataView).mockReturnValue({ - runtimeMappings: {}, browserFields: {}, dataViewId: '', loading: false, diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.ts b/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.ts index cba0c25cb25ad..15c934718981b 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/left/hooks/use_threat_intelligence_details.ts @@ -71,7 +71,7 @@ export const useThreatIntelligenceDetails = (): ThreatIntelligenceDetailsResult const [isEventDataLoading, eventData] = useTimelineEventsDetails({ indexName, eventId, - runtimeMappings: sourcererDataView.runtimeMappings as RunTimeMappings, + runtimeMappings: sourcererDataView.sourcererDataView?.runtimeFieldMap as RunTimeMappings, skip: !eventId, }); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_event_details.ts b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_event_details.ts index a75453d4d2f4d..b039cc9573f35 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_event_details.ts +++ b/x-pack/plugins/security_solution/public/flyout/document_details/shared/hooks/use_event_details.ts @@ -87,7 +87,7 @@ export const useEventDetails = ({ useTimelineEventsDetails({ indexName: eventIndex, eventId: eventId ?? '', - runtimeMappings: sourcererDataView.runtimeMappings as RunTimeMappings, + runtimeMappings: sourcererDataView?.sourcererDataView?.runtimeFieldMap as RunTimeMappings, skip: !eventId, }); const getFieldsData = useGetFieldsData(searchHit?.fields); diff --git a/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx b/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx index 0a17a3a0e8ee9..0465f16d55b70 100644 --- a/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx +++ b/x-pack/plugins/security_solution/public/resolver/view/process_event_dot.tsx @@ -584,7 +584,7 @@ export const ProcessEventDot = styled(UnstyledProcessEventDot)` width: fit-content; } - & .euiSelectableList-bordered { + & .euiSelectableList { border-top-right-radius: 0px; border-top-left-radius: 0px; } diff --git a/x-pack/plugins/security_solution/public/sourcerer/containers/get_sourcerer_data_view.test.ts b/x-pack/plugins/security_solution/public/sourcerer/containers/get_sourcerer_data_view.test.ts index fcf2e86462193..4c336233a4faf 100644 --- a/x-pack/plugins/security_solution/public/sourcerer/containers/get_sourcerer_data_view.test.ts +++ b/x-pack/plugins/security_solution/public/sourcerer/containers/get_sourcerer_data_view.test.ts @@ -40,7 +40,6 @@ describe('getSourcererDataView', () => { runtimeFieldMap: {}, }, browserFields: {}, - runtimeMappings: {}, }); }); it('should call dataViewsService.get with the correct arguments', async () => { diff --git a/x-pack/plugins/security_solution/public/sourcerer/containers/get_sourcerer_data_view.ts b/x-pack/plugins/security_solution/public/sourcerer/containers/get_sourcerer_data_view.ts index a0c6a82e66c48..95a19fbb29fb4 100644 --- a/x-pack/plugins/security_solution/public/sourcerer/containers/get_sourcerer_data_view.ts +++ b/x-pack/plugins/security_solution/public/sourcerer/containers/get_sourcerer_data_view.ts @@ -7,7 +7,7 @@ import type { DataViewsServicePublic } from '@kbn/data-views-plugin/public/types'; import { ensurePatternFormat } from '../../../common/utils/sourcerer'; -import type { SourcererDataView, RunTimeMappings } from '../store/model'; +import type { SourcererDataView } from '../store/model'; import { getDataViewStateFromIndexFields } from '../../common/containers/source/use_data_view'; export const getSourcererDataView = async ( @@ -29,6 +29,5 @@ export const getSourcererDataView = async ( dataView: dataViewData, browserFields: getDataViewStateFromIndexFields(dataViewData.id ?? '', dataViewData.fields) .browserFields, - runtimeMappings: dataViewData.runtimeFieldMap as RunTimeMappings, }; }; diff --git a/x-pack/plugins/security_solution/public/sourcerer/containers/index.tsx b/x-pack/plugins/security_solution/public/sourcerer/containers/index.tsx index a4ee0815aac97..9765a26e60b0e 100644 --- a/x-pack/plugins/security_solution/public/sourcerer/containers/index.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/containers/index.tsx @@ -126,7 +126,6 @@ export const useSourcererDataView = ( }, indicesExist, loading: loading || sourcererDataView.loading, - runtimeMappings: sourcererDataView.runtimeMappings, // all active & inactive patterns in DATA_VIEW patternList: sourcererDataView.title.split(','), // selected patterns in DATA_VIEW including filter diff --git a/x-pack/plugins/security_solution/public/sourcerer/containers/mocks.ts b/x-pack/plugins/security_solution/public/sourcerer/containers/mocks.ts index cdee31b50b6f3..e3c30a0eb6521 100644 --- a/x-pack/plugins/security_solution/public/sourcerer/containers/mocks.ts +++ b/x-pack/plugins/security_solution/public/sourcerer/containers/mocks.ts @@ -8,7 +8,7 @@ import { mockGlobalState } from '../../common/mock'; import type { SelectedDataView } from '../store/model'; import { initSourcererScope } from '../store/model'; -import { mockBrowserFields, mockRuntimeMappings } from '../../common/containers/source/mock'; +import { mockBrowserFields } from '../../common/containers/source/mock'; export const mockPatterns = [ 'auditbeat-*', @@ -56,6 +56,5 @@ export const mockSourcererScope: SelectedDataView = { indicesExist: true, loading: false, dataViewId: mockGlobalState.sourcerer.defaultDataView.id, - runtimeMappings: mockRuntimeMappings, patternList: mockPatterns, }; diff --git a/x-pack/plugins/security_solution/public/sourcerer/store/model.ts b/x-pack/plugins/security_solution/public/sourcerer/store/model.ts index 6447eff3c1ee7..6120b3c66cf7e 100644 --- a/x-pack/plugins/security_solution/public/sourcerer/store/model.ts +++ b/x-pack/plugins/security_solution/public/sourcerer/store/model.ts @@ -72,12 +72,6 @@ export interface SourcererDataView extends KibanaDataView { fields: DataViewSpec['fields'] | undefined; /** set when data view fields are fetched */ loading: boolean; - /** - * @deprecated use sourcererDataView.runtimeMappings - * Needed to pass to search strategy - * Remove once issue resolved: https://github.com/elastic/kibana/issues/111762 - */ - runtimeMappings: RunTimeMappings; /** * @type DataView @kbn/data-views-plugin/common */ @@ -108,10 +102,6 @@ export interface SelectedDataView { * all active & inactive patterns from SourcererDataView['title'] */ patternList: string[]; - /** - * @deprecated use sourcererDataView.runtimeMappings - */ - runtimeMappings: SourcererDataView['runtimeMappings']; /** * @deprecated use sourcererDataView.title or sourcererDataView.matchedIndices * all selected patterns from SourcererScope['selectedPatterns'] */ @@ -165,7 +155,6 @@ export const initDataView: SourcererDataView & { id: string; error?: unknown } = fields: undefined, loading: false, patternList: [], - runtimeMappings: {}, title: '', dataView: undefined, }; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_links.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_links.ts index a2bc62eb26807..808c779a0aed5 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_links.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/suricata/suricata_links.ts @@ -18,8 +18,8 @@ const lazySuricataLibConfiguration = () => { ); }; -const has = (obj: T, key: string | number | symbol): key is keyof T => - Object.prototype.hasOwnProperty.call(obj, key); +const has = (obj: T, key: string | number | symbol): key is keyof T => + Object.hasOwn(obj, key); export const getLinksFromSignature = async (id: number): Promise => { const db = (await lazySuricataLibConfiguration()).db; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.tsx index f4c75235b76df..e2881c8c24458 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/eql/index.tsx @@ -16,6 +16,7 @@ import type { EuiDataGridControlColumn } from '@elastic/eui'; import { DataLoadingState } from '@kbn/unified-data-table'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; +import type { RunTimeMappings } from '@kbn/timelines-plugin/common/search_strategy'; import { useKibana } from '../../../../../common/lib/kibana'; import { DocumentDetailsLeftPanelKey, @@ -90,8 +91,8 @@ export const EqlTabContentComponent: React.FC = ({ browserFields, dataViewId, loading: loadingSourcerer, - runtimeMappings, selectedPatterns, + sourcererDataView, } = useSourcererDataView(SourcererScopeName.timeline); const { augmentedColumnHeaders, timelineQueryFieldsFromColumns } = useTimelineColumns(columns); @@ -132,7 +133,7 @@ export const EqlTabContentComponent: React.FC = ({ indexNames: selectedPatterns, language: 'eql', limit: !unifiedComponentsInTimelineDisabled ? sampleSize : itemsPerPage, - runtimeMappings, + runtimeMappings: sourcererDataView?.runtimeFieldMap as RunTimeMappings, skip: !canQueryTimeline(), startDate: start, timerangeKind, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/pinned/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/pinned/index.tsx index fe7913aa7acd4..43632efb3b0eb 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/pinned/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/pinned/index.tsx @@ -14,6 +14,7 @@ import deepEqual from 'fast-deep-equal'; import type { EuiDataGridControlColumn } from '@elastic/eui'; import { DataLoadingState } from '@kbn/unified-data-table'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; +import type { RunTimeMappings } from '@kbn/timelines-plugin/common/search_strategy'; import { DocumentDetailsLeftPanelKey, DocumentDetailsRightPanelKey, @@ -93,7 +94,7 @@ export const PinnedTabContentComponent: React.FC = ({ browserFields, dataViewId, loading: loadingSourcerer, - runtimeMappings, + sourcererDataView, selectedPatterns, } = useSourcererDataView(SourcererScopeName.timeline); const { setTimelineFullScreen, timelineFullScreen } = useTimelineFullScreen(); @@ -167,7 +168,7 @@ export const PinnedTabContentComponent: React.FC = ({ fields: timelineQueryFields, limit: itemsPerPage, filterQuery, - runtimeMappings, + runtimeMappings: sourcererDataView?.runtimeFieldMap as RunTimeMappings, skip: filterQuery === '', startDate: '', sort: timelineQuerySortField, diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx index 823534331b757..42463e13f24ac 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx @@ -14,6 +14,7 @@ import type { EuiDataGridControlColumn } from '@elastic/eui'; import { getEsQueryConfig } from '@kbn/data-plugin/common'; import { DataLoadingState } from '@kbn/unified-data-table'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; +import type { RunTimeMappings } from '@kbn/timelines-plugin/common/search_strategy'; import { DocumentDetailsLeftPanelKey, DocumentDetailsRightPanelKey, @@ -101,10 +102,10 @@ export const QueryTabContentComponent: React.FC = ({ dataViewId, loading: loadingSourcerer, indexPattern, - runtimeMappings, // important to get selectedPatterns from useSourcererDataView // in order to include the exclude filters in the search that are not stored in the timeline selectedPatterns, + sourcererDataView, } = useSourcererDataView(SourcererScopeName.timeline); const { uiSettings, telemetry, timelineDataService } = useKibana().services; @@ -195,7 +196,7 @@ export const QueryTabContentComponent: React.FC = ({ indexNames: selectedPatterns, language: kqlQuery.language, limit: !unifiedComponentsInTimelineDisabled ? sampleSize : itemsPerPage, - runtimeMappings, + runtimeMappings: sourcererDataView?.runtimeFieldMap as RunTimeMappings, skip: !canQueryTimeline, sort: timelineQuerySortField, startDate: start, diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts index c657cc6e53119..5ad28bc37566c 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/fleet_services.ts @@ -29,7 +29,7 @@ import type { import { AGENT_API_ROUTES, AGENT_POLICY_API_ROUTES, - AGENT_POLICY_SAVED_OBJECT_TYPE, + LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, agentPolicyRouteService, agentRouteService, AGENTS_INDEX, @@ -850,7 +850,7 @@ export const getOrCreateDefaultAgentPolicy = async ({ policyName = DEFAULT_AGENT_POLICY_NAME, }: GetOrCreateDefaultAgentPolicyOptions): Promise => { const existingPolicy = await fetchAgentPolicyList(kbnClient, { - kuery: `${AGENT_POLICY_SAVED_OBJECT_TYPE}.name: "${policyName}"`, + kuery: `${LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE}.name: "${policyName}"`, }); if (existingPolicy.items[0]) { diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/roles_users/serverless/es_serverless_resources/roles.yml b/x-pack/plugins/security_solution/scripts/endpoint/common/roles_users/serverless/es_serverless_resources/roles.yml index 12214295817a5..3fd3bd2e3233e 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/roles_users/serverless/es_serverless_resources/roles.yml +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/roles_users/serverless/es_serverless_resources/roles.yml @@ -65,6 +65,7 @@ viewer: - feature_siem.endpoint_list_read - feature_securitySolutionCases.read - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.read - feature_osquery.read @@ -143,6 +144,7 @@ editor: - feature_siem.file_operations_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.all - feature_osquery.all @@ -191,6 +193,7 @@ t1_analyst: - feature_siem.endpoint_list_read - feature_securitySolutionCases.read - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.read - feature_osquery.read @@ -245,6 +248,7 @@ t2_analyst: - feature_siem.endpoint_list_read - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.read - feature_osquery.read @@ -314,6 +318,7 @@ t3_analyst: - feature_siem.scan_operations_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.all - feature_osquery.all @@ -370,6 +375,7 @@ threat_intelligence_analyst: - feature_siem.blocklist_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.read - feature_osquery.all @@ -437,6 +443,7 @@ rule_author: - feature_siem.actions_log_management_read - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.all - feature_osquery.all @@ -508,6 +515,7 @@ soc_manager: - feature_siem.scan_operations_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_osquery.all @@ -567,6 +575,7 @@ detections_admin: - feature_siem.crud_alerts - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_dev_tools.all @@ -625,6 +634,7 @@ platform_engineer: - feature_siem.actions_log_management_read - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_fleet.all @@ -697,6 +707,7 @@ endpoint_operations_analyst: - feature_siem.scan_operations_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_osquery.all @@ -763,6 +774,7 @@ endpoint_policy_manager: - feature_siem.blocklist_all # Elastic Defend Policy Management - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_osquery.all diff --git a/x-pack/plugins/security_solution/scripts/run_cypress/utils.ts b/x-pack/plugins/security_solution/scripts/run_cypress/utils.ts index 857e29ab8d390..7d6e35bc48f74 100644 --- a/x-pack/plugins/security_solution/scripts/run_cypress/utils.ts +++ b/x-pack/plugins/security_solution/scripts/run_cypress/utils.ts @@ -99,6 +99,7 @@ export const parseTestFileConfig = (filePath: string): SecuritySolutionDescribeB try { // TODO:PT need to assess implication of using this approach to get the JSON back out + // eslint-disable-next-line no-new-func const ftrConfigJson = new Function(`return ${ftrConfigCode}`)(); return TestFileFtrConfigSchema.validate(ftrConfigJson); } catch (err) { diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts index 236879a4e4164..f1061db4e8c59 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/metadata.test.ts @@ -17,6 +17,8 @@ import { httpServiceMock, savedObjectsClientMock, } from '@kbn/core/server/mocks'; +import { createAppContextStartContractMock as fleetCreateAppContextStartContractMock } from '@kbn/fleet-plugin/server/mocks'; +import { appContextService as fleetAppContextService } from '@kbn/fleet-plugin/server/services'; import type { HostInfo, MetadataListResponse } from '../../../../common/endpoint/types'; import { HostStatus } from '../../../../common/endpoint/types'; import { registerEndpointRoutes } from '.'; @@ -135,6 +137,11 @@ describe('test endpoint routes', () => { page: 1, per_page: 10, }); + fleetAppContextService.start( + fleetCreateAppContextStartContractMock({}, false, { + withoutSpaceExtensions: mockSavedObjectClient, + }) + ); mockAgentClient.getAgentStatusById.mockResolvedValue('error'); mockAgentClient.listAgents.mockResolvedValue(noUnenrolledAgent); mockAgentPolicyService.getByIds = jest.fn().mockResolvedValueOnce([]); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts index 7efe718b458a9..edc7861d9d3af 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/metadata/query_builders.test.ts @@ -5,6 +5,9 @@ * 2.0. */ +import { createAppContextStartContractMock as fleetCreateAppContextStartContractMock } from '@kbn/fleet-plugin/server/mocks'; +import { appContextService as fleetAppContextService } from '@kbn/fleet-plugin/server/services'; + import { getESQueryHostMetadataByID, buildUnitedIndexQuery } from './query_builders'; import { metadataCurrentIndexPattern } from '../../../../common/endpoint/constants'; import { get } from 'lodash'; @@ -50,6 +53,11 @@ describe('query builder', () => { per_page: 0, page: 0, }); + fleetAppContextService.start( + fleetCreateAppContextStartContractMock({}, false, { + withoutSpaceExtensions: soClient, + }) + ); }); it('correctly builds empty query', async () => { diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.test.ts index bb2ea455675c0..22e113f05de13 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.test.ts @@ -84,9 +84,11 @@ describe('ManifestManager', () => { const ARTIFACT_NAME_BLOCKLISTS_LINUX = 'endpoint-blocklist-linux-v1'; const getMockPolicyFetchAllItemIds = (items: string[]) => - jest.fn(async function* () { - yield items; - }); + jest.fn(async () => + jest.fn(async function* () { + yield items; + })() + ); let ARTIFACTS: InternalArtifactCompleteSchema[] = []; let ARTIFACTS_BY_ID: { [K: string]: InternalArtifactCompleteSchema } = {}; @@ -1265,9 +1267,11 @@ describe('ManifestManager', () => { describe('tryDispatch', () => { const getMockPolicyFetchAllItems = (items: PackagePolicy[]) => - jest.fn(async function* () { - yield items; - }); + jest.fn(async () => + jest.fn(async function* () { + yield items; + })() + ); test(`Should not dispatch if no policies`, async () => { const context = buildManifestManagerContextMock({}); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts index f10dbb1ab3a50..63a2b56cb8525 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/artifacts/manifest_manager/manifest_manager.ts @@ -686,7 +686,7 @@ export class ManifestManager { }, }); - for await (const policies of this.fetchAllPolicies()) { + for await (const policies of await this.fetchAllPolicies()) { for (const packagePolicy of policies) { const { id, name } = packagePolicy; @@ -768,7 +768,7 @@ export class ManifestManager { } } - private fetchAllPolicies(): AsyncIterable { + private fetchAllPolicies(): Promise> { return this.packagePolicyService.fetchAllItems(this.savedObjectsClient, { kuery: 'ingest-package-policies.package.name:endpoint', }); @@ -776,7 +776,7 @@ export class ManifestManager { private async listEndpointPolicyIds(): Promise { const allPolicyIds: string[] = []; - const idFetcher = this.packagePolicyService.fetchAllItemIds(this.savedObjectsClient, { + const idFetcher = await this.packagePolicyService.fetchAllItemIds(this.savedObjectsClient, { kuery: 'ingest-package-policies.package.name:endpoint', }); diff --git a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts index cd26a9752be7f..750e746761e7a 100644 --- a/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/services/metadata/endpoint_metadata_service.test.ts @@ -21,6 +21,8 @@ import { import type { HostMetadata } from '../../../../common/endpoint/types'; import type { Agent, PackagePolicy } from '@kbn/fleet-plugin/common'; import type { AgentPolicyServiceInterface } from '@kbn/fleet-plugin/server/services'; +import { createAppContextStartContractMock as fleetCreateAppContextStartContractMock } from '@kbn/fleet-plugin/server/mocks'; +import { appContextService as fleetAppContextService } from '@kbn/fleet-plugin/server/services'; import { EndpointError } from '../../../../common/endpoint/errors'; import type { SavedObjectsClientContract } from '@kbn/core/server'; @@ -38,6 +40,11 @@ describe('EndpointMetadataService', () => { esClient = elasticsearchServiceMock.createScopedClusterClient().asInternalUser; soClient = savedObjectsClientMock.create(); soClient.find = jest.fn().mockResolvedValue({ saved_objects: [] }); + fleetAppContextService.start( + fleetCreateAppContextStartContractMock({}, false, { + withoutSpaceExtensions: soClient, + }) + ); }); describe('#findHostMetadataForFleetAgents()', () => { diff --git a/x-pack/plugins/security_solution/server/integration_tests/lib/telemetry_helpers.ts b/x-pack/plugins/security_solution/server/integration_tests/lib/telemetry_helpers.ts index 2daf8c732002b..2e8820dedd52e 100644 --- a/x-pack/plugins/security_solution/server/integration_tests/lib/telemetry_helpers.ts +++ b/x-pack/plugins/security_solution/server/integration_tests/lib/telemetry_helpers.ts @@ -23,7 +23,7 @@ import { deleteExceptionList, deleteExceptionListItem, } from '@kbn/lists-plugin/server/services/exception_lists'; -import { AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common/constants'; +import { LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE } from '@kbn/fleet-plugin/common/constants'; import { packagePolicyService } from '@kbn/fleet-plugin/server/services'; @@ -282,7 +282,7 @@ export async function createAgentPolicy( ], }; - await soClient.create(AGENT_POLICY_SAVED_OBJECT_TYPE, {}, { id }).catch(() => {}); + await soClient.create(LEGACY_AGENT_POLICY_SAVED_OBJECT_TYPE, {}, { id }).catch(() => {}); await packagePolicyService .create(soClient, esClient, packagePolicy, { id, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_migrations.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_migrations.ts index 1c5d1cc1a63b2..f802593c39121 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_migrations.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_actions_legacy/logic/rule_actions/legacy_migrations.ts @@ -31,7 +31,7 @@ import { */ function isEmptyObject(obj: {}) { for (const attr in obj) { - if (Object.prototype.hasOwnProperty.call(obj, attr)) { + if (Object.hasOwn(obj, attr)) { return false; } } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/utils/filter_field_entries.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/utils/filter_field_entries.ts index 383aa616603e6..581dd7ffbff1a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/utils/filter_field_entries.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/source_fields_merging/utils/filter_field_entries.ts @@ -29,11 +29,12 @@ export const filterFieldEntries = ( ): Array<[string, FieldsType]> => { return fieldEntries.filter(([fieldsKey, fieldsValue]: [string, FieldsType]) => { return ( + // TODO: Look at not filtering this and instead transform it so it can be inserted correctly in the strategies which does an overwrite of everything from fields !isEqlBug77152(fieldsKey) && !isIgnored(fieldsKey, ignoreFields) && !isInvalidKey(fieldsKey) && !isMultiField(fieldsKey, fieldEntries) && - !isTypeObject(fieldsValue) // TODO: Look at not filtering this and instead transform it so it can be inserted correctly in the strategies which does an overwrite of everything from fields + !isTypeObject(fieldsValue) ); }); }; diff --git a/x-pack/plugins/security_solution/server/lib/product_features_service/mocks.ts b/x-pack/plugins/security_solution/server/lib/product_features_service/mocks.ts index dfc86518e124f..c2275ebbcee5f 100644 --- a/x-pack/plugins/security_solution/server/lib/product_features_service/mocks.ts +++ b/x-pack/plugins/security_solution/server/lib/product_features_service/mocks.ts @@ -31,6 +31,11 @@ jest.mock('@kbn/security-solution-features/product_features', () => ({ baseKibanaSubFeatureIds: [], subFeaturesMap: new Map(), })), + getAttackDiscoveryFeature: jest.fn(() => ({ + baseKibanaFeature: {}, + baseKibanaSubFeatureIds: [], + subFeaturesMap: new Map(), + })), })); export const createProductFeaturesServiceMock = ( @@ -103,6 +108,25 @@ export const createProductFeaturesServiceMock = ( ]) ) ), + attackDiscovery: jest.fn().mockReturnValue( + new Map( + enabledFeatureKeys.map((key) => [ + key, + { + privileges: { + all: { + ui: ['entity-analytics'], + api: [`test-entity-analytics`], + }, + read: { + ui: ['entity-analytics'], + api: [`test-entity-analytics`], + }, + }, + }, + ]) + ) + ), }); } diff --git a/x-pack/plugins/security_solution/server/lib/product_features_service/product_features_service.test.ts b/x-pack/plugins/security_solution/server/lib/product_features_service/product_features_service.test.ts index b59dafb2f0eb7..27205a30be785 100644 --- a/x-pack/plugins/security_solution/server/lib/product_features_service/product_features_service.test.ts +++ b/x-pack/plugins/security_solution/server/lib/product_features_service/product_features_service.test.ts @@ -40,6 +40,7 @@ const productFeature = { }; const mockGetFeature = jest.fn().mockReturnValue(productFeature); jest.mock('@kbn/security-solution-features/product_features', () => ({ + getAttackDiscoveryFeature: () => mockGetFeature(), getAssistantFeature: () => mockGetFeature(), getCasesFeature: () => mockGetFeature(), getSecurityFeature: () => mockGetFeature(), @@ -54,8 +55,8 @@ describe('ProductFeaturesService', () => { const experimentalFeatures = {} as ExperimentalFeatures; new ProductFeaturesService(loggerMock.create(), experimentalFeatures); - expect(mockGetFeature).toHaveBeenCalledTimes(3); - expect(MockedProductFeatures).toHaveBeenCalledTimes(3); + expect(mockGetFeature).toHaveBeenCalledTimes(4); + expect(MockedProductFeatures).toHaveBeenCalledTimes(4); }); it('should init all ProductFeatures when initialized', () => { @@ -86,8 +87,10 @@ describe('ProductFeaturesService', () => { const mockSecurityConfig = new Map() as ProductFeaturesConfig; const mockCasesConfig = new Map() as ProductFeaturesConfig; const mockAssistantConfig = new Map() as ProductFeaturesConfig; + const mockAttackDiscoveryConfig = new Map() as ProductFeaturesConfig; const configurator: ProductFeaturesConfigurator = { + attackDiscovery: jest.fn(() => mockAttackDiscoveryConfig), security: jest.fn(() => mockSecurityConfig), cases: jest.fn(() => mockCasesConfig), securityAssistant: jest.fn(() => mockAssistantConfig), @@ -97,6 +100,7 @@ describe('ProductFeaturesService', () => { expect(configurator.security).toHaveBeenCalled(); expect(configurator.cases).toHaveBeenCalled(); expect(configurator.securityAssistant).toHaveBeenCalled(); + expect(configurator.attackDiscovery).toHaveBeenCalled(); expect(MockedProductFeatures.mock.instances[0].setConfig).toHaveBeenCalledWith( mockSecurityConfig @@ -105,6 +109,9 @@ describe('ProductFeaturesService', () => { expect(MockedProductFeatures.mock.instances[2].setConfig).toHaveBeenCalledWith( mockAssistantConfig ); + expect(MockedProductFeatures.mock.instances[3].setConfig).toHaveBeenCalledWith( + mockAttackDiscoveryConfig + ); }); it('should return isEnabled for enabled features', () => { @@ -127,8 +134,12 @@ describe('ProductFeaturesService', () => { const mockAssistantConfig = new Map([ [ProductFeatureKey.assistant, {}], ]) as ProductFeaturesConfig; + const mockAttackDiscoveryConfig = new Map([ + [ProductFeatureKey.attackDiscovery, {}], + ]) as ProductFeaturesConfig; const configurator: ProductFeaturesConfigurator = { + attackDiscovery: jest.fn(() => mockAttackDiscoveryConfig), security: jest.fn(() => mockSecurityConfig), cases: jest.fn(() => mockCasesConfig), securityAssistant: jest.fn(() => mockAssistantConfig), @@ -139,6 +150,7 @@ describe('ProductFeaturesService', () => { expect(productFeaturesService.isEnabled(ProductFeatureKey.endpointExceptions)).toEqual(true); expect(productFeaturesService.isEnabled(ProductFeatureKey.casesConnectors)).toEqual(true); expect(productFeaturesService.isEnabled(ProductFeatureKey.assistant)).toEqual(true); + expect(productFeaturesService.isEnabled(ProductFeatureKey.attackDiscovery)).toEqual(true); expect(productFeaturesService.isEnabled(ProductFeatureKey.externalRuleActions)).toEqual(false); }); diff --git a/x-pack/plugins/security_solution/server/lib/product_features_service/product_features_service.ts b/x-pack/plugins/security_solution/server/lib/product_features_service/product_features_service.ts index 8714c2e4ab6ab..e30c067a0d4a4 100644 --- a/x-pack/plugins/security_solution/server/lib/product_features_service/product_features_service.ts +++ b/x-pack/plugins/security_solution/server/lib/product_features_service/product_features_service.ts @@ -17,6 +17,7 @@ import type { FeaturesPluginSetup } from '@kbn/features-plugin/server'; import type { ProductFeatureKeyType } from '@kbn/security-solution-features'; import { getAssistantFeature, + getAttackDiscoveryFeature, getCasesFeature, getSecurityFeature, } from '@kbn/security-solution-features/product_features'; @@ -31,6 +32,7 @@ export class ProductFeaturesService { private securityProductFeatures: ProductFeatures; private casesProductFeatures: ProductFeatures; private securityAssistantProductFeatures: ProductFeatures; + private attackDiscoveryProductFeatures: ProductFeatures; private productFeatures?: Set; constructor( @@ -67,12 +69,21 @@ export class ProductFeaturesService { assistantFeature.baseKibanaFeature, assistantFeature.baseKibanaSubFeatureIds ); + + const attackDiscoveryFeature = getAttackDiscoveryFeature(); + this.attackDiscoveryProductFeatures = new ProductFeatures( + this.logger, + attackDiscoveryFeature.subFeaturesMap, + attackDiscoveryFeature.baseKibanaFeature, + attackDiscoveryFeature.baseKibanaSubFeatureIds + ); } public init(featuresSetup: FeaturesPluginSetup) { this.securityProductFeatures.init(featuresSetup); this.casesProductFeatures.init(featuresSetup); this.securityAssistantProductFeatures.init(featuresSetup); + this.attackDiscoveryProductFeatures.init(featuresSetup); } public setProductFeaturesConfigurator(configurator: ProductFeaturesConfigurator) { @@ -85,11 +96,15 @@ export class ProductFeaturesService { const securityAssistantProductFeaturesConfig = configurator.securityAssistant(); this.securityAssistantProductFeatures.setConfig(securityAssistantProductFeaturesConfig); + const attackDiscoveryProductFeaturesConfig = configurator.attackDiscovery(); + this.attackDiscoveryProductFeatures.setConfig(attackDiscoveryProductFeaturesConfig); + this.productFeatures = new Set( Object.freeze([ ...securityProductFeaturesConfig.keys(), ...casesProductFeaturesConfig.keys(), ...securityAssistantProductFeaturesConfig.keys(), + ...attackDiscoveryProductFeaturesConfig.keys(), ]) as readonly ProductFeatureKeyType[] ); } @@ -107,7 +122,8 @@ export class ProductFeaturesService { return ( this.securityProductFeatures.isActionRegistered(action) || this.casesProductFeatures.isActionRegistered(action) || - this.securityAssistantProductFeatures.isActionRegistered(action) + this.securityAssistantProductFeatures.isActionRegistered(action) || + this.attackDiscoveryProductFeatures.isActionRegistered(action) ); } diff --git a/x-pack/plugins/security_solution/server/lib/product_features_service/types.ts b/x-pack/plugins/security_solution/server/lib/product_features_service/types.ts index 27bf020fad4ae..9c7b20cfba960 100644 --- a/x-pack/plugins/security_solution/server/lib/product_features_service/types.ts +++ b/x-pack/plugins/security_solution/server/lib/product_features_service/types.ts @@ -13,6 +13,7 @@ import type { } from '@kbn/security-solution-features/keys'; export interface ProductFeaturesConfigurator { + attackDiscovery: () => ProductFeaturesConfig; security: () => ProductFeaturesConfig; cases: () => ProductFeaturesConfig; securityAssistant: () => ProductFeaturesConfig; diff --git a/x-pack/plugins/security_solution_ess/public/upselling/lazy_upselling.tsx b/x-pack/plugins/security_solution_ess/public/upselling/lazy_upselling.tsx index 70f39b2ae70e6..56775b6c4433e 100644 --- a/x-pack/plugins/security_solution_ess/public/upselling/lazy_upselling.tsx +++ b/x-pack/plugins/security_solution_ess/public/upselling/lazy_upselling.tsx @@ -24,3 +24,9 @@ export const EntityAnalyticsUpsellingPageLazy = lazy(() => default: EntityAnalyticsUpsellingPageESS, })) ); + +export const AttackDiscoveryUpsellingPageLazy = lazy(() => + import('./pages/attack_discovery').then(({ AttackDiscoveryUpsellingPageESS }) => ({ + default: AttackDiscoveryUpsellingPageESS, + })) +); diff --git a/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/index.test.tsx b/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/index.test.tsx new file mode 100644 index 0000000000000..ee84089e5624a --- /dev/null +++ b/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/index.test.tsx @@ -0,0 +1,56 @@ +/* + * 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 { render, screen } from '@testing-library/react'; +import React from 'react'; + +import * as i18n from './translations'; + +jest.mock('../../../common/services', () => ({ + useKibana: jest.fn(() => ({ + services: { + application: { + getUrlForApp: jest + .fn() + .mockReturnValue('http://localhost:5601/app/management/stack/license_management'), + }, + http: { + basePath: { + get: () => 'some-base-path', + }, + }, + }, + })), +})); + +import { AttackDiscoveryUpsellingPageESS } from '.'; + +describe('AttackDiscoveryUpsellingPageESS', () => { + beforeEach(() => { + jest.clearAllMocks(); + + render(); + }); + + it('renders the expected ESS-specific availability message', () => { + const attackDiscoveryIsAvailable = screen.getByTestId('availabilityMessage'); + + expect(attackDiscoveryIsAvailable).toHaveTextContent(i18n.AVAILABILITY_MESSAGE); + }); + + it('renders the expected ESS-specific upgrade message', () => { + const pleaseUpgrade = screen.getByTestId('upgradeMessage'); + + expect(pleaseUpgrade).toHaveTextContent(i18n.UPGRADE_MESSAGE); + }); + + it('renders the ESS-specific actions', () => { + const actions = screen.getByTestId('essActions'); + + expect(actions).toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/index.tsx b/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/index.tsx new file mode 100644 index 0000000000000..12486b0a7be8c --- /dev/null +++ b/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/index.tsx @@ -0,0 +1,42 @@ +/* + * 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 { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { AttackDiscoveryUpsellingPage } from '@kbn/security-solution-upselling/pages/attack_discovery'; +import React, { useMemo } from 'react'; + +import { UpgradeActions } from './upgrade_actions'; +import * as i18n from './translations'; + +/** + * This component passes self-managed-specific upgrade actions and `i18n` to + * the platform agnostic `AttackDiscoveryUpsellingPage` component. + */ +const AttackDiscoveryUpsellingPageESSComponent: React.FC = () => { + const actions = useMemo( + () => ( + + + + + + ), + [] + ); + + return ( + + ); +}; + +AttackDiscoveryUpsellingPageESSComponent.displayName = 'AttackDiscoveryUpsellingPageESS'; + +export const AttackDiscoveryUpsellingPageESS = React.memo(AttackDiscoveryUpsellingPageESSComponent); diff --git a/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/translations.ts b/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/translations.ts new file mode 100644 index 0000000000000..de393ffcf26a1 --- /dev/null +++ b/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/translations.ts @@ -0,0 +1,22 @@ +/* + * 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 AVAILABILITY_MESSAGE = i18n.translate( + 'xpack.securitySolutionEss.upselling.pages.attackDiscovery.availabilityMessage', + { + defaultMessage: 'Your license does not support Attack discovery.', + } +); + +export const UPGRADE_MESSAGE = i18n.translate( + 'xpack.securitySolutionEss.upselling.pages.attackDiscovery.upgradeMessage', + { + defaultMessage: 'Please upgrade your license to use this feature.', + } +); diff --git a/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/upgrade_actions/index.test.tsx b/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/upgrade_actions/index.test.tsx new file mode 100644 index 0000000000000..27f19e36f8543 --- /dev/null +++ b/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/upgrade_actions/index.test.tsx @@ -0,0 +1,57 @@ +/* + * 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 { render, screen } from '@testing-library/react'; +import React from 'react'; + +import * as i18n from './translations'; +import { UpgradeActions } from '.'; + +jest.mock('../../../../common/services', () => ({ + useKibana: jest.fn().mockReturnValue({ + services: { + application: { + getUrlForApp: jest + .fn() + .mockReturnValue('http://localhost:5601/app/management/stack/license_management'), + }, + }, + }), +})); + +describe('UpgradeActions', () => { + beforeEach(() => { + render(); + }); + + describe('upgrade docs button', () => { + it('renders the expected button text', () => { + expect(screen.getByTestId('upgradeDocs')).toHaveTextContent(i18n.UPGRADE_DOCS); + }); + + it('opens the link in a new tab', () => { + expect(screen.getByTestId('upgradeDocs')).toHaveAttribute('target', '_blank'); + }); + }); + + describe('upgrade call to action button', () => { + it('renders the expected button text', () => { + expect(screen.getByTestId('upgradeCta')).toHaveTextContent(i18n.UPGRADE_CTA); + }); + + it('opens the license management page in a new tab', () => { + expect(screen.getByTestId('upgradeCta')).toHaveAttribute('target', '_blank'); + }); + + it('links to the license management page', () => { + expect(screen.getByTestId('upgradeCta')).toHaveAttribute( + 'href', + 'http://localhost:5601/app/management/stack/license_management' + ); + }); + }); +}); diff --git a/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/upgrade_actions/index.tsx b/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/upgrade_actions/index.tsx new file mode 100644 index 0000000000000..b0849e8d9526c --- /dev/null +++ b/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/upgrade_actions/index.tsx @@ -0,0 +1,52 @@ +/* + * 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, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import React from 'react'; + +import { useKibana } from '../../../../common/services'; +import * as i18n from './translations'; + +const UpgradeActionsComponent = () => { + const { services } = useKibana(); + + return ( + + + + {i18n.UPGRADE_DOCS} + + + + + + {i18n.UPGRADE_CTA} + + + + ); +}; + +export const UpgradeActions = React.memo(UpgradeActionsComponent); diff --git a/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/upgrade_actions/translations.ts b/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/upgrade_actions/translations.ts new file mode 100644 index 0000000000000..185d89e188c84 --- /dev/null +++ b/x-pack/plugins/security_solution_ess/public/upselling/pages/attack_discovery/upgrade_actions/translations.ts @@ -0,0 +1,22 @@ +/* + * 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 UPGRADE_CTA = i18n.translate( + 'xpack.securitySolutionEss.upselling.pages.attackDiscovery.upgrade.upgradeTitle', + { + defaultMessage: 'Manage license', + } +); + +export const UPGRADE_DOCS = i18n.translate( + 'xpack.securitySolutionEss.upselling.pages.attackDiscovery.upgrade.upgradeButtonLabel', + { + defaultMessage: 'Subscription plans', + } +); diff --git a/x-pack/plugins/security_solution_ess/public/upselling/register_upsellings.test.tsx b/x-pack/plugins/security_solution_ess/public/upselling/register_upsellings.test.tsx new file mode 100644 index 0000000000000..e7fdcf39e4e72 --- /dev/null +++ b/x-pack/plugins/security_solution_ess/public/upselling/register_upsellings.test.tsx @@ -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 { SecurityPageName } from '@kbn/security-solution-plugin/common'; + +import { upsellingPages } from './register_upsellings'; + +describe('upsellingPages', () => { + it('registers the Attack discovery page with the expected minimum license for self managed', () => { + const attackDiscoveryPage = upsellingPages.find( + ({ pageName }) => pageName === SecurityPageName.attackDiscovery + ); + + expect(attackDiscoveryPage?.minimumLicenseRequired).toEqual('enterprise'); + }); +}); diff --git a/x-pack/plugins/security_solution_ess/public/upselling/register_upsellings.tsx b/x-pack/plugins/security_solution_ess/public/upselling/register_upsellings.tsx index 2f86c68821ef3..b7fbdab3b5982 100644 --- a/x-pack/plugins/security_solution_ess/public/upselling/register_upsellings.tsx +++ b/x-pack/plugins/security_solution_ess/public/upselling/register_upsellings.tsx @@ -25,6 +25,7 @@ import type React from 'react'; import type { Services } from '../common/services'; import { withServicesProvider } from '../common/services'; import { + AttackDiscoveryUpsellingPageLazy, EntityAnalyticsUpsellingPageLazy, EntityAnalyticsUpsellingSectionLazy, } from './lazy_upselling'; @@ -92,6 +93,11 @@ export const upsellingPages: UpsellingPages = [ minimumLicenseRequired: 'platinum', component: EntityAnalyticsUpsellingPageLazy, }, + { + pageName: SecurityPageName.attackDiscovery, + minimumLicenseRequired: 'enterprise', + component: AttackDiscoveryUpsellingPageLazy, + }, ]; // Upsellings for sections, linked by arbitrary ids diff --git a/x-pack/plugins/security_solution_ess/server/product_features/attack_discovery_product_features_config.ts b/x-pack/plugins/security_solution_ess/server/product_features/attack_discovery_product_features_config.ts new file mode 100644 index 0000000000000..9e575e805e203 --- /dev/null +++ b/x-pack/plugins/security_solution_ess/server/product_features/attack_discovery_product_features_config.ts @@ -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 type { + ProductFeatureKeys, + ProductFeatureKibanaConfig, + ProductFeaturesAttackDiscoveryConfig, +} from '@kbn/security-solution-features'; +import { + attackDiscoveryDefaultProductFeaturesConfig, + createEnabledProductFeaturesConfigMap, +} from '@kbn/security-solution-features/config'; +import type { ProductFeatureAttackDiscoveryKey } from '@kbn/security-solution-features/keys'; + +/** + * Maps the ProductFeatures keys to Kibana privileges that will be merged + * into the base privileges config for the Security app. + * + * Privileges can be added in different ways: + * - `privileges`: the privileges that will be added directly into the main Attack discovery feature. + * - `subFeatureIds`: the ids of the sub-features that will be added into the Attack discovery subFeatures entry. + * - `subFeaturesPrivileges`: the privileges that will be added into the existing Attack discovery subFeature with the privilege `id` specified. + */ +const attackDiscoveryProductFeaturesConfig: Record< + ProductFeatureAttackDiscoveryKey, + ProductFeatureKibanaConfig +> = { + ...attackDiscoveryDefaultProductFeaturesConfig, + // ess-specific app features configs here +}; + +export const getAttackDiscoveryProductFeaturesConfigurator = + (enabledProductFeatureKeys: ProductFeatureKeys) => (): ProductFeaturesAttackDiscoveryConfig => + createEnabledProductFeaturesConfigMap( + attackDiscoveryProductFeaturesConfig, + enabledProductFeatureKeys + ); diff --git a/x-pack/plugins/security_solution_ess/server/product_features/index.ts b/x-pack/plugins/security_solution_ess/server/product_features/index.ts index dc84442075fc0..ed85c32f12284 100644 --- a/x-pack/plugins/security_solution_ess/server/product_features/index.ts +++ b/x-pack/plugins/security_solution_ess/server/product_features/index.ts @@ -10,11 +10,13 @@ import type { ProductFeaturesConfigurator } from '@kbn/security-solution-plugin/ import { getCasesProductFeaturesConfigurator } from './cases_product_features_config'; import { getSecurityProductFeaturesConfigurator } from './security_product_features_config'; import { getSecurityAssistantProductFeaturesConfigurator } from './assistant_product_features_config'; +import { getAttackDiscoveryProductFeaturesConfigurator } from './attack_discovery_product_features_config'; export const getProductProductFeaturesConfigurator = ( enabledProductFeatureKeys: ProductFeatureKeys ): ProductFeaturesConfigurator => { return { + attackDiscovery: getAttackDiscoveryProductFeaturesConfigurator(enabledProductFeatureKeys), security: getSecurityProductFeaturesConfigurator(enabledProductFeatureKeys), cases: getCasesProductFeaturesConfigurator(enabledProductFeatureKeys), securityAssistant: getSecurityAssistantProductFeaturesConfigurator(enabledProductFeatureKeys), diff --git a/x-pack/plugins/security_solution_serverless/common/pli/pli_config.ts b/x-pack/plugins/security_solution_serverless/common/pli/pli_config.ts index 9a6eb9ab743ca..42cdf7589fb35 100644 --- a/x-pack/plugins/security_solution_serverless/common/pli/pli_config.ts +++ b/x-pack/plugins/security_solution_serverless/common/pli/pli_config.ts @@ -22,6 +22,7 @@ export const PLI_PRODUCT_FEATURES: PliProductFeatures = { complete: [ ProductFeatureKey.advancedInsights, ProductFeatureKey.assistant, + ProductFeatureKey.attackDiscovery, ProductFeatureKey.investigationGuide, ProductFeatureKey.investigationGuideInteractions, ProductFeatureKey.threatIntelligence, diff --git a/x-pack/plugins/security_solution_serverless/public/upselling/lazy_upselling.tsx b/x-pack/plugins/security_solution_serverless/public/upselling/lazy_upselling.tsx index b7e4640608928..526654a6f4509 100644 --- a/x-pack/plugins/security_solution_serverless/public/upselling/lazy_upselling.tsx +++ b/x-pack/plugins/security_solution_serverless/public/upselling/lazy_upselling.tsx @@ -40,3 +40,11 @@ export const EntityAnalyticsUpsellingSectionLazy = withSuspenseUpsell( ) ) ); + +export const AttackDiscoveryUpsellingPageLazy = withSuspenseUpsell( + lazy(() => + import('./pages/attack_discovery').then(({ AttackDiscoveryUpsellingPageServerless }) => ({ + default: AttackDiscoveryUpsellingPageServerless, + })) + ) +); diff --git a/x-pack/plugins/security_solution_serverless/public/upselling/pages/attack_discovery/index.test.tsx b/x-pack/plugins/security_solution_serverless/public/upselling/pages/attack_discovery/index.test.tsx new file mode 100644 index 0000000000000..249e5e369f9c0 --- /dev/null +++ b/x-pack/plugins/security_solution_serverless/public/upselling/pages/attack_discovery/index.test.tsx @@ -0,0 +1,45 @@ +/* + * 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 { render, screen } from '@testing-library/react'; +import React from 'react'; + +import * as i18n from './translations'; + +jest.mock('../../../common/services', () => ({ + useKibana: jest.fn(() => ({ + services: { + http: { + basePath: { + get: () => 'some-base-path', + }, + }, + }, + })), +})); + +import { AttackDiscoveryUpsellingPageServerless } from '.'; + +describe('AttackDiscoveryUpsellingPageServerless', () => { + beforeEach(() => { + jest.clearAllMocks(); + + render(); + }); + + it('renders the expected serverless-specific availability message', () => { + const attackDiscoveryIsAvailable = screen.getByTestId('availabilityMessage'); + + expect(attackDiscoveryIsAvailable).toHaveTextContent(i18n.AVAILABILITY_MESSAGE); + }); + + it('renders the expected serverless-specific upgrade message', () => { + const pleaseUpgrade = screen.getByTestId('upgradeMessage'); + + expect(pleaseUpgrade).toHaveTextContent(i18n.UPGRADE_MESSAGE); + }); +}); diff --git a/x-pack/plugins/security_solution_serverless/public/upselling/pages/attack_discovery/index.tsx b/x-pack/plugins/security_solution_serverless/public/upselling/pages/attack_discovery/index.tsx new file mode 100644 index 0000000000000..cedbbae3ff335 --- /dev/null +++ b/x-pack/plugins/security_solution_serverless/public/upselling/pages/attack_discovery/index.tsx @@ -0,0 +1,31 @@ +/* + * 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 { AttackDiscoveryUpsellingPage } from '@kbn/security-solution-upselling/pages/attack_discovery'; +import React from 'react'; + +import * as i18n from './translations'; + +/** + * This component passes serverless-specific `i18n` to the platform agnostic + * `AttackDiscoveryUpsellingPage` component. + */ +const AttackDiscoveryUpsellingPageServerlessComponent: React.FC = () => { + return ( + + ); +}; + +AttackDiscoveryUpsellingPageServerlessComponent.displayName = + 'AttackDiscoveryUpsellingPageServerless'; + +export const AttackDiscoveryUpsellingPageServerless = React.memo( + AttackDiscoveryUpsellingPageServerlessComponent +); diff --git a/x-pack/plugins/security_solution_serverless/public/upselling/pages/attack_discovery/translations.ts b/x-pack/plugins/security_solution_serverless/public/upselling/pages/attack_discovery/translations.ts new file mode 100644 index 0000000000000..4e246986d1e0a --- /dev/null +++ b/x-pack/plugins/security_solution_serverless/public/upselling/pages/attack_discovery/translations.ts @@ -0,0 +1,22 @@ +/* + * 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 AVAILABILITY_MESSAGE = i18n.translate( + 'xpack.securitySolutionServerless.upselling.pages.attackDiscovery.availabilityMessage', + { + defaultMessage: 'Your product tier does not support Attack discovery.', + } +); + +export const UPGRADE_MESSAGE = i18n.translate( + 'xpack.securitySolutionServerless.upselling.pages.attackDiscovery.upgradeMessage', + { + defaultMessage: 'Please upgrade your product tier to use this feature.', + } +); diff --git a/x-pack/plugins/security_solution_serverless/public/upselling/upsellings.test.tsx b/x-pack/plugins/security_solution_serverless/public/upselling/upsellings.test.tsx new file mode 100644 index 0000000000000..4ec14e81ca175 --- /dev/null +++ b/x-pack/plugins/security_solution_serverless/public/upselling/upsellings.test.tsx @@ -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 { SecurityPageName } from '@kbn/security-solution-plugin/common'; +import { ProductFeatureKey } from '@kbn/security-solution-features/keys'; + +import { upsellingPages } from './upsellings'; + +describe('upsellingPages', () => { + it('registers the Attack discovery page with the Attack discovery PLI', () => { + const attackDiscoveryPage = upsellingPages.find( + ({ pageName }) => pageName === SecurityPageName.attackDiscovery + ); + + expect(attackDiscoveryPage?.pli).toEqual(ProductFeatureKey.attackDiscovery); + }); +}); diff --git a/x-pack/plugins/security_solution_serverless/public/upselling/upsellings.tsx b/x-pack/plugins/security_solution_serverless/public/upselling/upsellings.tsx index cb0e1514b1df5..bbc873ef137e7 100644 --- a/x-pack/plugins/security_solution_serverless/public/upselling/upsellings.tsx +++ b/x-pack/plugins/security_solution_serverless/public/upselling/upsellings.tsx @@ -25,6 +25,7 @@ import { } from './sections/endpoint_management'; import { getProductTypeByPLI } from './hooks/use_product_type_by_pli'; import { + AttackDiscoveryUpsellingPageLazy, EndpointExceptionsDetailsUpsellingLazy, EntityAnalyticsUpsellingPageLazy, EntityAnalyticsUpsellingSectionLazy, @@ -76,6 +77,11 @@ export const upsellingPages: UpsellingPages = [ ), }, + { + pageName: SecurityPageName.attackDiscovery, + pli: ProductFeatureKey.attackDiscovery, + component: () => , + }, ]; const entityAnalyticsProductType = getProductTypeByPLI(ProductFeatureKey.advancedInsights) ?? ''; diff --git a/x-pack/plugins/security_solution_serverless/server/plugin.ts b/x-pack/plugins/security_solution_serverless/server/plugin.ts index f81a8e013e290..7161c5b684505 100644 --- a/x-pack/plugins/security_solution_serverless/server/plugin.ts +++ b/x-pack/plugins/security_solution_serverless/server/plugin.ts @@ -63,6 +63,7 @@ export class SecuritySolutionServerlessPlugin // Register product features const enabledProductFeatures = getProductProductFeatures(this.config.productTypes); + registerProductFeatures(pluginsSetup, enabledProductFeatures, this.config); // Register telemetry events diff --git a/x-pack/plugins/security_solution_serverless/server/product_features/attack_discovery_product_features_config.ts b/x-pack/plugins/security_solution_serverless/server/product_features/attack_discovery_product_features_config.ts new file mode 100644 index 0000000000000..406c396edfb72 --- /dev/null +++ b/x-pack/plugins/security_solution_serverless/server/product_features/attack_discovery_product_features_config.ts @@ -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 type { + ProductFeatureKeys, + ProductFeatureKibanaConfig, + ProductFeaturesAttackDiscoveryConfig, +} from '@kbn/security-solution-features'; +import { + attackDiscoveryDefaultProductFeaturesConfig, + createEnabledProductFeaturesConfigMap, +} from '@kbn/security-solution-features/config'; +import type { ProductFeatureAttackDiscoveryKey } from '@kbn/security-solution-features/keys'; + +/** + * Maps the ProductFeatures keys to Kibana privileges that will be merged + * into the base privileges config for the app. + * + * Privileges can be added in different ways: + * - `privileges`: the privileges that will be added directly into the main Attack discovery feature. + * - `subFeatureIds`: the ids of the sub-features that will be added into the Attack discovery subFeatures entry. + * - `subFeaturesPrivileges`: the privileges that will be added into the existing Attack discovery subFeature with the privilege `id` specified. + */ +const attackDiscoveryProductFeaturesConfig: Record< + ProductFeatureAttackDiscoveryKey, + ProductFeatureKibanaConfig +> = { + ...attackDiscoveryDefaultProductFeaturesConfig, + // serverless-specific app features configs here +}; + +export const getAttackDiscoveryProductFeaturesConfigurator = + (enabledProductFeatureKeys: ProductFeatureKeys) => (): ProductFeaturesAttackDiscoveryConfig => + createEnabledProductFeaturesConfigMap( + attackDiscoveryProductFeaturesConfig, + enabledProductFeatureKeys + ); diff --git a/x-pack/plugins/security_solution_serverless/server/product_features/index.ts b/x-pack/plugins/security_solution_serverless/server/product_features/index.ts index 6c0b2b9091c66..310ea860787ba 100644 --- a/x-pack/plugins/security_solution_serverless/server/product_features/index.ts +++ b/x-pack/plugins/security_solution_serverless/server/product_features/index.ts @@ -9,6 +9,7 @@ import type { Logger } from '@kbn/logging'; import { ProductFeatureKey } from '@kbn/security-solution-features/keys'; import type { ProductFeatureKeys } from '@kbn/security-solution-features'; +import { getAttackDiscoveryProductFeaturesConfigurator } from './attack_discovery_product_features_config'; import { getCasesProductFeaturesConfigurator } from './cases_product_features_config'; import { getSecurityProductFeaturesConfigurator } from './security_product_features_config'; import { getSecurityAssistantProductFeaturesConfigurator } from './assistant_product_features_config'; @@ -32,6 +33,7 @@ export const registerProductFeatures = ( // register product features for the main security solution product features service pluginsSetup.securitySolution.setProductFeaturesConfigurator({ + attackDiscovery: getAttackDiscoveryProductFeaturesConfigurator(enabledProductFeatureKeys), security: getSecurityProductFeaturesConfigurator( enabledProductFeatureKeys, config.experimentalFeatures diff --git a/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.ts b/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.ts index b5d9be07d91af..d37337852b6b9 100644 --- a/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.ts +++ b/x-pack/plugins/spaces/server/capabilities/capabilities_switcher.ts @@ -98,7 +98,7 @@ function toggleDisabledFeatures( for (const feature of disabledFeatures) { // Disable associated navLink, if one exists feature.app.forEach((app) => { - if (navLinks.hasOwnProperty(app) && !enabledAppEntries.has(app)) { + if (Object.hasOwn(navLinks, app) && !enabledAppEntries.has(app)) { navLinks[app] = false; } }); @@ -117,8 +117,8 @@ function toggleDisabledFeatures( sectionItems.forEach((item) => { const enabledManagementEntriesSection = enabledManagementEntries.get(sectionId); if ( - managementItems.hasOwnProperty(sectionId) && - managementItems[sectionId].hasOwnProperty(item) + Object.hasOwn(managementItems, sectionId) && + Object.hasOwn(managementItems[sectionId], item) ) { const isEnabledElsewhere = (enabledManagementEntriesSection ?? []).includes(item); if (!isEnabledElsewhere) { @@ -129,7 +129,7 @@ function toggleDisabledFeatures( }); // Disable "sub features" that match the disabled feature - if (capabilities.hasOwnProperty(feature.id)) { + if (Object.hasOwn(capabilities, feature.id)) { const capability = capabilities[feature.id]; Object.keys(capability).forEach((featureKey) => { capability[featureKey] = false; diff --git a/x-pack/plugins/spaces/server/saved_objects/migrations/space_migrations.ts b/x-pack/plugins/spaces/server/saved_objects/migrations/space_migrations.ts index 28d4e42cfb9cf..c060f8d36a09d 100644 --- a/x-pack/plugins/spaces/server/saved_objects/migrations/space_migrations.ts +++ b/x-pack/plugins/spaces/server/saved_objects/migrations/space_migrations.ts @@ -10,7 +10,7 @@ import type { SavedObjectUnsanitizedDoc } from '@kbn/core/server'; import type { Space } from '../../../common'; export const migrateTo660 = (doc: SavedObjectUnsanitizedDoc) => { - if (!doc.attributes.hasOwnProperty('disabledFeatures')) { + if (!Object.hasOwn(doc.attributes, 'disabledFeatures')) { doc.attributes.disabledFeatures = []; } return doc; diff --git a/x-pack/plugins/spaces/server/spaces_client/spaces_client.ts b/x-pack/plugins/spaces/server/spaces_client/spaces_client.ts index 7019520b9498c..e94918a62b26b 100644 --- a/x-pack/plugins/spaces/server/spaces_client/spaces_client.ts +++ b/x-pack/plugins/spaces/server/spaces_client/spaces_client.ts @@ -142,11 +142,11 @@ export class SpacesClient implements ISpacesClient { ); } - if (this.isServerless && space.hasOwnProperty('solution')) { + if (this.isServerless && Object.hasOwn(space, 'solution')) { throw Boom.badRequest('Unable to create Space, solution property is forbidden in serverless'); } - if (space.hasOwnProperty('solution') && !space.solution) { + if (Object.hasOwn(space, 'solution') && !space.solution) { throw Boom.badRequest('Unable to create Space, solution property cannot be empty'); } @@ -175,11 +175,11 @@ export class SpacesClient implements ISpacesClient { ); } - if (this.isServerless && space.hasOwnProperty('solution')) { + if (this.isServerless && Object.hasOwn(space, 'solution')) { throw Boom.badRequest('Unable to update Space, solution property is forbidden in serverless'); } - if (space.hasOwnProperty('solution') && !space.solution) { + if (Object.hasOwn(space, 'solution') && !space.solution) { throw Boom.badRequest('Unable to update Space, solution property cannot be empty'); } diff --git a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts index d6b8215bd2a37..f017ee0f63aed 100644 --- a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts +++ b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_esql_query.ts @@ -11,8 +11,12 @@ import { SharePluginStart } from '@kbn/share-plugin/server'; import { IScopedClusterClient, Logger } from '@kbn/core/server'; import { ecsFieldMap, alertFieldMap } from '@kbn/alerts-as-data-utils'; import { createTaskRunError, TaskErrorSource } from '@kbn/task-manager-plugin/server'; -import { OnlyEsqlQueryRuleParams } from '../types'; +import { LocatorPublic } from '@kbn/share-plugin/common'; +import { DiscoverAppLocatorParams } from '@kbn/discover-plugin/common'; +import { DataViewsContract } from '@kbn/data-views-plugin/common'; +import { Filter, Query } from '@kbn/es-query'; import { EsqlTable, toEsQueryHits } from '../../../../common'; +import { OnlyEsqlQueryRuleParams } from '../types'; export interface FetchEsqlQueryOpts { ruleId: string; @@ -127,3 +131,31 @@ export const getSourceFields = (results: EsqlTable) => { return intersectionBy(resultFields, ecsFields, 'label'); }; + +export async function generateLink( + esqlQuery: Query, + discoverLocator: LocatorPublic, + dataViews: DataViewsContract, + dataViewToUpdate: DataView, + dateStart: string, + dateEnd: string, + spacePrefix: string, + filterToExcludeHitsFromPreviousRun: Filter | null +) { + const redirectUrlParams: DiscoverAppLocatorParams = { + filters: filterToExcludeHitsFromPreviousRun ? [filterToExcludeHitsFromPreviousRun] : [], + timeRange: { from: dateStart, to: dateEnd }, + isAlertResults: true, + query: { + language: 'esql', + query: esqlQuery, + }, + }; + + // use `lzCompress` flag for making the link readable during debugging/testing + // const redirectUrl = discoverLocator!.getRedirectUrl(redirectUrlParams, { lzCompress: false }); + const redirectUrl = discoverLocator!.getRedirectUrl(redirectUrlParams); + const [start, end] = redirectUrl.split('/app'); + + return start + spacePrefix + '/app' + end; +} diff --git a/x-pack/plugins/stack_alerts/server/rule_types/geo_containment/lib/transform_results.ts b/x-pack/plugins/stack_alerts/server/rule_types/geo_containment/lib/transform_results.ts index 6b457575b4029..47292ab82e195 100644 --- a/x-pack/plugins/stack_alerts/server/rule_types/geo_containment/lib/transform_results.ts +++ b/x-pack/plugins/stack_alerts/server/rule_types/geo_containment/lib/transform_results.ts @@ -17,7 +17,7 @@ export function transformResults( const resultsMap = new Map(); const boundarySplitBuckets = results?.aggregations?.shapes?.buckets ?? {}; for (const boundaryId in boundarySplitBuckets) { - if (!boundarySplitBuckets.hasOwnProperty(boundaryId)) { + if (!Object.hasOwn(boundarySplitBuckets, boundaryId)) { continue; } diff --git a/x-pack/plugins/stack_connectors/common/slack_api/schema.ts b/x-pack/plugins/stack_connectors/common/slack_api/schema.ts index 37ca6de1cf231..029b2fb0e81f0 100644 --- a/x-pack/plugins/stack_connectors/common/slack_api/schema.ts +++ b/x-pack/plugins/stack_connectors/common/slack_api/schema.ts @@ -42,7 +42,7 @@ export function validateBlockkit(text: string) { try { const parsedText = JSON.parse(text); - if (!parsedText.hasOwnProperty('blocks')) { + if (!Object.hasOwn(parsedText, 'blocks')) { return 'block kit body must contain field "blocks"'; } } catch (err) { diff --git a/x-pack/plugins/stack_connectors/public/connector_types/jira/jira_params.tsx b/x-pack/plugins/stack_connectors/public/connector_types/jira/jira_params.tsx index 2163c822ee4a6..7ae1efbe13f38 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/jira/jira_params.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/jira/jira_params.tsx @@ -107,10 +107,10 @@ const JiraParamsFields: React.FunctionComponent fields != null ? { - hasLabels: Object.prototype.hasOwnProperty.call(fields, 'labels'), - hasDescription: Object.prototype.hasOwnProperty.call(fields, 'description'), - hasPriority: Object.prototype.hasOwnProperty.call(fields, 'priority'), - hasParent: Object.prototype.hasOwnProperty.call(fields, 'parent'), + hasLabels: Object.hasOwn(fields, 'labels'), + hasDescription: Object.hasOwn(fields, 'description'), + hasPriority: Object.hasOwn(fields, 'priority'), + hasParent: Object.hasOwn(fields, 'parent'), } : { hasLabels: false, hasDescription: false, hasPriority: false, hasParent: false }, [fields] diff --git a/x-pack/plugins/stack_connectors/public/connector_types/slack_api/slack_api.tsx b/x-pack/plugins/stack_connectors/public/connector_types/slack_api/slack_api.tsx index 5924a1feffc62..c44fd56612d20 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/slack_api/slack_api.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/slack_api/slack_api.tsx @@ -76,7 +76,7 @@ export const getConnectorType = (): ConnectorTypeModel< if (actionParams.subAction === 'postBlockkit' && actionParams.subActionParams.text) { try { const blockkitJson = JSON.parse(actionParams.subActionParams.text); - if (!blockkitJson.hasOwnProperty('blocks')) { + if (!Object.hasOwn(blockkitJson, 'blocks')) { errors.text.push(BLOCKS_REQUIRED); } } catch { diff --git a/x-pack/plugins/threat_intelligence/public/components/update_status.test.tsx b/x-pack/plugins/threat_intelligence/public/components/update_status.test.tsx index 3ca6c01360b37..26f5e4b100264 100644 --- a/x-pack/plugins/threat_intelligence/public/components/update_status.test.tsx +++ b/x-pack/plugins/threat_intelligence/public/components/update_status.test.tsx @@ -11,7 +11,8 @@ import { TestProvidersComponent } from '../mocks/test_providers'; import { UpdateStatus } from './update_status'; describe('', () => { - it('should render Updated now', () => { + // Flaky: https://github.com/elastic/kibana/issues/186996 + it.skip('should render Updated now', () => { const result = render(, { wrapper: TestProvidersComponent, }); diff --git a/x-pack/plugins/transform/common/utils/es_utils.ts b/x-pack/plugins/transform/common/utils/es_utils.ts index abe24ac017e2f..41513176076c6 100644 --- a/x-pack/plugins/transform/common/utils/es_utils.ts +++ b/x-pack/plugins/transform/common/utils/es_utils.ts @@ -35,8 +35,7 @@ export function isValidIndexName(indexName: string) { /^[^-_\+]+$/.test(indexName.charAt(0)) && // Cannot be . or .. indexName !== '.' && - indexName !== '..' && - // Cannot be longer than 255 bytes (note it is bytes, + indexName !== '..' && // Cannot be longer than 255 bytes (note it is bytes, // so multi-byte characters will count towards the 255 limit faster) isValidIndexNameLength(indexName) ); diff --git a/x-pack/plugins/transform/public/app/hooks/use_delete_transform.tsx b/x-pack/plugins/transform/public/app/hooks/use_delete_transform.tsx index c2549b0edad56..3a933dcc9e935 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_delete_transform.tsx +++ b/x-pack/plugins/transform/public/app/hooks/use_delete_transform.tsx @@ -110,7 +110,7 @@ export const useDeleteTransforms = () => { onSuccess: (results) => { for (const transformId in results) { // hasOwnProperty check to ensure only properties on object itself, and not its prototypes - if (results.hasOwnProperty(transformId)) { + if (Object.hasOwn(results, transformId)) { const status = results[transformId]; const destinationIndex = status.destinationIndex; diff --git a/x-pack/plugins/transform/public/app/hooks/use_reauthorize_transform.tsx b/x-pack/plugins/transform/public/app/hooks/use_reauthorize_transform.tsx index 0465a178c09a3..65d98bbea0141 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_reauthorize_transform.tsx +++ b/x-pack/plugins/transform/public/app/hooks/use_reauthorize_transform.tsx @@ -51,7 +51,7 @@ export const useReauthorizeTransforms = () => { onSuccess: (results) => { for (const transformId in results) { // hasOwnProperty check to ensure only properties on object itself, and not its prototypes - if (results.hasOwnProperty(transformId)) { + if (Object.hasOwn(results, transformId)) { const result = results[transformId]; if (!result.success) { toastNotifications.addError( diff --git a/x-pack/plugins/transform/public/app/hooks/use_reset_transform.tsx b/x-pack/plugins/transform/public/app/hooks/use_reset_transform.tsx index fafc26581fa09..212cb2e9b629f 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_reset_transform.tsx +++ b/x-pack/plugins/transform/public/app/hooks/use_reset_transform.tsx @@ -47,7 +47,7 @@ export const useResetTransforms = () => { onSuccess: (results) => { for (const transformId in results) { // hasOwnProperty check to ensure only properties on object itself, and not its prototypes - if (results.hasOwnProperty(transformId)) { + if (Object.hasOwn(results, transformId)) { const status = results[transformId]; if (status.transformReset?.error) { diff --git a/x-pack/plugins/transform/public/app/hooks/use_schedule_now_transform.tsx b/x-pack/plugins/transform/public/app/hooks/use_schedule_now_transform.tsx index 22201b2806848..8511c2092e4ca 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_schedule_now_transform.tsx +++ b/x-pack/plugins/transform/public/app/hooks/use_schedule_now_transform.tsx @@ -51,7 +51,7 @@ export const useScheduleNowTransforms = () => { onSuccess: (results) => { for (const transformId in results) { // hasOwnProperty check to ensure only properties on object itself, and not its prototypes - if (results.hasOwnProperty(transformId)) { + if (Object.hasOwn(results, transformId)) { const result = results[transformId]; if (!result.success) { toastNotifications.addError( diff --git a/x-pack/plugins/transform/public/app/hooks/use_start_transform.tsx b/x-pack/plugins/transform/public/app/hooks/use_start_transform.tsx index 2175ccffeea53..73790b09f3b1b 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_start_transform.tsx +++ b/x-pack/plugins/transform/public/app/hooks/use_start_transform.tsx @@ -47,7 +47,7 @@ export const useStartTransforms = () => { onSuccess: (results) => { for (const transformId in results) { // hasOwnProperty check to ensure only properties on object itself, and not its prototypes - if (results.hasOwnProperty(transformId)) { + if (Object.hasOwn(results, transformId)) { const result = results[transformId]; if (!result.success) { toastNotifications.addError( diff --git a/x-pack/plugins/transform/public/app/hooks/use_stop_transform.tsx b/x-pack/plugins/transform/public/app/hooks/use_stop_transform.tsx index 439c654ded169..29939d9fcef7d 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_stop_transform.tsx +++ b/x-pack/plugins/transform/public/app/hooks/use_stop_transform.tsx @@ -48,7 +48,7 @@ export const useStopTransforms = () => { onSuccess: (results) => { for (const transformId in results) { // hasOwnProperty check to ensure only properties on object itself, and not its prototypes - if (results.hasOwnProperty(transformId)) { + if (Object.hasOwn(results, transformId)) { if (!results[transformId].success) { toastNotifications.addDanger( i18n.translate('xpack.transform.transformList.stopTransformErrorMessage', { diff --git a/x-pack/plugins/transform/public/app/hooks/use_transform_config_data.ts b/x-pack/plugins/transform/public/app/hooks/use_transform_config_data.ts index 4ecba4f66168b..f18b3778d6af3 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_transform_config_data.ts +++ b/x-pack/plugins/transform/public/app/hooks/use_transform_config_data.ts @@ -270,7 +270,7 @@ export const useTransformConfigData = ( return ({ rowIndex, columnId }: { rowIndex: number; columnId: string }) => { const adjustedRowIndex = rowIndex - pagination.pageIndex * pagination.pageSize; - const cellValue = pageData.hasOwnProperty(adjustedRowIndex) + const cellValue = Object.hasOwn(pageData, adjustedRowIndex) ? pageData[adjustedRowIndex][columnId] ?? null : null; diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_runtime_mappings_settings/advanced_runtime_mappings_settings.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_runtime_mappings_settings/advanced_runtime_mappings_settings.tsx index b150fb0c4e7ca..b8924c2f44744 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_runtime_mappings_settings/advanced_runtime_mappings_settings.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/advanced_runtime_mappings_settings/advanced_runtime_mappings_settings.tsx @@ -56,7 +56,7 @@ export const AdvancedRuntimeMappingsSettings: FC = (props) = const previousConfig = runtimeMappings; const isFieldDeleted = (field: string) => - previousConfig?.hasOwnProperty(field) && !nextConfig.hasOwnProperty(field); + Object.hasOwn(previousConfig ?? {}, field) && !Object.hasOwn(nextConfig, field); applyRuntimeMappingsEditorChanges(); @@ -66,8 +66,8 @@ export const AdvancedRuntimeMappingsSettings: FC = (props) = const groupBy = groupByList[groupByKey]; if ( isPivotGroupByConfigWithUiSupport(groupBy) && - previousConfig?.hasOwnProperty(groupBy.field) && - !nextConfig.hasOwnProperty(groupBy.field) + Object.hasOwn(previousConfig ?? {}, groupBy.field) && + !Object.hasOwn(nextConfig, groupBy.field) ) { deleteGroupBy(groupByKey); } diff --git a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx index 068da2a3567d8..2269f68f39840 100644 --- a/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx +++ b/x-pack/plugins/transform/public/app/sections/create_transform/components/step_define/common/filter_agg/components/filter_agg_form.tsx @@ -31,7 +31,7 @@ export function getSupportedFilterAggs( if (dataViewField !== undefined) { return [...commonFilterAggs, ...filterAggsFieldSupport[dataViewField.type]]; } - if (isPopulatedObject(runtimeMappings) && runtimeMappings.hasOwnProperty(fieldName)) { + if (isPopulatedObject(runtimeMappings) && Object.hasOwn(runtimeMappings, fieldName)) { const runtimeField = runtimeMappings[fieldName]; return [ ...commonFilterAggs, diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index b048ed05a577a..b134c6acfc580 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -5301,7 +5301,6 @@ "kbn-esql-validation-autocomplete.esql.autocomplete.noPoliciesLabelsFound": "Cliquez pour créer", "kbn-esql-validation-autocomplete.esql.autocomplete.pipeDoc": "Barre verticale (|)", "kbn-esql-validation-autocomplete.esql.autocomplete.semiColonDoc": "Point-virgule (;)", - "kbn-esql-validation-autocomplete.esql.autocomplete.sourceDefinition": "Index", "kbn-esql-validation-autocomplete.esql.autocomplete.valueDefinition": "Valeur littérale", "kbn-esql-validation-autocomplete.esql.autocomplete.variableDefinition": "Variable spécifiée par l'utilisateur dans la requête ES|QL", "kbn-esql-validation-autocomplete.esql.definition.addDoc": "Ajouter (+)", @@ -7697,7 +7696,6 @@ "timelion.vis.invalidIntervalErrorMessage": "Format d'intervalle non valide.", "timelion.vis.selectIntervalHelpText": "Choisissez une option ou créez une valeur personnalisée. Exemples : 30s, 20m, 24h, 2d, 1w, 1M", "timelion.vis.selectIntervalPlaceholder": "Choisir un intervalle", - "tryInConsole.button": "Essayer dans la console", "uiActions.actionPanel.more": "Plus", "uiActions.actionPanel.title": "Options", "uiActions.errors.incompatibleAction": "Action non compatible", @@ -14651,10 +14649,8 @@ "xpack.datasetQuality.expandLabel": "Développer", "xpack.datasetQuality.fetchDatasetDetailsFailed": "Nous n'avons pas pu obtenir les détails de votre ensemble de données.", "xpack.datasetQuality.fetchDatasetDetailsFailed.noDatasetSelected": "Vous n'avez sélectionné aucun ensemble de données", - "xpack.datasetQuality.fetchDatasetSettingsFailed": "Les paramètres de l'ensemble de données n'ont pas pu être chargés.", "xpack.datasetQuality.fetchDatasetStatsFailed": "Nous n'avons pas pu obtenir vos ensembles de données.", "xpack.datasetQuality.fetchDegradedStatsFailed": "Nous n'avons pas pu obtenir d'informations sur vos documents dégradés.", - "xpack.datasetQuality.fetchIntegrationDashboardsFailed": "Nous n'avons pas pu obtenir vos tableaux de bord d'intégration.", "xpack.datasetQuality.fetchIntegrationsFailed": "Nous n'avons pas pu obtenir vos intégrations.", "xpack.datasetQuality.fetchNonAggregatableDatasetsFailed": "Nous n'avons pas pu obtenir d'informations sur les ensembles de données non agrégés.", "xpack.datasetQuality.fewDegradedDocsTooltip": "{degradedDocsCount} documents dégradés dans cet ensemble de données.", @@ -14668,36 +14664,9 @@ "xpack.datasetQuality.flyout.nonAggregatable.warning": "{dataset} est incompatible avec l'agrégation _ignored, ce qui peut entraîner des délais lors de la recherche de données. {howToFixIt}", "xpack.datasetQuality.flyout.nonAggregatableDatasets.link.title": "substitution", "xpack.datasetQuality.flyoutCancelText": "Annuler", - "xpack.datasetQuality.flyoutChartExploreDataInDiscoverText": "Explorer les données dans Discover", - "xpack.datasetQuality.flyoutChartExploreDataInLogsExplorerText": "Explorer les données dans l'Explorateur de logs", - "xpack.datasetQuality.flyoutChartOpenInLensText": "Ouvrir dans Lens", - "xpack.datasetQuality.flyoutDatasetCreatedOnText": "Créé le", - "xpack.datasetQuality.flyoutDatasetDetailsText": "Détails de l’ensemble de données", - "xpack.datasetQuality.flyoutDatasetLastActivityText": "Dernière activité", - "xpack.datasetQuality.flyoutDegradedDocsPercentage": "Pourcentage de documents dégradés", - "xpack.datasetQuality.flyoutDegradedDocsTooltip": "Le pourcentage de documents dégradés (des documents avec la propriété {ignoredProperty}) dans votre ensemble de données.", - "xpack.datasetQuality.flyoutDegradedDocsTopNValues": "{count} principales valeurs de {fieldName}", - "xpack.datasetQuality.flyoutDegradedDocsViz": "Tendance des documents dégradés", - "xpack.datasetQuality.flyoutDegradedFieldsSectionTitle": "Champs dégradés", - "xpack.datasetQuality.flyoutDegradedFieldsSectionTooltip": "Une liste partielle des champs dégradés trouvés dans votre ensemble de données.", - "xpack.datasetQuality.flyoutDegradedFieldsTableLoadingText": "Chargement des champs dégradés", - "xpack.datasetQuality.flyoutDegradedFieldsTableNoData": "Aucun champ dégradé n’a été trouvé", - "xpack.datasetQuality.flyoutDocsCountTotal": "Nombre de documents (total)", - "xpack.datasetQuality.flyoutHostsText": "Hôtes", - "xpack.datasetQuality.flyoutIndexTemplateActionText": "Modèle d'index", - "xpack.datasetQuality.flyoutIntegrationActionsText": "Actions d'intégration", + "xpack.datasetQuality.flyoutDatasetDetailsText": "Détails des ensembles de données", "xpack.datasetQuality.flyoutIntegrationDetailsText": "Détails de l'intégration", "xpack.datasetQuality.flyoutIntegrationNameText": "Nom", - "xpack.datasetQuality.flyoutIntegrationVersionText": "Version", - "xpack.datasetQuality.flyoutOpenInDiscoverText": "Ouvrir dans Discover", - "xpack.datasetQuality.flyoutOpenInLogsExplorerText": "Ouvrir dans l'explorateur de logs", - "xpack.datasetQuality.flyoutSeeIntegrationActionText": "Afficher l'intégration", - "xpack.datasetQuality.flyoutServicesText": "Services", - "xpack.datasetQuality.flyoutShowAllText": "Afficher tout", - "xpack.datasetQuality.flyoutSizeText": "Taille", - "xpack.datasetQuality.flyoutSummaryTitle": "Résumé", - "xpack.datasetQuality.flyoutSummaryTooltip": "Statistiques de l'ensemble de données dans la plage temporelle sélectionnée.", - "xpack.datasetQuality.flyoutViewDashboardsActionText": "Afficher les tableaux de bord", "xpack.datasetQuality.fullDatasetNameDescription": "Activez cette option pour afficher les noms complets des ensembles de données utilisés pour stocker les documents.", "xpack.datasetQuality.fullDatasetNameLabel": "Afficher les noms complets des ensembles de données", "xpack.datasetQuality.inactiveDatasetActivityColumnDescription": "Aucune activité pour la plage temporelle sélectionnée", @@ -32444,8 +32413,6 @@ "xpack.observability_onboarding.otelLogsPanel.historicalDataDescription2": "Le chemin des logs par défaut est /var/log/*. Vous pouvez si nécessaire modifier ce chemin dans le fichier otel.yml.", "xpack.observability_onboarding.otelLogsPanel.kubernetesApplyCommandPromptLabel": "À partir du répertoire où le manifeste est téléchargé, exécutez la commande suivante pour installer le collecteur sur chaque nœud de votre cluster :", "xpack.observability_onboarding.otelLogsPanel.limitationTitle": "Informations sur la configuration", - "xpack.observability_onboarding.otelLogsPanel.otelLogsModalHeaderTitleLabel": "OpenTelemetry", - "xpack.observability_onboarding.otelLogsPanel.p.collectLogsWithOpenTelemetryLabel": "Collectez les logs et les métriques de l'hôte à l'aide de la distribution Elastic du collecteur OTel.", "xpack.observability_onboarding.otelLogsPanel.p.runTheCommandOnYourHostLabel": "Exécutez la commande suivante sur votre hôte pour télécharger et configurer le collecteur.", "xpack.observability_onboarding.otelLogsPanel.p.startTheCollectorLabel": "Exécutez la commande suivante pour lancer le collecteur", "xpack.observability_onboarding.otelLogsPanel.steps.downloadManifest": "Télécharger le manifeste :", @@ -32675,7 +32642,6 @@ "xpack.observability.customThreshold.rule.reason.forTheLast": "durée : {duration}", "xpack.observability.customThreshold.rule.reason.group": "groupe : {group}", "xpack.observability.customThreshold.rule.reasonActionVariableDescription": "Une description concise de la raison du signalement", - "xpack.observability.customThreshold.rule.schema.invalidFilterQuery": "filterQuery doit être un filtre KQL valide", "xpack.observability.customThreshold.rule.sourceConfiguration.missingHttp": "Échec de chargement de la source : Aucun client HTTP disponible.", "xpack.observability.customThreshold.rule.sourceConfiguration.updateFailureBody": "Nous n'avons pas pu appliquer les modifications à la configuration des indicateurs. Réessayez plus tard.", "xpack.observability.customThreshold.rule.sourceConfiguration.updateFailureTitle": "La mise à jour de la configuration a échoué", @@ -35882,10 +35848,6 @@ "xpack.securitySolution.attackDiscovery.tour.video": "Regardez la vidéo de présentation", "xpack.securitySolution.attackDiscovery.tour.videoStep.desc": "Plongez dans les découvertes d'attaques axées sur les données et rationalisez votre flux de travail grâce à notre technologie d'IA intuitive, conçue pour accroître instantanément votre productivité.", "xpack.securitySolution.attackDiscovery.tour.videoStep.title": "Démarrez la découverte des attaques", - "xpack.securitySolution.attackDiscovery.upgrade.attackDiscoveryIsAvailable": "Votre licence ne prend pas en charge la découverte d'attaques.", - "xpack.securitySolution.attackDiscovery.upgrade.findPotentialAttacksWithAiTitle": "Trouvez les attaques potentielles grâce à l'IA", - "xpack.securitySolution.attackDiscovery.upgrade.pleaseUpgradeMessage": "Veuillez mettre votre licence à niveau pour bénéficier de cette fonctionnalité.", - "xpack.securitySolution.attackDiscovery.upgrade.upgradeButton": "Mettre à niveau", "xpack.securitySolution.auditd.abortedAuditStartupDescription": "démarrage de l'audit abandonné", "xpack.securitySolution.auditd.accessErrorDescription": "erreur d'accès", "xpack.securitySolution.auditd.accessPermissionDescription": "autorisation d'accès", @@ -46322,7 +46284,6 @@ "xpack.triggersActionsUI.sections.actionForm.unableToLoadActionsMessage": "Impossible de charger les connecteurs", "xpack.triggersActionsUI.sections.actionForm.unableToLoadConnectorTypesMessage": "Impossible de charger les types de connecteurs", "xpack.triggersActionsUI.sections.actionForm.unableToLoadSystemActionConnectorTitle": "Impossible de charger le connecteur", - "xpack.triggersActionsUI.sections.actionsConnectorsList.addActionButtonLabel": "Créer un connecteur", "xpack.triggersActionsUI.sections.actionsConnectorsList.buttons.deleteDisabledTitle": "Impossible de supprimer les connecteurs", "xpack.triggersActionsUI.sections.actionsConnectorsList.buttons.deleteLabel": "Supprimer {count}", "xpack.triggersActionsUI.sections.actionsConnectorsList.connectorsListTable.columns.actions.deleteActionDescription": "Supprimer ce connecteur", @@ -46345,7 +46306,6 @@ "xpack.triggersActionsUI.sections.actionsConnectorsList.noPermissionToCreateTitle": "Aucune autorisation pour créer des connecteurs", "xpack.triggersActionsUI.sections.actionsConnectorsList.preconfiguredTitleMessage": "Préconfiguré", "xpack.triggersActionsUI.sections.actionsConnectorsList.singleTitle": "connecteur", - "xpack.triggersActionsUI.sections.actionsConnectorsList.unableToLoadActionsMessage": "Impossible de charger les connecteurs", "xpack.triggersActionsUI.sections.actionsConnectorsList.unableToLoadConnectorTypesMessage": "Impossible de charger les types de connecteurs", "xpack.triggersActionsUI.sections.actionsConnectorsList.warningText": "{connectors, plural, one {Ce connecteur est} other {Certains connecteurs sont}} actuellement en cours d'utilisation.", "xpack.triggersActionsUI.sections.actionTypeForm.accordion.deleteIconAriaLabel": "Supprimer", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index a1ed084e1a6fb..39b898482ad06 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -5298,7 +5298,6 @@ "kbn-esql-validation-autocomplete.esql.autocomplete.pipeDoc": "パイプ(|)", "kbn-esql-validation-autocomplete.esql.autocomplete.policyDefinition": "{count, plural, other {インデックス}}で定義されたポリシー:{indices}", "kbn-esql-validation-autocomplete.esql.autocomplete.semiColonDoc": "セミコロン(;)", - "kbn-esql-validation-autocomplete.esql.autocomplete.sourceDefinition": "インデックス", "kbn-esql-validation-autocomplete.esql.autocomplete.valueDefinition": "リテラル値", "kbn-esql-validation-autocomplete.esql.autocomplete.variableDefinition": "ES|QLクエリーでユーザーが指定した変数", "kbn-esql-validation-autocomplete.esql.definition.addDoc": "加算(+)", @@ -7691,7 +7690,6 @@ "timelion.vis.invalidIntervalErrorMessage": "無効な間隔フォーマット。", "timelion.vis.selectIntervalHelpText": "オプションを選択するかカスタム値を作成します。例:30s、20m、24h、2d、1w、1M", "timelion.vis.selectIntervalPlaceholder": "間隔を選択", - "tryInConsole.button": "コンソールで試す", "uiActions.actionPanel.more": "詳細", "uiActions.actionPanel.title": "オプション", "uiActions.errors.incompatibleAction": "操作に互換性がありません", @@ -14639,10 +14637,8 @@ "xpack.datasetQuality.expandLabel": "拡張", "xpack.datasetQuality.fetchDatasetDetailsFailed": "データセット詳細を取得できませんでした。", "xpack.datasetQuality.fetchDatasetDetailsFailed.noDatasetSelected": "データセットが選択されていません", - "xpack.datasetQuality.fetchDatasetSettingsFailed": "データセット設定を読み込めませんでした。", "xpack.datasetQuality.fetchDatasetStatsFailed": "データセットを取得できませんでした。", "xpack.datasetQuality.fetchDegradedStatsFailed": "劣化したドキュメント情報を取得できませんでした。", - "xpack.datasetQuality.fetchIntegrationDashboardsFailed": "統合ダッシュボードを取得できませんでした。", "xpack.datasetQuality.fetchIntegrationsFailed": "統合を取得できませんでした。", "xpack.datasetQuality.fetchNonAggregatableDatasetsFailed": "集約可能なデータセット情報以外を取得できませんでした。", "xpack.datasetQuality.fewDegradedDocsTooltip": "このデータセットの{degradedDocsCount}個の劣化したドキュメント。", @@ -14656,36 +14652,9 @@ "xpack.datasetQuality.flyout.nonAggregatable.warning": "{dataset}は_ignored集約をサポートしていません。データのクエリを実行するときに遅延が生じる可能性があります。{howToFixIt}", "xpack.datasetQuality.flyout.nonAggregatableDatasets.link.title": "ロールオーバー", "xpack.datasetQuality.flyoutCancelText": "キャンセル", - "xpack.datasetQuality.flyoutChartExploreDataInDiscoverText": "Discoverでデータを探索", - "xpack.datasetQuality.flyoutChartExploreDataInLogsExplorerText": "ログエクスプローラーでデータを探索", - "xpack.datasetQuality.flyoutChartOpenInLensText": "Lensで開く", - "xpack.datasetQuality.flyoutDatasetCreatedOnText": "作成日時", "xpack.datasetQuality.flyoutDatasetDetailsText": "データセット詳細", - "xpack.datasetQuality.flyoutDatasetLastActivityText": "前回のアクティビティ", - "xpack.datasetQuality.flyoutDegradedDocsPercentage": "劣化したドキュメントの割合(%)", - "xpack.datasetQuality.flyoutDegradedDocsTooltip": "データセットにおける劣化したドキュメント({ignoredProperty}プロパティのドキュメント)の割合。", - "xpack.datasetQuality.flyoutDegradedDocsTopNValues": "{fieldName}の上位{count}つの値", - "xpack.datasetQuality.flyoutDegradedDocsViz": "劣化したドキュメントの傾向", - "xpack.datasetQuality.flyoutDegradedFieldsSectionTitle": "劣化したフィールド", - "xpack.datasetQuality.flyoutDegradedFieldsSectionTooltip": "データセットで見つかった劣化したフィールドの部分的なリスト。", - "xpack.datasetQuality.flyoutDegradedFieldsTableLoadingText": "劣化したフィールドを読み込み中", - "xpack.datasetQuality.flyoutDegradedFieldsTableNoData": "劣化したフィールドが見つかりません", - "xpack.datasetQuality.flyoutDocsCountTotal": "ドキュメント数(合計)", - "xpack.datasetQuality.flyoutHostsText": "ホスト", - "xpack.datasetQuality.flyoutIndexTemplateActionText": "インデックステンプレート", - "xpack.datasetQuality.flyoutIntegrationActionsText": "統合アクション", "xpack.datasetQuality.flyoutIntegrationDetailsText": "統合の詳細", "xpack.datasetQuality.flyoutIntegrationNameText": "名前", - "xpack.datasetQuality.flyoutIntegrationVersionText": "Version", - "xpack.datasetQuality.flyoutOpenInDiscoverText": "Discoverで開く", - "xpack.datasetQuality.flyoutOpenInLogsExplorerText": "ログエクスプローラーで開く", - "xpack.datasetQuality.flyoutSeeIntegrationActionText": "統合を表示", - "xpack.datasetQuality.flyoutServicesText": "サービス", - "xpack.datasetQuality.flyoutShowAllText": "すべて表示", - "xpack.datasetQuality.flyoutSizeText": "サイズ", - "xpack.datasetQuality.flyoutSummaryTitle": "まとめ", - "xpack.datasetQuality.flyoutSummaryTooltip": "選択した時間範囲内のデータセットの統計情報", - "xpack.datasetQuality.flyoutViewDashboardsActionText": "ダッシュボードを表示", "xpack.datasetQuality.fullDatasetNameDescription": "オンにすると、ドキュメントを格納するために使用される実際のデータセット名が表示されます。", "xpack.datasetQuality.fullDatasetNameLabel": "詳細なデータセット名を表示", "xpack.datasetQuality.inactiveDatasetActivityColumnDescription": "選択したタイムフレームにアクティビティがありません", @@ -32428,8 +32397,6 @@ "xpack.observability_onboarding.otelLogsPanel.historicalDataDescription2": "デフォルトのログのパスは/var/log/*です。必要に応じて、otel.ymlファイルでこのパスを変更できます。", "xpack.observability_onboarding.otelLogsPanel.kubernetesApplyCommandPromptLabel": "マニフェストがダウンロードされるディレクトリから、次のコマンドを実行し、クラスターのすべてのノードでコレクターをインストールします。", "xpack.observability_onboarding.otelLogsPanel.limitationTitle": "構成情報", - "xpack.observability_onboarding.otelLogsPanel.otelLogsModalHeaderTitleLabel": "OpenTelemetry", - "xpack.observability_onboarding.otelLogsPanel.p.collectLogsWithOpenTelemetryLabel": "OTelコレクターのElasticディストリビューションを使用して、ログとホストメトリックを収集します。", "xpack.observability_onboarding.otelLogsPanel.p.runTheCommandOnYourHostLabel": "ホストで次のコマンドを実行して、コレクターをダウンロード、構成します。", "xpack.observability_onboarding.otelLogsPanel.p.startTheCollectorLabel": "コレクターを開始するには、次のコマンドを実行してください", "xpack.observability_onboarding.otelLogsPanel.steps.downloadManifest": "マニフェストをダウンロード:", @@ -32660,7 +32627,6 @@ "xpack.observability.customThreshold.rule.reason.forTheLast": "duration: {duration}", "xpack.observability.customThreshold.rule.reason.group": "グループ:{group}", "xpack.observability.customThreshold.rule.reasonActionVariableDescription": "アラートの理由の簡潔な説明", - "xpack.observability.customThreshold.rule.schema.invalidFilterQuery": "filterQueryは有効なKQLフィルターでなければなりません", "xpack.observability.customThreshold.rule.sourceConfiguration.missingHttp": "ソースの読み込みに失敗しました:HTTPクライアントがありません。", "xpack.observability.customThreshold.rule.sourceConfiguration.updateFailureBody": "変更をメトリック構成に適用できませんでした。しばらくたってから再試行してください。", "xpack.observability.customThreshold.rule.sourceConfiguration.updateFailureTitle": "構成の更新が失敗しました", @@ -35866,10 +35832,6 @@ "xpack.securitySolution.attackDiscovery.tour.video": "概要動画を視聴", "xpack.securitySolution.attackDiscovery.tour.videoStep.desc": "データ主導のAttack Discoveryを導入し、生産性を即時に高めるために設計されたElasticの直感的なAI技術でワークフローを合理化しましょう。", "xpack.securitySolution.attackDiscovery.tour.videoStep.title": "攻撃の検出を開始", - "xpack.securitySolution.attackDiscovery.upgrade.attackDiscoveryIsAvailable": "ご使用のライセンスはAttack Discoveryをサポートしていません。", - "xpack.securitySolution.attackDiscovery.upgrade.findPotentialAttacksWithAiTitle": "AIを利用して潜在的な攻撃を検出", - "xpack.securitySolution.attackDiscovery.upgrade.pleaseUpgradeMessage": "この機能を使用するには、ライセンスをアップグレードしてください。", - "xpack.securitySolution.attackDiscovery.upgrade.upgradeButton": "アップグレード", "xpack.securitySolution.auditd.abortedAuditStartupDescription": "中断された監査のスタートアップ", "xpack.securitySolution.auditd.accessErrorDescription": "アクセスエラー", "xpack.securitySolution.auditd.accessPermissionDescription": "アクセス権限", @@ -46303,7 +46265,6 @@ "xpack.triggersActionsUI.sections.actionForm.unableToLoadActionsMessage": "コネクターを読み込めません", "xpack.triggersActionsUI.sections.actionForm.unableToLoadConnectorTypesMessage": "コネクタータイプを読み込めません", "xpack.triggersActionsUI.sections.actionForm.unableToLoadSystemActionConnectorTitle": "コネクターを読み込めません", - "xpack.triggersActionsUI.sections.actionsConnectorsList.addActionButtonLabel": "コネクターを作成", "xpack.triggersActionsUI.sections.actionsConnectorsList.buttons.deleteDisabledTitle": "コネクターを削除できません", "xpack.triggersActionsUI.sections.actionsConnectorsList.buttons.deleteLabel": "{count} 件を削除", "xpack.triggersActionsUI.sections.actionsConnectorsList.connectorsListTable.columns.actions.deleteActionDescription": "このコネクターを削除", @@ -46326,7 +46287,6 @@ "xpack.triggersActionsUI.sections.actionsConnectorsList.noPermissionToCreateTitle": "コネクターを作成する権限がありません", "xpack.triggersActionsUI.sections.actionsConnectorsList.preconfiguredTitleMessage": "構成済み", "xpack.triggersActionsUI.sections.actionsConnectorsList.singleTitle": "コネクター", - "xpack.triggersActionsUI.sections.actionsConnectorsList.unableToLoadActionsMessage": "コネクターを読み込めません", "xpack.triggersActionsUI.sections.actionsConnectorsList.unableToLoadConnectorTypesMessage": "コネクタータイプを読み込めません", "xpack.triggersActionsUI.sections.actionsConnectorsList.warningText": "{connectors, plural, one {このコネクターは} other {一部のコネクターが}}現在使用中です。", "xpack.triggersActionsUI.sections.actionTypeForm.accordion.deleteIconAriaLabel": "削除", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 6b824bc3a21c3..0d6c56ae59a35 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -5306,7 +5306,6 @@ "kbn-esql-validation-autocomplete.esql.autocomplete.pipeDoc": "管道符 (|)", "kbn-esql-validation-autocomplete.esql.autocomplete.policyDefinition": "策略在{count, plural, other {索引}}上定义:{indices}", "kbn-esql-validation-autocomplete.esql.autocomplete.semiColonDoc": "分号 (;)", - "kbn-esql-validation-autocomplete.esql.autocomplete.sourceDefinition": "索引", "kbn-esql-validation-autocomplete.esql.autocomplete.valueDefinition": "文本值", "kbn-esql-validation-autocomplete.esql.autocomplete.variableDefinition": "用户在 ES|QL 查询中指定的变量", "kbn-esql-validation-autocomplete.esql.definition.addDoc": "添加 (+)", @@ -7704,7 +7703,6 @@ "timelion.vis.invalidIntervalErrorMessage": "时间间隔格式无效。", "timelion.vis.selectIntervalHelpText": "选择选项或创建定制值。示例:30s、20m、24h、2d、1w、1M", "timelion.vis.selectIntervalPlaceholder": "选择时间间隔", - "tryInConsole.button": "在 Console 中试用", "uiActions.actionPanel.more": "更多", "uiActions.actionPanel.title": "选项", "uiActions.errors.incompatibleAction": "操作不兼容", @@ -14662,10 +14660,8 @@ "xpack.datasetQuality.expandLabel": "展开", "xpack.datasetQuality.fetchDatasetDetailsFailed": "无法获取数据集详情。", "xpack.datasetQuality.fetchDatasetDetailsFailed.noDatasetSelected": "尚未选择任何数据集", - "xpack.datasetQuality.fetchDatasetSettingsFailed": "无法加载数据集设置。", "xpack.datasetQuality.fetchDatasetStatsFailed": "无法获取数据集。", "xpack.datasetQuality.fetchDegradedStatsFailed": "无法获取已降级文档信息。", - "xpack.datasetQuality.fetchIntegrationDashboardsFailed": "无法获取集成仪表板。", "xpack.datasetQuality.fetchIntegrationsFailed": "无法获取集成。", "xpack.datasetQuality.fetchNonAggregatableDatasetsFailed": "无法获取非可聚合数据集信息。", "xpack.datasetQuality.fewDegradedDocsTooltip": "此数据集中的 {degradedDocsCount} 个已降级文档。", @@ -14679,36 +14675,9 @@ "xpack.datasetQuality.flyout.nonAggregatable.warning": "{dataset} 不支持 _ignored 聚合,在查询数据时可能会导致延迟。{howToFixIt}", "xpack.datasetQuality.flyout.nonAggregatableDatasets.link.title": "滚动更新", "xpack.datasetQuality.flyoutCancelText": "取消", - "xpack.datasetQuality.flyoutChartExploreDataInDiscoverText": "在 Discover 中浏览数据", - "xpack.datasetQuality.flyoutChartExploreDataInLogsExplorerText": "在日志浏览器中浏览数据", - "xpack.datasetQuality.flyoutChartOpenInLensText": "在 Lens 中打开", - "xpack.datasetQuality.flyoutDatasetCreatedOnText": "创建日期", "xpack.datasetQuality.flyoutDatasetDetailsText": "数据集详情", - "xpack.datasetQuality.flyoutDatasetLastActivityText": "上次活动", - "xpack.datasetQuality.flyoutDegradedDocsPercentage": "已降级文档 %", - "xpack.datasetQuality.flyoutDegradedDocsTooltip": "您的数据集中已降级文档的百分比,即包含 {ignoredProperty} 属性的文档。", - "xpack.datasetQuality.flyoutDegradedDocsTopNValues": "{fieldName} 的排名前 {count} 值", - "xpack.datasetQuality.flyoutDegradedDocsViz": "已降级文档趋势", - "xpack.datasetQuality.flyoutDegradedFieldsSectionTitle": "已降级字段", - "xpack.datasetQuality.flyoutDegradedFieldsSectionTooltip": "在数据集中发现的已降级字段的部分列表。", - "xpack.datasetQuality.flyoutDegradedFieldsTableLoadingText": "正在加载已降级字段", - "xpack.datasetQuality.flyoutDegradedFieldsTableNoData": "找不到已降级字段", - "xpack.datasetQuality.flyoutDocsCountTotal": "文档计数(总计)", - "xpack.datasetQuality.flyoutHostsText": "主机", - "xpack.datasetQuality.flyoutIndexTemplateActionText": "索引模板", - "xpack.datasetQuality.flyoutIntegrationActionsText": "集成操作", "xpack.datasetQuality.flyoutIntegrationDetailsText": "集成详情", "xpack.datasetQuality.flyoutIntegrationNameText": "名称", - "xpack.datasetQuality.flyoutIntegrationVersionText": "版本", - "xpack.datasetQuality.flyoutOpenInDiscoverText": "在 Discover 中打开", - "xpack.datasetQuality.flyoutOpenInLogsExplorerText": "在日志浏览器中打开", - "xpack.datasetQuality.flyoutSeeIntegrationActionText": "查看集成", - "xpack.datasetQuality.flyoutServicesText": "服务", - "xpack.datasetQuality.flyoutShowAllText": "全部显示", - "xpack.datasetQuality.flyoutSizeText": "大小", - "xpack.datasetQuality.flyoutSummaryTitle": "摘要", - "xpack.datasetQuality.flyoutSummaryTooltip": "选定时间范围内的数据集统计信息。", - "xpack.datasetQuality.flyoutViewDashboardsActionText": "查看仪表板", "xpack.datasetQuality.fullDatasetNameDescription": "打开以显示用于存储文档的实际数据集名称。", "xpack.datasetQuality.fullDatasetNameLabel": "显示完整数据集名称", "xpack.datasetQuality.inactiveDatasetActivityColumnDescription": "选定时间范围内没有任何活动", @@ -32468,8 +32437,6 @@ "xpack.observability_onboarding.otelLogsPanel.historicalDataDescription2": "默认日志路径为 /var/log/*。如果需要,可以在 otel.yml 文件中更改此路径。", "xpack.observability_onboarding.otelLogsPanel.kubernetesApplyCommandPromptLabel": "从下载清单的目录中,运行以下命令以在您集群的每个节点上安装收集器:", "xpack.observability_onboarding.otelLogsPanel.limitationTitle": "配置信息", - "xpack.observability_onboarding.otelLogsPanel.otelLogsModalHeaderTitleLabel": "OpenTelemetry", - "xpack.observability_onboarding.otelLogsPanel.p.collectLogsWithOpenTelemetryLabel": "使用 OTel 收集器的 Elastic 发行版收集日志和主机指标。", "xpack.observability_onboarding.otelLogsPanel.p.runTheCommandOnYourHostLabel": "在您的主机上运行以下命令,以下载和配置收集器。", "xpack.observability_onboarding.otelLogsPanel.p.startTheCollectorLabel": "运行以下命令以启动收集器", "xpack.observability_onboarding.otelLogsPanel.steps.downloadManifest": "下载清单:", @@ -32700,7 +32667,6 @@ "xpack.observability.customThreshold.rule.reason.forTheLast": "持续时间:{duration}", "xpack.observability.customThreshold.rule.reason.group": "组:{group}", "xpack.observability.customThreshold.rule.reasonActionVariableDescription": "告警原因的简洁描述", - "xpack.observability.customThreshold.rule.schema.invalidFilterQuery": "filterQuery 必须是有效的 KQL 筛选", "xpack.observability.customThreshold.rule.sourceConfiguration.missingHttp": "无法加载源:无 HTTP 客户端可用。", "xpack.observability.customThreshold.rule.sourceConfiguration.updateFailureBody": "无法对指标配置应用更改。请稍后重试。", "xpack.observability.customThreshold.rule.sourceConfiguration.updateFailureTitle": "配置更新失败", @@ -35907,10 +35873,6 @@ "xpack.securitySolution.attackDiscovery.tour.video": "观看概述视频", "xpack.securitySolution.attackDiscovery.tour.videoStep.desc": "深入了解数据驱动式 Attack Discovery,并利用旨在即时提高生产力的直观式 AI 技术精简您的工作流。", "xpack.securitySolution.attackDiscovery.tour.videoStep.title": "开始发现攻击", - "xpack.securitySolution.attackDiscovery.upgrade.attackDiscoveryIsAvailable": "您的许可证不支持 Attack Discovery。", - "xpack.securitySolution.attackDiscovery.upgrade.findPotentialAttacksWithAiTitle": "利用 AI 发现潜在攻击", - "xpack.securitySolution.attackDiscovery.upgrade.pleaseUpgradeMessage": "请升级许可证以使用此功能。", - "xpack.securitySolution.attackDiscovery.upgrade.upgradeButton": "升级", "xpack.securitySolution.auditd.abortedAuditStartupDescription": "已中止审计启动", "xpack.securitySolution.auditd.accessErrorDescription": "访问错误", "xpack.securitySolution.auditd.accessPermissionDescription": "访问权限", @@ -46353,7 +46315,6 @@ "xpack.triggersActionsUI.sections.actionForm.unableToLoadActionsMessage": "无法加载连接器", "xpack.triggersActionsUI.sections.actionForm.unableToLoadConnectorTypesMessage": "无法加载连接器类型", "xpack.triggersActionsUI.sections.actionForm.unableToLoadSystemActionConnectorTitle": "无法加载连接器", - "xpack.triggersActionsUI.sections.actionsConnectorsList.addActionButtonLabel": "创建连接器", "xpack.triggersActionsUI.sections.actionsConnectorsList.buttons.deleteDisabledTitle": "无法删除连接器", "xpack.triggersActionsUI.sections.actionsConnectorsList.buttons.deleteLabel": "删除 {count} 个", "xpack.triggersActionsUI.sections.actionsConnectorsList.connectorsListTable.columns.actions.deleteActionDescription": "删除此连接器", @@ -46376,7 +46337,6 @@ "xpack.triggersActionsUI.sections.actionsConnectorsList.noPermissionToCreateTitle": "无权创建连接器", "xpack.triggersActionsUI.sections.actionsConnectorsList.preconfiguredTitleMessage": "预配置", "xpack.triggersActionsUI.sections.actionsConnectorsList.singleTitle": "连接器", - "xpack.triggersActionsUI.sections.actionsConnectorsList.unableToLoadActionsMessage": "无法加载连接器", "xpack.triggersActionsUI.sections.actionsConnectorsList.unableToLoadConnectorTypesMessage": "无法加载连接器类型", "xpack.triggersActionsUI.sections.actionsConnectorsList.warningText": "{connectors, plural, one {此连接器} other {这些连接器}}当前正在使用中。", "xpack.triggersActionsUI.sections.actionTypeForm.accordion.deleteIconAriaLabel": "删除", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_home.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_home.test.tsx new file mode 100644 index 0000000000000..7c87676ae0bd0 --- /dev/null +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_home.test.tsx @@ -0,0 +1,210 @@ +/* + * 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 React from 'react'; +import { render, screen } from '@testing-library/react'; +import { RouteComponentProps } from 'react-router-dom'; +import { Router } from '@kbn/shared-ux-router'; +import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; +import { createMemoryHistory, createLocation } from 'history'; +import ActionsConnectorsHome, { MatchParams } from './actions_connectors_home'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import userEvent from '@testing-library/user-event'; + +jest.mock('../../../lib/action_connector_api', () => ({ + loadAllActions: jest.fn(), + loadActionTypes: jest.fn(), +})); +const { loadAllActions } = jest.requireMock('../../../lib/action_connector_api'); +jest.mock('../../../../common/lib/kibana'); +jest.mock('../../../lib/capabilities'); +jest.mock('../../../../common/get_experimental_features'); +jest.mock('../../../components/health_check', () => ({ + HealthCheck: ({ children }: { children: React.ReactNode }) => <>{children}, +})); +jest.mock('../../../context/health_context', () => ({ + HealthContextProvider: ({ children }: { children: React.ReactNode }) => <>{children}, +})); + +jest.mock('./actions_connectors_list', () => { + return () => ( +
      + {'Render Actions connectors list component'} +
      + ); +}); +jest.mock('./actions_connectors_event_log_list_table', () => { + return () => ( +
      + {'Render Connector Event log list table component'} +
      + ); +}); + +const queryClient = new QueryClient(); + +describe('ActionsConnectorsHome', () => { + it('renders Actions connectors list component', async () => { + const props: RouteComponentProps = { + history: createMemoryHistory({ + initialEntries: ['/connectors'], + }), + location: createLocation('/connectors'), + match: { + isExact: true, + path: '/connectors', + url: '', + params: { + section: 'connectors', + }, + }, + }; + + render( + + + + + + + + ); + + expect(loadAllActions).toHaveBeenCalled(); + expect(await screen.findByTestId('actionsConnectorsListComponent')).toBeInTheDocument(); + }); + + it('there are Connectors and Logs tabs', async () => { + const props: RouteComponentProps = { + history: createMemoryHistory({ + initialEntries: ['/connectors'], + }), + location: createLocation('/connectors'), + match: { + isExact: true, + path: '/connectors', + url: '', + params: { + section: 'connectors', + }, + }, + }; + + render( + + + + + + + + ); + + const tabs = await screen.findAllByRole('tab'); + expect(tabs).toHaveLength(2); + expect(tabs[0]).toHaveTextContent('Connectors'); + expect(tabs[1]).toHaveTextContent('Logs'); + }); + + it('show "Create connector" and "Documentation" buttons when on Connectors tab', async () => { + const props: RouteComponentProps = { + history: createMemoryHistory({ + initialEntries: ['/connectors'], + }), + location: createLocation('/connectors'), + match: { + isExact: true, + path: '/connectors', + url: '', + params: { + section: 'connectors', + }, + }, + }; + + render( + + + + + + + + ); + + const createConnectorButton = await screen.findByRole('button', { name: 'Create connector' }); + expect(createConnectorButton).toBeEnabled(); + + const documentationButton = await screen.findByRole('link', { name: 'Documentation' }); + expect(documentationButton).toBeEnabled(); + }); + + it('hide "Create connector" button when on Logs tab', async () => { + const props: RouteComponentProps = { + history: createMemoryHistory({ + initialEntries: ['/logs'], + }), + location: createLocation('/logs'), + match: { + isExact: true, + path: '/logs', + url: '', + params: { + section: 'logs', + }, + }, + }; + + render( + + + + + + + + ); + + const documentationButton = await screen.findByRole('link', { name: 'Documentation' }); + expect(documentationButton).toBeEnabled(); + expect(screen.queryByRole('button', { name: 'Create connector' })).not.toBeInTheDocument(); + }); + + it('show "Select a connector" flyout when "Create connector" button pressed', async () => { + const props: RouteComponentProps = { + history: createMemoryHistory({ + initialEntries: ['/connectors'], + }), + location: createLocation('/connectors'), + match: { + isExact: true, + path: '/connectors', + url: '', + params: { + section: 'connectors', + }, + }, + }; + + render( + + + + + + + + ); + + const createConnectorButton = await screen.findByRole('button', { name: 'Create connector' }); + userEvent.click(createConnectorButton); + const selectConnectorFlyout = await screen.findByRole('heading', { + name: 'Select a connector', + }); + expect(selectConnectorFlyout).toBeInTheDocument(); + }); +}); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_home.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_home.tsx index 836ff6730920b..3611797da36af 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_home.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_home.tsx @@ -5,13 +5,13 @@ * 2.0. */ -import React, { lazy, useCallback, useEffect } from 'react'; +import React, { lazy, useCallback, useEffect, useState } from 'react'; import { RouteComponentProps } from 'react-router-dom'; import { Routes, Route } from '@kbn/shared-ux-router'; - +import { useLocation } from 'react-router-dom'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; -import { EuiSpacer, EuiButtonEmpty, EuiPageHeader, EuiPageTemplate } from '@elastic/eui'; +import { EuiPageTemplate, EuiSpacer, EuiPageHeader, EuiButton, EuiButtonEmpty } from '@elastic/eui'; import { routeToConnectorEdit, routeToConnectors, routeToLogs, Section } from '../../../constants'; import { getAlertingSectionBreadcrumb } from '../../../lib/breadcrumb'; import { getCurrentDocTitle } from '../../../lib/doc_title'; @@ -20,6 +20,11 @@ import { HealthContextProvider } from '../../../context/health_context'; import { HealthCheck } from '../../../components/health_check'; import { useKibana } from '../../../../common/lib/kibana'; import ConnectorEventLogListTableWithApi from './actions_connectors_event_log_list_table'; +import { ActionConnector, EditConnectorTabs } from '../../../../types'; +import { CreateConnectorFlyout } from '../../action_connector_form/create_connector_flyout'; +import { EditConnectorFlyout } from '../../action_connector_form/edit_connector_flyout'; +import { EditConnectorProps } from './types'; +import { loadAllActions } from '../../../lib/action_connector_api'; const ConnectorsList = lazy(() => import('./actions_connectors_list')); @@ -33,7 +38,49 @@ export const ActionsConnectorsHome: React.FunctionComponent { - const { chrome, setBreadcrumbs, docLinks } = useKibana().services; + const { + chrome, + setBreadcrumbs, + docLinks, + actionTypeRegistry, + http, + notifications: { toasts }, + } = useKibana().services; + + const location = useLocation(); + + const [addFlyoutVisible, setAddFlyoutVisibility] = useState(false); + const [editConnectorProps, setEditConnectorProps] = useState({}); + const [actions, setActions] = useState([]); + const [isLoadingActions, setIsLoadingActions] = useState(true); + + const editItem = (actionConnector: ActionConnector, tab: EditConnectorTabs, isFix?: boolean) => { + setEditConnectorProps({ initialConnector: actionConnector, tab, isFix: isFix ?? false }); + }; + + const loadActions = useCallback(async () => { + setIsLoadingActions(true); + try { + const actionsResponse = await loadAllActions({ http }); + setActions(actionsResponse); + } catch (e) { + toasts.addDanger({ + title: i18n.translate( + 'xpack.triggersActionsUI.sections.connector.home.unableToLoadActionsMessage', + { + defaultMessage: 'Unable to load connectors', + } + ), + }); + } finally { + setIsLoadingActions(false); + } + }, [http, toasts]); + + useEffect(() => { + loadActions(); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); const tabs: Array<{ id: Section; @@ -84,6 +131,61 @@ export const ActionsConnectorsHome: React.FunctionComponent { + return suspendedComponentWithProps( + ConnectorsList, + 'xl' + )({ + setAddFlyoutVisibility, + editItem, + isLoadingActions, + actions, + loadActions, + setActions, + }); + }; + + const createConnectorButton = ( + setAddFlyoutVisibility(true)} + isLoading={false} + > + {i18n.translate('xpack.triggersActionsUI.connectors.home.createConnector', { + defaultMessage: 'Create connector', + })} + + ); + + const documentationButton = ( + + + + ); + + let topRightSideButtons: React.ReactNode[] = []; + switch (location.pathname) { + case '/connectors': + topRightSideButtons = [createConnectorButton, documentationButton]; + break; + case '/logs': + topRightSideButtons = [documentationButton]; + break; + default: + topRightSideButtons = []; + } return ( <> - - , - ]} + rightSideItems={topRightSideButtons} tabs={tabs.map((tab) => ({ label: tab.name, onClick: () => onSectionChange(tab.id), @@ -120,6 +209,37 @@ export const ActionsConnectorsHome: React.FunctionComponent + {addFlyoutVisible && ( + { + setAddFlyoutVisibility(false); + }} + onTestConnector={(connector) => editItem(connector, EditConnectorTabs.Test)} + onConnectorCreated={loadActions} + actionTypeRegistry={actionTypeRegistry} + /> + )} + {editConnectorProps.initialConnector && ( + { + setEditConnectorProps({ + tab: editConnectorProps?.tab, + isFix: editConnectorProps?.isFix, + }); + }} + onConnectorUpdated={(connector) => { + setEditConnectorProps({ ...editConnectorProps, initialConnector: connector }); + loadActions(); + }} + actionTypeRegistry={actionTypeRegistry} + /> + )} + @@ -127,7 +247,7 @@ export const ActionsConnectorsHome: React.FunctionComponent diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx index 79ab1fdd0eec8..081b7dd1f9fd6 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.test.tsx @@ -6,16 +6,18 @@ */ import * as React from 'react'; +import { render, screen, waitFor } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; // eslint-disable-next-line @kbn/eslint/module_migration import { ThemeProvider } from 'styled-components'; import { mountWithIntl, nextTick } from '@kbn/test-jest-helpers'; - import ActionsConnectorsList from './actions_connectors_list'; import { coreMock } from '@kbn/core/public/mocks'; import { ReactWrapper } from 'enzyme'; import { act } from 'react-dom/test-utils'; import { actionTypeRegistryMock } from '../../../action_type_registry.mock'; import { useKibana } from '../../../../common/lib/kibana'; +import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; jest.mock('../../../../common/lib/kibana'); import { ActionConnector, GenericValidationResult } from '../../../../types'; @@ -28,7 +30,7 @@ jest.mock('../../../lib/action_connector_api', () => ({ const useKibanaMock = useKibana as jest.Mocked; const actionTypeRegistry = actionTypeRegistryMock.create(); const mocks = coreMock.createSetup(); -const { loadAllActions, loadActionTypes } = jest.requireMock('../../../lib/action_connector_api'); +const { loadActionTypes } = jest.requireMock('../../../lib/action_connector_api'); const mockGetParams = jest.fn().mockReturnValue({}); const mockGetLocation = jest.fn().mockReturnValue({ search: '' }); const mockGetHistory = jest.fn().mockReturnValue({ push: jest.fn(), createHref: jest.fn() }); @@ -41,10 +43,7 @@ jest.mock('react-router-dom', () => ({ describe('actions_connectors_list', () => { describe('component empty', () => { - let wrapper: ReactWrapper; - - async function setup() { - loadAllActions.mockResolvedValueOnce([]); + const setup = async () => { loadActionTypes.mockResolvedValueOnce([ { id: 'test', @@ -76,95 +75,106 @@ describe('actions_connectors_list', () => { show: true, }, }; - wrapper = mountWithIntl(); - - // Wait for active space to resolve before requesting the component to update - await act(async () => { - await nextTick(); - wrapper.update(); - }); - } + }; it('renders empty prompt', async () => { await setup(); - expect( - wrapper.find('[data-test-subj="createFirstConnectorEmptyPrompt"]').find('EuiEmptyPrompt') - ).toHaveLength(1); - expect( - wrapper.find('[data-test-subj="createFirstActionButton"]').find('EuiButton') - ).toHaveLength(1); + render( + + {}} + loadActions={async () => {}} + editItem={() => {}} + isLoadingActions={false} + actions={[]} + setActions={() => {}} + /> + + ); + + expect(await screen.findByTestId('createFirstConnectorEmptyPrompt')).toBeInTheDocument(); + expect(await screen.findByTestId('createFirstActionButton')).toBeInTheDocument(); }); test('if click create button should render CreateConnectorFlyout', async () => { await setup(); - wrapper.find('[data-test-subj="createFirstActionButton"]').last().simulate('click'); - expect(wrapper.find('[data-test-subj="create-connector-flyout"]').exists()).toBeTruthy(); + const setAddFlyoutVisibility = jest.fn(); + render( + + {}} + editItem={() => {}} + isLoadingActions={false} + actions={[]} + setActions={() => {}} + /> + + ); + const createFirstActionButton = await screen.findByTestId('createFirstActionButton'); + userEvent.click(createFirstActionButton); + await waitFor(() => { + expect(setAddFlyoutVisibility).toBeCalled(); + }); }); }); describe('component with items', () => { let wrapper: ReactWrapper; - - async function setup(actionConnectors?: ActionConnector[]) { - loadAllActions.mockResolvedValueOnce( - actionConnectors ?? [ - { - id: '1', - actionTypeId: 'test', - description: 'My test', - isPreconfigured: false, - isDeprecated: false, - referencedByCount: 1, - config: {}, - }, - { - id: '2', - actionTypeId: 'test2', - description: 'My test 2', - referencedByCount: 1, - isPreconfigured: false, - isDeprecated: false, - config: {}, - }, - { - id: '3', - actionTypeId: 'test2', - description: 'My preconfigured test 2', - isMissingSecrets: true, - referencedByCount: 1, - isPreconfigured: true, - isDeprecated: false, - config: {}, - }, - { - id: '4', - actionTypeId: 'nonexistent', - description: 'My invalid connector type', - referencedByCount: 1, - isPreconfigured: false, - isDeprecated: false, - config: {}, - }, - { - id: '5', - actionTypeId: 'test3', - description: 'action with all feature ids', - referencedByCount: 1, - isPreconfigured: false, - isDeprecated: false, - config: {}, - }, - { - id: '6', - actionTypeId: 'test4', - description: 'only cases', - referencedByCount: 1, - isPreconfigured: false, - isDeprecated: false, - config: {}, - }, - ] - ); + const mockedActions = [ + { + id: '1', + actionTypeId: 'test', + isPreconfigured: false, + isDeprecated: false, + referencedByCount: 1, + config: {}, + }, + { + id: '2', + actionTypeId: 'test2', + description: 'My test 2', + referencedByCount: 1, + isPreconfigured: false, + isDeprecated: false, + config: {}, + }, + { + id: '3', + actionTypeId: 'test2', + isMissingSecrets: true, + referencedByCount: 1, + isPreconfigured: true, + isDeprecated: false, + config: {}, + }, + { + id: '4', + actionTypeId: 'nonexistent', + referencedByCount: 1, + isPreconfigured: false, + isDeprecated: false, + config: {}, + }, + { + id: '5', + actionTypeId: 'test3', + referencedByCount: 1, + isPreconfigured: false, + isDeprecated: false, + config: {}, + }, + { + id: '6', + actionTypeId: 'test4', + referencedByCount: 1, + isPreconfigured: false, + isDeprecated: false, + config: {}, + }, + ] as ActionConnector[]; + + async function setup(actionConnectors = mockedActions) { loadActionTypes.mockResolvedValueOnce([ { id: 'test', @@ -226,15 +236,25 @@ describe('actions_connectors_list', () => { show: true, }, }; - wrapper = mountWithIntl(); + + const editItem = jest.fn(); + + wrapper = mountWithIntl( + {}} + loadActions={async () => {}} + editItem={editItem} + isLoadingActions={false} + actions={actionConnectors} + setActions={() => {}} + /> + ); // Wait for active space to resolve before requesting the component to update await act(async () => { await nextTick(); wrapper.update(); }); - - expect(loadAllActions).toHaveBeenCalled(); } it('renders table of connectors', async () => { @@ -324,7 +344,6 @@ describe('actions_connectors_list', () => { actionTypeId: 'test', name: `My test ${index}`, secrets: {}, - description: `My test ${index}`, isPreconfigured: false, isDeprecated: false, isSystemAction: false, @@ -342,20 +361,14 @@ describe('actions_connectors_list', () => { wrapper.find('[data-test-subj="pagination-button-1"]').last().simulate('click'); expect(wrapper.find('[data-test-subj="actionsTable"]').first().prop('pagination')) .toMatchInlineSnapshot(` - Object { - "initialPageIndex": 0, - "pageIndex": 1, - } - `); + Object { + "initialPageIndex": 0, + "pageIndex": 1, + } + `); }); - test('if select item for edit should render EditConnectorFlyout', async () => { - await setup(); - await wrapper.find('[data-test-subj="edit1"]').first().find('button').simulate('click'); - expect(wrapper.find('[data-test-subj="edit-connector-flyout"]').exists()).toBeTruthy(); - }); - - test('if delete item that is used in a rule should show a warning in the popup', async () => { + it('if delete item that is used in a rule should show a warning in the popup', async () => { await setup(); await wrapper.find('.euiButtonIcon').last().simulate('click'); expect(wrapper.find('[data-test-subj="deleteConnectorsConfirmation"]').exists()).toBeTruthy(); @@ -368,11 +381,153 @@ describe('actions_connectors_list', () => { }); }); + describe('check EditConnectorFlyout will open on edit connector', () => { + let wrapper: ReactWrapper; + const mockedActions = [ + { + id: '1', + actionTypeId: 'test', + isPreconfigured: false, + isDeprecated: false, + referencedByCount: 1, + config: {}, + }, + { + id: '2', + actionTypeId: 'test2', + description: 'My test 2', + referencedByCount: 1, + isPreconfigured: false, + isDeprecated: false, + config: {}, + }, + { + id: '3', + actionTypeId: 'test2', + isMissingSecrets: true, + referencedByCount: 1, + isPreconfigured: true, + isDeprecated: false, + config: {}, + }, + { + id: '4', + actionTypeId: 'nonexistent', + referencedByCount: 1, + isPreconfigured: false, + isDeprecated: false, + config: {}, + }, + { + id: '5', + actionTypeId: 'test3', + referencedByCount: 1, + isPreconfigured: false, + isDeprecated: false, + config: {}, + }, + { + id: '6', + actionTypeId: 'test4', + referencedByCount: 1, + isPreconfigured: false, + isDeprecated: false, + config: {}, + }, + ] as ActionConnector[]; + + async function setup() { + loadActionTypes.mockResolvedValueOnce([ + { + id: 'test', + name: 'Test', + enabled: true, + supportedFeatureIds: ['alerting'], + }, + { + id: 'test2', + name: 'Test2', + enabled: true, + supportedFeatureIds: ['alerting', 'cases'], + }, + { + id: 'test3', + name: 'Test3', + enabled: true, + supportedFeatureIds: ['alerting', 'cases', 'siem', 'uptime'], + }, + { + id: 'test4', + name: 'Test4', + enabled: true, + supportedFeatureIds: ['cases'], + }, + ]); + + const [ + { + application: { capabilities }, + }, + ] = await mocks.getStartServices(); + + const mockedActionParamsFields = React.lazy(async () => ({ + default() { + return <>; + }, + })); + + actionTypeRegistry.get.mockReturnValue({ + id: 'test', + iconClass: 'test', + selectMessage: 'test', + validateParams: (): Promise> => { + const validationResult = { errors: {} }; + return Promise.resolve(validationResult); + }, + actionConnectorFields: null, + actionParamsFields: mockedActionParamsFields, + }); + // eslint-disable-next-line react-hooks/rules-of-hooks + useKibanaMock().services.actionTypeRegistry = actionTypeRegistry; + // eslint-disable-next-line react-hooks/rules-of-hooks + useKibanaMock().services.application.capabilities = { + ...capabilities, + actions: { + delete: true, + save: true, + show: true, + }, + }; + } + + it('if select item for edit should render EditConnectorFlyout', async () => { + await setup(); + const editItem = jest.fn(); + + wrapper = mountWithIntl( + {}} + loadActions={async () => {}} + editItem={editItem} + isLoadingActions={false} + actions={mockedActions} + setActions={() => {}} + /> + ); + + // Wait for active space to resolve before requesting the component to update + await act(async () => { + await nextTick(); + wrapper.update(); + }); + wrapper.find('[data-test-subj="edit1"]').first().find('button').simulate('click'); + expect(editItem).toBeCalled(); + }); + }); describe('component empty with show only capability', () => { let wrapper: ReactWrapper; async function setup() { - loadAllActions.mockResolvedValueOnce([]); loadActionTypes.mockResolvedValueOnce([ { id: 'test', @@ -402,7 +557,17 @@ describe('actions_connectors_list', () => { delete: false, }, }; - wrapper = mountWithIntl(); + + wrapper = mountWithIntl( + {}} + loadActions={async () => {}} + editItem={() => {}} + isLoadingActions={false} + actions={[]} + setActions={() => {}} + /> + ); // Wait for active space to resolve before requesting the component to update await act(async () => { @@ -416,7 +581,7 @@ describe('actions_connectors_list', () => { expect(wrapper.find('[defaultMessage="No permissions to create connectors"]')).toHaveLength( 1 ); - expect(wrapper.find('[data-test-subj="createActionButton"]')).toHaveLength(0); + expect(wrapper.find('[data-test-subj="createConnectorButton"]')).toHaveLength(0); }); }); @@ -424,22 +589,6 @@ describe('actions_connectors_list', () => { let wrapper: ReactWrapper; async function setup() { - loadAllActions.mockResolvedValueOnce([ - { - id: '1', - actionTypeId: 'test', - description: 'My test', - referencedByCount: 1, - config: {}, - }, - { - id: '2', - actionTypeId: 'test2', - description: 'My test 2', - referencedByCount: 1, - config: {}, - }, - ]); loadActionTypes.mockResolvedValueOnce([ { id: 'test', @@ -469,7 +618,35 @@ describe('actions_connectors_list', () => { }; // eslint-disable-next-line react-hooks/rules-of-hooks useKibanaMock().services.actionTypeRegistry = actionTypeRegistry; - wrapper = mountWithIntl(); + wrapper = mountWithIntl( + {}} + loadActions={async () => {}} + editItem={() => {}} + isLoadingActions={false} + actions={ + [ + { + id: '1', + actionTypeId: 'test', + isPreconfigured: false, + isDeprecated: false, + referencedByCount: 1, + config: {}, + }, + { + id: '2', + actionTypeId: 'test2', + referencedByCount: 1, + isPreconfigured: false, + isDeprecated: false, + config: {}, + }, + ] as ActionConnector[] + } + setActions={() => {}} + /> + ); // Wait for active space to resolve before requesting the component to update await act(async () => { @@ -494,22 +671,6 @@ describe('actions_connectors_list', () => { let wrapper: ReactWrapper; async function setup() { - loadAllActions.mockResolvedValueOnce([ - { - id: '1', - actionTypeId: 'test', - description: 'My test', - referencedByCount: 1, - config: {}, - }, - { - id: '2', - actionTypeId: 'test2', - description: 'My test 2', - referencedByCount: 1, - config: {}, - }, - ]); loadActionTypes.mockResolvedValueOnce([ { id: 'test', @@ -546,15 +707,37 @@ describe('actions_connectors_list', () => { }; // eslint-disable-next-line react-hooks/rules-of-hooks useKibanaMock().services.actionTypeRegistry = actionTypeRegistry; - wrapper = mountWithIntl(); + wrapper = mountWithIntl( + {}} + loadActions={async () => {}} + editItem={() => {}} + isLoadingActions={false} + actions={ + [ + { + id: '1', + actionTypeId: 'test', + referencedByCount: 1, + config: {}, + }, + { + id: '2', + actionTypeId: 'test2', + referencedByCount: 1, + config: {}, + }, + ] as ActionConnector[] + } + setActions={() => {}} + /> + ); // Wait for active space to resolve before requesting the component to update await act(async () => { await nextTick(); wrapper.update(); }); - - expect(loadAllActions).toHaveBeenCalled(); } it('renders table of connectors', async () => { @@ -574,24 +757,6 @@ describe('actions_connectors_list', () => { let wrapper: ReactWrapper; async function setup() { - loadAllActions.mockResolvedValueOnce([ - { - id: '1', - actionTypeId: '.servicenow', - description: 'My test', - referencedByCount: 1, - config: { usesTableApi: true }, - isDeprecated: true, - }, - { - id: '2', - actionTypeId: '.servicenow-sir', - description: 'My test 2', - referencedByCount: 1, - config: { usesTableApi: true }, - isDeprecated: true, - }, - ]); loadActionTypes.mockResolvedValueOnce([ { id: 'test', @@ -630,7 +795,31 @@ describe('actions_connectors_list', () => { useKibanaMock().services.actionTypeRegistry = actionTypeRegistry; wrapper = mountWithIntl( ({ eui: { euiSizeS: '15px' }, darkMode: true })}> - + {}} + loadActions={async () => {}} + editItem={() => {}} + isLoadingActions={false} + actions={ + [ + { + id: '1', + actionTypeId: '.servicenow', + referencedByCount: 1, + config: { usesTableApi: true }, + isDeprecated: true, + }, + { + id: '2', + actionTypeId: '.servicenow-sir', + referencedByCount: 1, + config: { usesTableApi: true }, + isDeprecated: true, + }, + ] as Array> + } + setActions={() => {}} + /> ); @@ -639,8 +828,6 @@ describe('actions_connectors_list', () => { await nextTick(); wrapper.update(); }); - - expect(loadAllActions).toHaveBeenCalled(); } it('shows the warning icon', async () => { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx index d7f5a2beb4c8f..cdfde543a3a69 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/actions_connectors_list.tsx @@ -23,11 +23,10 @@ import { EuiPageTemplate, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { omit } from 'lodash'; import { useHistory, useLocation, useParams } from 'react-router-dom'; import { getConnectorCompatibility } from '@kbn/actions-plugin/common'; import { FormattedMessage } from '@kbn/i18n-react'; -import { loadAllActions, loadActionTypes, deleteActions } from '../../../lib/action_connector_api'; +import { loadActionTypes, deleteActions } from '../../../lib/action_connector_api'; import { hasDeleteActionsCapability, hasSaveActionsCapability, @@ -49,18 +48,10 @@ import { connectorDeprecatedMessage, deprecatedMessage, } from '../../../../common/connectors_selection'; -import { CreateConnectorFlyout } from '../../action_connector_form/create_connector_flyout'; -import { EditConnectorFlyout } from '../../action_connector_form/edit_connector_flyout'; import { getAlertingSectionBreadcrumb } from '../../../lib/breadcrumb'; import { getCurrentDocTitle } from '../../../lib/doc_title'; import { routeToConnectors } from '../../../constants'; -interface EditConnectorProps { - initialConnector?: ActionConnector; - tab?: EditConnectorTabs; - isFix?: boolean; -} - const ConnectorIconTipWithSpacing: React.FC = () => { return ( { ); }; -const ActionsConnectorsList: React.FunctionComponent = () => { +const ActionsConnectorsList = ({ + setAddFlyoutVisibility, + editItem, + isLoadingActions, + actions, + loadActions, + setActions, +}: { + setAddFlyoutVisibility: (state: boolean) => void; + editItem: (actionConnector: ActionConnector, tab: EditConnectorTabs, isFix?: boolean) => void; + isLoadingActions: boolean; + actions: ActionConnector[]; + loadActions: () => Promise; + setActions: (state: ActionConnector[]) => void; +}) => { const { http, notifications: { toasts }, application: { capabilities }, - actionTypeRegistry, setBreadcrumbs, chrome, docLinks, } = useKibana().services; + const { connectorId } = useParams<{ connectorId?: string }>(); const history = useHistory(); const location = useLocation(); @@ -94,18 +99,10 @@ const ActionsConnectorsList: React.FunctionComponent = () => { const canSave = hasSaveActionsCapability(capabilities); const [actionTypesIndex, setActionTypesIndex] = useState(undefined); - const [actions, setActions] = useState([]); const [pageIndex, setPageIndex] = useState(0); const [selectedItems, setSelectedItems] = useState([]); const [isLoadingActionTypes, setIsLoadingActionTypes] = useState(false); - const [isLoadingActions, setIsLoadingActions] = useState(true); - const [addFlyoutVisible, setAddFlyoutVisibility] = useState(false); - const [editConnectorProps, setEditConnectorProps] = useState({}); const [connectorsToDelete, setConnectorsToDelete] = useState([]); - useEffect(() => { - loadActions(); - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); const [showWarningText, setShowWarningText] = useState(false); // Set breadcrumb and page title @@ -172,7 +169,7 @@ const ActionsConnectorsList: React.FunctionComponent = () => { window.history.replaceState(null, '', linkToConnectors); } - }, [actions, connectorId, history, isLoadingActions, location]); + }, [actions, connectorId, editItem, history, isLoadingActions, location]); function setDeleteConnectorWarning(connectors: string[]) { const show = connectors.some((c) => { @@ -188,29 +185,6 @@ const ActionsConnectorsList: React.FunctionComponent = () => { setDeleteConnectorWarning(itemIds); } - async function loadActions() { - setIsLoadingActions(true); - try { - const actionsResponse = await loadAllActions({ http }); - setActions(actionsResponse); - } catch (e) { - toasts.addDanger({ - title: i18n.translate( - 'xpack.triggersActionsUI.sections.actionsConnectorsList.unableToLoadActionsMessage', - { - defaultMessage: 'Unable to load connectors', - } - ), - }); - } finally { - setIsLoadingActions(false); - } - } - - function editItem(actionConnector: ActionConnector, tab: EditConnectorTabs, isFix?: boolean) { - setEditConnectorProps({ initialConnector: actionConnector, tab, isFix: isFix ?? false }); - } - const actionsTableColumns = [ { field: 'name', @@ -434,50 +408,34 @@ const ActionsConnectorsList: React.FunctionComponent = () => { options: actionTypesList, }, ], - toolsLeft: (selectedItems.length === 0 || !canDelete - ? [] - : [ - onDelete(selectedItems)} - title={ - canDelete - ? undefined - : i18n.translate( - 'xpack.triggersActionsUI.sections.actionsConnectorsList.buttons.deleteDisabledTitle', - { defaultMessage: 'Unable to delete connectors' } - ) - } - > - - , - ] - ).concat( - canSave - ? [ + toolsLeft: + selectedItems.length === 0 || !canDelete + ? [] + : [ setAddFlyoutVisibility(true)} + key="delete" + iconType="trash" + color="danger" + data-test-subj="bulkDelete" + onClick={() => onDelete(selectedItems)} + title={ + canDelete + ? undefined + : i18n.translate( + 'xpack.triggersActionsUI.sections.actionsConnectorsList.buttons.deleteDisabledTitle', + { defaultMessage: 'Unable to delete connectors' } + ) + } > , - ] - : [] - ), + ], }} /> ); @@ -546,33 +504,6 @@ const ActionsConnectorsList: React.FunctionComponent = () => { /> )} {actionConnectorTableItems.length === 0 && !canSave && } - {addFlyoutVisible ? ( - { - setAddFlyoutVisibility(false); - }} - onTestConnector={(connector) => editItem(connector, EditConnectorTabs.Test)} - onConnectorCreated={loadActions} - actionTypeRegistry={actionTypeRegistry} - /> - ) : null} - {editConnectorProps.initialConnector ? ( - { - setEditConnectorProps(omit(editConnectorProps, 'initialConnector')); - }} - onConnectorUpdated={(connector) => { - setEditConnectorProps({ ...editConnectorProps, initialConnector: connector }); - loadActions(); - }} - actionTypeRegistry={actionTypeRegistry} - /> - ) : null} ); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/types.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/types.ts new file mode 100644 index 0000000000000..abc595b98cdee --- /dev/null +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/actions_connectors_list/components/types.ts @@ -0,0 +1,13 @@ +/* + * 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 { ActionConnector, EditConnectorTabs } from '../../../../types'; + +export interface EditConnectorProps { + initialConnector?: ActionConnector; + tab?: EditConnectorTabs; + isFix?: boolean; +} diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_conditions.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_conditions.tsx index 5828210d32598..c9e95118698a5 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_conditions.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_conditions.tsx @@ -54,7 +54,7 @@ export const RuleConditions = !BUILT_IN_ACTION_GROUPS.has(id)), - (actionGroup) => actionGroup.hasOwnProperty('conditions') + (actionGroup) => Object.hasOwn(actionGroup, 'conditions') ); return ( diff --git a/x-pack/plugins/upgrade_assistant/public/plugin.ts b/x-pack/plugins/upgrade_assistant/public/plugin.ts index 1fb1656079fc9..694e29cd7cee3 100644 --- a/x-pack/plugins/upgrade_assistant/public/plugin.ts +++ b/x-pack/plugins/upgrade_assistant/public/plugin.ts @@ -68,7 +68,7 @@ export class UpgradeAssistantUIPlugin // Infra plugin doesnt export anything as a public interface. So the only // way we have at this stage for checking if the plugin is available or not // is by checking if the startServices has the `infra` key. - infra: plugins.hasOwnProperty('infra') ? {} : undefined, + infra: Object.hasOwn(plugins, 'infra') ? {} : undefined, }, services: { core: coreStart, diff --git a/x-pack/plugins/watcher/public/legacy/time_buckets.js b/x-pack/plugins/watcher/public/legacy/time_buckets.js index a0804e07c4662..469927269af57 100644 --- a/x-pack/plugins/watcher/public/legacy/time_buckets.js +++ b/x-pack/plugins/watcher/public/legacy/time_buckets.js @@ -345,7 +345,7 @@ TimeBuckets.__cached__ = function (self) { function cachedGetter(prop) { return { value: function cachedGetter(...rest) { - if (cache.hasOwnProperty(prop)) { + if (Object.hasOwn(cache, prop)) { return cache[prop]; } @@ -385,7 +385,7 @@ TimeBuckets.__cached__ = function (self) { _.forOwn(TimeBuckets.prototype, function (fn, prop) { if (prop[0] === '_') return; - if (breakers.hasOwnProperty(prop)) { + if (Object.hasOwn(breakers, prop)) { desc[prop] = cacheBreaker(prop); } else { desc[prop] = cachedGetter(prop); diff --git a/x-pack/plugins/watcher/server/models/settings/settings.js b/x-pack/plugins/watcher/server/models/settings/settings.js index 8f41736e6a53d..d6fbec1068e7c 100644 --- a/x-pack/plugins/watcher/server/models/settings/settings.js +++ b/x-pack/plugins/watcher/server/models/settings/settings.js @@ -51,7 +51,7 @@ function getNotifications(json) { return {}; } return Object.values(json).reduce((accum, value) => { - if (value.hasOwnProperty('xpack') && value.xpack.hasOwnProperty('notification')) { + if (Object.hasOwn(value, 'xpack') && Object.hasOwn(value.xpack, 'notification')) { accum = merge(accum, value.xpack.notification); } return accum; @@ -75,7 +75,7 @@ function getActionTypesSettings(upstreamJson) { // For actions types requiring setup, mark them as enabled // if upstream response contains them, indicating that they // are setup - if (upstreamActionTypes.hasOwnProperty(actionType)) { + if (Object.hasOwn(upstreamActionTypes, actionType)) { // If it exists in the upstream response, it's enabled actionTypeData.enabled = true; diff --git a/x-pack/test/accessibility/apps/group2/ml_anomaly_detection.ts b/x-pack/test/accessibility/apps/group2/ml_anomaly_detection.ts index 33c7db9eb0b20..0667d2d3cddd4 100644 --- a/x-pack/test/accessibility/apps/group2/ml_anomaly_detection.ts +++ b/x-pack/test/accessibility/apps/group2/ml_anomaly_detection.ts @@ -372,22 +372,22 @@ export default function ({ getService }: FtrProviderContext) { await a11y.testAppSnapshot(); await ml.jobWizardAdvanced.selectDetectorFunction(detector.function); - if (detector.hasOwnProperty('field')) { + if (Object.hasOwn(detector, 'field')) { await ml.jobWizardAdvanced.selectDetectorField(detector.field!); } - if (detector.hasOwnProperty('byField')) { + if (Object.hasOwn(detector, 'byField')) { await ml.jobWizardAdvanced.selectDetectorByField(detector.byField!); } - if (detector.hasOwnProperty('overField')) { + if (Object.hasOwn(detector, 'overField')) { await ml.jobWizardAdvanced.selectDetectorOverField(detector.overField!); } - if (detector.hasOwnProperty('partitionField')) { + if (Object.hasOwn(detector, 'partitionField')) { await ml.jobWizardAdvanced.selectDetectorPartitionField(detector.partitionField!); } - if (detector.hasOwnProperty('excludeFrequent')) { + if (Object.hasOwn(detector, 'excludeFrequent')) { await ml.jobWizardAdvanced.selectDetectorExcludeFrequent(detector.excludeFrequent!); } - if (detector.hasOwnProperty('description')) { + if (Object.hasOwn(detector, 'description')) { await ml.jobWizardAdvanced.setDetectorDescription(detector.description!); } diff --git a/x-pack/test/alerting_api_integration/observability/helpers/alerting_wait_for_helpers.ts b/x-pack/test/alerting_api_integration/observability/helpers/alerting_wait_for_helpers.ts index 0d04939dbb341..861c59dbf2b7a 100644 --- a/x-pack/test/alerting_api_integration/observability/helpers/alerting_wait_for_helpers.ts +++ b/x-pack/test/alerting_api_integration/observability/helpers/alerting_wait_for_helpers.ts @@ -60,12 +60,18 @@ export async function waitForDocumentInIndex({ docCountTarget = 1, retryService, logger, + timeout = TIMEOUT, + retries = RETRIES, + retryDelay = RETRY_DELAY, }: { esClient: Client; indexName: string; docCountTarget?: number; retryService: RetryService; logger: ToolingLog; + timeout?: number; + retries?: number; + retryDelay?: number; }): Promise>> { return await retry>>({ test: async () => { @@ -75,6 +81,7 @@ export async function waitForDocumentInIndex({ ignore_unavailable: true, }); if (!response.hits.total || (response.hits.total as number) < docCountTarget) { + logger.debug(`Document count is ${response.hits.total}, should be ${docCountTarget}`); throw new Error( `Number of hits does not match expectation (total: ${response.hits.total}, target: ${docCountTarget})` ); @@ -85,9 +92,9 @@ export async function waitForDocumentInIndex({ utilityName: `waiting for documents in ${indexName} index`, logger, retryService, - timeout: TIMEOUT, - retries: RETRIES, - retryDelay: RETRY_DELAY, + timeout, + retries, + retryDelay, }); } diff --git a/x-pack/test/api_integration/apis/entity_manager/builtin_definitions.ts b/x-pack/test/api_integration/apis/entity_manager/builtin_definitions.ts new file mode 100644 index 0000000000000..d5d92e75179fe --- /dev/null +++ b/x-pack/test/api_integration/apis/entity_manager/builtin_definitions.ts @@ -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 semver from 'semver'; +import expect from '@kbn/expect'; +import { builtInDefinitions } from '@kbn/entityManager-plugin/server/lib/entities/built_in'; +import { ERROR_API_KEY_NOT_FOUND } from '@kbn/entityManager-plugin/public'; +import { builtInEntityDefinition as mockBuiltInEntityDefinition } from '@kbn/entityManager-plugin/server/lib/entities/helpers/fixtures'; +import { EntityDefinition } from '@kbn/entities-schema'; +import { EntityDefinitionWithState } from '@kbn/entityManager-plugin/server/lib/entities/types'; +import { FtrProviderContext } from '../../ftr_provider_context'; +import { createAdmin, createRuntimeUser } from './helpers/user'; +import { Auth, getInstalledDefinitions, upgradeBuiltinDefinitions } from './helpers/request'; + +export default function ({ getService }: FtrProviderContext) { + const esClient = getService('es'); + const supertest = getService('supertest'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + + const enablementRequest = + (method: 'get' | 'put' | 'delete') => + async (auth: Auth, expectedCode: number, query: { [key: string]: any } = {}) => { + const response = await supertestWithoutAuth[method]('/internal/entities/managed/enablement') + .auth(auth.username, auth.password) + .query(query) + .set('kbn-xsrf', 'xxx') + .send() + .expect(expectedCode); + return response.body; + }; + + const entityDiscoveryState = enablementRequest('get'); + const enableEntityDiscovery = enablementRequest('put'); + const disableEntityDiscovery = enablementRequest('delete'); + + const expectNoInstalledDefinitions = async () => { + const definitionsResponse = await getInstalledDefinitions(supertest); + expect(definitionsResponse.definitions).to.eql([]); + }; + + const isInstalledAndRunning = ( + definition: EntityDefinition, + installedDefinitions: EntityDefinitionWithState[] + ) => { + return installedDefinitions.find((installedDefinition) => { + return ( + installedDefinition.id === definition.id && + installedDefinition.version === definition.version && + installedDefinition.state.installed && + installedDefinition.state.running + ); + }); + }; + + describe('Entity discovery builtin definitions', () => { + let authorizedUser: { username: string; password: string }; + let unauthorizedUser: { username: string; password: string }; + + before(async () => { + [authorizedUser, unauthorizedUser] = await Promise.all([ + createAdmin({ esClient }), + createRuntimeUser({ esClient }), + ]); + }); + + describe('enablement/disablement', () => { + describe('with authorized user', () => { + it('should enable and disable entity discovery', async () => { + const enableResponse = await enableEntityDiscovery(authorizedUser, 200); + expect(enableResponse.success).to.eql(true, "authorized user can't enable EEM"); + + const definitionsResponse = await getInstalledDefinitions( + supertestWithoutAuth, + authorizedUser + ); + expect(definitionsResponse.definitions.length).to.eql(builtInDefinitions.length); + expect( + builtInDefinitions.every((builtin) => + isInstalledAndRunning(builtin, definitionsResponse.definitions) + ) + ).to.eql(true, 'all builtin definitions are not installed/running'); + + let stateResponse = await entityDiscoveryState(authorizedUser, 200); + expect(stateResponse.enabled).to.eql( + true, + `EEM is not enabled; response: ${JSON.stringify(stateResponse)}` + ); + + const disableResponse = await disableEntityDiscovery(authorizedUser, 200, { + deleteData: false, + }); + expect(disableResponse.success).to.eql( + true, + `authorized user failed to disable EEM; response: ${JSON.stringify(disableResponse)}` + ); + + stateResponse = await entityDiscoveryState(authorizedUser, 200); + expect(stateResponse.enabled).to.eql(false, 'EEM is not disabled'); + + await expectNoInstalledDefinitions(); + }); + }); + + describe('with unauthorized user', () => { + it('should fail to enable entity discovery', async () => { + await enableEntityDiscovery(unauthorizedUser, 403); + + const stateResponse = await entityDiscoveryState(unauthorizedUser, 200); + expect(stateResponse.enabled).to.eql(false, 'EEM is enabled'); + + await expectNoInstalledDefinitions(); + }); + + it('should fail to disable entity discovery', async () => { + const enableResponse = await enableEntityDiscovery(authorizedUser, 200); + expect(enableResponse.success).to.eql(true, "authorized user can't enable EEM"); + + await disableEntityDiscovery(unauthorizedUser, 403); + + const disableResponse = await disableEntityDiscovery(authorizedUser, 200); + expect(disableResponse.success).to.eql(true, "authorized user can't disable EEM"); + }); + }); + }); + + describe('upgrade', () => { + it('should noop when no api key stored', async () => { + const result = await upgradeBuiltinDefinitions(supertest, []); + expect(result).to.eql({ success: false, reason: ERROR_API_KEY_NOT_FOUND }); + }); + + it('should upgrade existing definitions', async () => { + await expectNoInstalledDefinitions(); + + const enableResponse = await enableEntityDiscovery(authorizedUser, 200); + expect(enableResponse.success).to.eql(true, "authorized user can't enable EEM"); + + let definitionsResponse = await getInstalledDefinitions(supertest); + expect(definitionsResponse.definitions.length).to.eql(builtInDefinitions.length); + + // increment the version of builtin definitions + const updatedBuiltinDefinitions = definitionsResponse.definitions.map((definition) => { + return { + ...definition, + version: semver.inc(definition.version, 'minor')!, + }; + }); + + const upgradeResponse = await upgradeBuiltinDefinitions( + supertest, + updatedBuiltinDefinitions + ); + expect(upgradeResponse.success).to.eql(true); + + // check builtin definitions are running the latest version + definitionsResponse = await getInstalledDefinitions(supertest); + expect(definitionsResponse.definitions.length).to.eql(builtInDefinitions.length); + expect( + updatedBuiltinDefinitions.every((builtin) => + isInstalledAndRunning(builtin, definitionsResponse.definitions) + ) + ).to.eql(true, 'all builtin definitions are not installed/running'); + + await disableEntityDiscovery(authorizedUser, 200); + }); + }); + + it('should install new builtin definitions', async () => { + await expectNoInstalledDefinitions(); + + const enableResponse = await enableEntityDiscovery(authorizedUser, 200); + expect(enableResponse.success).to.eql(true, "authorized user can't enable EEM"); + + // inject definition to simulate release of new builtin definition + const latestBuiltInDefinitions = [...builtInDefinitions, mockBuiltInEntityDefinition]; + const upgradeResponse = await upgradeBuiltinDefinitions(supertest, latestBuiltInDefinitions); + expect(upgradeResponse.success).to.eql(true, 'upgrade was not successful'); + + const definitionsResponse = await getInstalledDefinitions(supertest); + expect(definitionsResponse.definitions.length).to.eql(latestBuiltInDefinitions.length); + expect( + isInstalledAndRunning(mockBuiltInEntityDefinition, definitionsResponse.definitions) + ).to.ok(); + + await disableEntityDiscovery(authorizedUser, 200); + }); + }); +} diff --git a/x-pack/test/api_integration/apis/entity_manager/config.ts b/x-pack/test/api_integration/apis/entity_manager/config.ts index 4280c8a0393ef..eb84cd768c3f8 100644 --- a/x-pack/test/api_integration/apis/entity_manager/config.ts +++ b/x-pack/test/api_integration/apis/entity_manager/config.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { resolve } from 'path'; import { FtrConfigProviderContext, GenericFtrProviderContext } from '@kbn/test'; import { FtrProviderContext } from '../../ftr_provider_context'; @@ -21,10 +22,18 @@ export default async function createTestConfig({ }: FtrConfigProviderContext): Promise { const baseIntegrationTestsConfig = await readConfigFile(require.resolve('../../config.ts')); const services = baseIntegrationTestsConfig.get('services'); + const entityManagerFixturePlugin = resolve(__dirname, './fixture_plugin'); return { ...baseIntegrationTestsConfig.getAll(), testFiles: [require.resolve('.')], + kbnTestServer: { + ...baseIntegrationTestsConfig.get('kbnTestServer'), + serverArgs: [ + ...baseIntegrationTestsConfig.get('kbnTestServer.serverArgs'), + `--plugin-path=${entityManagerFixturePlugin}`, + ], + }, services: { ...services, }, diff --git a/x-pack/test/api_integration/apis/entity_manager/definitions.ts b/x-pack/test/api_integration/apis/entity_manager/definitions.ts index 4f1ff81bbfe6e..0b901b1d6efbc 100644 --- a/x-pack/test/api_integration/apis/entity_manager/definitions.ts +++ b/x-pack/test/api_integration/apis/entity_manager/definitions.ts @@ -6,15 +6,23 @@ */ import expect from '@kbn/expect'; +import { entityLatestSchema } from '@kbn/entities-schema'; import { entityDefinition as mockDefinition, entityDefinitionWithBackfill as mockBackfillDefinition, } from '@kbn/entityManager-plugin/server/lib/entities/helpers/fixtures'; +import { PartialConfig, cleanup, generate } from '@kbn/data-forge'; +import { generateLatestIndexName } from '@kbn/entityManager-plugin/server/lib/entities/helpers/generate_component_id'; import { FtrProviderContext } from '../../ftr_provider_context'; import { installDefinition, uninstallDefinition, getInstalledDefinitions } from './helpers/request'; +import { waitForDocumentInIndex } from '../../../alerting_api_integration/observability/helpers/alerting_wait_for_helpers'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); + const logger = getService('log'); + const esClient = getService('es'); + const retryService = getService('retry'); + const esDeleteAllIndices = getService('esDeleteAllIndices'); describe('Entity definitions', () => { describe('definitions installations', () => { @@ -56,5 +64,53 @@ export default function ({ getService }: FtrProviderContext) { await uninstallDefinition(supertest, mockDefinition.id); }); }); + describe('entity data', () => { + let dataForgeConfig: PartialConfig; + let dataForgeIndices: string[]; + + before(async () => { + dataForgeConfig = { + indexing: { + dataset: 'fake_stack', + eventsPerCycle: 100, + interval: 60_000, + }, + schedule: [ + { + template: 'good', + start: 'now-15m', + end: 'now+5m', + }, + ], + }; + dataForgeIndices = await generate({ client: esClient, config: dataForgeConfig, logger }); + await waitForDocumentInIndex({ + esClient, + indexName: 'kbn-data-forge-fake_stack.admin-console-*', + docCountTarget: 2020, + retryService, + logger, + }); + }); + + after(async () => { + await esDeleteAllIndices(dataForgeIndices); + await uninstallDefinition(supertest, mockDefinition.id, true); + await cleanup({ client: esClient, config: dataForgeConfig, logger }); + }); + + it('should create the proper entities in the latest index', async () => { + await installDefinition(supertest, mockDefinition); + const sample = await waitForDocumentInIndex({ + esClient, + indexName: generateLatestIndexName(mockDefinition), + docCountTarget: 5, + retryService, + logger, + }); + const parsedSample = entityLatestSchema.safeParse(sample.hits.hits[0]._source); + expect(parsedSample.success).to.be(true); + }); + }); }); } diff --git a/x-pack/test/api_integration/apis/entity_manager/enablement.ts b/x-pack/test/api_integration/apis/entity_manager/enablement.ts deleted file mode 100644 index 0745a526c443d..0000000000000 --- a/x-pack/test/api_integration/apis/entity_manager/enablement.ts +++ /dev/null @@ -1,111 +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 expect from '@kbn/expect'; -import { builtInDefinitions } from '@kbn/entityManager-plugin/server/lib/entities/built_in'; -import { EntityDefinitionWithState } from '@kbn/entityManager-plugin/server/lib/entities/types'; -import { FtrProviderContext } from '../../ftr_provider_context'; -import { createAdmin, createRuntimeUser } from './helpers/user'; -import { Auth, getInstalledDefinitions } from './helpers/request'; - -export default function ({ getService }: FtrProviderContext) { - const esClient = getService('es'); - const supertest = getService('supertestWithoutAuth'); - - const enablementRequest = - (method: 'get' | 'put' | 'delete') => - async (auth: Auth, expectedCode: number, query: { [key: string]: any } = {}) => { - const response = await supertest[method]('/internal/entities/managed/enablement') - .auth(auth.username, auth.password) - .query(query) - .set('kbn-xsrf', 'xxx') - .send() - .expect(expectedCode); - return response.body; - }; - - const entityDiscoveryState = enablementRequest('get'); - const enableEntityDiscovery = enablementRequest('put'); - const disableEntityDiscovery = enablementRequest('delete'); - - describe('Entity discovery enablement', () => { - let authorizedUser: { username: string; password: string }; - let unauthorizedUser: { username: string; password: string }; - - before(async () => { - [authorizedUser, unauthorizedUser] = await Promise.all([ - createAdmin({ esClient }), - createRuntimeUser({ esClient }), - ]); - }); - - describe('with authorized user', () => { - it('should enable and disable entity discovery', async () => { - const enableResponse = await enableEntityDiscovery(authorizedUser, 200); - expect(enableResponse.success).to.eql(true, "authorized user can't enable EEM"); - - let definitionsResponse = await getInstalledDefinitions(supertest, authorizedUser); - expect(definitionsResponse.definitions.length).to.eql(builtInDefinitions.length); - expect( - builtInDefinitions.every((builtin) => { - return definitionsResponse.definitions.find( - (installedDefinition: EntityDefinitionWithState) => { - return ( - installedDefinition.id === builtin.id && - installedDefinition.state.installed && - installedDefinition.state.running - ); - } - ); - }) - ).to.eql(true, 'all builtin definitions are not installed/running'); - - let stateResponse = await entityDiscoveryState(authorizedUser, 200); - expect(stateResponse.enabled).to.eql( - true, - `EEM is not enabled; response: ${JSON.stringify(stateResponse)}` - ); - - const disableResponse = await disableEntityDiscovery(authorizedUser, 200, { - deleteData: false, - }); - expect(disableResponse.success).to.eql( - true, - `authorized user failed to disable EEM; response: ${JSON.stringify(disableResponse)}` - ); - - stateResponse = await entityDiscoveryState(authorizedUser, 200); - expect(stateResponse.enabled).to.eql(false, 'EEM is not disabled'); - - definitionsResponse = await getInstalledDefinitions(supertest, authorizedUser); - expect(definitionsResponse.definitions).to.eql([]); - }); - }); - - describe('with unauthorized user', () => { - it('should fail to enable entity discovery', async () => { - await enableEntityDiscovery(unauthorizedUser, 403); - - const stateResponse = await entityDiscoveryState(unauthorizedUser, 200); - expect(stateResponse.enabled).to.eql(false, 'EEM is enabled'); - - const definitionsResponse = await getInstalledDefinitions(supertest, unauthorizedUser); - expect(definitionsResponse.definitions).to.eql([]); - }); - - it('should fail to disable entity discovery', async () => { - const enableResponse = await enableEntityDiscovery(authorizedUser, 200); - expect(enableResponse.success).to.eql(true, "authorized user can't enable EEM"); - - let disableResponse = await disableEntityDiscovery(unauthorizedUser, 403); - - disableResponse = await disableEntityDiscovery(authorizedUser, 200); - expect(disableResponse.success).to.eql(true, "authorized user can't disable EEM"); - }); - }); - }); -} diff --git a/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/kibana.jsonc b/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/kibana.jsonc new file mode 100644 index 0000000000000..ca3d05aea0f8f --- /dev/null +++ b/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/kibana.jsonc @@ -0,0 +1,15 @@ +{ + "type": "plugin", + "id": "@kbn/entity-manager-fixture-plugin", + "owner": "@elastic/obs-entities", + "plugin": { + "id": "entityManagerFixture", + "server": true, + "browser": false, + "requiredPlugins": [ + "encryptedSavedObjects", + "security", + ], + "optionalPlugins": [] + } +} diff --git a/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/package.json b/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/package.json new file mode 100644 index 0000000000000..b06e2193de990 --- /dev/null +++ b/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/package.json @@ -0,0 +1,13 @@ +{ + "name": "@kbn/entity-manager-fixture-plugin", + "version": "1.0.0", + "kibana": { + "version": "kibana", + "templateVersion": "1.0.0" + }, + "scripts": { + "kbn": "node ../../../../../../scripts/kbn.js", + "build": "rm -rf './target' && ../../../../../../node_modules/.bin/tsc" + }, + "license": "Elastic License 2.0" +} \ No newline at end of file diff --git a/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/server/index.ts b/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/server/index.ts new file mode 100644 index 0000000000000..b9896f3e88d55 --- /dev/null +++ b/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/server/index.ts @@ -0,0 +1,13 @@ +/* + * 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 { PluginInitializerContext } from '@kbn/core-plugins-server'; +import { FixturePlugin } from './plugin'; + +export const plugin = async (context: PluginInitializerContext<{}>) => { + return new FixturePlugin(context); +}; diff --git a/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/server/plugin.ts b/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/server/plugin.ts new file mode 100644 index 0000000000000..65469bf7c1a8c --- /dev/null +++ b/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/server/plugin.ts @@ -0,0 +1,74 @@ +/* + * 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 { z } from 'zod'; +import { + Plugin, + CoreSetup, + RequestHandlerContext, + KibanaRequest, + KibanaResponseFactory, + Logger, + PluginInitializerContext, +} from '@kbn/core/server'; +import { buildRouteValidationWithZod } from '@kbn/zod-helpers'; +import { upgradeBuiltInEntityDefinitions } from '@kbn/entityManager-plugin/server/lib/entities/upgrade_entity_definition'; +import { SecurityPluginStart } from '@kbn/security-plugin-types-server'; +import { EncryptedSavedObjectsPluginStart } from '@kbn/encrypted-saved-objects-plugin/server'; +import { entityDefinitionSchema } from '@kbn/entities-schema'; + +interface FixtureStartDeps { + encryptedSavedObjects: EncryptedSavedObjectsPluginStart; + security: SecurityPluginStart; +} + +export class FixturePlugin implements Plugin { + private logger: Logger; + + constructor(context: PluginInitializerContext<{}>) { + this.logger = context.logger.get(); + } + + public setup(core: CoreSetup) { + core.http.createRouter().post( + { + path: '/api/entities/upgrade_builtin_definitions', + validate: { + body: buildRouteValidationWithZod( + z.object({ + definitions: z.array(entityDefinitionSchema), + }) + ), + }, + }, + async ( + context: RequestHandlerContext, + req: KibanaRequest, + res: KibanaResponseFactory + ) => { + const [coreStart, { encryptedSavedObjects, security }] = await core.getStartServices(); + + const result = await upgradeBuiltInEntityDefinitions({ + definitions: req.body.definitions, + server: { + encryptedSavedObjects, + security, + core: coreStart, + logger: this.logger, + config: {}, + isServerless: false, + }, + }); + + return res.ok({ body: result }); + } + ); + } + + public start() {} + public stop() {} +} diff --git a/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/tsconfig.json b/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/tsconfig.json new file mode 100644 index 0000000000000..ab011eaef3eef --- /dev/null +++ b/x-pack/test/api_integration/apis/entity_manager/fixture_plugin/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../../../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "isolatedModules": true + }, + "include": [ + "server/**/**/*", + ], + "kbn_references": [ + "@kbn/core", + "@kbn/encrypted-saved-objects-plugin", + "@kbn/core-plugins-server", + "@kbn/zod-helpers", + "@kbn/entityManager-plugin", + "@kbn/security-plugin-types-server", + "@kbn/entities-schema", + ], + "exclude": [ + "target/**/*", + ] +} diff --git a/x-pack/test/api_integration/apis/entity_manager/helpers/request.ts b/x-pack/test/api_integration/apis/entity_manager/helpers/request.ts index 14b083282ff40..e69cb950afe42 100644 --- a/x-pack/test/api_integration/apis/entity_manager/helpers/request.ts +++ b/x-pack/test/api_integration/apis/entity_manager/helpers/request.ts @@ -39,10 +39,23 @@ export const installDefinition = async ( .expect(200); }; -export const uninstallDefinition = (supertest: Agent, id: string) => { +export const uninstallDefinition = (supertest: Agent, id: string, deleteData = false) => { return supertest .delete(`/internal/entities/definition/${id}`) + .query({ deleteData }) .set('kbn-xsrf', 'xxx') .send() .expect(200); }; + +export const upgradeBuiltinDefinitions = async ( + supertest: Agent, + definitions: EntityDefinition[] +): Promise<{ success: boolean }> => { + const response = await supertest + .post('/api/entities/upgrade_builtin_definitions') + .set('kbn-xsrf', 'xxx') + .send({ definitions }) + .expect(200); + return response.body; +}; diff --git a/x-pack/test/api_integration/apis/entity_manager/index.ts b/x-pack/test/api_integration/apis/entity_manager/index.ts index b6876849ef682..8f7af35e5c8ad 100644 --- a/x-pack/test/api_integration/apis/entity_manager/index.ts +++ b/x-pack/test/api_integration/apis/entity_manager/index.ts @@ -11,7 +11,7 @@ export default function ({ loadTestFile }: FtrProviderContext) { describe('Entity Manager', function () { this.tags(['entityManager']); - loadTestFile(require.resolve('./enablement')); + loadTestFile(require.resolve('./builtin_definitions')); loadTestFile(require.resolve('./definitions')); }); } diff --git a/x-pack/test/api_integration/apis/features/features/features.ts b/x-pack/test/api_integration/apis/features/features/features.ts index a494e3e09ee0a..5236ec72d437a 100644 --- a/x-pack/test/api_integration/apis/features/features/features.ts +++ b/x-pack/test/api_integration/apis/features/features/features.ts @@ -128,6 +128,7 @@ export default function ({ getService }: FtrProviderContext) { 'siem', 'slo', 'securitySolutionAssistant', + 'securitySolutionAttackDiscovery', 'securitySolutionCases', 'fleet', 'fleetv2', diff --git a/x-pack/test/api_integration/apis/logs_shared/config.ts b/x-pack/test/api_integration/apis/logs_shared/config.ts new file mode 100644 index 0000000000000..5f335f116fefe --- /dev/null +++ b/x-pack/test/api_integration/apis/logs_shared/config.ts @@ -0,0 +1,17 @@ +/* + * 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 { FtrConfigProviderContext } from '@kbn/test'; + +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const baseIntegrationTestsConfig = await readConfigFile(require.resolve('../../config.ts')); + + return { + ...baseIntegrationTestsConfig.getAll(), + testFiles: [require.resolve('.')], + }; +} diff --git a/x-pack/test/api_integration/apis/logs_shared/index.ts b/x-pack/test/api_integration/apis/logs_shared/index.ts new file mode 100644 index 0000000000000..157526c418754 --- /dev/null +++ b/x-pack/test/api_integration/apis/logs_shared/index.ts @@ -0,0 +1,14 @@ +/* + * 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 { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('Logs shared routes', () => { + loadTestFile(require.resolve('./migrate_log_view_settings')); + }); +} diff --git a/x-pack/test/api_integration/apis/logs_shared/migrate_log_view_settings.ts b/x-pack/test/api_integration/apis/logs_shared/migrate_log_view_settings.ts new file mode 100644 index 0000000000000..e3185fc82dacf --- /dev/null +++ b/x-pack/test/api_integration/apis/logs_shared/migrate_log_view_settings.ts @@ -0,0 +1,95 @@ +/* + * 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 { LogViewAttributes } from '@kbn/logs-shared-plugin/common/log_views'; +import { infraSourceConfigurationSavedObjectName } from '@kbn/infra-plugin/server/lib/sources'; +import { logViewSavedObjectName } from '@kbn/logs-shared-plugin/server'; +import { defaultLogViewId } from '@kbn/logs-shared-plugin/common/log_views'; +import { MIGRATE_LOG_VIEW_SETTINGS_URL } from '@kbn/logs-shared-plugin/common/http_api/deprecations'; +import { OBSERVABILITY_LOGS_DATA_ACCESS_LOG_SOURCES_ID } from '@kbn/management-settings-ids'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +export default function ({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const logViewsService = getService('infraLogViews'); + const kibanaServer = getService('kibanaServer'); + const retry = getService('retry'); + + const INDICES = 'logs-*,something-else-*,test-*'; + + describe('Log view settings migration', () => { + describe('Migration API', () => { + before(async () => { + await kibanaServer.savedObjects.clean({ + types: [infraSourceConfigurationSavedObjectName, logViewSavedObjectName], + }); + }); + + afterEach(async () => { + await kibanaServer.savedObjects.clean({ + types: [infraSourceConfigurationSavedObjectName, logViewSavedObjectName], + }); + }); + + it('performs a migration when the log view is not using the Kibana advanced setting', async () => { + const logViewAttributes: Partial = { + name: 'Test Log View 1', + description: 'Test Description 1', + logIndices: { type: 'index_name', indexName: INDICES }, + logColumns: [], + }; + + await logViewsService.putLogView(defaultLogViewId, { + attributes: logViewAttributes, + }); + + await supertest + .put(MIGRATE_LOG_VIEW_SETTINGS_URL) + .set({ + 'kbn-xsrf': 'some-xsrf-token', + }) + .send() + .expect(200); + + await retry.try(async () => { + const migratedLogView = await logViewsService.getLogView(defaultLogViewId); + expect(migratedLogView.data.attributes.logIndices.type).to.eql('kibana_advanced_setting'); + const uiSetting = await kibanaServer.uiSettings.get( + OBSERVABILITY_LOGS_DATA_ACCESS_LOG_SOURCES_ID + ); + expect(uiSetting).to.eql([INDICES]); + }); + }); + + it('should error when the log view is already using the Kibana advanced setting', async () => { + const logViewAttributes: Partial = { + name: 'Test Log View 1', + description: 'Test Description 1', + logIndices: { type: 'kibana_advanced_setting' }, + logColumns: [], + }; + + await logViewsService.putLogView(defaultLogViewId, { + attributes: logViewAttributes, + }); + + const response = await supertest + .put(MIGRATE_LOG_VIEW_SETTINGS_URL) + .set({ + 'kbn-xsrf': 'some-xsrf-token', + }) + .send() + .expect(400); + + expect(response.body.message).to.eql( + "Unable to migrate log view settings. A log view either doesn't exist or is already using the Kibana advanced setting." + ); + }); + }); + }); +} diff --git a/x-pack/test/api_integration/apis/management/advanced_settings/feature_controls.ts b/x-pack/test/api_integration/apis/management/advanced_settings/feature_controls.ts index 45630dac148d8..caf98ec1ece02 100644 --- a/x-pack/test/api_integration/apis/management/advanced_settings/feature_controls.ts +++ b/x-pack/test/api_integration/apis/management/advanced_settings/feature_controls.ts @@ -12,9 +12,11 @@ import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST, } from '@kbn/core-http-common'; import { FtrProviderContext } from '../../../ftr_provider_context'; +import { retryRequestIfConflicts } from './utils'; export default function featureControlsTests({ getService }: FtrProviderContext) { const supertestWithoutAuth = getService('supertestWithoutAuth'); + const log = getService('log'); const security = getService('security'); const spaces = getService('spaces'); const deployment = getService('deployment'); @@ -54,11 +56,14 @@ export default function featureControlsTests({ getService }: FtrProviderContext) async function saveAdvancedSetting(username: string, password: string, spaceId?: string) { const basePath = spaceId ? `/s/${spaceId}` : ''; - return await supertestWithoutAuth - .post(`${basePath}/internal/kibana/settings`) - .auth(username, password) - .set('kbn-xsrf', 'foo') - .send({ changes: { [CSV_QUOTE_VALUES_SETTING]: null } }) + const sendRequest = async () => + await supertestWithoutAuth + .post(`${basePath}/internal/kibana/settings`) + .auth(username, password) + .set('kbn-xsrf', 'foo') + .send({ changes: { [CSV_QUOTE_VALUES_SETTING]: null } }); + + return await retryRequestIfConflicts(log, 'saveAdvancedSetting', sendRequest) .then((response: any) => ({ error: undefined, response })) .catch((error: any) => ({ error, response: undefined })); } @@ -66,19 +71,21 @@ export default function featureControlsTests({ getService }: FtrProviderContext) async function saveTelemetrySetting(username: string, password: string, spaceId?: string) { const basePath = spaceId ? `/s/${spaceId}` : ''; - return await supertestWithoutAuth - .post(`${basePath}/internal/telemetry/optIn`) - .auth(username, password) - .set('kbn-xsrf', 'foo') - .set(ELASTIC_HTTP_VERSION_HEADER, '2') - .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') - .send({ enabled: true }) + const sendRequest = async () => + await supertestWithoutAuth + .post(`${basePath}/internal/telemetry/optIn`) + .auth(username, password) + .set('kbn-xsrf', 'foo') + .set(ELASTIC_HTTP_VERSION_HEADER, '2') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send({ enabled: true }); + + return await retryRequestIfConflicts(log, 'saveTelemetrySetting', sendRequest) .then((response: any) => ({ error: undefined, response })) .catch((error: any) => ({ error, response: undefined })); } - // Failing: See https://github.com/elastic/kibana/issues/176445 - describe.skip('feature controls', () => { + describe('feature controls', () => { it(`settings can be saved with the advancedSettings: ["all"] feature privilege`, async () => { const username = 'settings_all'; const roleName = 'settings_all'; diff --git a/x-pack/test/api_integration/apis/management/advanced_settings/utils/index.ts b/x-pack/test/api_integration/apis/management/advanced_settings/utils/index.ts new file mode 100644 index 0000000000000..9d293f9058a7d --- /dev/null +++ b/x-pack/test/api_integration/apis/management/advanced_settings/utils/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 { retryRequestIfConflicts } from './retry_if_conflicts'; diff --git a/x-pack/test/api_integration/apis/management/advanced_settings/utils/retry_if_conflicts.ts b/x-pack/test/api_integration/apis/management/advanced_settings/utils/retry_if_conflicts.ts new file mode 100644 index 0000000000000..09a07b9b7a1f1 --- /dev/null +++ b/x-pack/test/api_integration/apis/management/advanced_settings/utils/retry_if_conflicts.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 { ToolingLog } from '@kbn/tooling-log'; + +// Number of times to retry when conflicts occur +const RETRY_ATTEMPTS = 2; + +// Delay between retries when conflicts occur +const RETRY_DELAY = 200; + +/* + * Retry a request if it runs into 409 Conflicts, + * up to a maximum number of attempts. + */ +export const retryRequestIfConflicts = async ( + logger: ToolingLog, + name: string, + sendRequest: () => Promise, + retries: number = RETRY_ATTEMPTS, + retryDelay: number = RETRY_DELAY +): Promise => { + const response = await sendRequest(); + if (response.statusCode !== 409) { + return response; + } + + // If no retries left, throw it + if (retries <= 0) { + logger.error(`${name} conflict, exceeded retries`); + throw new Error(`${name} conflict, exceeded retries`); + } + + // Otherwise, delay a bit before retrying + logger.debug(`${name} conflict, retrying ...`); + await waitBeforeNextRetry(retryDelay); + return await retryRequestIfConflicts(logger, name, sendRequest, retries - 1); +}; + +async function waitBeforeNextRetry(retryDelay: number): Promise { + await new Promise((resolve) => setTimeout(resolve, retryDelay)); +} diff --git a/x-pack/test/api_integration/apis/management/index_management/settings.ts b/x-pack/test/api_integration/apis/management/index_management/settings.ts index e6986dfca8622..24819d177ccf0 100644 --- a/x-pack/test/api_integration/apis/management/index_management/settings.ts +++ b/x-pack/test/api_integration/apis/management/index_management/settings.ts @@ -84,7 +84,7 @@ export default function ({ getService }: FtrProviderContext) { // Make sure none of the settings have been removed from ES API expectedSettings.forEach((setting) => { try { - expect(body.defaults.index.hasOwnProperty(setting)).to.be(true); + expect(Object.hasOwn(body.defaults.index, setting)).to.be(true); } catch { throw new Error(`Expected setting "${setting}" not found.`); } diff --git a/x-pack/test/api_integration/apis/management/index_management/stats.ts b/x-pack/test/api_integration/apis/management/index_management/stats.ts index 28ef3083e3a4c..4ce10574c6361 100644 --- a/x-pack/test/api_integration/apis/management/index_management/stats.ts +++ b/x-pack/test/api_integration/apis/management/index_management/stats.ts @@ -48,7 +48,7 @@ export default function ({ getService }: FtrProviderContext) { // Make sure none of the stats have been removed from ES API expectedStats.forEach((stat) => { try { - expect(body.stats.total.hasOwnProperty(stat)).to.be(true); + expect(Object.hasOwn(body.stats.total, stat)).to.be(true); } catch { throw new Error(`Expected stat "${stat}" not found.`); } 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 e8ac6369f00a5..457955354be62 100644 --- a/x-pack/test/api_integration/apis/metrics_ui/infra.ts +++ b/x-pack/test/api_integration/apis/metrics_ui/infra.ts @@ -8,13 +8,13 @@ import expect from '@kbn/expect'; import { - GetInfraMetricsRequestBodyPayload, + GetInfraMetricsRequestBodyPayloadClient, GetInfraMetricsResponsePayload, } from '@kbn/infra-plugin/common/http_api/infra'; import { DATES } from './constants'; import { FtrProviderContext } from '../../ftr_provider_context'; -const ENDPOINT = '/api/metrics/infra'; +const ENDPOINT = '/api/metrics/infra/host'; const normalizeNewLine = (text: string) => { return text.replaceAll(/(\s{2,}|\\n\\s)/g, ' '); @@ -23,39 +23,20 @@ export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const supertest = getService('supertest'); - const basePayload: GetInfraMetricsRequestBodyPayload = { - type: 'host', + const basePayload: GetInfraMetricsRequestBodyPayloadClient = { limit: 10, metrics: [ - { - type: 'cpu', - }, - { - type: 'cpuV2', - }, - { - type: 'diskSpaceUsage', - }, - { - type: 'memory', - }, - { - type: 'memoryFree', - }, - { - type: 'normalizedLoad1m', - }, - { - type: 'rx', - }, - { - type: 'tx', - }, + 'cpu', + 'cpuV2', + 'diskSpaceUsage', + 'memory', + 'memoryFree', + 'normalizedLoad1m', + 'rx', + 'tx', ], - range: { - from: new Date(DATES['8.0.0'].logs_and_metrics.min).toISOString(), - to: new Date(DATES['8.0.0'].logs_and_metrics.max).toISOString(), - }, + from: new Date(DATES['8.0.0'].logs_and_metrics.min).toISOString(), + to: new Date(DATES['8.0.0'].logs_and_metrics.max).toISOString(), query: { bool: { must_not: [], filter: [], should: [], must: [] } }, }; @@ -64,7 +45,7 @@ export default function ({ getService }: FtrProviderContext) { invalidBody, expectedHTTPCode, }: { - body?: GetInfraMetricsRequestBodyPayload; + body?: GetInfraMetricsRequestBodyPayloadClient; invalidBody?: any; expectedHTTPCode: number; }) => { @@ -85,7 +66,7 @@ export default function ({ getService }: FtrProviderContext) { describe('fetch hosts', () => { it('should return metrics for a host', async () => { - const body: GetInfraMetricsRequestBodyPayload = { ...basePayload, limit: 1 }; + const body: GetInfraMetricsRequestBodyPayloadClient = { ...basePayload, limit: 1 }; const response = await makeRequest({ body, expectedHTTPCode: 200 }); expect(response.body.nodes).length(1); @@ -98,27 +79,24 @@ export default function ({ getService }: FtrProviderContext) { ], metrics: [ { name: 'cpu', value: 0.44708333333333333 }, - { name: 'cpuV2', value: 0 }, - { name: 'diskSpaceUsage', value: 0 }, + { name: 'cpuV2', value: null }, + { name: 'diskSpaceUsage', value: null }, { name: 'memory', value: 0.4563333333333333 }, { name: 'memoryFree', value: 8573890560 }, { name: 'normalizedLoad1m', value: 0.7375000000000002 }, { name: 'rx', value: null }, { name: 'tx', value: null }, ], + hasSystemMetrics: true, name: 'gke-observability-8--observability-8--bc1afd95-f0zc', }, ]); }); it('should return all hosts if query params is not sent', async () => { - const body: GetInfraMetricsRequestBodyPayload = { + const body: GetInfraMetricsRequestBodyPayloadClient = { ...basePayload, - metrics: [ - { - type: 'memory', - }, - ], + metrics: ['memory'], query: undefined, }; @@ -131,6 +109,7 @@ export default function ({ getService }: FtrProviderContext) { { name: 'host.ip', value: null }, ], metrics: [{ name: 'memory', value: 0.4563333333333333 }], + hasSystemMetrics: true, name: 'gke-observability-8--observability-8--bc1afd95-f0zc', }, { @@ -140,6 +119,7 @@ export default function ({ getService }: FtrProviderContext) { { name: 'host.ip', value: null }, ], metrics: [{ name: 'memory', value: 0.32066666666666666 }], + hasSystemMetrics: true, name: 'gke-observability-8--observability-8--bc1afd95-ngmh', }, { @@ -149,19 +129,16 @@ export default function ({ getService }: FtrProviderContext) { { name: 'host.ip', value: null }, ], metrics: [{ name: 'memory', value: 0.2346666666666667 }], + hasSystemMetrics: true, name: 'gke-observability-8--observability-8--bc1afd95-nhhw', }, ]); }); it('should return 3 hosts when filtered by "host.os.name=CentOS Linux"', async () => { - const body: GetInfraMetricsRequestBodyPayload = { + const body: GetInfraMetricsRequestBodyPayloadClient = { ...basePayload, - metrics: [ - { - type: 'cpuV2', - }, - ], + metrics: ['cpuV2'], query: { bool: { filter: [{ term: { 'host.os.name': 'CentOS Linux' } }] } }, }; const response = await makeRequest({ body, expectedHTTPCode: 200 }); @@ -175,13 +152,9 @@ export default function ({ getService }: FtrProviderContext) { }); it('should return 0 hosts when filtered by "host.os.name=Ubuntu"', async () => { - const body: GetInfraMetricsRequestBodyPayload = { + const body: GetInfraMetricsRequestBodyPayloadClient = { ...basePayload, - metrics: [ - { - type: 'cpuV2', - }, - ], + metrics: ['cpuV2'], query: { bool: { filter: [{ term: { 'host.os.name': 'Ubuntu' } }] } }, }; const response = await makeRequest({ body, expectedHTTPCode: 200 }); @@ -192,13 +165,9 @@ export default function ({ getService }: FtrProviderContext) { }); it('should return 0 hosts when filtered by not "host.name=gke-observability-8--observability-8--bc1afd95-nhhw"', async () => { - const body: GetInfraMetricsRequestBodyPayload = { + const body: GetInfraMetricsRequestBodyPayloadClient = { ...basePayload, - metrics: [ - { - type: 'cpuV2', - }, - ], + metrics: ['cpuV2'], query: { bool: { must_not: [ @@ -218,7 +187,7 @@ export default function ({ getService }: FtrProviderContext) { describe('endpoint validations', () => { it('should fail when limit is 0', async () => { - const body: GetInfraMetricsRequestBodyPayload = { ...basePayload, limit: 0 }; + const body: GetInfraMetricsRequestBodyPayloadClient = { ...basePayload, limit: 0 }; const response = await makeRequest({ body, expectedHTTPCode: 400 }); expect(normalizeNewLine(response.body.message)).to.be( @@ -227,7 +196,7 @@ export default function ({ getService }: FtrProviderContext) { }); it('should fail when limit is negative', async () => { - const body: GetInfraMetricsRequestBodyPayload = { ...basePayload, limit: -2 }; + const body: GetInfraMetricsRequestBodyPayloadClient = { ...basePayload, limit: -2 }; const response = await makeRequest({ body, expectedHTTPCode: 400 }); expect(normalizeNewLine(response.body.message)).to.be( @@ -236,7 +205,7 @@ export default function ({ getService }: FtrProviderContext) { }); it('should fail when limit above 500', async () => { - const body: GetInfraMetricsRequestBodyPayload = { ...basePayload, limit: 501 }; + const body: GetInfraMetricsRequestBodyPayloadClient = { ...basePayload, limit: 501 }; const response = await makeRequest({ body, expectedHTTPCode: 400 }); expect(normalizeNewLine(response.body.message)).to.be( @@ -245,30 +214,30 @@ export default function ({ getService }: FtrProviderContext) { }); it('should fail when metric is invalid', async () => { - const invalidBody = { ...basePayload, metrics: [{ type: 'any' }] }; + const invalidBody = { ...basePayload, metrics: ['any'] }; const response = await makeRequest({ invalidBody, expectedHTTPCode: 400 }); expect(normalizeNewLine(response.body.message)).to.be( - '[request body]: Failed to validate: in metrics/0/type: "any" does not match expected type "cpu" | "cpuV2" | "normalizedLoad1m" | "diskSpaceUsage" | "memory" | "memoryFree" | "rx" | "tx" | "rxV2" | "txV2"' + '[request body]: Failed to validate: in metrics/0: "any" does not match expected type "cpu" | "cpuV2" | "normalizedLoad1m" | "diskSpaceUsage" | "memory" | "memoryFree" | "rx" | "tx" | "rxV2" | "txV2"' ); }); it('should pass when limit is 1', async () => { - const body: GetInfraMetricsRequestBodyPayload = { ...basePayload, limit: 1 }; + const body: GetInfraMetricsRequestBodyPayloadClient = { ...basePayload, limit: 1 }; await makeRequest({ body, expectedHTTPCode: 200 }); }); it('should pass when limit is 500', async () => { - const body: GetInfraMetricsRequestBodyPayload = { ...basePayload, limit: 500 }; + const body: GetInfraMetricsRequestBodyPayloadClient = { ...basePayload, limit: 500 }; await makeRequest({ body, expectedHTTPCode: 200 }); }); - it('should fail when range is not informed', async () => { - const invalidBody = { ...basePayload, range: undefined }; + it('should fail when from and to are not informed', async () => { + const invalidBody = { ...basePayload, from: undefined, to: undefined }; const response = await makeRequest({ invalidBody, expectedHTTPCode: 400 }); expect(normalizeNewLine(response.body.message)).to.be( - '[request body]: Failed to validate: in range: undefined does not match expected type { from: Date, to: Date }' + '[request body]: Failed to validate: in from: undefined does not match expected type isoToEpochRt in to: undefined does not match expected type isoToEpochRt' ); }); }); @@ -290,12 +259,10 @@ export default function ({ getService }: FtrProviderContext) { describe('fetch hosts', () => { it('should return metrics for a host with alert count', async () => { - const body: GetInfraMetricsRequestBodyPayload = { + const body: GetInfraMetricsRequestBodyPayloadClient = { ...basePayload, - range: { - from: '2018-10-17T19:42:21.208Z', - to: '2018-10-17T19:58:03.952Z', - }, + from: '2018-10-17T19:42:21.208Z', + to: '2018-10-17T19:58:03.952Z', limit: 1, }; const response = await makeRequest({ body, expectedHTTPCode: 200 }); diff --git a/x-pack/test/api_integration/apis/ml/job_validation/validate.ts b/x-pack/test/api_integration/apis/ml/job_validation/validate.ts index 02088af0b12e1..b1481ffe183d5 100644 --- a/x-pack/test/api_integration/apis/ml/job_validation/validate.ts +++ b/x-pack/test/api_integration/apis/ml/job_validation/validate.ts @@ -175,7 +175,7 @@ export default ({ getService }: FtrProviderContext) => { // and may vary between test environments, e.g. cloud vs non-cloud, // so it should not be part of the validation body.forEach((element: any) => { - if (element.hasOwnProperty('maxModelMemoryLimit')) { + if (Object.hasOwn(element, 'maxModelMemoryLimit')) { delete element.maxModelMemoryLimit; } }); diff --git a/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts b/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts index 0c03b65dcced0..31dd5f3354635 100644 --- a/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts +++ b/x-pack/test/api_integration/apis/ml/modules/recognize_module.ts @@ -221,7 +221,7 @@ export default ({ getService }: FtrProviderContext) => { for (const testData of testDataList) { describe('lists matching modules', function () { before(async () => { - if (testData.hasOwnProperty('sourceDataArchive')) { + if (Object.hasOwn(testData, 'sourceDataArchive')) { await esArchiver.loadIfNeeded(testData.sourceDataArchive!); } }); diff --git a/x-pack/test/api_integration/apis/ml/modules/setup_module.ts b/x-pack/test/api_integration/apis/ml/modules/setup_module.ts index 27d6d048e3f84..def9774a55ddc 100644 --- a/x-pack/test/api_integration/apis/ml/modules/setup_module.ts +++ b/x-pack/test/api_integration/apis/ml/modules/setup_module.ts @@ -860,10 +860,10 @@ export default ({ getService }: FtrProviderContext) => { for (const testData of testDataListNegative) { describe('rejects request', function () { before(async () => { - if (testData.hasOwnProperty('sourceDataArchive')) { + if (Object.hasOwn(testData, 'sourceDataArchive')) { await esArchiver.loadIfNeeded(testData.sourceDataArchive!); } - if (testData.hasOwnProperty('indexPattern')) { + if (Object.hasOwn(testData, 'indexPattern')) { await ml.testResources.createDataViewIfNeeded( testData.indexPattern!.name as string, testData.indexPattern!.timeField as string @@ -873,7 +873,7 @@ export default ({ getService }: FtrProviderContext) => { after(async () => { await ml.api.cleanMlIndices(); - if (testData.hasOwnProperty('indexPattern')) { + if (Object.hasOwn(testData, 'indexPattern')) { await ml.testResources.deleteDataViewByTitle(testData.indexPattern!.name); } }); diff --git a/x-pack/test/api_integration/apis/ml/trained_models/put_model.ts b/x-pack/test/api_integration/apis/ml/trained_models/put_model.ts index 9893e19c3c8c4..15c650d0d384c 100644 --- a/x-pack/test/api_integration/apis/ml/trained_models/put_model.ts +++ b/x-pack/test/api_integration/apis/ml/trained_models/put_model.ts @@ -15,8 +15,7 @@ export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertestWithoutAuth'); const ml = getService('ml'); - // FLAKY: https://github.com/elastic/kibana/issues/189637 - describe.skip('PUT trained_models', () => { + describe('PUT trained_models', function () { before(async () => { await ml.api.initSavedObjects(); await ml.testResources.setKibanaTimeZoneToUTC(); @@ -38,9 +37,8 @@ export default ({ getService }: FtrProviderContext) => { .send(requestBody); ml.api.assertResponseStatusCode(200, putResponseStatus, putResponseBody); - expect(omit(putResponseBody, 'create_time')).to.eql({ + expect(omit(putResponseBody, ['create_time', 'model_type'])).to.eql({ model_id: 'dfa_regression_model_n_0', - model_type: 'tree_ensemble', created_by: 'api_user', version: '12.0.0', model_size_bytes: 304, diff --git a/x-pack/test/api_integration/apis/security/privileges.ts b/x-pack/test/api_integration/apis/security/privileges.ts index 4cbaeca03373c..b4528ad1b1475 100644 --- a/x-pack/test/api_integration/apis/security/privileges.ts +++ b/x-pack/test/api_integration/apis/security/privileges.ts @@ -78,6 +78,7 @@ export default function ({ getService }: FtrProviderContext) { 'minimal_read', 'update_anonymization', ], + securitySolutionAttackDiscovery: ['all', 'read', 'minimal_all', 'minimal_read'], securitySolutionCases: [ 'all', 'read', diff --git a/x-pack/test/api_integration/apis/security/privileges_basic.ts b/x-pack/test/api_integration/apis/security/privileges_basic.ts index 5fb3c715805f1..683fa48a69216 100644 --- a/x-pack/test/api_integration/apis/security/privileges_basic.ts +++ b/x-pack/test/api_integration/apis/security/privileges_basic.ts @@ -44,6 +44,7 @@ export default function ({ getService }: FtrProviderContext) { ml: ['all', 'read', 'minimal_all', 'minimal_read'], siem: ['all', 'read', 'minimal_all', 'minimal_read'], securitySolutionAssistant: ['all', 'read', 'minimal_all', 'minimal_read'], + securitySolutionAttackDiscovery: ['all', 'read', 'minimal_all', 'minimal_read'], securitySolutionCases: ['all', 'read', 'minimal_all', 'minimal_read'], fleetv2: ['all', 'read', 'minimal_all', 'minimal_read'], fleet: ['all', 'read', 'minimal_all', 'minimal_read'], @@ -161,6 +162,7 @@ export default function ({ getService }: FtrProviderContext) { 'minimal_read', 'update_anonymization', ], + securitySolutionAttackDiscovery: ['all', 'read', 'minimal_all', 'minimal_read'], securitySolutionCases: [ 'all', 'read', diff --git a/x-pack/test/api_integration/apis/synthetics/get_monitor.ts b/x-pack/test/api_integration/apis/synthetics/get_monitor.ts index 41c299b4ed3ca..fc75de4107440 100644 --- a/x-pack/test/api_integration/apis/synthetics/get_monitor.ts +++ b/x-pack/test/api_integration/apis/synthetics/get_monitor.ts @@ -25,6 +25,7 @@ export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); const kibanaServer = getService('kibanaServer'); + const retry = getService('retry'); let _monitors: MonitorFields[]; let monitors: MonitorFields[]; @@ -101,18 +102,20 @@ export default function ({ getService }: FtrProviderContext) { .map(saveMonitor) ); - const firstPageResp = await supertest - .get(`${SYNTHETICS_API_URLS.SYNTHETICS_MONITORS}?page=1&perPage=2`) - .expect(200); - const secondPageResp = await supertest - .get(`${SYNTHETICS_API_URLS.SYNTHETICS_MONITORS}?page=2&perPage=3`) - .expect(200); + await retry.try(async () => { + const firstPageResp = await supertest + .get(`${SYNTHETICS_API_URLS.SYNTHETICS_MONITORS}?page=1&perPage=2`) + .expect(200); + const secondPageResp = await supertest + .get(`${SYNTHETICS_API_URLS.SYNTHETICS_MONITORS}?page=2&perPage=3`) + .expect(200); - expect(firstPageResp.body.total).greaterThan(6); - expect(firstPageResp.body.monitors.length).eql(2); - expect(secondPageResp.body.monitors.length).eql(3); + expect(firstPageResp.body.total).greaterThan(6); + expect(firstPageResp.body.monitors.length).eql(2); + expect(secondPageResp.body.monitors.length).eql(3); - expect(firstPageResp.body.monitors[0].id).not.eql(secondPageResp.body.monitors[0].id); + expect(firstPageResp.body.monitors[0].id).not.eql(secondPageResp.body.monitors[0].id); + }); }); it('with single monitorQueryId filter', async () => { diff --git a/x-pack/test/api_integration/apis/synthetics/suggestions.ts b/x-pack/test/api_integration/apis/synthetics/suggestions.ts index bbdac399714de..dab822f832c08 100644 --- a/x-pack/test/api_integration/apis/synthetics/suggestions.ts +++ b/x-pack/test/api_integration/apis/synthetics/suggestions.ts @@ -161,6 +161,18 @@ export default function ({ getService }: FtrProviderContext) { value: project, }, ], + monitorTypes: [ + { + count: 20, + label: 'http', + value: 'http', + }, + { + count: 2, + label: 'icmp', + value: 'icmp', + }, + ], tags: expect.arrayContaining([ { count: 21, @@ -237,6 +249,18 @@ export default function ({ getService }: FtrProviderContext) { value: project, }, ], + monitorTypes: [ + // { + // count: 20, + // label: 'http', + // value: 'http', + // }, + { + count: 2, + label: 'icmp', + value: 'icmp', + }, + ], tags: expect.arrayContaining([ { count: 1, diff --git a/x-pack/test/api_integration/deployment_agnostic/README.md b/x-pack/test/api_integration/deployment_agnostic/README.md index 93165007d9b61..da0a9d3f3e18b 100644 --- a/x-pack/test/api_integration/deployment_agnostic/README.md +++ b/x-pack/test/api_integration/deployment_agnostic/README.md @@ -94,26 +94,23 @@ Add test files to `x-pack/test//deployment_agnost test example ```ts export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { - const samlAuth = getService('samlAuth'); - const supertestWithoutAuth = getService('supertestWithoutAuth'); - let roleAuthc: RoleCredentials; - let internalHeaders: InternalRequestHeader; + const roleScopedSupertest = getService('roleScopedSupertest'); + let supertestWithAdminScope: SupertestWithRoleScopeType; describe('compression', () => { before(async () => { - roleAuthc = await samlAuth.createM2mApiKeyWithRoleScope('admin'); - internalHeaders = samlAuth.getInternalRequestHeader(); + supertestWithAdminScope = await roleScopedSupertest.getSupertestWithRoleScope('admin', { + withInternalHeaders: true, + withCustomHeaders: { 'accept-encoding': 'gzip' }, + }); }); after(async () => { - await samlAuth.invalidateM2mApiKeyWithRoleScope(roleAuthc); + // always invalidate API key for the scoped role in the end + await supertestWithAdminScope.destroy(); }); describe('against an application page', () => { it(`uses compression when there isn't a referer`, async () => { - const response = await supertestWithoutAuth - .get('/app/kibana') - .set('accept-encoding', 'gzip') - .set(internalHeaders) - .set(roleAuthc.apiKeyHeader); + const response = await supertestWithAdminScope.get('/app/kibana'); expect(response.header).to.have.property('content-encoding', 'gzip'); }); }); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/console/spec_definitions.ts b/x-pack/test/api_integration/deployment_agnostic/apis/console/spec_definitions.ts index a2c8115e4ea0d..9b4a2f92b7036 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/console/spec_definitions.ts +++ b/x-pack/test/api_integration/deployment_agnostic/apis/console/spec_definitions.ts @@ -6,30 +6,25 @@ */ import expect from '@kbn/expect'; -import { RoleCredentials, InternalRequestHeader } from '@kbn/ftr-common-functional-services'; import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { - const samlAuth = getService('samlAuth'); - const supertestWithoutAuth = getService('supertestWithoutAuth'); - let roleAuthc: RoleCredentials; - let internalHeaders: InternalRequestHeader; + const roleScopedSupertest = getService('roleScopedSupertest'); + let supertestWithAdminScope: SupertestWithRoleScopeType; describe('GET /api/console/api_server', () => { before(async () => { - roleAuthc = await samlAuth.createM2mApiKeyWithRoleScope('admin'); - internalHeaders = samlAuth.getInternalRequestHeader(); + supertestWithAdminScope = await roleScopedSupertest.getSupertestWithRoleScope('admin', { + withInternalHeaders: true, + withCustomHeaders: { 'kbn-xsrf': 'true' }, + }); }); after(async () => { - await samlAuth.invalidateM2mApiKeyWithRoleScope(roleAuthc); + await supertestWithAdminScope.destroy(); }); it('returns autocomplete definitions', async () => { - const { body } = await supertestWithoutAuth - .get('/api/console/api_server') - .set(roleAuthc.apiKeyHeader) - .set(internalHeaders) - .set('kbn-xsrf', 'true') - .expect(200); + const { body } = await supertestWithAdminScope.get('/api/console/api_server').expect(200); expect(body.es).to.be.ok(); const { es: { name, globals, endpoints }, diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/core/compression.ts b/x-pack/test/api_integration/deployment_agnostic/apis/core/compression.ts index d1aa1cfb45153..3873274a5c3b8 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/core/compression.ts +++ b/x-pack/test/api_integration/deployment_agnostic/apis/core/compression.ts @@ -6,40 +6,32 @@ */ import expect from '@kbn/expect'; -import { RoleCredentials, InternalRequestHeader } from '@kbn/ftr-common-functional-services'; import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { - const samlAuth = getService('samlAuth'); - const supertestWithoutAuth = getService('supertestWithoutAuth'); - let roleAuthc: RoleCredentials; - let internalHeaders: InternalRequestHeader; + const roleScopedSupertest = getService('roleScopedSupertest'); + let supertestWithAdminScope: SupertestWithRoleScopeType; describe('compression', () => { before(async () => { - roleAuthc = await samlAuth.createM2mApiKeyWithRoleScope('admin'); - internalHeaders = samlAuth.getInternalRequestHeader(); + supertestWithAdminScope = await roleScopedSupertest.getSupertestWithRoleScope('admin', { + withCustomHeaders: { 'accept-encoding': 'gzip' }, + }); }); after(async () => { - await samlAuth.invalidateM2mApiKeyWithRoleScope(roleAuthc); + await supertestWithAdminScope.destroy(); }); describe('against an application page', () => { it(`uses compression when there isn't a referer`, async () => { - const response = await supertestWithoutAuth - .get('/app/kibana') - .set('accept-encoding', 'gzip') - .set(internalHeaders) - .set(roleAuthc.apiKeyHeader); + const response = await supertestWithAdminScope.get('/app/kibana'); expect(response.header).to.have.property('content-encoding', 'gzip'); }); it(`uses compression when there is a whitelisted referer`, async () => { - const response = await supertestWithoutAuth + const response = await supertestWithAdminScope .get('/app/kibana') - .set('accept-encoding', 'gzip') - .set(internalHeaders) - .set('referer', 'https://some-host.com') - .set(roleAuthc.apiKeyHeader); + .set('referer', 'https://some-host.com'); expect(response.header).to.have.property('content-encoding', 'gzip'); }); }); diff --git a/x-pack/test/api_integration/deployment_agnostic/apis/painless_lab/painless_lab.ts b/x-pack/test/api_integration/deployment_agnostic/apis/painless_lab/painless_lab.ts index 7e7047ac9cb57..0bbf125270ec0 100644 --- a/x-pack/test/api_integration/deployment_agnostic/apis/painless_lab/painless_lab.ts +++ b/x-pack/test/api_integration/deployment_agnostic/apis/painless_lab/painless_lab.ts @@ -6,35 +6,32 @@ */ import expect from '@kbn/expect'; -import { RoleCredentials, InternalRequestHeader } from '@kbn/ftr-common-functional-services'; import { DeploymentAgnosticFtrProviderContext } from '../../ftr_provider_context'; +import { SupertestWithRoleScopeType } from '../../services'; const API_BASE_PATH = '/api/painless_lab'; export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { - const samlAuth = getService('samlAuth'); - const supertestWithoutAuth = getService('supertestWithoutAuth'); - let roleAuthc: RoleCredentials; - let internalHeaders: InternalRequestHeader; + const roleScopedSupertest = getService('roleScopedSupertest'); + let supertestWithAdminScope: SupertestWithRoleScopeType; describe('Painless Lab Routes', function () { before(async () => { - roleAuthc = await samlAuth.createM2mApiKeyWithRoleScope('admin'); - internalHeaders = samlAuth.getInternalRequestHeader(); + supertestWithAdminScope = await roleScopedSupertest.getSupertestWithRoleScope('admin', { + withInternalHeaders: true, + withCustomHeaders: { 'Content-Type': 'application/json;charset=UTF-8' }, + }); }); after(async () => { - await samlAuth.invalidateM2mApiKeyWithRoleScope(roleAuthc); + await supertestWithAdminScope.destroy(); }); describe('Execute', () => { it('should execute a valid painless script', async () => { const script = '"{\\n \\"script\\": {\\n \\"source\\": \\"return true;\\",\\n \\"params\\": {\\n \\"string_parameter\\": \\"string value\\",\\n \\"number_parameter\\": 1.5,\\n \\"boolean_parameter\\": true\\n}\\n }\\n}"'; - const { body } = await supertestWithoutAuth + const { body } = await supertestWithAdminScope .post(`${API_BASE_PATH}/execute`) - .set(internalHeaders) - .set(roleAuthc.apiKeyHeader) - .set('Content-Type', 'application/json;charset=UTF-8') .send(script) .expect(200); @@ -47,11 +44,8 @@ export default function ({ getService }: DeploymentAgnosticFtrProviderContext) { const invalidScript = '"{\\n \\"script\\": {\\n \\"source\\": \\"foobar\\",\\n \\"params\\": {\\n \\"string_parameter\\": \\"string value\\",\\n \\"number_parameter\\": 1.5,\\n \\"boolean_parameter\\": true\\n}\\n }\\n}"'; - const { body } = await supertestWithoutAuth + const { body } = await supertestWithAdminScope .post(`${API_BASE_PATH}/execute`) - .set(internalHeaders) - .set('Content-Type', 'application/json;charset=UTF-8') - .set(roleAuthc.apiKeyHeader) .send(invalidScript) .expect(200); diff --git a/x-pack/test/api_integration/deployment_agnostic/default_configs/stateful.config.base.ts b/x-pack/test/api_integration/deployment_agnostic/default_configs/stateful.config.base.ts index 458f78a3dd86f..2fd2d61e1cf81 100644 --- a/x-pack/test/api_integration/deployment_agnostic/default_configs/stateful.config.base.ts +++ b/x-pack/test/api_integration/deployment_agnostic/default_configs/stateful.config.base.ts @@ -18,6 +18,10 @@ import { systemIndicesSuperuser, FtrConfigProviderContext, } from '@kbn/test'; +import path from 'path'; +// @ts-expect-error we have to check types with "allowJs: false" for now, causing this import to fail +import { REPO_ROOT } from '@kbn/repo-info'; +import { STATEFUL_ROLES_ROOT_PATH } from '@kbn/es'; import { DeploymentAgnosticCommonServices, services } from '../services'; interface CreateTestConfigOptions { @@ -85,6 +89,10 @@ export function createStatefulTestConfig; +} + +export class SupertestWithRoleScope { + private roleAuthc: RoleCredentials | null; + private readonly supertestWithoutAuth: SupertestWithoutAuthProviderType; + private samlAuth: SamlAuthProviderType; + private readonly options: RequestHeadersOptions; + + constructor( + roleAuthc: RoleCredentials, + supertestWithoutAuth: SupertestWithoutAuthProviderType, + samlAuth: SamlAuthProviderType, + options: RequestHeadersOptions + ) { + this.roleAuthc = roleAuthc; + this.supertestWithoutAuth = supertestWithoutAuth; + this.samlAuth = samlAuth; + this.options = options; + } + + async destroy() { + if (this.roleAuthc) { + await this.samlAuth.invalidateM2mApiKeyWithRoleScope(this.roleAuthc); + this.roleAuthc = null; + } + } + + private addHeaders(agent: Test): Test { + const { withInternalHeaders, withCommonHeaders, withCustomHeaders } = this.options; + + if (!this.roleAuthc) { + throw new Error('The instance has already been destroyed.'); + } + // set role-based API key by default + agent.set(this.roleAuthc.apiKeyHeader); + + if (withInternalHeaders) { + agent.set(this.samlAuth.getInternalRequestHeader()); + } + + if (withCommonHeaders) { + agent.set(this.samlAuth.getCommonRequestHeader()); + } + + if (withCustomHeaders) { + agent.set(withCustomHeaders); + } + + return agent; + } + + private request(method: 'post' | 'get' | 'put' | 'delete', url: string): Test { + if (!this.roleAuthc) { + throw new Error('Instance has been destroyed and cannot be used for making requests.'); + } + const agent = this.supertestWithoutAuth[method](url); + return this.addHeaders(agent); + } + + post(url: string) { + return this.request('post', url); + } + + get(url: string) { + return this.request('get', url); + } + + put(url: string) { + return this.request('put', url); + } + + delete(url: string) { + return this.request('delete', url); + } +} + +/** + * Provides a customized 'supertest' instance that is authenticated using a role-based API key + * and enriched with the appropriate request headers. This service allows you to perform + * HTTP requests with specific authentication and header configurations, ensuring that + * the requests are scoped to the provided role and environment. + * + * Use this service to easily test API endpoints with role-specific authorization and + * custom headers, both in serverless and stateful environments. + */ +export function RoleScopedSupertestProvider({ getService }: DeploymentAgnosticFtrProviderContext) { + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const samlAuth = getService('samlAuth'); + + return { + async getSupertestWithRoleScope( + role: string, + options: RequestHeadersOptions = { + withCommonHeaders: false, + withInternalHeaders: false, + } + ) { + const roleAuthc = await samlAuth.createM2mApiKeyWithRoleScope(role); + return new SupertestWithRoleScope(roleAuthc, supertestWithoutAuth, samlAuth, options); + }, + }; +} diff --git a/x-pack/test/cloud_security_posture_functional/agentless/create_agent.ts b/x-pack/test/cloud_security_posture_functional/agentless/create_agent.ts index aa1a079262cba..1b1497140875e 100644 --- a/x-pack/test/cloud_security_posture_functional/agentless/create_agent.ts +++ b/x-pack/test/cloud_security_posture_functional/agentless/create_agent.ts @@ -27,15 +27,17 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { describe('Agentless cloud', function () { let cisIntegration: typeof pageObjects.cisAddIntegration; + let cisIntegrationAws: typeof pageObjects.cisAddIntegration.cisAws; let mockApiServer: http.Server; before(async () => { cisIntegration = pageObjects.cisAddIntegration; + cisIntegrationAws = pageObjects.cisAddIntegration.cisAws; mockApiServer = await mockAgentlessApiService.listen(8089); // Start the usage api mock server on port 8081 }); after(async () => { - await await pageObjects.cspSecurity.logout(); + await pageObjects.cspSecurity.logout(); mockApiServer.close(); }); @@ -58,6 +60,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await cisIntegration.clickSaveButton(); await pageObjects.header.waitUntilLoadingHasFinished(); + expect(await cisIntegrationAws.showPostInstallCloudFormationModal()).to.be(false); + await cisIntegration.navigateToIntegrationCspList(); await pageObjects.header.waitUntilLoadingHasFinished(); @@ -84,6 +88,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await cisIntegration.clickSaveButton(); await pageObjects.header.waitUntilLoadingHasFinished(); + expect(await cisIntegrationAws.showPostInstallCloudFormationModal()).to.be(true); + const agentPolicyName = await cisIntegration.getAgentBasedPolicyValue(); await cisIntegration.navigateToIntegrationCspList(); diff --git a/x-pack/test/cloud_security_posture_functional/config.agentless.ts b/x-pack/test/cloud_security_posture_functional/config.agentless.ts index 459c814b6e08c..341ef6a9905b7 100644 --- a/x-pack/test/cloud_security_posture_functional/config.agentless.ts +++ b/x-pack/test/cloud_security_posture_functional/config.agentless.ts @@ -24,8 +24,8 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) { ...xpackFunctionalConfig.get('kbnTestServer.serverArgs'), `--xpack.fleet.agents.fleet_server.hosts=["https://ftr.kibana:8220"]`, `--xpack.fleet.internal.fleetServerStandalone=true`, - `--xpack.fleet.enableExperimental.0=agentless`, - `--xpack.fleet.agentless.api.url=http://localhost:8089/agentless-api/api/v1/ess`, + `--xpack.fleet.agentless.enabled=true`, + `--xpack.fleet.agentless.api.url=http://localhost:8089/agentless-api`, `--xpack.fleet.agentless.api.tls.certificate=${KBN_CERT_PATH}`, `--xpack.fleet.agentless.api.tls.key=${KBN_KEY_PATH}`, `--xpack.fleet.agentless.api.tls.ca=${CA_CERT_PATH}`, diff --git a/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts b/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts index 37b93d0864c2c..5337e23d985ae 100644 --- a/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts +++ b/x-pack/test/cloud_security_posture_functional/page_objects/add_cis_integration_form_page.ts @@ -54,6 +54,9 @@ export function AddCisIntegrationFormPageProvider({ getPostInstallCloudFormationModal: async () => { return await testSubjects.find('postInstallCloudFormationModal'); }, + showPostInstallCloudFormationModal: async () => { + return await testSubjects.exists('postInstallCloudFormationModal'); + }, showLaunchCloudFormationAgentlessButton: async () => { return await testSubjects.exists('launchCloudFormationAgentlessButton'); }, diff --git a/x-pack/test/dataset_quality_api_integration/tests/data_streams/data_stream_settings.spec.ts b/x-pack/test/dataset_quality_api_integration/tests/data_streams/data_stream_settings.spec.ts index e5b38d2463cb0..3ba9965d980a4 100644 --- a/x-pack/test/dataset_quality_api_integration/tests/data_streams/data_stream_settings.spec.ts +++ b/x-pack/test/dataset_quality_api_integration/tests/data_streams/data_stream_settings.spec.ts @@ -35,6 +35,10 @@ export default function ApiTest({ getService }: FtrProviderContext) { version: '1.14.0', }; + const defaultDataStreamPrivileges = { + datasetUserPrivileges: { canRead: true, canMonitor: true, canViewIntegrations: true }, + }; + async function callApiAs(user: DatasetQualityApiClientKey, dataStream: string) { return await datasetQualityApiClient[user]({ endpoint: 'GET /internal/dataset_quality/data_streams/{dataStream}/settings', @@ -99,11 +103,11 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(err.res.body.message.indexOf(expectedMessage)).to.greaterThan(-1); }); - it('returns {} if matching data stream is not available', async () => { + it('returns only privileges if matching data stream is not available', async () => { const nonExistentDataSet = 'Non-existent'; const nonExistentDataStream = `${type}-${nonExistentDataSet}-${namespace}`; const resp = await callApiAs('datasetQualityLogsUser', nonExistentDataStream); - expect(resp.body).empty(); + expect(resp.body).eql(defaultDataStreamPrivileges); }); it('returns "createdOn" correctly', async () => { @@ -136,6 +140,9 @@ export default function ApiTest({ getService }: FtrProviderContext) { ); expect(resp.body.createdOn).to.be(Number(dataStreamSettings?.index?.creation_date)); expect(resp.body.integration).to.be('apache'); + expect(resp.body.datasetUserPrivileges).to.eql( + defaultDataStreamPrivileges.datasetUserPrivileges + ); }); after(async () => { diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/__snapshots__/agent_policy.snap b/x-pack/test/fleet_api_integration/apis/agent_policy/__snapshots__/agent_policy.snap index 9112ad20ad860..a4d255613133e 100644 --- a/x-pack/test/fleet_api_integration/apis/agent_policy/__snapshots__/agent_policy.snap +++ b/x-pack/test/fleet_api_integration/apis/agent_policy/__snapshots__/agent_policy.snap @@ -30,6 +30,7 @@ Object { "enabled": true, "name": "system-1", "namespace": "default", + "output_id": null, "package": Object { "name": "system", "requires_root": true, diff --git a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts b/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts index 261e210a979cd..be968e21feb97 100644 --- a/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts +++ b/x-pack/test/fleet_api_integration/apis/agent_policy/agent_policy.ts @@ -531,6 +531,7 @@ export default function (providerContext: FtrProviderContext) { updated_by: 'elastic', package_policies: [], is_protected: false, + space_ids: [], }); }); @@ -962,6 +963,7 @@ export default function (providerContext: FtrProviderContext) { inactivity_timeout: 1209600, package_policies: [], is_protected: false, + space_ids: [], }); }); @@ -1125,6 +1127,7 @@ export default function (providerContext: FtrProviderContext) { package_policies: [], monitoring_enabled: ['logs', 'metrics'], inactivity_timeout: 1209600, + space_ids: [], }); const listResponseAfterUpdate = await fetchPackageList(); @@ -1183,6 +1186,7 @@ export default function (providerContext: FtrProviderContext) { inactivity_timeout: 1209600, package_policies: [], is_protected: false, + space_ids: [], overrides: { agent: { logging: { @@ -1473,6 +1477,7 @@ export default function (providerContext: FtrProviderContext) { const { package_policies: packagePolicies, id, + space_ids: spaceIds, updated_at: updatedAt, version: policyVersion, ...rest diff --git a/x-pack/test/fleet_api_integration/apis/agents/delete.ts b/x-pack/test/fleet_api_integration/apis/agents/delete.ts index 43be03e3182a7..be07a16cee458 100644 --- a/x-pack/test/fleet_api_integration/apis/agents/delete.ts +++ b/x-pack/test/fleet_api_integration/apis/agents/delete.ts @@ -41,7 +41,7 @@ export default function ({ getService }: FtrProviderContext) { describe('fleet_delete_agent', () => { before(async () => { for (const roleName in users) { - if (users.hasOwnProperty(roleName)) { + if (Object.hasOwn(users, roleName)) { const user = users[roleName]; if (user.permissions) { diff --git a/x-pack/test/fleet_api_integration/apis/outputs/crud.ts b/x-pack/test/fleet_api_integration/apis/outputs/crud.ts index 76585c1f0099a..b830373e7dbbd 100644 --- a/x-pack/test/fleet_api_integration/apis/outputs/crud.ts +++ b/x-pack/test/fleet_api_integration/apis/outputs/crud.ts @@ -49,13 +49,13 @@ export default function (providerContext: FtrProviderContext) { const enableOutputSecrets = async () => { try { - await kibanaServer.savedObjects.update({ + await kibanaServer.savedObjects.create({ type: GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, id: 'fleet-default-settings', attributes: { output_secret_storage_requirements_met: true, }, - overwrite: false, + overwrite: true, }); } catch (e) { throw e; @@ -64,13 +64,13 @@ export default function (providerContext: FtrProviderContext) { const disableOutputSecrets = async () => { try { - await kibanaServer.savedObjects.update({ + await kibanaServer.savedObjects.create({ type: GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, id: 'fleet-default-settings', attributes: { output_secret_storage_requirements_met: false, }, - overwrite: false, + overwrite: true, }); } catch (e) { throw e; @@ -120,7 +120,10 @@ export default function (providerContext: FtrProviderContext) { } }; - const createAgentPolicy = async (spaceId?: string): Promise => { + const createAgentPolicy = async ( + spaceId?: string, + dataOutputId?: string + ): Promise => { const { body: testPolicyRes } = await supertest .post(spaceId ? `/s/${spaceId}/api/fleet/agent_policies` : `/api/fleet/agent_policies`) .set('kbn-xsrf', 'xxxx') @@ -128,6 +131,7 @@ export default function (providerContext: FtrProviderContext) { name: `test ${uuidV4()}`, description: '', namespace: 'default', + ...(dataOutputId ? { data_output_id: dataOutputId } : {}), }) .expect(200); @@ -148,6 +152,33 @@ export default function (providerContext: FtrProviderContext) { .expect(200); }; + const createPackagePolicy = async ( + agentPolicyIds: string[], + spaceId?: string, + outputId?: string + ): Promise => { + const { body: testPolicyRes } = await supertest + .post(spaceId ? `/s/${spaceId}/api/fleet/package_policies` : `/api/fleet/package_policies`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: `package ${uuidV4()}`, + description: '', + namespace: 'default', + policy_ids: agentPolicyIds, + enabled: true, + inputs: [], + package: { + name: 'filetest', + title: 'For File Tests', + version: '0.1.0', + }, + ...(outputId ? { output_id: outputId } : {}), + }) + .expect(200); + + return testPolicyRes; + }; + const getAgentPolicy = async ( policyId: string, spaceId?: string @@ -396,7 +427,7 @@ export default function (providerContext: FtrProviderContext) { }) .expect(400); expect(body.message).to.eql( - 'Logstash output cannot be used with Fleet Server integration in Fleet Server policy 1. Please create a new ElasticSearch output.' + 'Logstash output cannot be used with Fleet Server integration in Fleet Server policy 1. Please create a new Elasticsearch output.' ); }); @@ -417,7 +448,7 @@ export default function (providerContext: FtrProviderContext) { }) .expect(400); expect(body.message).to.eql( - 'Kafka output cannot be used with Fleet Server integration in Fleet Server policy 1. Please create a new ElasticSearch output.' + 'Kafka output cannot be used with Fleet Server integration in Fleet Server policy 1. Please create a new Elasticsearch output.' ); }); @@ -765,10 +796,28 @@ export default function (providerContext: FtrProviderContext) { }); it('should bump all policies in all spaces if updating the default output', async () => { - const [policy1, policy2, policy3] = await Promise.all([ - createAgentPolicy(), + const { body: nonDefaultOutput } = await supertest + .post(`/api/fleet/outputs`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'Nondefault Output', + type: 'elasticsearch', + hosts: ['https://test.fr'], + }) + .expect(200); + + const [policy1, policy2, policy3, policy4] = await Promise.all([ createAgentPolicy(), + createAgentPolicy(undefined, nonDefaultOutput.item.id), createAgentPolicy(TEST_SPACE_ID), + createAgentPolicy(TEST_SPACE_ID, nonDefaultOutput.item.id), + ]); + + // Create package policies with default output under agent policies not using default output + // to ensure that those agent policies still get bumped + await Promise.all([ + createPackagePolicy([policy2.item.id], undefined, defaultOutputId), + createPackagePolicy([policy4.item.id], TEST_SPACE_ID, defaultOutputId), ]); await supertest @@ -781,20 +830,79 @@ export default function (providerContext: FtrProviderContext) { }) .expect(200); - const [updatedPolicy1, updatedPolicy2, updatedPolicy3] = await Promise.all([ + const [updatedPolicy1, updatedPolicy2, updatedPolicy3, updatedPolicy4] = await Promise.all([ getAgentPolicy(policy1.item.id), getAgentPolicy(policy2.item.id), getAgentPolicy(policy3.item.id, TEST_SPACE_ID), + getAgentPolicy(policy4.item.id, TEST_SPACE_ID), ]); expect(updatedPolicy1.item.revision).to.eql(policy1.item.revision + 1); - expect(updatedPolicy2.item.revision).to.eql(policy2.item.revision + 1); + expect(updatedPolicy2.item.revision).to.eql(policy2.item.revision + 2); expect(updatedPolicy3.item.revision).to.eql(policy3.item.revision + 1); + expect(updatedPolicy4.item.revision).to.eql(policy4.item.revision + 2); + + // cleanup + await Promise.all([ + deleteAgentPolicy(policy1.item.id), + deleteAgentPolicy(policy2.item.id), + deleteAgentPolicy(policy3.item.id, TEST_SPACE_ID), + deleteAgentPolicy(policy4.item.id, TEST_SPACE_ID), + ]); + }); + + it('should bump all policies in all spaces if updating non-default output', async () => { + const { body: nonDefaultOutput } = await supertest + .post(`/api/fleet/outputs`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'Nondefault Output', + type: 'elasticsearch', + hosts: ['https://test.fr'], + }) + .expect(200); + + const [policy1, policy2, policy3, policy4] = await Promise.all([ + createAgentPolicy(), + createAgentPolicy(undefined, nonDefaultOutput.item.id), + createAgentPolicy(TEST_SPACE_ID), + createAgentPolicy(TEST_SPACE_ID, nonDefaultOutput.item.id), + ]); + + // Create package policies under agent policies using default output to ensure those + // agent policies still get bumped + await Promise.all([ + createPackagePolicy([policy1.item.id], undefined, nonDefaultOutput.item.id), + createPackagePolicy([policy3.item.id], TEST_SPACE_ID, nonDefaultOutput.item.id), + ]); + + await supertest + .put(`/api/fleet/outputs/${nonDefaultOutput.item.id}`) + .set('kbn-xsrf', 'xxxx') + .send({ + name: 'Updated Nondefault Output', + type: 'elasticsearch', + hosts: ['http://test.fr:443'], + }) + .expect(200); + + const [updatedPolicy1, updatedPolicy2, updatedPolicy3, updatedPolicy4] = await Promise.all([ + getAgentPolicy(policy1.item.id), + getAgentPolicy(policy2.item.id), + getAgentPolicy(policy3.item.id, TEST_SPACE_ID), + getAgentPolicy(policy4.item.id, TEST_SPACE_ID), + ]); + + expect(updatedPolicy1.item.revision).to.eql(policy1.item.revision + 2); + expect(updatedPolicy2.item.revision).to.eql(policy2.item.revision + 1); + expect(updatedPolicy3.item.revision).to.eql(policy3.item.revision + 2); + expect(updatedPolicy4.item.revision).to.eql(policy4.item.revision + 1); // cleanup await Promise.all([ deleteAgentPolicy(policy1.item.id), deleteAgentPolicy(policy2.item.id), deleteAgentPolicy(policy3.item.id, TEST_SPACE_ID), + deleteAgentPolicy(policy4.item.id, TEST_SPACE_ID), ]); }); }); diff --git a/x-pack/test/fleet_api_integration/apis/policy_secrets.ts b/x-pack/test/fleet_api_integration/apis/policy_secrets.ts index d8e641b7af0a5..86e32ca567413 100644 --- a/x-pack/test/fleet_api_integration/apis/policy_secrets.ts +++ b/x-pack/test/fleet_api_integration/apis/policy_secrets.ts @@ -169,13 +169,13 @@ export default function (providerContext: FtrProviderContext) { // Reset the global settings object to disable secrets between tests. // Each test can re-run setup as part of its setup if it needs to enable secrets - await kibanaServer.savedObjects.update({ + await kibanaServer.savedObjects.create({ type: GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, id: 'fleet-default-settings', attributes: { secret_storage_requirements_met: false, }, - overwrite: false, + overwrite: true, }); }; diff --git a/x-pack/test/fleet_api_integration/apis/settings/enrollment.ts b/x-pack/test/fleet_api_integration/apis/settings/enrollment.ts index 9c1cf8ea59c51..046c5408dcbee 100644 --- a/x-pack/test/fleet_api_integration/apis/settings/enrollment.ts +++ b/x-pack/test/fleet_api_integration/apis/settings/enrollment.ts @@ -67,12 +67,14 @@ export default function (providerContext: FtrProviderContext) { is_default_fleet_server: true, is_managed: false, name: 'Fleet Server Policy', + space_ids: [], }, { id: 'fleet-server-policy-2', is_default_fleet_server: false, is_managed: false, name: 'Fleet Server Policy 2', + space_ids: [], }, ], has_active: true, @@ -117,6 +119,7 @@ export default function (providerContext: FtrProviderContext) { is_default_fleet_server: false, is_managed: false, name: 'Fleet Server Policy 2', + space_ids: [], }, ], has_active: true, diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/actions.ts b/x-pack/test/fleet_api_integration/apis/space_awareness/actions.ts index efd73ddb54b0f..4f458cd7190cc 100644 --- a/x-pack/test/fleet_api_integration/apis/space_awareness/actions.ts +++ b/x-pack/test/fleet_api_integration/apis/space_awareness/actions.ts @@ -56,6 +56,8 @@ export default function (providerContext: FtrProviderContext) { let testSpaceAgent2: string; before(async () => { + await apiClient.postEnableSpaceAwareness(); + const [_defaultSpacePolicy1, _spaceTest1Policy1, _spaceTest1Policy2] = await Promise.all([ apiClient.createAgentPolicy(), apiClient.createAgentPolicy(TEST_SPACE_1), diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/agent_policies.ts b/x-pack/test/fleet_api_integration/apis/space_awareness/agent_policies.ts index 7ab4e86448bde..e2f6f0eafb94a 100644 --- a/x-pack/test/fleet_api_integration/apis/space_awareness/agent_policies.ts +++ b/x-pack/test/fleet_api_integration/apis/space_awareness/agent_policies.ts @@ -10,7 +10,7 @@ import { CreateAgentPolicyResponse } from '@kbn/fleet-plugin/common'; import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; import { SpaceTestApiClient } from './api_helper'; -import { cleanFleetIndices } from './helpers'; +import { cleanFleetIndices, expectToRejectWithNotFound } from './helpers'; import { setupTestSpaces, TEST_SPACE_1 } from './space_helpers'; export default function (providerContext: FtrProviderContext) { @@ -44,6 +44,8 @@ export default function (providerContext: FtrProviderContext) { let spaceTest1Policy1: CreateAgentPolicyResponse; let spaceTest1Policy2: CreateAgentPolicyResponse; before(async () => { + await apiClient.postEnableSpaceAwareness(); + const [_defaultSpacePolicy1, _spaceTest1Policy1, _spaceTest1Policy2] = await Promise.all([ apiClient.createAgentPolicy(), apiClient.createAgentPolicy(TEST_SPACE_1), @@ -79,27 +81,13 @@ export default function (providerContext: FtrProviderContext) { await apiClient.getAgentPolicy(spaceTest1Policy1.item.id, TEST_SPACE_1); }); it('should not allow to get a policy from a different space from the default space', async () => { - let err: Error | undefined; - try { - await apiClient.getAgentPolicy(spaceTest1Policy1.item.id); - } catch (_err) { - err = _err; - } - - expect(err).to.be.an(Error); - expect(err?.message).to.match(/404 "Not Found"/); + await expectToRejectWithNotFound(() => apiClient.getAgentPolicy(spaceTest1Policy1.item.id)); }); it('should not allow to get an default space policy from a different space', async () => { - let err: Error | undefined; - try { - await apiClient.getAgentPolicy(defaultSpacePolicy1.item.id, TEST_SPACE_1); - } catch (_err) { - err = _err; - } - - expect(err).to.be.an(Error); - expect(err?.message).to.match(/404 "Not Found"/); + await expectToRejectWithNotFound(() => + apiClient.getAgentPolicy(defaultSpacePolicy1.item.id, TEST_SPACE_1) + ); }); }); }); diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/agents.ts b/x-pack/test/fleet_api_integration/apis/space_awareness/agents.ts index 047d32a854511..b4f7241dec0fb 100644 --- a/x-pack/test/fleet_api_integration/apis/space_awareness/agents.ts +++ b/x-pack/test/fleet_api_integration/apis/space_awareness/agents.ts @@ -50,6 +50,8 @@ export default function (providerContext: FtrProviderContext) { let testSpaceAgent2: string; before(async () => { + await apiClient.postEnableSpaceAwareness(); + const [_defaultSpacePolicy1, _spaceTest1Policy1, _spaceTest1Policy2] = await Promise.all([ apiClient.createAgentPolicy(), apiClient.createAgentPolicy(TEST_SPACE_1), diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/api_helper.ts b/x-pack/test/fleet_api_integration/apis/space_awareness/api_helper.ts index 11fd693d9340b..58f372ac0d7ee 100644 --- a/x-pack/test/fleet_api_integration/apis/space_awareness/api_helper.ts +++ b/x-pack/test/fleet_api_integration/apis/space_awareness/api_helper.ts @@ -15,6 +15,8 @@ import { GetAgentsResponse, GetOneAgentPolicyResponse, GetOneAgentResponse, + GetOnePackagePolicyResponse, + GetPackagePoliciesResponse, } from '@kbn/fleet-plugin/common'; import { GetEnrollmentAPIKeysResponse, @@ -27,27 +29,35 @@ import { PutSpaceSettingsRequest, GetActionStatusResponse, PostNewAgentActionResponse, + UpdateAgentPolicyResponse, + UpdateAgentPolicyRequest, } from '@kbn/fleet-plugin/common/types'; import { GetUninstallTokenResponse, GetUninstallTokensMetadataResponse, } from '@kbn/fleet-plugin/common/types/rest_spec/uninstall_token'; import { SimplifiedPackagePolicy } from '@kbn/fleet-plugin/common/services/simplified_package_policy_helper'; +import { testUsers } from '../test_users'; export class SpaceTestApiClient { - constructor(private readonly supertest: Agent) {} + constructor( + private readonly supertest: Agent, + private readonly auth = testUsers.fleet_all_int_all + ) {} private getBaseUrl(spaceId?: string) { return spaceId ? `/s/${spaceId}` : ''; } async setup(spaceId?: string): Promise { const { body: res } = await this.supertest .post(`${this.getBaseUrl(spaceId)}/api/fleet/setup`) + .auth(this.auth.username, this.auth.password) .set('kbn-xsrf', 'xxxx') .send({}) .expect(200); return res; } + // Agent policies async createAgentPolicy( spaceId?: string, @@ -55,6 +65,7 @@ export class SpaceTestApiClient { ): Promise { const { body: res } = await this.supertest .post(`${this.getBaseUrl(spaceId)}/api/fleet/agent_policies`) + .auth(this.auth.username, this.auth.password) .set('kbn-xsrf', 'xxxx') .send({ name: `test ${uuidV4()}`, @@ -79,6 +90,26 @@ export class SpaceTestApiClient { return res; } + + async getPackagePolicy( + packagePolicyId: string, + spaceId?: string + ): Promise { + const { body: res } = await this.supertest + .get(`${this.getBaseUrl(spaceId)}/api/fleet/package_policies/${packagePolicyId}`) + .expect(200); + + return res; + } + + async getPackagePolicies(spaceId?: string): Promise { + const { body: res } = await this.supertest + .get(`${this.getBaseUrl(spaceId)}/api/fleet/package_policies`) + .expect(200); + + return res; + } + async createFleetServerPolicy(spaceId?: string): Promise { const { body: res } = await this.supertest .post(`${this.getBaseUrl(spaceId)}/api/fleet/agent_policies`) @@ -111,6 +142,29 @@ export class SpaceTestApiClient { return res; } + async putAgentPolicy( + policyId: string, + data: Partial, + spaceId?: string + ): Promise { + const { body: res, statusCode } = await this.supertest + .put(`${this.getBaseUrl(spaceId)}/api/fleet/agent_policies/${policyId}`) + .auth(this.auth.username, this.auth.password) + .send({ + ...data, + }) + .set('kbn-xsrf', 'xxxx'); + + if (statusCode === 200) { + return res; + } + + if (statusCode === 404) { + throw new Error('404 "Not Found"'); + } else { + throw new Error(`${statusCode} ${res?.error} ${res.message}`); + } + } async getAgentPolicies(spaceId?: string): Promise { const { body: res } = await this.supertest .get(`${this.getBaseUrl(spaceId)}/api/fleet/agent_policies`) @@ -322,4 +376,13 @@ export class SpaceTestApiClient { return res; } + // Enable space awareness + async postEnableSpaceAwareness(spaceId?: string): Promise { + const { body: res } = await this.supertest + .post(`${this.getBaseUrl(spaceId)}/internal/fleet/enable_space_awareness`) + .set('kbn-xsrf', 'xxxx') + .set('elastic-api-version', '1'); + + return res; + } } diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/change_space_agent_policies.ts b/x-pack/test/fleet_api_integration/apis/space_awareness/change_space_agent_policies.ts new file mode 100644 index 0000000000000..e3a0936dc4a5d --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/space_awareness/change_space_agent_policies.ts @@ -0,0 +1,197 @@ +/* + * 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 { CreateAgentPolicyResponse, GetOnePackagePolicyResponse } from '@kbn/fleet-plugin/common'; +import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; +import { skipIfNoDockerRegistry } from '../../helpers'; +import { SpaceTestApiClient } from './api_helper'; +import { + cleanFleetIndices, + createFleetAgent, + expectToRejectWithError, + expectToRejectWithNotFound, +} from './helpers'; +import { setupTestSpaces, TEST_SPACE_1 } from './space_helpers'; +import { testUsers, setupTestUsers } from '../test_users'; + +export default function (providerContext: FtrProviderContext) { + const { getService } = providerContext; + const supertest = getService('supertest'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const esClient = getService('es'); + const kibanaServer = getService('kibanaServer'); + + describe('change space agent policies', async function () { + skipIfNoDockerRegistry(providerContext); + const apiClient = new SpaceTestApiClient(supertest); + + before(async () => { + await setupTestUsers(getService('security'), true); + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.savedObjects.cleanStandardList({ + space: TEST_SPACE_1, + }); + await cleanFleetIndices(esClient); + }); + + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.savedObjects.cleanStandardList({ + space: TEST_SPACE_1, + }); + await cleanFleetIndices(esClient); + }); + + setupTestSpaces(providerContext); + let defaultSpacePolicy1: CreateAgentPolicyResponse; + let defaultPackagePolicy1: GetOnePackagePolicyResponse; + before(async () => { + await apiClient.postEnableSpaceAwareness(); + const _policyRes = await apiClient.createAgentPolicy(); + defaultSpacePolicy1 = _policyRes; + await apiClient.installPackage({ + pkgName: 'nginx', + pkgVersion: '1.20.0', + force: true, // To avoid package verification + }); + await createFleetAgent(esClient, defaultSpacePolicy1.item.id); + const packagePolicyRes = await apiClient.createPackagePolicy(undefined, { + policy_ids: [defaultSpacePolicy1.item.id], + name: `test-nginx-${Date.now()}`, + description: 'test', + package: { + name: 'nginx', + version: '1.20.0', + }, + inputs: {}, + }); + defaultPackagePolicy1 = packagePolicyRes; + }); + + describe('PUT /agent_policies/{id}', () => { + beforeEach(async () => { + // Reset policy in default space + await apiClient + .putAgentPolicy( + defaultSpacePolicy1.item.id, + { + name: 'tata', + namespace: 'default', + description: 'tata', + space_ids: ['default'], + }, + TEST_SPACE_1 + ) + .catch(() => {}); + await apiClient + .putAgentPolicy(defaultSpacePolicy1.item.id, { + name: 'tata', + namespace: 'default', + description: 'tata', + space_ids: ['default'], + }) + .catch(() => {}); + }); + async function assertPolicyAvailableInSpace(spaceId?: string) { + await apiClient.getAgentPolicy(defaultSpacePolicy1.item.id, spaceId); + await apiClient.getPackagePolicy(defaultPackagePolicy1.item.id, spaceId); + const enrollmentApiKeys = await apiClient.getEnrollmentApiKeys(spaceId); + expect( + enrollmentApiKeys.items.find((item) => item.policy_id === defaultSpacePolicy1.item.id) + ).not.to.be(undefined); + + const agents = await apiClient.getAgents(spaceId); + expect(agents.total).to.be(1); + } + + async function assertPolicyNotAvailableInSpace(spaceId?: string) { + await expectToRejectWithNotFound(() => + apiClient.getPackagePolicy(defaultPackagePolicy1.item.id, spaceId) + ); + await expectToRejectWithNotFound(() => + apiClient.getAgentPolicy(defaultSpacePolicy1.item.id, spaceId) + ); + + const enrollmentApiKeys = await apiClient.getEnrollmentApiKeys(spaceId); + expect( + enrollmentApiKeys.items.find((item) => item.policy_id === defaultSpacePolicy1.item.id) + ).to.be(undefined); + + const agents = await apiClient.getAgents(spaceId); + expect(agents.total).to.be(0); + } + + it('should allow set policy in multiple space', async () => { + await apiClient.putAgentPolicy(defaultSpacePolicy1.item.id, { + name: 'tata', + namespace: 'default', + description: 'tata', + space_ids: ['default', TEST_SPACE_1], + }); + + await assertPolicyAvailableInSpace(); + await assertPolicyAvailableInSpace(TEST_SPACE_1); + }); + + it('should allow set policy in test space only', async () => { + await apiClient.putAgentPolicy(defaultSpacePolicy1.item.id, { + name: 'tata', + namespace: 'default', + description: 'tata', + space_ids: [TEST_SPACE_1], + }); + + await assertPolicyNotAvailableInSpace(); + await assertPolicyAvailableInSpace(TEST_SPACE_1); + }); + + it('should not allow add policy to a space where user do not have access', async () => { + const testApiClient = new SpaceTestApiClient( + supertestWithoutAuth, + testUsers.fleet_all_int_all_default_space_only + ); + + await expectToRejectWithError( + () => + testApiClient.putAgentPolicy(defaultSpacePolicy1.item.id, { + name: 'tata', + namespace: 'default', + description: 'tata', + space_ids: ['default', TEST_SPACE_1], + }), + /400 Bad Request No enough permissions to create policies in space test1/ + ); + }); + + it('should not allow to remove policy from a space where user do not have access', async () => { + await apiClient.putAgentPolicy(defaultSpacePolicy1.item.id, { + name: 'tata', + namespace: 'default', + description: 'tata', + space_ids: ['default', TEST_SPACE_1], + }); + + const testApiClient = new SpaceTestApiClient( + supertestWithoutAuth, + testUsers.fleet_all_int_all_default_space_only + ); + + await expectToRejectWithError( + () => + testApiClient.putAgentPolicy(defaultSpacePolicy1.item.id, { + name: 'tata', + namespace: 'default', + description: 'tata', + space_ids: ['default'], + }), + /400 Bad Request No enough permissions to remove policies from space test1/ + ); + }); + }); + }); +} diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/enrollment_api_keys.ts b/x-pack/test/fleet_api_integration/apis/space_awareness/enrollment_api_keys.ts index 13238acb3917c..c14e7336fedda 100644 --- a/x-pack/test/fleet_api_integration/apis/space_awareness/enrollment_api_keys.ts +++ b/x-pack/test/fleet_api_integration/apis/space_awareness/enrollment_api_keys.ts @@ -49,6 +49,8 @@ export default function (providerContext: FtrProviderContext) { let spaceTest1EnrollmentKey1: EnrollmentAPIKey; // Create agent policies it should create a enrollment key for every keys before(async () => { + await apiClient.postEnableSpaceAwareness(); + const [_defaultSpacePolicy1, _spaceTest1Policy1, _spaceTest1Policy2] = await Promise.all([ apiClient.createAgentPolicy(), apiClient.createAgentPolicy(TEST_SPACE_1), diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/enrollment_settings.ts b/x-pack/test/fleet_api_integration/apis/space_awareness/enrollment_settings.ts index af648ec765971..b05e090efccf1 100644 --- a/x-pack/test/fleet_api_integration/apis/space_awareness/enrollment_settings.ts +++ b/x-pack/test/fleet_api_integration/apis/space_awareness/enrollment_settings.ts @@ -42,6 +42,7 @@ export default function (providerContext: FtrProviderContext) { setupTestSpaces(providerContext); before(async () => { + await apiClient.postEnableSpaceAwareness(); await apiClient.setup(); }); @@ -78,6 +79,7 @@ export default function (providerContext: FtrProviderContext) { setupTestSpaces(providerContext); before(async () => { + await apiClient.postEnableSpaceAwareness(); await apiClient.setup(); const testSpaceFleetServerPolicy = await apiClient.createFleetServerPolicy(TEST_SPACE_1); await createFleetAgent(esClient, testSpaceFleetServerPolicy.item.id, TEST_SPACE_1); @@ -116,6 +118,7 @@ export default function (providerContext: FtrProviderContext) { setupTestSpaces(providerContext); before(async () => { + await apiClient.postEnableSpaceAwareness(); await apiClient.setup(); const defaultFleetServerPolicy = await apiClient.createFleetServerPolicy(); await createFleetAgent(esClient, defaultFleetServerPolicy.item.id); diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/helpers.ts b/x-pack/test/fleet_api_integration/apis/space_awareness/helpers.ts index eacee0b41b6ac..c54291dc588a3 100644 --- a/x-pack/test/fleet_api_integration/apis/space_awareness/helpers.ts +++ b/x-pack/test/fleet_api_integration/apis/space_awareness/helpers.ts @@ -6,6 +6,7 @@ */ import { Client } from '@elastic/elasticsearch'; +import expect from '@kbn/expect'; import { AGENT_ACTIONS_INDEX, @@ -17,6 +18,21 @@ import { ENROLLMENT_API_KEYS_INDEX } from '@kbn/fleet-plugin/common/constants'; const ES_INDEX_OPTIONS = { headers: { 'X-elastic-product-origin': 'fleet' } }; +export async function expectToRejectWithNotFound(fn: any) { + await expectToRejectWithError(fn, /404 "Not Found"/); +} + +export async function expectToRejectWithError(fn: any, errRegexp: RegExp) { + let err: Error | undefined; + try { + await fn(); + } catch (_err) { + err = _err; + } + expect(err).to.be.an(Error); + expect(err?.message).to.match(errRegexp); +} + export async function cleanFleetIndices(esClient: Client) { await Promise.all([ esClient.deleteByQuery({ diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/index.js b/x-pack/test/fleet_api_integration/apis/space_awareness/index.js index c684504372736..3162492de2036 100644 --- a/x-pack/test/fleet_api_integration/apis/space_awareness/index.js +++ b/x-pack/test/fleet_api_integration/apis/space_awareness/index.js @@ -15,5 +15,7 @@ export default function loadTests({ loadTestFile }) { loadTestFile(require.resolve('./package_install')); loadTestFile(require.resolve('./space_settings')); loadTestFile(require.resolve('./actions')); + loadTestFile(require.resolve('./change_space_agent_policies')); + loadTestFile(require.resolve('./space_awareness_migration')); }); } diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/space_awareness_migration.ts b/x-pack/test/fleet_api_integration/apis/space_awareness/space_awareness_migration.ts new file mode 100644 index 0000000000000..6d780a600496f --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/space_awareness/space_awareness_migration.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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; +import { skipIfNoDockerRegistry } from '../../helpers'; +import { SpaceTestApiClient } from './api_helper'; +import { cleanFleetIndices } from './helpers'; +import { setupTestSpaces, TEST_SPACE_1 } from './space_helpers'; + +export default function (providerContext: FtrProviderContext) { + const { getService } = providerContext; + const supertest = getService('supertest'); + const esClient = getService('es'); + const kibanaServer = getService('kibanaServer'); + + describe('space awareness migration', async function () { + skipIfNoDockerRegistry(providerContext); + const apiClient = new SpaceTestApiClient(supertest); + + before(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.savedObjects.cleanStandardList({ + space: TEST_SPACE_1, + }); + await cleanFleetIndices(esClient); + }); + + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.savedObjects.cleanStandardList({ + space: TEST_SPACE_1, + }); + await cleanFleetIndices(esClient); + }); + + setupTestSpaces(providerContext); + + // Create agent policies it should create a enrollment key for every keys + before(async () => { + const [defaultSpacePolicy1, spaceTest1Policy1] = await Promise.all([ + apiClient.createAgentPolicy(), + apiClient.createAgentPolicy(TEST_SPACE_1), + apiClient.createAgentPolicy(TEST_SPACE_1), + ]); + + await apiClient.installPackage({ + pkgName: 'nginx', + pkgVersion: '1.20.0', + force: true, // To avoid package verification + }); + + await apiClient.createPackagePolicy(undefined, { + policy_ids: [defaultSpacePolicy1.item.id], + name: `test-nginx-1-${Date.now()}`, + description: 'test', + package: { + name: 'nginx', + version: '1.20.0', + }, + inputs: {}, + }); + + await apiClient.createPackagePolicy(TEST_SPACE_1, { + policy_ids: [spaceTest1Policy1.item.id], + name: `test-nginx-2-${Date.now()}`, + description: 'test', + package: { + name: 'nginx', + version: '1.20.0', + }, + inputs: {}, + }); + }); + + describe('without opt-in', () => { + it('agent policies should not be space aware', async () => { + const policiesDefaultSpaceIds = (await apiClient.getAgentPolicies()).items + .map(({ id }) => id) + .sort(); + + const policiesTestSpaceIds = (await apiClient.getAgentPolicies(TEST_SPACE_1)).items + .map(({ id }) => id) + .sort(); + + expect(policiesDefaultSpaceIds.length).to.eql(3); + expect(policiesDefaultSpaceIds).to.eql(policiesTestSpaceIds); + }); + + it('package policies should not be space aware', async () => { + const policiesDefaultSpaceIds = (await apiClient.getPackagePolicies()).items + .map(({ id }) => id) + .sort(); + + const policiesTestSpaceIds = (await apiClient.getPackagePolicies(TEST_SPACE_1)).items + .map(({ id }) => id) + .sort(); + + expect(policiesDefaultSpaceIds.length).to.eql(2); + expect(policiesDefaultSpaceIds).to.eql(policiesTestSpaceIds); + }); + }); + + describe('with space awareness opt-in', () => { + before(async () => { + await apiClient.postEnableSpaceAwareness(); + }); + + it('agent policies should be migrated to the default space', async () => { + const policiesDefaultSpaceIds = (await apiClient.getAgentPolicies()).items + .map(({ id }) => id) + .sort(); + + const policiesTestSpaceIds = (await apiClient.getAgentPolicies(TEST_SPACE_1)).items + .map(({ id }) => id) + .sort(); + + expect(policiesDefaultSpaceIds.length).to.eql(3); + expect(policiesTestSpaceIds.length).to.eql(0); + }); + + it('package policies should be migrated to the default space', async () => { + const policiesDefaultSpaceIds = (await apiClient.getPackagePolicies()).items + .map(({ id }) => id) + .sort(); + + const policiesTestSpaceIds = (await apiClient.getPackagePolicies(TEST_SPACE_1)).items + .map(({ id }) => id) + .sort(); + + expect(policiesDefaultSpaceIds.length).to.eql(2); + expect(policiesTestSpaceIds.length).to.eql(0); + }); + }); + }); +} diff --git a/x-pack/test/fleet_api_integration/apis/space_awareness/uninstall_tokens.ts b/x-pack/test/fleet_api_integration/apis/space_awareness/uninstall_tokens.ts index 12bbc8bec3b37..9938509b16b94 100644 --- a/x-pack/test/fleet_api_integration/apis/space_awareness/uninstall_tokens.ts +++ b/x-pack/test/fleet_api_integration/apis/space_awareness/uninstall_tokens.ts @@ -11,7 +11,7 @@ import { UninstallTokenMetadata } from '@kbn/fleet-plugin/common/types/models/un import { FtrProviderContext } from '../../../api_integration/ftr_provider_context'; import { skipIfNoDockerRegistry } from '../../helpers'; import { SpaceTestApiClient } from './api_helper'; -import { cleanFleetIndices } from './helpers'; +import { cleanFleetIndices, expectToRejectWithNotFound } from './helpers'; import { setupTestSpaces, TEST_SPACE_1 } from './space_helpers'; export default function (providerContext: FtrProviderContext) { @@ -48,6 +48,7 @@ export default function (providerContext: FtrProviderContext) { let spaceTest1Token: UninstallTokenMetadata; // Create agent policies it should create am uninstall token for every keys before(async () => { + await apiClient.postEnableSpaceAwareness(); const [_defaultSpacePolicy1, _spaceTest1Policy1, _spaceTest1Policy2] = await Promise.all([ apiClient.createAgentPolicy(), apiClient.createAgentPolicy(TEST_SPACE_1), @@ -88,27 +89,13 @@ export default function (providerContext: FtrProviderContext) { await apiClient.getUninstallToken(spaceTest1Token.id, TEST_SPACE_1); }); it('should not allow to get an uninstall token from a different space from the default space', async () => { - let err: Error | undefined; - try { - await apiClient.getUninstallToken(spaceTest1Token.id); - } catch (_err) { - err = _err; - } - - expect(err).to.be.an(Error); - expect(err?.message).to.match(/404 "Not Found"/); + await expectToRejectWithNotFound(() => apiClient.getUninstallToken(spaceTest1Token.id)); }); it('should not allow to get an default space uninstall token from a different space', async () => { - let err: Error | undefined; - try { - await apiClient.getUninstallToken(defaultSpaceToken.id, TEST_SPACE_1); - } catch (_err) { - err = _err; - } - - expect(err).to.be.an(Error); - expect(err?.message).to.match(/404 "Not Found"/); + await expectToRejectWithNotFound(() => + apiClient.getUninstallToken(defaultSpaceToken.id, TEST_SPACE_1) + ); }); }); }); diff --git a/x-pack/test/fleet_api_integration/apis/test_users.ts b/x-pack/test/fleet_api_integration/apis/test_users.ts index 2a89477e77b7f..f84c1f72fb657 100644 --- a/x-pack/test/fleet_api_integration/apis/test_users.ts +++ b/x-pack/test/fleet_api_integration/apis/test_users.ts @@ -21,6 +21,17 @@ export const testUsers: { username: 'fleet_all_int_all', password: 'changeme', }, + fleet_all_int_all_default_space_only: { + permissions: { + feature: { + fleetv2: ['all'], + fleet: ['all'], + }, + spaces: ['default'], + }, + username: 'fleet_all_int_all_default_space_only', + password: 'changeme', + }, fleet_read_only: { permissions: { feature: { @@ -231,9 +242,12 @@ export const testUsers: { }, }; -export const setupTestUsers = async (security: SecurityService) => { +export const setupTestUsers = async (security: SecurityService, spaceAwarenessEnabled = false) => { for (const roleName in testUsers) { - if (testUsers.hasOwnProperty(roleName)) { + if (!spaceAwarenessEnabled && roleName === 'fleet_all_int_all_default_space_only') { + continue; + } + if (Object.hasOwn(testUsers, roleName)) { const user = testUsers[roleName]; if (user.permissions) { diff --git a/x-pack/test/fleet_api_integration/config.base.ts b/x-pack/test/fleet_api_integration/config.base.ts index cc689e1f3f536..8e11dc1c5aa52 100644 --- a/x-pack/test/fleet_api_integration/config.base.ts +++ b/x-pack/test/fleet_api_integration/config.base.ts @@ -91,9 +91,9 @@ export default async function ({ readConfigFile, log }: FtrConfigProviderContext 'enableStrictKQLValidation', 'subfeaturePrivileges', 'enablePackagesStateMachine', - 'agentless', ])}`, `--xpack.cloud.id='123456789'`, + `--xpack.fleet.agentless.enabled=true`, `--xpack.fleet.agentless.api.url=https://api.agentless.url/api/v1/ess`, `--xpack.fleet.agentless.api.tls.certificate=./config/node.crt`, `--xpack.fleet.agentless.api.tls.key=./config/node.key`, diff --git a/x-pack/test/fleet_api_integration/helpers.ts b/x-pack/test/fleet_api_integration/helpers.ts index 6144e17327b2a..6ae7845522733 100644 --- a/x-pack/test/fleet_api_integration/helpers.ts +++ b/x-pack/test/fleet_api_integration/helpers.ts @@ -143,14 +143,30 @@ export function setPrereleaseSetting(supertest: SuperTestAgent) { } export async function enableSecrets(providerContext: FtrProviderContext) { - await providerContext.getService('kibanaServer').savedObjects.update({ - type: GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, - id: 'fleet-default-settings', - attributes: { - secret_storage_requirements_met: true, - }, - overwrite: false, - }); + const settingsSO = await providerContext + .getService('kibanaServer') + .savedObjects.get({ type: GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, id: 'fleet-default-settings' }) + .catch((err) => {}); + + if (settingsSO) { + await providerContext.getService('kibanaServer').savedObjects.update({ + type: GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, + id: 'fleet-default-settings', + attributes: { + secret_storage_requirements_met: true, + }, + overwrite: false, + }); + } else { + await providerContext.getService('kibanaServer').savedObjects.create({ + type: GLOBAL_SETTINGS_SAVED_OBJECT_TYPE, + id: 'fleet-default-settings', + attributes: { + secret_storage_requirements_met: true, + }, + overwrite: true, + }); + } } export const generateNAgentPolicies = async ( diff --git a/x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_dashboard_drilldown.ts b/x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_dashboard_drilldown.ts index 95ea2dc42bc39..b7f8e6099675a 100644 --- a/x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_dashboard_drilldown.ts +++ b/x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_dashboard_drilldown.ts @@ -15,7 +15,6 @@ const DRILLDOWN_TO_AREA_CHART_NAME = 'Go to area chart dashboard'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); - const dashboardPanelActions = getService('dashboardPanelActions'); const dashboardDrilldownPanelActions = getService('dashboardDrilldownPanelActions'); const dashboardDrilldownsManage = getService('dashboardDrilldownsManage'); const PageObjects = getPageObjects([ @@ -45,9 +44,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await toasts.dismissAll(); // toasts get in the way of bottom "Create drilldown" button in flyout // create drilldown - await dashboardPanelActions.openContextMenu(); - await dashboardPanelActions.clickContextMenuMoreItem(); - await dashboardDrilldownPanelActions.expectExistsCreateDrilldownAction(); await dashboardDrilldownPanelActions.clickCreateDrilldown(); await dashboardDrilldownsManage.expectsCreateDrilldownFlyoutOpen(); await testSubjects.click('actionFactoryItem-DASHBOARD_TO_DASHBOARD_DRILLDOWN'); @@ -277,8 +273,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('delete dashboard to dashboard drilldown', async () => { // delete drilldown await PageObjects.dashboard.switchToEditMode(); - await dashboardPanelActions.openContextMenu(); - await dashboardPanelActions.clickContextMenuMoreItem(); await dashboardDrilldownPanelActions.expectExistsManageDrilldownsAction(); await dashboardDrilldownPanelActions.clickManageDrilldowns(); await dashboardDrilldownsManage.expectsManageDrilldownsFlyoutOpen(); diff --git a/x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_url_drilldown.ts b/x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_url_drilldown.ts index e7c8a0819fd1a..2e15f19e702ac 100644 --- a/x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_url_drilldown.ts +++ b/x-pack/test/functional/apps/dashboard/group3/drilldowns/dashboard_to_url_drilldown.ts @@ -11,7 +11,6 @@ import { FtrProviderContext } from '../../../../ftr_provider_context'; const DRILLDOWN_TO_DISCOVER_URL = 'Go to discover'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const dashboardPanelActions = getService('dashboardPanelActions'); const dashboardDrilldownPanelActions = getService('dashboardDrilldownPanelActions'); const dashboardDrilldownsManage = getService('dashboardDrilldownsManage'); const PageObjects = getPageObjects(['dashboard', 'common', 'header', 'timePicker', 'discover']); @@ -32,8 +31,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ); // create drilldown - await dashboardPanelActions.openContextMenu(); - await dashboardPanelActions.clickContextMenuMoreItem(); await dashboardDrilldownPanelActions.expectExistsCreateDrilldownAction(); await dashboardDrilldownPanelActions.clickCreateDrilldown(); await dashboardDrilldownsManage.expectsCreateDrilldownFlyoutOpen(); diff --git a/x-pack/test/functional/apps/dashboard/group3/reporting/download_csv.ts b/x-pack/test/functional/apps/dashboard/group3/reporting/download_csv.ts index 858332ce4d0a3..9e834b80a2130 100644 --- a/x-pack/test/functional/apps/dashboard/group3/reporting/download_csv.ts +++ b/x-pack/test/functional/apps/dashboard/group3/reporting/download_csv.ts @@ -52,13 +52,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; const clickDownloadCsv = async () => { - log.debug('click "More"'); - await dashboardPanelActions.clickContextMenuMoreItem(); - - const actionItemTestSubj = 'embeddablePanelAction-generateCsvReport'; - await testSubjects.existOrFail(actionItemTestSubj); // wait for the full panel to display or else the test runner could click the wrong option! log.debug('click "Generate CSV"'); - await testSubjects.click(actionItemTestSubj); + await dashboardPanelActions.clickContextMenuItem('embeddablePanelAction-generateCsvReport'); await testSubjects.existOrFail('csvReportStarted'); // validate toast panel }; diff --git a/x-pack/test/functional/apps/discover/visualize_field.ts b/x-pack/test/functional/apps/discover/visualize_field.ts index c745800dbdf2e..13df0fe667357 100644 --- a/x-pack/test/functional/apps/discover/visualize_field.ts +++ b/x-pack/test/functional/apps/discover/visualize_field.ts @@ -29,6 +29,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { ]); const elasticChart = getService('elasticChart'); const monacoEditor = getService('monacoEditor'); + const dashboardPanelActions = getService('dashboardPanelActions'); const defaultSettings = { enableESQL: true, @@ -232,8 +233,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await testSubjects.existOrFail('embeddablePanelHeading-TextBasedChart'); await elasticChart.setNewChartUiDebugFlag(true); await PageObjects.header.waitUntilLoadingHasFinished(); - await testSubjects.click('embeddablePanelToggleMenuIcon'); - await testSubjects.click('embeddablePanelAction-ACTION_CONFIGURE_IN_LENS'); + await dashboardPanelActions.clickInlineEdit(); await PageObjects.header.waitUntilLoadingHasFinished(); expect(await PageObjects.lens.canRemoveDimension('lnsXY_xDimensionPanel')).to.equal(true); await PageObjects.lens.removeDimension('lnsXY_xDimensionPanel'); @@ -261,8 +261,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await elasticChart.setNewChartUiDebugFlag(true); await PageObjects.header.waitUntilLoadingHasFinished(); // open the inline editing flyout - await testSubjects.click('embeddablePanelToggleMenuIcon'); - await testSubjects.click('embeddablePanelAction-ACTION_CONFIGURE_IN_LENS'); + await dashboardPanelActions.clickInlineEdit(); await PageObjects.header.waitUntilLoadingHasFinished(); // change the query diff --git a/x-pack/test/functional/apps/lens/group1/ad_hoc_data_view.ts b/x-pack/test/functional/apps/lens/group1/ad_hoc_data_view.ts index a97577696b0c6..685d01d0ec6f1 100644 --- a/x-pack/test/functional/apps/lens/group1/ad_hoc_data_view.ts +++ b/x-pack/test/functional/apps/lens/group1/ad_hoc_data_view.ts @@ -28,6 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const browser = getService('browser'); const dataViews = getService('dataViews'); + const dashboardPanelActions = getService('dashboardPanelActions'); const expectedData = [ { x: '97.220.3.248', y: 19755 }, @@ -55,9 +56,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { } const checkDiscoverNavigationResult = async () => { - await testSubjects.click('embeddablePanelToggleMenuIcon'); - await testSubjects.click('embeddablePanelMore-mainMenu'); - await testSubjects.click('embeddablePanelAction-ACTION_OPEN_IN_DISCOVER'); + await dashboardPanelActions.clickContextMenuItem( + 'embeddablePanelAction-ACTION_OPEN_IN_DISCOVER' + ); const [, discoverHandle] = await browser.getAllWindowHandles(); await browser.switchToWindow(discoverHandle); @@ -73,6 +74,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await dataViews.isAdHoc()).to.be(true); }; + const waitForPageReady = async () => { + await PageObjects.header.waitUntilLoadingHasFinished(); + await retry.waitFor('page ready after refresh', async () => { + const queryBarVisible = await testSubjects.exists('globalQueryBar'); + return queryBarVisible; + }); + }; + describe('lens ad hoc data view tests', () => { it('should allow building a chart based on ad hoc data view', async () => { await setupAdHocDataView(); @@ -225,9 +234,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const [lensHandle] = await browser.getAllWindowHandles(); await browser.switchToWindow(lensHandle); }); - - // Failing: See https://github.com/elastic/kibana/issues/164623 - it.skip('should navigate to discover from embeddable correctly', async () => { + it('should navigate to discover from embeddable correctly', async () => { const [lensHandle] = await browser.getAllWindowHandles(); await browser.switchToWindow(lensHandle); await PageObjects.header.waitUntilLoadingHasFinished(); @@ -247,6 +254,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'new' ); + await PageObjects.header.waitUntilLoadingHasFinished(); await checkDiscoverNavigationResult(); await browser.closeCurrentWindow(); @@ -256,6 +264,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // adhoc data view should be persisted after refresh await browser.refresh(); + await waitForPageReady(); await checkDiscoverNavigationResult(); await browser.closeCurrentWindow(); diff --git a/x-pack/test/functional/apps/lens/group4/dashboard.ts b/x-pack/test/functional/apps/lens/group4/dashboard.ts index 776a4416d7d4c..cfa46167b7860 100644 --- a/x-pack/test/functional/apps/lens/group4/dashboard.ts +++ b/x-pack/test/functional/apps/lens/group4/dashboard.ts @@ -183,9 +183,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dashboardAddPanel.closeAddPanel(); await retry.try(async () => { - await panelActions.openContextMenu(); - await panelActions.clickContextMenuMoreItem(); - await testSubjects.existOrFail(ACTION_TEST_SUBJ); + await panelActions.expectExistsPanelAction(ACTION_TEST_SUBJ); }); }); @@ -225,9 +223,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); await PageObjects.lens.saveAndReturn(); - await panelActions.openContextMenu(); - await panelActions.clickContextMenuMoreItem(); - await testSubjects.click('embeddablePanelAction-openInspector'); + await panelActions.openInspector(); await inspector.openInspectorRequestsView(); const requests = await inspector.getRequestNames(); expect(requests.split(',').length).to.be(2); @@ -337,8 +333,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); await PageObjects.lens.save('test', true); // Edit the visualization now and get back to Lens editor - await testSubjects.click('embeddablePanelToggleMenuIcon'); - await testSubjects.click('embeddablePanelAction-ACTION_CONFIGURE_IN_LENS'); + await panelActions.clickInlineEdit(); await testSubjects.click('navigateToLensEditorLink'); // Click on Share, then Copy link and paste the link in a new tab. const url = await PageObjects.lens.getUrl(); diff --git a/x-pack/test/functional/apps/lens/group4/show_underlying_data_dashboard.ts b/x-pack/test/functional/apps/lens/group4/show_underlying_data_dashboard.ts index 965474919e6fa..1f6b3efd9d014 100644 --- a/x-pack/test/functional/apps/lens/group4/show_underlying_data_dashboard.ts +++ b/x-pack/test/functional/apps/lens/group4/show_underlying_data_dashboard.ts @@ -8,6 +8,8 @@ import expect from '@kbn/expect'; import { v4 as uuidv4 } from 'uuid'; import { FtrProviderContext } from '../../../ftr_provider_context'; +const OPEN_IN_DISCOVER_DATA_TEST_SUBJ = 'embeddablePanelAction-ACTION_OPEN_IN_DISCOVER'; + export default function ({ getService, getPageObjects }: FtrProviderContext) { const PageObjects = getPageObjects([ 'visualize', @@ -40,9 +42,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { exitFromEditMode: true, }); - await dashboardPanelActions.openContextMenu(); - - await testSubjects.click('embeddablePanelAction-ACTION_OPEN_IN_DISCOVER'); + await dashboardPanelActions.clickContextMenuItem(OPEN_IN_DISCOVER_DATA_TEST_SUBJ); const [dashboardWindowHandle, discoverWindowHandle] = await browser.getAllWindowHandles(); await browser.switchToWindow(discoverWindowHandle); @@ -73,9 +73,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { exitFromEditMode: true, }); - await dashboardPanelActions.openContextMenu(); - - await testSubjects.click('embeddablePanelAction-ACTION_OPEN_IN_DISCOVER'); + await dashboardPanelActions.clickContextMenuItem(OPEN_IN_DISCOVER_DATA_TEST_SUBJ); const [dashboardWindowHandle, discoverWindowHandle] = await browser.getAllWindowHandles(); await browser.switchToWindow(discoverWindowHandle); @@ -118,19 +116,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.clickQuickSave(); // make sure Open in Discover is also available in edit mode - await dashboardPanelActions.openContextMenuMorePanel(); - await testSubjects.existOrFail('embeddablePanelAction-ACTION_OPEN_IN_DISCOVER'); - + await dashboardPanelActions.expectExistsPanelAction(OPEN_IN_DISCOVER_DATA_TEST_SUBJ); await PageObjects.dashboard.clickCancelOutOfEditMode(); - await dashboardPanelActions.openContextMenu(); - - await testSubjects.click('embeddablePanelAction-ACTION_OPEN_IN_DISCOVER'); + await dashboardPanelActions.clickContextMenuItem(OPEN_IN_DISCOVER_DATA_TEST_SUBJ); const [dashboardWindowHandle, discoverWindowHandle] = await browser.getAllWindowHandles(); await browser.switchToWindow(discoverWindowHandle); await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); await retry.waitFor('filter count to be correct', async () => { const filterCount = await filterBarService.getFilterCount(); diff --git a/x-pack/test/functional/apps/lens/group6/error_handling.ts b/x-pack/test/functional/apps/lens/group6/error_handling.ts index ccdb193b30951..83acbff338df2 100644 --- a/x-pack/test/functional/apps/lens/group6/error_handling.ts +++ b/x-pack/test/functional/apps/lens/group6/error_handling.ts @@ -113,7 +113,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.find('emptyPlaceholder'); await PageObjects.dashboard.switchToEditMode(); - await dashboardPanelActions.editPanelByTitle(); + await dashboardPanelActions.clickEdit(); await PageObjects.timePicker.waitForNoDataPopover(); await PageObjects.timePicker.ensureHiddenNoDataPopover(); diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts index 67f1739a53d9b..8a0cd091bb85d 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/gauge.ts @@ -21,8 +21,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const elasticChart = getService('elasticChart'); - // Failing: See https://github.com/elastic/kibana/issues/181895 - describe.skip('Gauge', function describeIndexTests() { + describe('Gauge', function describeIndexTests() { const isNewChartsLibraryEnabled = true; before(async () => { diff --git a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts index f812b741bd440..dbc02a11c9c80 100644 --- a/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts +++ b/x-pack/test/functional/apps/lens/open_in_lens/agg_based/heatmap.ts @@ -8,7 +8,7 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../../../../ftr_provider_context'; -export default function ({ getPageObjects, getService }: FtrProviderContext) { +export default function ({ getPageObjects }: FtrProviderContext) { const { visualize, lens, visChart, timePicker, visEditor } = getPageObjects([ 'visualize', 'lens', diff --git a/x-pack/test/functional/apps/maps/group2/embeddable/filter_by_map_extent.js b/x-pack/test/functional/apps/maps/group2/embeddable/filter_by_map_extent.js index 4da0d2af33894..45fb47b0eee7c 100644 --- a/x-pack/test/functional/apps/maps/group2/embeddable/filter_by_map_extent.js +++ b/x-pack/test/functional/apps/maps/group2/embeddable/filter_by_map_extent.js @@ -5,6 +5,8 @@ * 2.0. */ +const FILTER_BY_MAP_EXTENT_DATA_TEST_SUBJ = 'embeddablePanelAction-FILTER_BY_MAP_EXTENT'; + export default function ({ getPageObjects, getService }) { const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'lens', 'maps']); @@ -34,9 +36,10 @@ export default function ({ getPageObjects, getService }) { }); it('should filter dashboard by map extent when "filter by map extent" is enabled', async () => { - const mapPanelHeader = await dashboardPanelActions.getPanelHeading('document example'); - await dashboardPanelActions.openContextMenuMorePanel(mapPanelHeader); - await testSubjects.click('embeddablePanelAction-FILTER_BY_MAP_EXTENT'); + await dashboardPanelActions.clickContextMenuItemByTitle( + FILTER_BY_MAP_EXTENT_DATA_TEST_SUBJ, + 'document example' + ); await testSubjects.setEuiSwitch( 'filterByMapExtentSwitch24ade730-afe4-42b6-919a-c4e0a98c94f2', 'check' @@ -54,9 +57,11 @@ export default function ({ getPageObjects, getService }) { }); it('should remove map extent filter dashboard when "filter by map extent" is disabled', async () => { - const mapPanelHeader = await dashboardPanelActions.getPanelHeading('document example'); - await dashboardPanelActions.openContextMenuMorePanel(mapPanelHeader); - await testSubjects.click('embeddablePanelAction-FILTER_BY_MAP_EXTENT'); + await dashboardPanelActions.clickContextMenuItemByTitle( + FILTER_BY_MAP_EXTENT_DATA_TEST_SUBJ, + 'document example' + ); + await testSubjects.setEuiSwitch( 'filterByMapExtentSwitch24ade730-afe4-42b6-919a-c4e0a98c94f2', 'uncheck' diff --git a/x-pack/test/functional/apps/maps/group2/es_geo_grid_source.js b/x-pack/test/functional/apps/maps/group2/es_geo_grid_source.js index 8b8bec8a3b99c..d2440a5dd706b 100644 --- a/x-pack/test/functional/apps/maps/group2/es_geo_grid_source.js +++ b/x-pack/test/functional/apps/maps/group2/es_geo_grid_source.js @@ -124,8 +124,8 @@ export default function ({ getPageObjects, getService }) { expect(mapboxStyle.sources[LAYER_ID].data.features.length).to.equal(12); mapboxStyle.sources[LAYER_ID].data.features.forEach(({ properties }) => { - expect(properties.hasOwnProperty(MAX_OF_BYTES_PROP_NAME)).to.be(true); - expect(properties.hasOwnProperty(DOC_COUNT_PROP_NAME)).to.be(true); + expect(Object.hasOwn(properties, MAX_OF_BYTES_PROP_NAME)).to.be(true); + expect(Object.hasOwn(properties, DOC_COUNT_PROP_NAME)).to.be(true); }); }); diff --git a/x-pack/test/functional/apps/maps/group4/joins.js b/x-pack/test/functional/apps/maps/group4/joins.js index 74e68cb12c11a..b4846533b6a05 100644 --- a/x-pack/test/functional/apps/maps/group4/joins.js +++ b/x-pack/test/functional/apps/maps/group4/joins.js @@ -81,9 +81,9 @@ export default function ({ getPageObjects, getService }) { mapboxStyle.sources.n1t6f.data.features.forEach(({ properties }) => { if (properties.name === 'tango') { //left join, which means we won't rescale joins that do not match - expect(properties.hasOwnProperty(JOIN_PROPERTY_NAME)).to.be(false); + expect(Object.hasOwn(properties, JOIN_PROPERTY_NAME)).to.be(false); } else { - expect(properties.hasOwnProperty(JOIN_PROPERTY_NAME)).to.be(true); + expect(Object.hasOwn(properties, JOIN_PROPERTY_NAME)).to.be(true); } expect(properties[JOIN_PROPERTY_NAME]).to.be(EXPECTED_JOIN_VALUES[properties.name]); }); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_integrations/lens_to_ml.ts b/x-pack/test/functional/apps/ml/anomaly_detection_integrations/lens_to_ml.ts index eef7461bec609..667b5664ce145 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_integrations/lens_to_ml.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_integrations/lens_to_ml.ts @@ -9,7 +9,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const ml = getService('ml'); - const dashboardPanelActions = getService('dashboardPanelActions'); const browser = getService('browser'); const PageObjects = getPageObjects(['common', 'timePicker', 'dashboard']); const kibanaServer = getService('kibanaServer'); @@ -31,9 +30,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await ml.dashboardEmbeddables.assertDashboardPanelExists(selectedPanelTitle); await setFarequoteTimerange(); - - const header = await dashboardPanelActions.getPanelHeading(selectedPanelTitle); - await dashboardPanelActions.openContextMenuMorePanel(header); } describe('create jobs from lens', function () { @@ -70,7 +66,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dashboardPreparation(selectedPanelTitle); - await ml.lensVisualizations.clickCreateMLJobMenuAction(); + await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle); await ml.lensVisualizations.assertLayerSelectorExists(); @@ -102,7 +98,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dashboardPreparation(selectedPanelTitle); - await ml.lensVisualizations.clickCreateMLJobMenuAction(); + await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle); await ml.lensVisualizations.assertLayerSelectorExists(); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_integrations/lens_to_ml_with_wizard.ts b/x-pack/test/functional/apps/ml/anomaly_detection_integrations/lens_to_ml_with_wizard.ts index 089141ba663e7..87f4bfd36335a 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_integrations/lens_to_ml_with_wizard.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_integrations/lens_to_ml_with_wizard.ts @@ -41,8 +41,7 @@ export default function ({ getService, getPageObject, getPageObjects }: FtrProvi await setFarequoteTimerange(); - const header = await dashboardPanelActions.getPanelHeading(selectedPanelTitle); - await dashboardPanelActions.openContextMenuMorePanel(header); + await dashboardPanelActions.openContextMenuByTitle(selectedPanelTitle); } async function createJobInWizard( @@ -129,7 +128,7 @@ export default function ({ getService, getPageObject, getPageObjects }: FtrProvi await dashboardPreparation(selectedPanelTitle); - await ml.lensVisualizations.clickCreateMLJobMenuAction(); + await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle); await ml.lensVisualizations.assertLayerSelectorExists(); @@ -154,7 +153,7 @@ export default function ({ getService, getPageObject, getPageObjects }: FtrProvi await dashboardPreparation(selectedPanelTitle); - await ml.lensVisualizations.clickCreateMLJobMenuAction(); + await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle); await ml.lensVisualizations.assertLayerSelectorExists(); @@ -179,7 +178,7 @@ export default function ({ getService, getPageObject, getPageObjects }: FtrProvi await dashboardPreparation(selectedPanelTitle); - await ml.lensVisualizations.clickCreateMLJobMenuAction(); + await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle); await ml.lensVisualizations.assertLayerSelectorExists(); @@ -202,7 +201,7 @@ export default function ({ getService, getPageObject, getPageObjects }: FtrProvi await dashboardPreparation(selectedPanelTitle); - await ml.lensVisualizations.clickCreateMLJobMenuAction(); + await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle); await ml.lensVisualizations.assertLayerSelectorExists(); @@ -216,7 +215,7 @@ export default function ({ getService, getPageObject, getPageObjects }: FtrProvi await dashboardPreparation(selectedPanelTitle); - ml.lensVisualizations.assertMLJobMenuActionDoesNotExist(); + ml.lensVisualizations.assertMLJobMenuActionDoesNotExist(selectedPanelTitle); }); }); } diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_integrations/map_to_ml.ts b/x-pack/test/functional/apps/ml/anomaly_detection_integrations/map_to_ml.ts index f77c46de6341e..aee7ab8695fb0 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_integrations/map_to_ml.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_integrations/map_to_ml.ts @@ -23,8 +23,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.dashboard.loadSavedDashboard(dashboardTitle); await ml.dashboardEmbeddables.assertDashboardPanelExists(selectedPanelTitle); - const header = await dashboardPanelActions.getPanelHeading(selectedPanelTitle); - await dashboardPanelActions.openContextMenuMorePanel(header); + await dashboardPanelActions.openContextMenuByTitle(selectedPanelTitle); } describe('create jobs from dashboard map', function () { @@ -62,7 +61,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await dashboardPreparation(selectedPanelTitle); - await ml.lensVisualizations.clickCreateMLJobMenuAction(); + await ml.lensVisualizations.clickCreateMLJobMenuAction(selectedPanelTitle); await ml.lensVisualizations.assertLayerSelectorExists(); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/advanced_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/advanced_job.ts index 9ebc7d8ddc827..ea5d70fcbe069 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/advanced_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/advanced_job.ts @@ -243,21 +243,21 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job creation inputs the query delay'); await ml.jobWizardAdvanced.assertQueryDelayInputExists(); await ml.jobWizardAdvanced.assertQueryDelayValue(defaultValues.queryDelay); - if (testData.datafeedConfig.hasOwnProperty('queryDelay')) { + if (Object.hasOwn(testData.datafeedConfig, 'queryDelay')) { await ml.jobWizardAdvanced.setQueryDelay(testData.datafeedConfig.queryDelay!); } await ml.testExecution.logTestStep('job creation inputs the frequency'); await ml.jobWizardAdvanced.assertFrequencyInputExists(); await ml.jobWizardAdvanced.assertFrequencyValue(defaultValues.frequency); - if (testData.datafeedConfig.hasOwnProperty('frequency')) { + if (Object.hasOwn(testData.datafeedConfig, 'frequency')) { await ml.jobWizardAdvanced.setFrequency(testData.datafeedConfig.frequency!); } await ml.testExecution.logTestStep('job creation inputs the scroll size'); await ml.jobWizardAdvanced.assertScrollSizeInputExists(); await ml.jobWizardAdvanced.assertScrollSizeValue(defaultValues.scrollSize); - if (testData.datafeedConfig.hasOwnProperty('scrollSize')) { + if (Object.hasOwn(testData.datafeedConfig, 'scrollSize')) { await ml.jobWizardAdvanced.setScrollSize(testData.datafeedConfig.scrollSize!); } @@ -270,7 +270,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job creation selects the categorization field'); await ml.jobWizardAdvanced.assertCategorizationFieldInputExists(); - if (testData.pickFieldsConfig.hasOwnProperty('categorizationField')) { + if (Object.hasOwn(testData.pickFieldsConfig, 'categorizationField')) { await ml.jobWizardAdvanced.selectCategorizationField( testData.pickFieldsConfig.categorizationField! ); @@ -280,7 +280,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job creation selects the summary count field'); await ml.jobWizardAdvanced.assertSummaryCountFieldInputExists(); - if (testData.pickFieldsConfig.hasOwnProperty('summaryCountField')) { + if (Object.hasOwn(testData.pickFieldsConfig, 'summaryCountField')) { await ml.jobWizardAdvanced.selectSummaryCountField( testData.pickFieldsConfig.summaryCountField! ); @@ -307,22 +307,22 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorDescriptionValue(''); await ml.jobWizardAdvanced.selectDetectorFunction(detector.function); - if (detector.hasOwnProperty('field')) { + if (Object.hasOwn(detector, 'field')) { await ml.jobWizardAdvanced.selectDetectorField(detector.field!); } - if (detector.hasOwnProperty('byField')) { + if (Object.hasOwn(detector, 'byField')) { await ml.jobWizardAdvanced.selectDetectorByField(detector.byField!); } - if (detector.hasOwnProperty('overField')) { + if (Object.hasOwn(detector, 'overField')) { await ml.jobWizardAdvanced.selectDetectorOverField(detector.overField!); } - if (detector.hasOwnProperty('partitionField')) { + if (Object.hasOwn(detector, 'partitionField')) { await ml.jobWizardAdvanced.selectDetectorPartitionField(detector.partitionField!); } - if (detector.hasOwnProperty('excludeFrequent')) { + if (Object.hasOwn(detector, 'excludeFrequent')) { await ml.jobWizardAdvanced.selectDetectorExcludeFrequent(detector.excludeFrequent!); } - if (detector.hasOwnProperty('description')) { + if (Object.hasOwn(detector, 'description')) { await ml.jobWizardAdvanced.setDetectorDescription(detector.description!); } @@ -334,7 +334,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorEntryExists( index, detector.identifier, - detector.hasOwnProperty('description') ? detector.description! : undefined + Object.hasOwn(detector, 'description') ? detector.description! : undefined ); } @@ -459,20 +459,20 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job cloning pre-fills the query delay'); await ml.jobWizardAdvanced.assertQueryDelayInputExists(); - if (testData.datafeedConfig.hasOwnProperty('queryDelay')) { + if (Object.hasOwn(testData.datafeedConfig, 'queryDelay')) { await ml.jobWizardAdvanced.assertQueryDelayValue(testData.datafeedConfig.queryDelay!); } await ml.testExecution.logTestStep('job cloning pre-fills the frequency'); await ml.jobWizardAdvanced.assertFrequencyInputExists(); - if (testData.datafeedConfig.hasOwnProperty('frequency')) { + if (Object.hasOwn(testData.datafeedConfig, 'frequency')) { await ml.jobWizardAdvanced.assertFrequencyValue(testData.datafeedConfig.frequency!); } await ml.testExecution.logTestStep('job cloning pre-fills the scroll size'); await ml.jobWizardAdvanced.assertScrollSizeInputExists(); await ml.jobWizardAdvanced.assertScrollSizeValue( - testData.datafeedConfig.hasOwnProperty('scrollSize') + Object.hasOwn(testData.datafeedConfig, 'scrollSize') ? testData.datafeedConfig.scrollSize! : defaultValues.scrollSize ); @@ -487,7 +487,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job cloning pre-fills the categorization field'); await ml.jobWizardAdvanced.assertCategorizationFieldInputExists(); await ml.jobWizardAdvanced.assertCategorizationFieldSelection( - testData.pickFieldsConfig.hasOwnProperty('categorizationField') + Object.hasOwn(testData.pickFieldsConfig, 'categorizationField') ? [testData.pickFieldsConfig.categorizationField!] : [] ); @@ -495,7 +495,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job cloning pre-fills the summary count field'); await ml.jobWizardAdvanced.assertSummaryCountFieldInputExists(); await ml.jobWizardAdvanced.assertSummaryCountFieldSelection( - testData.pickFieldsConfig.hasOwnProperty('summaryCountField') + Object.hasOwn(testData.pickFieldsConfig, 'summaryCountField') ? [testData.pickFieldsConfig.summaryCountField!] : [] ); @@ -505,7 +505,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorEntryExists( index, detector.identifier, - detector.hasOwnProperty('description') ? detector.description! : undefined + Object.hasOwn(detector, 'description') ? detector.description! : undefined ); await ml.jobWizardAdvanced.clickEditDetector(index); @@ -519,23 +519,23 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorFunctionSelection([detector.function]); await ml.jobWizardAdvanced.assertDetectorFieldSelection( - detector.hasOwnProperty('field') ? [detector.field!] : [] + Object.hasOwn(detector, 'field') ? [detector.field!] : [] ); await ml.jobWizardAdvanced.assertDetectorByFieldSelection( - detector.hasOwnProperty('byField') ? [detector.byField!] : [] + Object.hasOwn(detector, 'byField') ? [detector.byField!] : [] ); await ml.jobWizardAdvanced.assertDetectorOverFieldSelection( - detector.hasOwnProperty('overField') ? [detector.overField!] : [] + Object.hasOwn(detector, 'overField') ? [detector.overField!] : [] ); await ml.jobWizardAdvanced.assertDetectorPartitionFieldSelection( - detector.hasOwnProperty('partitionField') ? [detector.partitionField!] : [] + Object.hasOwn(detector, 'partitionField') ? [detector.partitionField!] : [] ); await ml.jobWizardAdvanced.assertDetectorExcludeFrequentSelection( - detector.hasOwnProperty('excludeFrequent') ? [detector.excludeFrequent!] : [] + Object.hasOwn(detector, 'excludeFrequent') ? [detector.excludeFrequent!] : [] ); // Currently, a description different form the identifier is generated for detectors with partition field await ml.jobWizardAdvanced.assertDetectorDescriptionValue( - detector.hasOwnProperty('description') + Object.hasOwn(detector, 'description') ? detector.description! : detector.identifier.replace('partition_field_name', 'partitionfield') ); diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/convert_jobs_to_advanced_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/convert_jobs_to_advanced_job.ts index 082ec7762bb98..08f3d91c15ecd 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/convert_jobs_to_advanced_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/convert_jobs_to_advanced_job.ts @@ -58,7 +58,7 @@ export default function ({ getService }: FtrProviderContext) { 'advanced job creation retains or inputs the summary count field' ); await ml.jobWizardAdvanced.assertSummaryCountFieldInputExists(); - if (testData.pickFieldsConfig.hasOwnProperty('summaryCountField')) { + if (Object.hasOwn(testData.pickFieldsConfig, 'summaryCountField')) { await ml.jobWizardAdvanced.selectSummaryCountField( testData.pickFieldsConfig.summaryCountField! ); @@ -92,22 +92,22 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorDescriptionValue(''); await ml.jobWizardAdvanced.selectDetectorFunction(detector.function); - if (detector.hasOwnProperty('field')) { + if (Object.hasOwn(detector, 'field')) { await ml.jobWizardAdvanced.selectDetectorField(detector.field!); } - if (detector.hasOwnProperty('byField')) { + if (Object.hasOwn(detector, 'byField')) { await ml.jobWizardAdvanced.selectDetectorByField(detector.byField!); } - if (detector.hasOwnProperty('overField')) { + if (Object.hasOwn(detector, 'overField')) { await ml.jobWizardAdvanced.selectDetectorOverField(detector.overField!); } - if (detector.hasOwnProperty('partitionField')) { + if (Object.hasOwn(detector, 'partitionField')) { await ml.jobWizardAdvanced.selectDetectorPartitionField(detector.partitionField!); } - if (detector.hasOwnProperty('excludeFrequent')) { + if (Object.hasOwn(detector, 'excludeFrequent')) { await ml.jobWizardAdvanced.selectDetectorExcludeFrequent(detector.excludeFrequent!); } - if (detector.hasOwnProperty('description')) { + if (Object.hasOwn(detector, 'description')) { await ml.jobWizardAdvanced.setDetectorDescription(detector.description!); } @@ -119,7 +119,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorEntryExists( index + previousDetectors.length, detector.identifier, - detector.hasOwnProperty('description') ? detector.description! : undefined + Object.hasOwn(detector, 'description') ? detector.description! : undefined ); } diff --git a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/date_nanos_job.ts b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/date_nanos_job.ts index 864d89b2b08f3..e5ffd4c193949 100644 --- a/x-pack/test/functional/apps/ml/anomaly_detection_jobs/date_nanos_job.ts +++ b/x-pack/test/functional/apps/ml/anomaly_detection_jobs/date_nanos_job.ts @@ -134,21 +134,21 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job creation inputs the query delay'); await ml.jobWizardAdvanced.assertQueryDelayInputExists(); await ml.jobWizardAdvanced.assertQueryDelayValue(defaultValues.queryDelay); - if (testData.datafeedConfig.hasOwnProperty('queryDelay')) { + if (Object.hasOwn(testData.datafeedConfig, 'queryDelay')) { await ml.jobWizardAdvanced.setQueryDelay(testData.datafeedConfig.queryDelay!); } await ml.testExecution.logTestStep('job creation inputs the frequency'); await ml.jobWizardAdvanced.assertFrequencyInputExists(); await ml.jobWizardAdvanced.assertFrequencyValue(defaultValues.frequency); - if (testData.datafeedConfig.hasOwnProperty('frequency')) { + if (Object.hasOwn(testData.datafeedConfig, 'frequency')) { await ml.jobWizardAdvanced.setFrequency(testData.datafeedConfig.frequency!); } await ml.testExecution.logTestStep('job creation inputs the scroll size'); await ml.jobWizardAdvanced.assertScrollSizeInputExists(); await ml.jobWizardAdvanced.assertScrollSizeValue(defaultValues.scrollSize); - if (testData.datafeedConfig.hasOwnProperty('scrollSize')) { + if (Object.hasOwn(testData.datafeedConfig, 'scrollSize')) { await ml.jobWizardAdvanced.setScrollSize(testData.datafeedConfig.scrollSize!); } @@ -161,7 +161,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.testExecution.logTestStep('job creation selects the summary count field'); await ml.jobWizardAdvanced.assertSummaryCountFieldInputExists(); - if (testData.pickFieldsConfig.hasOwnProperty('summaryCountField')) { + if (Object.hasOwn(testData.pickFieldsConfig, 'summaryCountField')) { await ml.jobWizardAdvanced.selectSummaryCountField( testData.pickFieldsConfig.summaryCountField! ); @@ -188,22 +188,22 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorDescriptionValue(''); await ml.jobWizardAdvanced.selectDetectorFunction(detector.function); - if (detector.hasOwnProperty('field')) { + if (Object.hasOwn(detector, 'field')) { await ml.jobWizardAdvanced.selectDetectorField(detector.field!); } - if (detector.hasOwnProperty('byField')) { + if (Object.hasOwn(detector, 'byField')) { await ml.jobWizardAdvanced.selectDetectorByField(detector.byField!); } - if (detector.hasOwnProperty('overField')) { + if (Object.hasOwn(detector, 'overField')) { await ml.jobWizardAdvanced.selectDetectorOverField(detector.overField!); } - if (detector.hasOwnProperty('partitionField')) { + if (Object.hasOwn(detector, 'partitionField')) { await ml.jobWizardAdvanced.selectDetectorPartitionField(detector.partitionField!); } - if (detector.hasOwnProperty('excludeFrequent')) { + if (Object.hasOwn(detector, 'excludeFrequent')) { await ml.jobWizardAdvanced.selectDetectorExcludeFrequent(detector.excludeFrequent!); } - if (detector.hasOwnProperty('description')) { + if (Object.hasOwn(detector, 'description')) { await ml.jobWizardAdvanced.setDetectorDescription(detector.description!); } @@ -215,7 +215,7 @@ export default function ({ getService }: FtrProviderContext) { await ml.jobWizardAdvanced.assertDetectorEntryExists( index, detector.identifier, - detector.hasOwnProperty('description') ? detector.description! : undefined + Object.hasOwn(detector, 'description') ? detector.description! : undefined ); } diff --git a/x-pack/test/functional/page_objects/infra_logs_page.ts b/x-pack/test/functional/page_objects/infra_logs_page.ts index 8a39f01e4ae27..778acfc5fe480 100644 --- a/x-pack/test/functional/page_objects/infra_logs_page.ts +++ b/x-pack/test/functional/page_objects/infra_logs_page.ts @@ -38,7 +38,7 @@ export function InfraLogsPageProvider({ getPageObjects, getService }: FtrProvide const parsedParams: Record = {}; for (const key in params) { - if (params.hasOwnProperty(key)) { + if (Object.hasOwn(params, key)) { const value = params[key]; parsedParams[key] = encode(value); } diff --git a/x-pack/test/functional/page_objects/uptime_page.ts b/x-pack/test/functional/page_objects/uptime_page.ts index 531e0e5980255..07c7e25edd975 100644 --- a/x-pack/test/functional/page_objects/uptime_page.ts +++ b/x-pack/test/functional/page_objects/uptime_page.ts @@ -92,7 +92,7 @@ export class UptimePageObject extends FtrService { public async selectFilterItems(filters: Record) { for (const key in filters) { - if (filters.hasOwnProperty(key)) { + if (Object.hasOwn(filters, key)) { const values = filters[key]; for (let i = 0; i < values.length; i++) { await this.commonService.selectFilterItem(key, values[i]); diff --git a/x-pack/test/functional/services/actions/common.ts b/x-pack/test/functional/services/actions/common.ts index 145f56e49a351..60bba2b6b494d 100644 --- a/x-pack/test/functional/services/actions/common.ts +++ b/x-pack/test/functional/services/actions/common.ts @@ -15,7 +15,7 @@ export function ActionsCommonServiceProvider({ getService, getPageObject }: FtrP return { async openNewConnectorForm(name: string) { - const createBtn = await testSubjects.find('createActionButton'); + const createBtn = await testSubjects.find('createConnectorButton'); const createBtnIsVisible = await createBtn.isDisplayed(); if (createBtnIsVisible) { await createBtn.click(); diff --git a/x-pack/test/functional/services/ml/lens_visualizations.ts b/x-pack/test/functional/services/ml/lens_visualizations.ts index a315fa1344a60..7bb49e7397e9d 100644 --- a/x-pack/test/functional/services/ml/lens_visualizations.ts +++ b/x-pack/test/functional/services/ml/lens_visualizations.ts @@ -14,10 +14,14 @@ export function MachineLearningLensVisualizationsProvider( mlCommonUI: MlCommonUI ) { const testSubjects = getService('testSubjects'); + const dashboardPanelActions = getService('dashboardPanelActions'); return { - async clickCreateMLJobMenuAction() { - await testSubjects.click('embeddablePanelAction-create-ml-ad-job-action'); + async clickCreateMLJobMenuAction(title = '') { + await dashboardPanelActions.clickContextMenuItemByTitle( + 'embeddablePanelAction-create-ml-ad-job-action', + title + ); }, async clickCreateJob(layerIndex: number) { await testSubjects.clickWhenNotDisabledWithoutRetry( @@ -30,8 +34,11 @@ export function MachineLearningLensVisualizationsProvider( async assertLayerSelectorExists() { await testSubjects.existOrFail('mlFlyoutLayerSelector'); }, - async assertMLJobMenuActionDoesNotExist() { - await testSubjects.missingOrFail('embeddablePanelAction-create-ml-ad-job-action'); + async assertMLJobMenuActionDoesNotExist(title = '') { + await dashboardPanelActions.expectMissingPanelAction( + 'embeddablePanelAction-create-ml-ad-job-action', + title + ); }, async assertNumberOfCompatibleLensLayers(numberOfCompatibleLayers: number) { const compatibleLayers = await testSubjects.findAll('mlLensLayerCompatible'); diff --git a/x-pack/test/functional_with_es_ssl/apps/cases/group2/attachment_framework.ts b/x-pack/test/functional_with_es_ssl/apps/cases/group2/attachment_framework.ts index c714cdba25637..49e8fb47db644 100644 --- a/x-pack/test/functional_with_es_ssl/apps/cases/group2/attachment_framework.ts +++ b/x-pack/test/functional_with_es_ssl/apps/cases/group2/attachment_framework.ts @@ -23,6 +23,8 @@ import { } from '../../../../cases_api_integration/common/lib/api'; import { FtrProviderContext } from '../../../ftr_provider_context'; +const ADD_TO_EXISTING_CASE_DATA_TEST_SUBJ = 'embeddablePanelAction-embeddable_addToExistingCase'; + const createLogStashDataView = async ( supertest: SuperTest.Agent ): Promise<{ data_view: { id: string } }> => { @@ -63,6 +65,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { const listingTable = getService('listingTable'); const toasts = getService('toasts'); const browser = getService('browser'); + const dashboardPanelActions = getService('dashboardPanelActions'); const createAttachmentAndNavigate = async (attachment: AttachmentRequest) => { const caseData = await cases.api.createCase({ @@ -400,10 +403,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { await common.navigateToApp('dashboard'); await dashboard.preserveCrossAppState(); await dashboard.loadSavedDashboard(myDashboardName); - - await testSubjects.click('embeddablePanelToggleMenuIcon'); - await testSubjects.click('embeddablePanelMore-mainMenu'); - await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase'); + await dashboardPanelActions.clickContextMenuItem(ADD_TO_EXISTING_CASE_DATA_TEST_SUBJ); await testSubjects.click('cases-table-add-case-filter-bar'); await cases.create.createCase({ @@ -435,9 +435,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { await dashboard.preserveCrossAppState(); await dashboard.loadSavedDashboard(myDashboardName); - await testSubjects.click('embeddablePanelToggleMenuIcon'); - await testSubjects.click('embeddablePanelMore-mainMenu'); - await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase'); + await dashboardPanelActions.clickContextMenuItem(ADD_TO_EXISTING_CASE_DATA_TEST_SUBJ); await testSubjects.click(`cases-table-row-select-${theCase.id}`); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/slack.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/slack.ts index 25243b838e583..b584c5d3a78b6 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/slack.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/connectors/slack.ts @@ -36,8 +36,8 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); it('should only show one slack connector', async () => { - if (await testSubjects.exists('createActionButton')) { - await testSubjects.click('createActionButton'); + if (await testSubjects.exists('createConnectorButton')) { + await testSubjects.click('createConnectorButton'); } else { await testSubjects.click('createFirstActionButton'); } diff --git a/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts b/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts index 77c6b9b692678..137e9ef6f6f2b 100644 --- a/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts +++ b/x-pack/test/functional_with_es_ssl/page_objects/triggers_actions_ui_page.ts @@ -51,7 +51,7 @@ export function TriggersActionsPageProvider({ getService }: FtrProviderContext) return await noPermissionsTitle.getVisibleText(); }, async clickCreateConnectorButton() { - const createBtn = await testSubjects.find('createActionButton'); + const createBtn = await testSubjects.find('createConnectorButton'); const createBtnIsVisible = await createBtn.isDisplayed(); if (createBtnIsVisible) { await createBtn.click(); diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/__snapshots__/csv_v2.snap b/x-pack/test/reporting_api_integration/reporting_and_security/csv/__snapshots__/csv_v2.snap similarity index 100% rename from x-pack/test/reporting_api_integration/reporting_and_security/__snapshots__/csv_v2.snap rename to x-pack/test/reporting_api_integration/reporting_and_security/csv/__snapshots__/csv_v2.snap diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/__snapshots__/csv_v2_esql.snap b/x-pack/test/reporting_api_integration/reporting_and_security/csv/__snapshots__/csv_v2_esql.snap similarity index 100% rename from x-pack/test/reporting_api_integration/reporting_and_security/__snapshots__/csv_v2_esql.snap rename to x-pack/test/reporting_api_integration/reporting_and_security/csv/__snapshots__/csv_v2_esql.snap diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/__snapshots__/generate_csv_discover.snap b/x-pack/test/reporting_api_integration/reporting_and_security/csv/__snapshots__/generate_csv_discover.snap similarity index 100% rename from x-pack/test/reporting_api_integration/reporting_and_security/__snapshots__/generate_csv_discover.snap rename to x-pack/test/reporting_api_integration/reporting_and_security/csv/__snapshots__/generate_csv_discover.snap diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/csv_v2.ts b/x-pack/test/reporting_api_integration/reporting_and_security/csv/csv_v2.ts similarity index 99% rename from x-pack/test/reporting_api_integration/reporting_and_security/csv_v2.ts rename to x-pack/test/reporting_api_integration/reporting_and_security/csv/csv_v2.ts index 5b70c5db2fd8a..78403308dea91 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security/csv_v2.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security/csv/csv_v2.ts @@ -12,7 +12,7 @@ import { DISCOVER_APP_LOCATOR } from '@kbn/discover-plugin/common'; import type { JobParamsCsvFromSavedObject } from '@kbn/reporting-export-types-csv-common'; import type { ReportApiJSON } from '@kbn/reporting-common/types'; import rison from '@kbn/rison'; -import { FtrProviderContext } from '../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; const LOGSTASH_DATA_ARCHIVE = 'test/functional/fixtures/es_archiver/logstash_functional'; const LOGSTASH_SAVED_OBJECTS = 'x-pack/test/functional/fixtures/kbn_archiver/reporting/logs'; diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/csv_v2_esql.ts b/x-pack/test/reporting_api_integration/reporting_and_security/csv/csv_v2_esql.ts similarity index 99% rename from x-pack/test/reporting_api_integration/reporting_and_security/csv_v2_esql.ts rename to x-pack/test/reporting_api_integration/reporting_and_security/csv/csv_v2_esql.ts index 09a1da86b72d6..0489bef799100 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security/csv_v2_esql.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security/csv/csv_v2_esql.ts @@ -12,7 +12,7 @@ import { DISCOVER_APP_LOCATOR } from '@kbn/discover-plugin/common'; import type { JobParamsCsvFromSavedObject } from '@kbn/reporting-export-types-csv-common'; import type { ReportApiJSON } from '@kbn/reporting-common/types'; import rison from '@kbn/rison'; -import { FtrProviderContext } from '../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; // eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/generate_csv_discover.ts b/x-pack/test/reporting_api_integration/reporting_and_security/csv/generate_csv_discover.ts similarity index 99% rename from x-pack/test/reporting_api_integration/reporting_and_security/generate_csv_discover.ts rename to x-pack/test/reporting_api_integration/reporting_and_security/csv/generate_csv_discover.ts index 8846ff15055ca..c48dcb97b37bf 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security/generate_csv_discover.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security/csv/generate_csv_discover.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import type { SortDirection } from '@kbn/data-plugin/common'; import type { JobParamsCSV } from '@kbn/reporting-export-types-csv-common'; import type { Filter } from '@kbn/es-query'; -import type { FtrProviderContext } from '../ftr_provider_context'; +import type { FtrProviderContext } from '../../ftr_provider_context'; // eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/error_codes.ts b/x-pack/test/reporting_api_integration/reporting_and_security/error_codes.ts deleted file mode 100644 index 67fe67481232f..0000000000000 --- a/x-pack/test/reporting_api_integration/reporting_and_security/error_codes.ts +++ /dev/null @@ -1,62 +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 expect from '@kbn/expect'; -import { INTERNAL_ROUTES } from '@kbn/reporting-common'; -import { ReportApiJSON } from '@kbn/reporting-common/types'; -import { FtrProviderContext } from '../ftr_provider_context'; - -// eslint-disable-next-line import/no-default-export -export default function ({ getService }: FtrProviderContext) { - const reportingAPI = getService('reportingAPI'); - const esArchiver = getService('esArchiver'); - const supertest = getService('supertestWithoutAuth'); - - describe('Reporting error codes', () => { - it('places error_code in report output', async () => { - await reportingAPI.initEcommerce(); - - const { body: reportApiJson, status } = await reportingAPI.generateCsv({ - title: 'CSV Report', - browserTimezone: 'UTC', - objectType: 'search', - version: '7.15.0', - searchSource: null, // Invalid searchSource that should cause job to throw at execute phase... - } as any); - expect(status).to.be(200); - - const { job: report, path: downloadPath } = reportApiJson as { - job: ReportApiJSON; - path: string; - }; - - // wait for the the pending job to complete - await reportingAPI.waitForJobToFinish(downloadPath, true); - - expect(await reportingAPI.getJobErrorCode(report.id)).to.be('unknown_error'); - - await reportingAPI.teardownEcommerce(); - await reportingAPI.deleteAllReports(); - }); - - it('adds warning text with cause of failure in report output', async () => { - await reportingAPI.createDataAnalystRole(); - await reportingAPI.createDataAnalyst(); - await esArchiver.load('x-pack/test/functional/es_archives/reporting/archived_reports'); - - const jobInfo = await supertest - .get(INTERNAL_ROUTES.JOBS.INFO_PREFIX + '/kraz4j94154g0763b583rc37') - .auth('test_user', 'changeme'); - - expect(jobInfo.body.output.warnings).to.eql([ - 'Error: Max attempts reached (1). Queue timeout reached.', - ]); - - await esArchiver.unload('x-pack/test/functional/es_archives/reporting/archived_reports'); - }); - }); -} diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/index.ts b/x-pack/test/reporting_api_integration/reporting_and_security/index.ts index 14c33bced7601..8bd69780b44b7 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security/index.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security/index.ts @@ -20,54 +20,18 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { }); loadTestFile(require.resolve('./bwc_existing_indexes')); - loadTestFile(require.resolve('./security_roles_privileges')); - loadTestFile(require.resolve('./generate_csv_discover')); loadTestFile(require.resolve('./datastream')); - loadTestFile(require.resolve('./csv_v2')); - loadTestFile(require.resolve('./csv_v2_esql')); - loadTestFile(require.resolve('./network_policy')); - loadTestFile(require.resolve('./spaces')); loadTestFile(require.resolve('./ilm_migration_apis')); - loadTestFile(require.resolve('./error_codes')); - loadTestFile(require.resolve('./validation')); - }); -} + loadTestFile(require.resolve('./security_roles_privileges')); + loadTestFile(require.resolve('./spaces')); -export const createPdfV2Params = (testWidth: number | string, layoutId = 'preserve_layout') => - `(browserTimezone:UTC,layout:` + - `(dimensions:(height:1492,width:${testWidth}),id:${layoutId}),` + - `locatorParams:\u0021((id:DASHBOARD_APP_LOCATOR,params:` + - `(dashboardId:\'6c263e00-1c6d-11ea-a100-8589bb9d7c6b\',` + - `preserveSavedFilters:\u0021t,` + - `timeRange:(from:\'2019-03-23T03:06:17.785Z\',to:\'2019-10-04T02:33:16.708Z\'),` + - `useHash:\u0021f,` + - `viewMode:view),` + - `version:\'8.2.0\')),` + - `objectType:dashboard,` + - `title:\'Ecom Dashboard\',` + - `version:\'8.2.0\')`; + // CSV-specific + loadTestFile(require.resolve('./csv/csv_v2')); + loadTestFile(require.resolve('./csv/csv_v2_esql')); + loadTestFile(require.resolve('./csv/generate_csv_discover')); -export const createPngV2Params = (testWidth: number | string) => - `(browserTimezone:UTC,layout:` + - `(dimensions:(height:648,width:${testWidth}),id:preserve_layout),` + - `locatorParams:(id:VISUALIZE_APP_LOCATOR,params:` + - `(filters:\u0021(),` + - `indexPattern:\'5193f870-d861-11e9-a311-0fa548c5f953\',` + - `linked:\u0021t,` + - `query:(language:kuery,query:\'\'),` + - `savedSearchId:\'6091ead0-1c6d-11ea-a100-8589bb9d7c6b\',` + - `timeRange:(from:\'2019-03-23T03:06:17.785Z\',to:\'2019-10-04T02:33:16.708Z\'),` + - `uiState:(),` + - `vis:(aggs:\u0021((enabled:\u0021t,id:\'1\',params:(emptyAsNull:\u0021f),schema:metric,type:count),` + - `(enabled:\u0021t,` + - `id:\'2\',` + - `params:(field:customer_first_name.keyword,missingBucket:\u0021f,missingBucketLabel:Missing,order:desc,orderBy:\'1\',otherBucket:\u0021f,otherBucketLabel:Other,size:10),` + - `schema:segment,type:terms)),` + - `params:(maxFontSize:72,minFontSize:18,orientation:single,palette:(name:kibana_palette,type:palette),scale:linear,showLabel:\u0021t),` + - `title:\'Tag Cloud of Names\',` + - `type:tagcloud),` + - `visId:\'1bba55f0-507e-11eb-9c0d-97106882b997\'),` + - `version:\'8.2.0\'),` + - `objectType:visualization,` + - `title:\'Tag Cloud of Names\',` + - `version:\'8.2.0\')`; + // Screenshot-specific + loadTestFile(require.resolve('./screenshot/network_policy')); + loadTestFile(require.resolve('./screenshot/validation')); + }); +} diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/network_policy.ts b/x-pack/test/reporting_api_integration/reporting_and_security/screenshot/network_policy.ts similarity index 96% rename from x-pack/test/reporting_api_integration/reporting_and_security/network_policy.ts rename to x-pack/test/reporting_api_integration/reporting_and_security/screenshot/network_policy.ts index 40ee0986df9e5..5b82e1e2fcb4c 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security/network_policy.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security/screenshot/network_policy.ts @@ -6,7 +6,7 @@ */ import expect from '@kbn/expect'; -import { FtrProviderContext } from '../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; // eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { diff --git a/x-pack/test/reporting_api_integration/reporting_and_security/validation.ts b/x-pack/test/reporting_api_integration/reporting_and_security/screenshot/validation.ts similarity index 65% rename from x-pack/test/reporting_api_integration/reporting_and_security/validation.ts rename to x-pack/test/reporting_api_integration/reporting_and_security/screenshot/validation.ts index f4e26c9b77a89..e5181c1c16776 100644 --- a/x-pack/test/reporting_api_integration/reporting_and_security/validation.ts +++ b/x-pack/test/reporting_api_integration/reporting_and_security/screenshot/validation.ts @@ -7,8 +7,46 @@ import expect from '@kbn/expect'; import supertest from 'supertest'; -import { createPdfV2Params, createPngV2Params } from '.'; -import { FtrProviderContext } from '../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; + +const createPdfV2Params = (testWidth: number | string, layoutId = 'preserve_layout') => + `(browserTimezone:UTC,layout:` + + `(dimensions:(height:1492,width:${testWidth}),id:${layoutId}),` + + `locatorParams:\u0021((id:DASHBOARD_APP_LOCATOR,params:` + + `(dashboardId:\'6c263e00-1c6d-11ea-a100-8589bb9d7c6b\',` + + `preserveSavedFilters:\u0021t,` + + `timeRange:(from:\'2019-03-23T03:06:17.785Z\',to:\'2019-10-04T02:33:16.708Z\'),` + + `useHash:\u0021f,` + + `viewMode:view),` + + `version:\'8.2.0\')),` + + `objectType:dashboard,` + + `title:\'Ecom Dashboard\',` + + `version:\'8.2.0\')`; + +const createPngV2Params = (testWidth: number | string) => + `(browserTimezone:UTC,layout:` + + `(dimensions:(height:648,width:${testWidth}),id:preserve_layout),` + + `locatorParams:(id:VISUALIZE_APP_LOCATOR,params:` + + `(filters:\u0021(),` + + `indexPattern:\'5193f870-d861-11e9-a311-0fa548c5f953\',` + + `linked:\u0021t,` + + `query:(language:kuery,query:\'\'),` + + `savedSearchId:\'6091ead0-1c6d-11ea-a100-8589bb9d7c6b\',` + + `timeRange:(from:\'2019-03-23T03:06:17.785Z\',to:\'2019-10-04T02:33:16.708Z\'),` + + `uiState:(),` + + `vis:(aggs:\u0021((enabled:\u0021t,id:\'1\',params:(emptyAsNull:\u0021f),schema:metric,type:count),` + + `(enabled:\u0021t,` + + `id:\'2\',` + + `params:(field:customer_first_name.keyword,missingBucket:\u0021f,missingBucketLabel:Missing,order:desc,orderBy:\'1\',otherBucket:\u0021f,otherBucketLabel:Other,size:10),` + + `schema:segment,type:terms)),` + + `params:(maxFontSize:72,minFontSize:18,orientation:single,palette:(name:kibana_palette,type:palette),scale:linear,showLabel:\u0021t),` + + `title:\'Tag Cloud of Names\',` + + `type:tagcloud),` + + `visId:\'1bba55f0-507e-11eb-9c0d-97106882b997\'),` + + `version:\'8.2.0\'),` + + `objectType:visualization,` + + `title:\'Tag Cloud of Names\',` + + `version:\'8.2.0\')`; // eslint-disable-next-line import/no-default-export export default function ({ getService }: FtrProviderContext) { diff --git a/x-pack/test/reporting_api_integration/reporting_without_security/job_apis_csv.ts b/x-pack/test/reporting_api_integration/reporting_without_security/csv/job_apis_csv.ts similarity index 99% rename from x-pack/test/reporting_api_integration/reporting_without_security/job_apis_csv.ts rename to x-pack/test/reporting_api_integration/reporting_without_security/csv/job_apis_csv.ts index 5aec831f70897..ade8efab7166c 100644 --- a/x-pack/test/reporting_api_integration/reporting_without_security/job_apis_csv.ts +++ b/x-pack/test/reporting_api_integration/reporting_without_security/csv/job_apis_csv.ts @@ -9,7 +9,7 @@ import expect from '@kbn/expect'; import { INTERNAL_ROUTES } from '@kbn/reporting-common'; import { ReportApiJSON } from '@kbn/reporting-common/types'; import { pick } from 'lodash'; -import { FtrProviderContext } from '../ftr_provider_context'; +import { FtrProviderContext } from '../../ftr_provider_context'; const apiResponseFields = [ 'attempts', diff --git a/x-pack/test/reporting_api_integration/reporting_without_security/index.ts b/x-pack/test/reporting_api_integration/reporting_without_security/index.ts index 19f96aa5d2869..7586e067d3e6b 100644 --- a/x-pack/test/reporting_api_integration/reporting_without_security/index.ts +++ b/x-pack/test/reporting_api_integration/reporting_without_security/index.ts @@ -15,6 +15,6 @@ export default function ({ loadTestFile, getService }: FtrProviderContext) { await reportingAPI.logTaskManagerHealth(); }); - loadTestFile(require.resolve('./job_apis_csv')); + loadTestFile(require.resolve('./csv/job_apis_csv')); }); } diff --git a/x-pack/test/reporting_functional/services/scenarios.ts b/x-pack/test/reporting_functional/services/scenarios.ts index 2fb9eaf249cda..be86161fd13f5 100644 --- a/x-pack/test/reporting_functional/services/scenarios.ts +++ b/x-pack/test/reporting_functional/services/scenarios.ts @@ -9,6 +9,8 @@ import expect from '@kbn/expect'; import { createScenarios as createAPIScenarios } from '../../reporting_api_integration/services/scenarios'; import { FtrProviderContext } from '../ftr_provider_context'; +const GENERATE_CSV_DATA_TEST_SUBJ = 'embeddablePanelAction-generateCsvReport'; + export function createScenarios( context: Pick ) { @@ -74,35 +76,27 @@ export function createScenarios( await PageObjects.canvas.loadFirstWorkpad(title); }; - const getSavedSearchPanel = async (savedSearchTitle: string) => { - return await testSubjects.find(`embeddablePanelHeading-${savedSearchTitle.replace(' ', '')}`); - }; const tryDashboardGenerateCsvFail = async (savedSearchTitle: string) => { - const savedSearchPanel = await getSavedSearchPanel(savedSearchTitle); - await dashboardPanelActions.toggleContextMenu(savedSearchPanel); - const actionItemTestSubj = 'embeddablePanelAction-generateCsvReport'; - - if (!(await testSubjects.exists(actionItemTestSubj))) { - await testSubjects.click('embeddablePanelMore-mainMenu'); - } - - await testSubjects.click(actionItemTestSubj); + await dashboardPanelActions.clickContextMenuItemByTitle( + GENERATE_CSV_DATA_TEST_SUBJ, + savedSearchTitle + ); await testSubjects.existOrFail('generateCsvFail'); }; const tryDashboardGenerateCsvNotAvailable = async (savedSearchTitle: string) => { - const savedSearchPanel = await getSavedSearchPanel(savedSearchTitle); - await dashboardPanelActions.toggleContextMenu(savedSearchPanel); - await dashboardPanelActions.clickContextMenuMoreItem(); - await testSubjects.missingOrFail('embeddablePanelAction-generateCsvReport'); + await dashboardPanelActions.expectMissingPanelAction( + GENERATE_CSV_DATA_TEST_SUBJ, + savedSearchTitle + ); }; const tryDashboardGenerateCsvSuccess = async (savedSearchTitle: string) => { - const savedSearchPanel = await getSavedSearchPanel(savedSearchTitle); - await dashboardPanelActions.toggleContextMenu(savedSearchPanel); - await dashboardPanelActions.clickContextMenuMoreItem(); - const actionItemTestSubj = 'embeddablePanelAction-generateCsvReport'; - await testSubjects.existOrFail(actionItemTestSubj); - /* wait for the full panel to display or else the test runner could click the wrong option! */ await testSubjects.click( - actionItemTestSubj + await dashboardPanelActions.expectExistsPanelAction( + GENERATE_CSV_DATA_TEST_SUBJ, + savedSearchTitle + ); + await dashboardPanelActions.clickContextMenuItemByTitle( + GENERATE_CSV_DATA_TEST_SUBJ, + savedSearchTitle ); await testSubjects.existOrFail('csvReportStarted'); /* validate toast panel */ }; diff --git a/x-pack/test/security_solution_api_integration/config/services/security_solution_serverless_utils.ts b/x-pack/test/security_solution_api_integration/config/services/security_solution_serverless_utils.ts index 15b2699acbedb..da57ccf64860e 100644 --- a/x-pack/test/security_solution_api_integration/config/services/security_solution_serverless_utils.ts +++ b/x-pack/test/security_solution_api_integration/config/services/security_solution_serverless_utils.ts @@ -32,8 +32,6 @@ export function SecuritySolutionServerlessUtils({ }); async function invalidateApiKey(credentials: RoleCredentials) { - // load service to call it outside mocha context - await svlUserManager.init(); await svlUserManager.invalidateM2mApiKeyWithRoleScope(credentials); } @@ -55,8 +53,6 @@ export function SecuritySolutionServerlessUtils({ const createSuperTest = async (role = 'admin') => { cleanCredentials(role); - // load service to call it outside mocha context - await svlUserManager.init(); const credentials = await svlUserManager.createM2mApiKeyWithRoleScope(role); rolesCredentials.set(role, credentials); @@ -66,8 +62,6 @@ export function SecuritySolutionServerlessUtils({ return { getUsername: async (role = 'admin') => { - // load service to call it outside mocha context - await svlUserManager.init(); const { username } = await svlUserManager.getUserData(role); return username; diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_entity_calculation.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_entity_calculation.ts index e35ea16c87f1a..214c531bd6ab6 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_entity_calculation.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_entity_calculation.ts @@ -57,9 +57,8 @@ export default ({ getService }: FtrProviderContext): void => { return result; }; - const calculateEntityRiskScoreAfterRuleCreationAndExecution = async ( + const createRuleAndWaitExecution = async ( documentId: string, - identifier: string, { alerts = 1, riskScore = 21, @@ -67,7 +66,9 @@ export default ({ getService }: FtrProviderContext): void => { }: { alerts?: number; riskScore?: number; maxSignals?: number } = {} ) => { await createAndSyncRuleAndAlerts({ query: `id: ${documentId}`, alerts, riskScore, maxSignals }); + }; + const calculateEntityRiskScore = async (identifier: string) => { return await calculateEntityRiskScores({ body: { identifier_type: 'host', @@ -102,9 +103,7 @@ export default ({ getService }: FtrProviderContext): void => { beforeEach(async () => { await deleteAllAlerts(supertest, log, es); await deleteAllRules(supertest, log); - await cleanRiskEngine({ kibanaServer, es, log }); - await riskEngineRoutes.init(); }); afterEach(async () => { @@ -118,11 +117,11 @@ export default ({ getService }: FtrProviderContext): void => { it('calculates and persists risk score for entity', async () => { const documentId = uuidv4(); await indexListOfDocuments([buildDocument({ host: { name: 'host-1' } }, documentId)]); + await createRuleAndWaitExecution(documentId); + await riskEngineRoutes.init(); + await waitForRiskScoresToBePresent({ es, log, scoreCount: 1 }); - const results = await calculateEntityRiskScoreAfterRuleCreationAndExecution( - documentId, - 'host-1' - ); + const results = await calculateEntityRiskScore('host-1'); const expectedScore = { calculated_level: 'Unknown', @@ -139,13 +138,14 @@ export default ({ getService }: FtrProviderContext): void => { expect(score).to.eql(expectedScore); expect(results.success).to.be(true); - await waitForRiskScoresToBePresent({ es, log }); + await waitForRiskScoresToBePresent({ es, log, scoreCount: 2 }); const persistedScores = await readRiskScores(es); - expect(persistedScores.length).to.eql(1); - const [persistedScore] = normalizeScores(persistedScores); + expect(persistedScores.length).to.greaterThan(1); // the risk score is calculated once by the risk engine and a second time by the API + const [persistedScoreByApi, persistedScoreByEngine] = normalizeScores(persistedScores); - expect(persistedScore).to.eql(expectedScore); + expect(persistedScoreByApi).to.eql(expectedScore); + expect(persistedScoreByApi).to.eql(persistedScoreByEngine); }); describe('with asset criticality data', () => { @@ -167,11 +167,12 @@ export default ({ getService }: FtrProviderContext): void => { const documentId = uuidv4(); await indexListOfDocuments([buildDocument({ host: { name: 'host-1' } }, documentId)]); await waitForAssetCriticalityToBePresent({ es, log }); + await createRuleAndWaitExecution(documentId); + await riskEngineRoutes.init(); + await waitForRiskScoresToBePresent({ es, log, scoreCount: 1 }); + + const results = await calculateEntityRiskScore('host-1'); - const results = await calculateEntityRiskScoreAfterRuleCreationAndExecution( - documentId, - 'host-1' - ); const expectedScore = { criticality_level: 'high_impact', criticality_modifier: 1.5, @@ -188,20 +189,21 @@ export default ({ getService }: FtrProviderContext): void => { expect(results.success).to.be(true); expect(score).to.eql(expectedScore); - await waitForRiskScoresToBePresent({ es, log }); + await waitForRiskScoresToBePresent({ es, log, scoreCount: 2 }); const persistedScores = await readRiskScores(es); - expect(persistedScores.length).to.eql(1); - const [persistedScore] = normalizeScores(persistedScores); + expect(persistedScores.length).to.greaterThan(1); // the risk score is calculated once by the risk engine and a second time by the API + const [persistedScoreByApi, persistedScoreByEngine] = normalizeScores(persistedScores); + expect(persistedScoreByApi).to.eql(expectedScore); + expect(persistedScoreByApi).to.eql(persistedScoreByEngine); - expect(persistedScore).to.eql(expectedScore); const [rawScore] = persistedScores; expect( rawScore.host?.risk.category_1_score! + rawScore.host?.risk.category_2_score! ).to.be.within( - persistedScore.calculated_score_norm! - 0.000000000000001, - persistedScore.calculated_score_norm! + 0.000000000000001 + persistedScoreByApi.calculated_score_norm! - 0.000000000000001, + persistedScoreByApi.calculated_score_norm! + 0.000000000000001 ); }); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule.cy.ts index 6f804f9385e63..2b0b9f3fdab61 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule.cy.ts @@ -64,6 +64,7 @@ import { EQL_OPTIONS_TIMESTAMP_INPUT, EQL_QUERY_INPUT, EQL_QUERY_VALIDATION_ERROR, + EQL_QUERY_VALIDATION_ERROR_CONTENT, RULES_CREATION_FORM, } from '../../../../screens/create_new_rule'; @@ -222,4 +223,65 @@ describe('EQL rules', { tags: ['@ess', '@serverless'] }, () => { cy.get(EQL_QUERY_VALIDATION_ERROR).should('not.exist'); }); }); + + describe('EQL query validation', () => { + it('validates missing data source', () => { + login(); + visit(CREATE_RULE_URL); + selectEqlRuleType(); + getIndexPatternClearButton().click(); + getRuleIndexInput().type('endgame-*{enter}'); + + cy.get(RULES_CREATION_FORM).find(EQL_QUERY_INPUT).should('exist'); + cy.get(RULES_CREATION_FORM).find(EQL_QUERY_INPUT).should('be.visible'); + cy.get(RULES_CREATION_FORM).find(EQL_QUERY_INPUT).type('any where true'); + + cy.get(EQL_QUERY_VALIDATION_ERROR).should('be.visible'); + cy.get(EQL_QUERY_VALIDATION_ERROR).should('have.text', '1'); + cy.get(EQL_QUERY_VALIDATION_ERROR).click(); + cy.get(EQL_QUERY_VALIDATION_ERROR_CONTENT).should('be.visible'); + cy.get(EQL_QUERY_VALIDATION_ERROR_CONTENT).should( + 'have.text', + `EQL Validation Errorsindex_not_found_exception\n\tCaused by:\n\t\tverification_exception: Found 1 problem\nline -1:-1: Unknown index [*,-*]\n\tRoot causes:\n\t\tverification_exception: Found 1 problem\nline -1:-1: Unknown index [*,-*]` + ); + }); + + it('validates missing data fields', () => { + login(); + visit(CREATE_RULE_URL); + selectEqlRuleType(); + + cy.get(RULES_CREATION_FORM).find(EQL_QUERY_INPUT).should('exist'); + cy.get(RULES_CREATION_FORM).find(EQL_QUERY_INPUT).should('be.visible'); + cy.get(RULES_CREATION_FORM).find(EQL_QUERY_INPUT).type('any where field1'); + + cy.get(EQL_QUERY_VALIDATION_ERROR).should('be.visible'); + cy.get(EQL_QUERY_VALIDATION_ERROR).should('have.text', '1'); + cy.get(EQL_QUERY_VALIDATION_ERROR).click(); + cy.get(EQL_QUERY_VALIDATION_ERROR_CONTENT).should('be.visible'); + cy.get(EQL_QUERY_VALIDATION_ERROR_CONTENT).should( + 'have.text', + 'EQL Validation ErrorsFound 1 problem\nline 1:11: Unknown column [field1]' + ); + }); + + it('validates syntax errors', () => { + login(); + visit(CREATE_RULE_URL); + selectEqlRuleType(); + + cy.get(RULES_CREATION_FORM).find(EQL_QUERY_INPUT).should('exist'); + cy.get(RULES_CREATION_FORM).find(EQL_QUERY_INPUT).should('be.visible'); + cy.get(RULES_CREATION_FORM).find(EQL_QUERY_INPUT).type('test any where true'); + + cy.get(EQL_QUERY_VALIDATION_ERROR).should('be.visible'); + cy.get(EQL_QUERY_VALIDATION_ERROR).should('have.text', '1'); + cy.get(EQL_QUERY_VALIDATION_ERROR).click(); + cy.get(EQL_QUERY_VALIDATION_ERROR_CONTENT).should('be.visible'); + cy.get(EQL_QUERY_VALIDATION_ERROR_CONTENT).should( + 'have.text', + `EQL Validation Errorsline 1:6: extraneous input 'any' expecting 'where'` + ); + }); + }); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/esql/discover_timeline_state_integration.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/esql/discover_timeline_state_integration.cy.ts index f27502dcd2bad..8e45d23d35433 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/esql/discover_timeline_state_integration.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/esql/discover_timeline_state_integration.cy.ts @@ -58,12 +58,12 @@ const esqlQuery = 'from auditbeat-* | where ecs.version == "8.0.0"'; const handleIntercepts = () => { cy.intercept('PATCH', '/api/timeline', (req) => { - if (req.body.hasOwnProperty('timeline') && req.body.timeline.savedSearchId === null) { + if (Object.hasOwn(req.body, 'timeline') && req.body.timeline.savedSearchId === null) { req.alias = TIMELINE_PATCH_REQ; } }); cy.intercept('PATCH', '/api/timeline', (req) => { - if (req.body.hasOwnProperty('timeline') && req.body.timeline.savedSearchId !== null) { + if (Object.hasOwn(req.body, 'timeline') && req.body.timeline.savedSearchId !== null) { req.alias = TIMELINE_REQ_WITH_SAVED_SEARCH; } }); diff --git a/x-pack/test/security_solution_cypress/cypress/screens/create_new_rule.ts b/x-pack/test/security_solution_cypress/cypress/screens/create_new_rule.ts index 46b0b3a68734a..4e6df1ed3a750 100644 --- a/x-pack/test/security_solution_cypress/cypress/screens/create_new_rule.ts +++ b/x-pack/test/security_solution_cypress/cypress/screens/create_new_rule.ts @@ -119,6 +119,9 @@ export const EQL_QUERY_VALIDATION_LABEL = '.euiFormLabel-isInvalid'; export const EQL_QUERY_VALIDATION_ERROR = '[data-test-subj="eql-validation-errors-popover-button"]'; +export const EQL_QUERY_VALIDATION_ERROR_CONTENT = + '[data-test-subj="eql-validation-errors-popover-content"]'; + export const EQL_OPTIONS_POPOVER_TRIGGER = '[data-test-subj="eql-settings-trigger"]'; export const EQL_OPTIONS_TIMESTAMP_INPUT = diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/privileges.ts b/x-pack/test/security_solution_cypress/cypress/tasks/privileges.ts index 04dddd6da4384..bd7c9d9178198 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/privileges.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/privileges.ts @@ -64,6 +64,7 @@ export const secAll: Role = { feature: { siem: ['all'], securitySolutionAssistant: ['all'], + securitySolutionAttackDiscovery: ['all'], securitySolutionCases: ['all'], actions: ['all'], actionsSimulators: ['all'], @@ -96,6 +97,7 @@ export const secReadCasesAll: Role = { feature: { siem: ['read'], securitySolutionAssistant: ['all'], + securitySolutionAttackDiscovery: ['all'], securitySolutionCases: ['all'], actions: ['all'], actionsSimulators: ['all'], @@ -128,6 +130,7 @@ export const secAllCasesOnlyReadDelete: Role = { feature: { siem: ['all'], securitySolutionAssistant: ['all'], + securitySolutionAttackDiscovery: ['all'], securitySolutionCases: ['cases_read', 'cases_delete'], actions: ['all'], actionsSimulators: ['all'], @@ -160,6 +163,7 @@ export const secAllCasesNoDelete: Role = { feature: { siem: ['all'], securitySolutionAssistant: ['all'], + securitySolutionAttackDiscovery: ['all'], securitySolutionCases: ['minimal_all'], actions: ['all'], actionsSimulators: ['all'], diff --git a/x-pack/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts b/x-pack/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts index 6987186c7d525..49b0794accb5b 100644 --- a/x-pack/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts +++ b/x-pack/test/spaces_api_integration/spaces_only/telemetry/telemetry.ts @@ -82,6 +82,7 @@ export default function ({ getService }: FtrProviderContext) { siem: 0, securitySolutionCases: 0, securitySolutionAssistant: 0, + securitySolutionAttackDiscovery: 0, discover: 0, visualize: 0, dashboard: 0, diff --git a/x-pack/test/stack_functional_integration/apps/ccs/ccs_console.js b/x-pack/test/stack_functional_integration/apps/ccs/ccs_console.js index 940e624336caf..01205ed528a1c 100644 --- a/x-pack/test/stack_functional_integration/apps/ccs/ccs_console.js +++ b/x-pack/test/stack_functional_integration/apps/ccs/ccs_console.js @@ -30,7 +30,7 @@ export default function ({ getService, getPageObjects }) { await PageObjects.console.monaco.clearEditorText(); }); it('it should be able to access remote data', async () => { - await PageObjects.console.enterRequest( + await PageObjects.console.monaco.enterText( '\nGET ftr-remote:makelogs工程-*/_search\n {\n "query": {\n "bool": {\n "must": [\n {"match": {"extension" : "jpg"} \n}\n}\n}\n}\n}' ); await PageObjects.console.clickPlay(); diff --git a/x-pack/test/tsconfig.json b/x-pack/test/tsconfig.json index 974a206d71e3f..9d56d273a8205 100644 --- a/x-pack/test/tsconfig.json +++ b/x-pack/test/tsconfig.json @@ -177,6 +177,7 @@ "@kbn/entities-schema", "@kbn/actions-simulators-plugin", "@kbn/cases-api-integration-test-plugin", + "@kbn/management-settings-ids", "@kbn/mock-idp-utils" ] } diff --git a/x-pack/test/ui_capabilities/security_and_spaces/tests/nav_links.ts b/x-pack/test/ui_capabilities/security_and_spaces/tests/nav_links.ts index b2955ade938b1..f51f169b51a35 100644 --- a/x-pack/test/ui_capabilities/security_and_spaces/tests/nav_links.ts +++ b/x-pack/test/ui_capabilities/security_and_spaces/tests/nav_links.ts @@ -83,7 +83,8 @@ export default function navLinksTests({ getService }: FtrProviderContext) { 'appSearch', 'workplaceSearch', 'guidedOnboardingFeature', - 'securitySolutionAssistant' + 'securitySolutionAssistant', + 'securitySolutionAttackDiscovery' ) ); break; diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/settings.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/settings.ts index b54393da6f6f7..a2c10a39a3859 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/settings.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/settings.ts @@ -49,7 +49,7 @@ export default function ({ getService }: FtrProviderContext) { // Make sure none of the settings have been removed from ES API expectedSettings.forEach((setting) => { try { - expect(body.defaults.index.hasOwnProperty(setting)).to.eql(true); + expect(Object.hasOwn(body.defaults.index, setting)).to.eql(true); } catch { throw new Error(`Expected setting "${setting}" not found.`); } diff --git a/x-pack/test_serverless/api_integration/test_suites/common/management/spaces.ts b/x-pack/test_serverless/api_integration/test_suites/common/management/spaces.ts index 4a8f65e4a9514..5c1e22811bdc3 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/management/spaces.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/management/spaces.ts @@ -39,7 +39,9 @@ export default function ({ getService }: FtrProviderContext) { svlCommonApi.assertResponseStatusCode(400, status, body); }); - it('#create', async () => { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + it.skip('#create', async () => { const { body, status } = await supertestWithoutAuth .post('/api/spaces/space') .set(internalRequestHeader) diff --git a/x-pack/test_serverless/api_integration/test_suites/common/platform_security/authorization.ts b/x-pack/test_serverless/api_integration/test_suites/common/platform_security/authorization.ts index 7c7f3caea8526..95277f9ea8d79 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/platform_security/authorization.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/platform_security/authorization.ts @@ -42,7 +42,9 @@ export default function ({ getService }: FtrProviderContext) { describe('route access', () => { describe('internal', () => { describe('disabled', () => { - it('get all privileges', async () => { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + it.skip('get all privileges', async () => { const { body, status } = await supertestWithoutAuth .get('/api/security/privileges') .set(svlCommonApi.getInternalRequestHeader()) @@ -50,7 +52,9 @@ export default function ({ getService }: FtrProviderContext) { svlCommonApi.assertApiNotFound(body, status); }); - it('get built-in elasticsearch privileges', async () => { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + it.skip('get built-in elasticsearch privileges', async () => { const { body, status } = await supertestWithoutAuth .get('/internal/security/esPrivileges/builtin') .set(svlCommonApi.getInternalRequestHeader()) diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/data_stream_settings.ts b/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/data_stream_settings.ts index c7550395b303c..37bfc688c9ec9 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/data_stream_settings.ts +++ b/x-pack/test_serverless/api_integration/test_suites/observability/dataset_quality_api_integration/data_stream_settings.ts @@ -29,6 +29,10 @@ export default function ({ getService }: DatasetQualityFtrContextProvider) { const serviceName = 'my-service'; const hostName = 'synth-host'; + const defaultDataStreamPrivileges = { + datasetUserPrivileges: { canRead: true, canMonitor: true, canViewIntegrations: true }, + }; + async function callApi( dataStream: string, roleAuthc: RoleCredentials, @@ -85,11 +89,11 @@ export default function ({ getService }: DatasetQualityFtrContextProvider) { expect(err.res.body.message.indexOf(expectedMessage)).to.greaterThan(-1); }); - it('returns {} if matching data stream is not available', async () => { + it('returns only privileges if matching data stream is not available', async () => { const nonExistentDataSet = 'Non-existent'; const nonExistentDataStream = `${type}-${nonExistentDataSet}-${namespace}`; const resp = await callApi(nonExistentDataStream, roleAuthc, internalReqHeader); - expect(resp.body).empty(); + expect(resp.body).eql(defaultDataStreamPrivileges); }); it('returns "createdOn" correctly', async () => { diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/infra/asset_count.ts b/x-pack/test_serverless/api_integration/test_suites/observability/infra/asset_count.ts index 507fba009b858..99ee61ccf2b67 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/infra/asset_count.ts +++ b/x-pack/test_serverless/api_integration/test_suites/observability/infra/asset_count.ts @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import type { - GetInfraAssetCountRequestBodyPayload, + GetInfraAssetCountRequestBodyPayloadClient, GetInfraAssetCountResponsePayload, GetInfraAssetCountRequestParamsPayload, } from '@kbn/infra-plugin/common/http_api'; @@ -33,7 +33,7 @@ export default function ({ getService }: FtrProviderContext) { roleAuthc, }: { params: GetInfraAssetCountRequestParamsPayload; - body: GetInfraAssetCountRequestBodyPayload; + body: GetInfraAssetCountRequestBodyPayloadClient; roleAuthc: RoleCredentials; }): Promise => { const { assetType } = params; @@ -73,7 +73,6 @@ export default function ({ getService }: FtrProviderContext) { }, from: timeRange.from, to: timeRange.to, - sourceId: 'default', }, roleAuthc, }); 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 f196598aa37fd..c4cbfd45663b1 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 @@ -7,7 +7,7 @@ import expect from '@kbn/expect'; import type { - GetInfraMetricsRequestBodyPayload, + GetInfraMetricsRequestBodyPayloadClient, GetInfraMetricsResponsePayload, } from '@kbn/infra-plugin/common/http_api'; import type { RoleCredentials } from '../../../../shared/services'; @@ -27,11 +27,11 @@ export default function ({ getService }: FtrProviderContext) { const svlCommonApi = getService('svlCommonApi'); const fetchInfraHosts = async ( - body: GetInfraMetricsRequestBodyPayload, + body: GetInfraMetricsRequestBodyPayloadClient, roleAuthc: RoleCredentials ): Promise => { const response = await supertestWithoutAuth - .post('/api/metrics/infra') + .post('/api/metrics/infra/host') .set(svlCommonApi.getInternalRequestHeader()) .set(roleAuthc.apiKeyHeader) .send(body) @@ -39,7 +39,7 @@ export default function ({ getService }: FtrProviderContext) { return response.body; }; - describe('API /metrics/infra', () => { + describe('API /metrics/infra/host', () => { let roleAuthc: RoleCredentials; describe('works', () => { describe('with host asset', () => { @@ -55,28 +55,8 @@ export default function ({ getService }: FtrProviderContext) { it('received data', async () => { const infraHosts = await fetchInfraHosts( { - type: 'host', limit: 100, - metrics: [ - { - type: 'rx', - }, - { - type: 'tx', - }, - { - type: 'memory', - }, - { - type: 'cpu', - }, - { - type: 'diskSpaceUsage', - }, - { - type: 'memoryFree', - }, - ], + metrics: ['rxV2', 'txV2', 'memory', 'cpuV2', 'diskSpaceUsage', 'memoryFree'], query: { bool: { must: [], @@ -85,10 +65,8 @@ export default function ({ getService }: FtrProviderContext) { must_not: [], }, }, - range: { - from: timeRange.from, - to: timeRange.to, - }, + from: timeRange.from, + to: timeRange.to, }, roleAuthc ); @@ -114,30 +92,31 @@ export default function ({ getService }: FtrProviderContext) { ], metrics: [ { - name: 'rx', - value: 133425.6, + name: 'rxV2', + value: 17886.18845261874, }, { - name: 'tx', - value: 135892.3, + name: 'txV2', + value: 18216.85858680644, }, { name: 'memory', value: 0.9490000000000001, }, { - name: 'cpu', - value: 1.021, + name: 'cpuV2', + value: 0.124, }, { name: 'diskSpaceUsage', - value: 0, + value: null, }, { name: 'memoryFree', value: 1753829376, }, ], + hasSystemMetrics: true, name: 'serverless-host', }); } else { diff --git a/x-pack/test_serverless/functional/page_objects/svl_triggers_actions_ui_page.ts b/x-pack/test_serverless/functional/page_objects/svl_triggers_actions_ui_page.ts index c084e3eda6a7b..a2289ce1a2662 100644 --- a/x-pack/test_serverless/functional/page_objects/svl_triggers_actions_ui_page.ts +++ b/x-pack/test_serverless/functional/page_objects/svl_triggers_actions_ui_page.ts @@ -51,7 +51,7 @@ export function SvlTriggersActionsPageProvider({ getService }: FtrProviderContex return await noPermissionsTitle.getVisibleText(); }, async clickCreateConnectorButton() { - const createBtn = await testSubjects.find('createActionButton'); + const createBtn = await testSubjects.find('createConnectorButton'); const createBtnIsVisible = await createBtn.isDisplayed(); if (createBtnIsVisible) { await createBtn.click(); diff --git a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_default_app_state.ts b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_default_app_state.ts index c99f556b2f52d..7203793330590 100644 --- a/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_default_app_state.ts +++ b/x-pack/test_serverless/functional/test_suites/common/discover/context_awareness/extensions/_get_default_app_state.ts @@ -10,13 +10,20 @@ import kbnRison from '@kbn/rison'; import type { FtrProviderContext } from '../../../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const PageObjects = getPageObjects(['common', 'discover', 'svlCommonPage', 'unifiedFieldList']); + const PageObjects = getPageObjects([ + 'common', + 'discover', + 'svlCommonPage', + 'unifiedFieldList', + 'header', + ]); const dataViews = getService('dataViews'); const dataGrid = getService('dataGrid'); const queryBar = getService('queryBar'); const monacoEditor = getService('monacoEditor'); const testSubjects = getService('testSubjects'); const kibanaServer = getService('kibanaServer'); + const retry = getService('retry'); describe('extension getDefaultAppState', () => { before(async () => { @@ -27,6 +34,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.uiSettings.unset('defaultColumns'); }); + async function expectColumns(columns: string[]) { + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await retry.try(async () => { + const actualColumns = await PageObjects.discover.getColumnHeaders(); + expect(actualColumns).to.eql(columns); + }); + } + describe('ES|QL mode', () => { it('should render default columns and row height', async () => { const state = kbnRison.encode({ @@ -38,9 +54,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.common.navigateToActualUrl('discover', `?_a=${state}`, { ensureCurrentUrl: false, }); - await PageObjects.discover.waitUntilSearchingHasFinished(); - const columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message']); + await expectColumns(['@timestamp', 'log.level', 'message']); await dataGrid.clickGridSettings(); const rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -58,9 +72,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.common.navigateToActualUrl('discover', `?_a=${state}`, { ensureCurrentUrl: false, }); - await PageObjects.discover.waitUntilSearchingHasFinished(); - let columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'Document']); + await expectColumns(['@timestamp', 'Document']); await dataGrid.clickGridSettings(); let rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -68,9 +80,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(rowHeightNumber).to.be(3); await monacoEditor.setCodeEditorValue('from my-example-logs'); await queryBar.clickQuerySubmitButton(); - await PageObjects.discover.waitUntilSearchingHasFinished(); - columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message']); + await expectColumns(['@timestamp', 'log.level', 'message']); await dataGrid.clickGridSettings(); rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -91,16 +101,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.waitUntilSearchingHasFinished(); await PageObjects.unifiedFieldList.clickFieldListItemRemove('log.level'); await PageObjects.unifiedFieldList.clickFieldListItemRemove('message'); - let columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'Document']); + await expectColumns(['@timestamp', 'Document']); await dataGrid.clickGridSettings(); await dataGrid.changeRowHeightValue('Single'); let rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Single'); await testSubjects.click('discoverNewButton'); - await PageObjects.discover.waitUntilSearchingHasFinished(); - columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message']); + await expectColumns(['@timestamp', 'log.level', 'message']); await dataGrid.clickGridSettings(); rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -121,22 +128,17 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.common.navigateToActualUrl('discover', `?_a=${state}`, { ensureCurrentUrl: false, }); - await PageObjects.discover.waitUntilSearchingHasFinished(); - const columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message', 'data_stream.type']); + await expectColumns(['@timestamp', 'log.level', 'message', 'data_stream.type']); }); }); - // FLAKY: https://github.com/elastic/kibana/issues/189994 - describe.skip('data view mode', () => { + describe('data view mode', () => { it('should render default columns and row height', async () => { await PageObjects.common.navigateToActualUrl('discover', undefined, { ensureCurrentUrl: false, }); await dataViews.switchTo('my-example-logs'); - await PageObjects.discover.waitUntilSearchingHasFinished(); - const columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message']); + await expectColumns(['@timestamp', 'log.level', 'message']); await dataGrid.clickGridSettings(); const rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -149,18 +151,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ensureCurrentUrl: false, }); await dataViews.switchTo('my-example-*'); - await PageObjects.discover.waitUntilSearchingHasFinished(); - let columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'Document']); + await expectColumns(['@timestamp', 'Document']); await dataGrid.clickGridSettings(); let rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); let rowHeightNumber = await dataGrid.getCustomRowHeightNumber(); expect(rowHeightNumber).to.be(3); await dataViews.switchTo('my-example-logs'); - await PageObjects.discover.waitUntilSearchingHasFinished(); - columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message']); + await expectColumns(['@timestamp', 'log.level', 'message']); await dataGrid.clickGridSettings(); rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -176,16 +174,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.waitUntilSearchingHasFinished(); await PageObjects.unifiedFieldList.clickFieldListItemRemove('log.level'); await PageObjects.unifiedFieldList.clickFieldListItemRemove('message'); - let columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'Document']); + await expectColumns(['@timestamp', 'Document']); await dataGrid.clickGridSettings(); await dataGrid.changeRowHeightValue('Single'); let rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Single'); await testSubjects.click('discoverNewButton'); - await PageObjects.discover.waitUntilSearchingHasFinished(); - columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message']); + await expectColumns(['@timestamp', 'log.level', 'message']); await dataGrid.clickGridSettings(); rowHeightValue = await dataGrid.getCurrentRowHeightValue(); expect(rowHeightValue).to.be('Custom'); @@ -201,9 +196,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ensureCurrentUrl: false, }); await dataViews.switchTo('my-example-logs'); - await PageObjects.discover.waitUntilSearchingHasFinished(); - const columns = await PageObjects.discover.getColumnHeaders(); - expect(columns).to.eql(['@timestamp', 'log.level', 'message', 'data_stream.type']); + await expectColumns(['@timestamp', 'log.level', 'message', 'data_stream.type']); }); }); }); diff --git a/x-pack/test_serverless/functional/test_suites/common/management/data_views/serverless.ts b/x-pack/test_serverless/functional/test_suites/common/management/data_views/serverless.ts index 83f70a465a49e..d97ee9fce2cd4 100644 --- a/x-pack/test_serverless/functional/test_suites/common/management/data_views/serverless.ts +++ b/x-pack/test_serverless/functional/test_suites/common/management/data_views/serverless.ts @@ -100,7 +100,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); - describe('when in single space mode', function () { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + describe.skip('when in single space mode', function () { let dataViewId = ''; before(async () => { await esArchiver.load( diff --git a/x-pack/test_serverless/functional/test_suites/common/management/landing_page.ts b/x-pack/test_serverless/functional/test_suites/common/management/landing_page.ts index 1796997bd7d77..1080ba0bc5c6b 100644 --- a/x-pack/test_serverless/functional/test_suites/common/management/landing_page.ts +++ b/x-pack/test_serverless/functional/test_suites/common/management/landing_page.ts @@ -47,7 +47,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }).not.to.throwError(); }); - describe('Roles management card', () => { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + describe.skip('Roles management card', () => { it('should not be displayed by default', async () => { await retry.waitFor('page to be visible', async () => { return await testSubjects.exists('cards-navigation-page'); @@ -56,7 +58,9 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { }); }); - describe('Organization members management card', () => { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + describe.skip('Organization members management card', () => { it('should not be displayed by default', async () => { await retry.waitFor('page to be visible', async () => { return await testSubjects.exists('cards-navigation-page'); diff --git a/x-pack/test_serverless/functional/test_suites/common/spaces/spaces_selection.ts b/x-pack/test_serverless/functional/test_suites/common/spaces/spaces_selection.ts index 47c63fc237137..526d0b3db5a41 100644 --- a/x-pack/test_serverless/functional/test_suites/common/spaces/spaces_selection.ts +++ b/x-pack/test_serverless/functional/test_suites/common/spaces/spaces_selection.ts @@ -12,7 +12,9 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { const svlCommonNavigation = getService('svlCommonNavigation'); const testSubjects = getService('testSubjects'); - describe('space selection', function () { + // Skipped due to change in QA environment for role management and spaces + // TODO: revisit once the change is rolled out to all environments + describe.skip('space selection', function () { before(async () => { await svlCommonPage.loginAsViewer(); }); diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/gauge.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/gauge.ts index e6abe73345b80..ab86b163ef6ee 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/gauge.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/gauge.ts @@ -69,13 +69,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should not convert aggregation with not supported field type', async () => { - const visPanel = await panelActions.getPanelHeading('Gauge - Unsupported field type'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Gauge - Unsupported field type')).to.eql( + false + ); }); it('should convert color ranges', async () => { - const visPanel = await panelActions.getPanelHeading('Gauge - Color ranges'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Gauge - Color ranges'); await lens.waitForVisualization('gaugeChart'); expect(await lens.getLayerCount()).to.be(1); diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/goal.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/goal.ts index 250241dbb43fe..97ace2684cb85 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/goal.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/goal.ts @@ -40,13 +40,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should show the "Convert to Lens" menu item', async () => { - const visPanel = await panelActions.getPanelHeading('Goal - Basic'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(true); + expect(await panelActions.canConvertToLensByTitle('Goal - Basic')).to.eql(true); }); it('should convert to Lens', async () => { - const visPanel = await panelActions.getPanelHeading('Goal - Basic'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Goal - Basic'); await lens.waitForVisualization('mtrVis'); const data = await lens.getMetricVisualizationData(); expect(data.length).to.be.equal(1); @@ -65,8 +63,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert aggregation with params', async () => { - const visPanel = await panelActions.getPanelHeading('Goal - Agg with params'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Goal - Agg with params'); await lens.waitForVisualization('mtrVis'); expect(await lens.getLayerCount()).to.be(1); @@ -93,8 +90,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert sibling pipeline aggregation', async () => { - const visPanel = await panelActions.getPanelHeading('Goal - Sibling pipeline agg'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Goal - Sibling pipeline agg'); await lens.waitForVisualization('mtrVis'); expect(await lens.getLayerCount()).to.be(1); @@ -122,8 +118,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert color ranges', async () => { - const visPanel = await panelActions.getPanelHeading('Goal - Color ranges'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Goal - Color ranges'); await lens.waitForVisualization('mtrVis'); expect(await lens.getLayerCount()).to.be(1); diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/heatmap.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/heatmap.ts index 836dceaee8b4e..3d292dc5f44fd 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/heatmap.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/heatmap.ts @@ -39,18 +39,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should show the "Convert to Lens" menu item if no X-axis was specified', async () => { - const visPanel = await panelActions.getPanelHeading('Heatmap - With Y-Axis only'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(true); + expect(await panelActions.canConvertToLensByTitle('Heatmap - With Y-Axis only')).to.eql(true); }); it('should show the "Convert to Lens" menu item', async () => { - const visPanel = await panelActions.getPanelHeading('Heatmap - With X-Axis only'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(true); + expect(await panelActions.canConvertToLensByTitle('Heatmap - With X-Axis only')).to.eql(true); }); it('should convert to Lens', async () => { - const visPanel = await panelActions.getPanelHeading('Heatmap - With X-Axis only'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Heatmap - With X-Axis only'); await lens.waitForVisualization('heatmapChart'); await lens.enableEchDebugState(); const debugState = await lens.getCurrentChartDebugState('heatmapChart'); @@ -83,8 +80,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert to Lens if Y-axis is defined, but X-axis is not', async () => { - const visPanel = await panelActions.getPanelHeading('Heatmap - With Y-Axis only'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Heatmap - With Y-Axis only'); await lens.waitForVisualization('heatmapChart'); await lens.enableEchDebugState(); const debugState = await lens.getCurrentChartDebugState('heatmapChart'); @@ -98,8 +94,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should respect heatmap colors number', async () => { - const visPanel = await panelActions.getPanelHeading('Heatmap - Color number'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Heatmap - Color number'); await lens.waitForVisualization('heatmapChart'); await lens.enableEchDebugState(); const debugState = await lens.getCurrentChartDebugState('heatmapChart'); @@ -118,8 +113,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should show respect heatmap custom color ranges', async () => { - const visPanel = await panelActions.getPanelHeading('Heatmap - Custom Color ranges'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Heatmap - Custom Color ranges'); await lens.waitForVisualization('heatmapChart'); await lens.enableEchDebugState(); const debugState = await lens.getCurrentChartDebugState('heatmapChart'); diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/metric.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/metric.ts index 31bbbca2e2718..711deb6b73e4c 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/metric.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/metric.ts @@ -40,8 +40,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert to Lens', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Basic'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Metric - Basic'); await lens.waitForVisualization('mtrVis'); const data = await lens.getMetricVisualizationData(); @@ -61,8 +60,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert aggregation with params', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Agg with params'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Metric - Agg with params'); await lens.waitForVisualization('mtrVis'); expect(await lens.getLayerCount()).to.be(1); @@ -88,8 +86,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert sibling pipeline aggregation', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Sibling pipeline agg'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Metric - Sibling pipeline agg'); await lens.waitForVisualization('mtrVis'); expect(await lens.getLayerCount()).to.be(1); @@ -116,13 +113,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should not convert aggregation with not supported field type', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Unsupported field type'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Metric - Unsupported field type')).to.eql( + false + ); }); it('should convert color ranges', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Color ranges'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Metric - Color ranges'); await lens.waitForVisualization('mtrVis'); expect(await lens.getLayerCount()).to.be(1); diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/pie.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/pie.ts index bdd51d65b703d..248bd25ae7f90 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/pie.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/pie.ts @@ -41,23 +41,19 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should hide the "Convert to Lens" menu item if no split slices were defined', async () => { - const visPanel = await panelActions.getPanelHeading('Pie - No split slices'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Pie - No split slices')).to.eql(false); }); it('should hide the "Convert to Lens" menu item if more than 3 split slices were defined', async () => { - const visPanel = await panelActions.getPanelHeading('Pie - 4 layers'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Pie - 4 layers')).to.eql(false); }); it('should show the "Convert to Lens" menu item', async () => { - const visPanel = await panelActions.getPanelHeading('Pie - 1 Split slice'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(true); + expect(await panelActions.canConvertToLensByTitle('Pie - 1 Split slice')).to.eql(true); }); it('should convert aggregation with params', async () => { - const visPanel = await panelActions.getPanelHeading('Pie - Agg with params'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Pie - Agg with params'); await lens.waitForVisualization('partitionVisChart'); expect(await lens.getLayerCount()).to.be(1); @@ -74,8 +70,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { it('should convert terms to slice by', async () => { const expectedTableData = ['ios', 'osx', 'win 7', 'win 8', 'win xp']; - const visPanel = await panelActions.getPanelHeading('Pie - Basic count'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Pie - Basic count'); await lens.waitForVisualization('partitionVisChart'); await lens.enableEchDebugState(); @@ -91,8 +86,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert Donut type correctly', async () => { - const visPanel = await panelActions.getPanelHeading('Pie - Basic count'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Pie - Basic count'); await lens.waitForVisualization('partitionVisChart'); const chartSwitcher = await testSubjects.find('lnsChartSwitchPopover'); @@ -101,8 +95,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert Pie types correctly', async () => { - const visPanel = await panelActions.getPanelHeading('Pie - Non Donut'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Pie - Non Donut'); await lens.waitForVisualization('partitionVisChart'); const chartSwitcher = await testSubjects.find('lnsChartSwitchPopover'); diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/table.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/table.ts index 7fa380951a12d..b02ab28fc6848 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/table.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/table.ts @@ -41,18 +41,15 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should not allow converting of unsupported aggregations', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Unsupported Agg'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Table - Unsupported Agg')).to.eql(false); }); it('should show the "Convert to Lens" menu item', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Agg with params'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(true); + expect(await panelActions.canConvertToLensByTitle('Table - Agg with params')).to.eql(true); }); it('should convert aggregation with params', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Agg with params'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Table - Agg with params'); await lens.waitForVisualization('lnsDataTable'); expect(await lens.getLayerCount()).to.be(1); @@ -63,8 +60,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert total function to summary row', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Summary row'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Table - Summary row'); await lens.waitForVisualization('lnsDataTable'); expect(await lens.getLayerCount()).to.be(1); @@ -80,8 +76,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert sibling pipeline aggregation', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Sibling pipeline agg'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Table - Sibling pipeline agg'); await lens.waitForVisualization('lnsDataTable'); expect(await lens.getLayerCount()).to.be(1); @@ -96,8 +91,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert parent pipeline aggregation', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Parent pipeline agg'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Table - Parent pipeline agg'); await lens.waitForVisualization('lnsDataTable'); expect(await lens.getLayerCount()).to.be(1); @@ -112,8 +106,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert split rows and split table to split table rows', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Split rows and tables'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Table - Split rows and tables'); await lens.waitForVisualization('lnsDataTable'); expect(await lens.getLayerCount()).to.be(1); @@ -130,8 +123,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert percentage column', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Percentage Column'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Table - Percentage Column'); await lens.waitForVisualization('lnsDataTable'); expect(await lens.getLayerCount()).to.be(1); diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/xy.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/xy.ts index 4f2d9ff033da8..1ec4c040ab916 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/xy.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group2/open_in_lens/agg_based/xy.ts @@ -41,38 +41,35 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should not allow converting if dot size aggregation is defined', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Dot size metric'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('XY - Dot size metric')).to.eql(false); }); it('should not allow converting if split chart is defined', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Split chart'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('XY - Split chart')).to.eql(false); }); it('should not allow converting if more than one axis left/right/top/bottom are defined', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Multiple Y Axes'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('XY - Multiple Y Axes')).to.eql(false); }); it('should not allow converting if several split series are defined', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Multiple Split Series'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('XY - Multiple Split Series')).to.eql( + false + ); }); it('should not allow converting if sibling pipeline agg and split series are defined', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Sibling pipeline agg w/ split'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect( + await panelActions.canConvertToLensByTitle('XY - Sibling pipeline agg w/ split') + ).to.eql(false); }); it('should not allow converting of unsupported aggregation', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Unsupported Agg'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('XY - Unsupported Agg')).to.eql(false); }); it('should convert in different layers if metrics have different chart types', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Differing Layers'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('XY - Differing Layers'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { @@ -89,8 +86,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert in one layer if metrics have the same chart type', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Similar Layers'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('XY - Similar Layers'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { @@ -106,8 +102,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert parent pipeline aggregation', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Parent pipeline agg'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('XY - Parent pipeline agg'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { @@ -120,8 +115,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert sibling pipeline aggregation', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Sibling pipeline agg'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('XY - Sibling pipeline agg'); await lens.waitForVisualization('xyVisChart'); expect(await lens.getLayerCount()).to.be(1); @@ -138,8 +132,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should draw a reference line', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Reference line'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('XY - Reference line'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { @@ -156,8 +149,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert line stacked to area stacked chart', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Stacked lines'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('XY - Stacked lines'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { @@ -169,8 +161,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert percentage charts', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Percentage chart'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('XY - Percentage chart'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { @@ -182,8 +173,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert horizontal bar', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Horizontal Bar'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('XY - Horizontal Bar'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { @@ -195,8 +185,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert y-axis positions', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Axis positions'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('XY - Axis positions'); await lens.waitForVisualization('xyVisChart'); expect(await lens.getLayerCount()).to.be(1); @@ -217,8 +206,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert split series', async () => { - const visPanel = await panelActions.getPanelHeading('XY - Split Series'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('XY - Split Series'); await lens.waitForVisualization('xyVisChart'); const expectedData = ['win 8', 'win xp', 'win 7', 'ios', 'osx']; @@ -237,8 +225,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert x-axis', async () => { - const visPanel = await panelActions.getPanelHeading('XY - X Axis'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('XY - X Axis'); await lens.waitForVisualization('xyVisChart'); const expectedData = ['Count']; diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/dashboard.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/dashboard.ts index d512d355c9bfc..2569695008ed1 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/dashboard.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/dashboard.ts @@ -54,8 +54,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await dashboard.waitForRenderComplete(); await dashboardBadgeActions.expectExistsTimeRangeBadgeAction(); - const visPanel = await panelActions.getPanelHeading('My TSVB to Lens viz 1'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('My TSVB to Lens viz 1'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { @@ -93,8 +92,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { await dashboard.waitForRenderComplete(); await dashboardBadgeActions.expectExistsTimeRangeBadgeAction(); - const visPanel = await panelActions.getPanelHeading('My TSVB to Lens viz 2'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('My TSVB to Lens viz 2'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/gauge.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/gauge.ts index 7cfb968d8edc1..a7e8a3e293370 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/gauge.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/gauge.ts @@ -36,13 +36,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should show the "Convert to Lens" menu item', async () => { - const visPanel = await panelActions.getPanelHeading('Gauge - Basic'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(true); + expect(await panelActions.canConvertToLensByTitle('Gauge - Basic')).to.eql(true); }); it('should convert to Lens', async () => { - const visPanel = await panelActions.getPanelHeading('Gauge - Basic'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Gauge - Basic'); await lens.waitForVisualization('mtrVis'); const metricData = await lens.getMetricVisualizationData(); @@ -50,8 +48,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert metric with params', async () => { - const visPanel = await panelActions.getPanelHeading('Gauge - Value count'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Gauge - Value count'); await lens.waitForVisualization('mtrVis'); await retry.try(async () => { const layers = await find.allByCssSelector(`[data-test-subj^="lns-layerPanel-"]`); @@ -65,18 +62,17 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should not allow converting of unsupported metric', async () => { - const visPanel = await panelActions.getPanelHeading('Gauge - Unsupported metric'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Gauge - Unsupported metric')).to.eql( + false + ); }); it('should not allow converting of invalid panel', async () => { - const visPanel = await panelActions.getPanelHeading('Gauge - Invalid panel'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Gauge - Invalid panel')).to.eql(false); }); it('should convert color ranges', async () => { - const visPanel = await panelActions.getPanelHeading('Gauge - Color ranges'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Gauge - Color ranges'); await lens.waitForVisualization('mtrVis'); await retry.try(async () => { @@ -106,15 +102,13 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should bring the ignore global filters configured at series level over', async () => { - const visPanel = await panelActions.getPanelHeading('Gauge - Ignore global filters series'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Gauge - Ignore global filters series'); await lens.waitForVisualization('mtrVis'); expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true); }); it('should bring the ignore global filters configured at panel level over', async () => { - const visPanel = await panelActions.getPanelHeading('Gauge - Ignore global filters panel'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Gauge - Ignore global filters panel'); await lens.waitForVisualization('mtrVis'); expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true); }); diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/metric.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/metric.ts index a9e668160eab5..b49b3235cb67c 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/metric.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/metric.ts @@ -35,13 +35,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should show the "Convert to Lens" menu item', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Basic'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(true); + expect(await panelActions.canConvertToLensByTitle('Metric - Basic')).to.eql(true); }); it('should convert to Lens', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Basic'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Metric - Basic'); await lens.waitForVisualization('mtrVis'); const metricData = await lens.getMetricVisualizationData(); @@ -49,8 +47,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should draw static value', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Static value'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Metric - Static value'); await lens.waitForVisualization('mtrVis'); await retry.try(async () => { @@ -63,8 +60,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert metric agg with params', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Agg with params'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Metric - Agg with params'); await lens.waitForVisualization('mtrVis'); await retry.try(async () => { @@ -77,18 +73,17 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should not allow converting of unsupported metric', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Unsupported metric'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Metric - Unsupported metric')).to.eql( + false + ); }); it('should not allow converting of invalid panel', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Invalid panel'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Metric - Invalid panel')).to.eql(false); }); it('should convert color ranges', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Color ranges'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Metric - Color ranges'); await lens.waitForVisualization('mtrVis'); await retry.try(async () => { @@ -116,16 +111,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should bring the ignore global filters configured at series level over', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Ignore global filters series'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Metric - Ignore global filters series'); await lens.waitForVisualization('mtrVis'); expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true); }); it('should bring the ignore global filters configured at panel level over', async () => { - const visPanel = await panelActions.getPanelHeading('Metric - Ignore global filters panel'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Metric - Ignore global filters panel'); await lens.waitForVisualization('mtrVis'); expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true); diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/table.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/table.ts index 707452f430d2f..a9243c7dd4f87 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/table.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/table.ts @@ -42,43 +42,41 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should allow converting a count aggregation', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Basic'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(true); + expect(await panelActions.canConvertToLensByTitle('Table - Basic')).to.eql(true); }); it('should not allow converting of not valid panel', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Invalid panel'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Table - Invalid panel')).to.eql(false); }); it('should not allow converting of unsupported aggregations', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Unsupported agg'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Table - Unsupported agg')).to.eql(false); }); it('should not allow converting sibling pipeline aggregations', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Sibling pipeline agg'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Table - Sibling pipeline agg')).to.eql( + false + ); }); it('should not allow converting parent pipeline aggregations', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Parent pipeline agg'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Table - Parent pipeline agg')).to.eql( + false + ); }); it('should not allow converting invalid aggregation function', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Invalid agg'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Table - Invalid agg')).to.eql(false); }); it('should not allow converting series with different aggregation function or aggregation by', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Different agg function'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Table - Different agg function')).to.eql( + false + ); }); it('should convert last value mode to reduced time range', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Last value mode'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Table - Last value mode'); await lens.waitForVisualization('lnsDataTable'); await lens.openDimensionEditor('lnsDatatable_metrics > lns-dimensionTrigger'); @@ -97,8 +95,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert static value to the metric dimension', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Static value'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Table - Static value'); await lens.waitForVisualization('lnsDataTable'); await retry.try(async () => { @@ -112,8 +109,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert aggregate by to split row dimension', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Agg by'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Table - Agg by'); await lens.waitForVisualization('lnsDataTable'); await retry.try(async () => { @@ -131,8 +127,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert group by field with custom label', async () => { - const visPanel = await panelActions.getPanelHeading('Table - GroupBy label'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Table - GroupBy label'); await lens.waitForVisualization('lnsDataTable'); await retry.try(async () => { @@ -144,8 +139,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert color ranges', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Color ranges'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Table - Color ranges'); await lens.waitForVisualization('lnsDataTable'); await retry.try(async () => { @@ -171,8 +165,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should bring the ignore global filters configured at panel level over', async () => { - const visPanel = await panelActions.getPanelHeading('Table - Ignore global filters panel'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Table - Ignore global filters panel'); await lens.waitForVisualization('lnsDataTable'); expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true); diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/timeseries.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/timeseries.ts index 6a2d0d6812a7d..29ea38755788a 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/timeseries.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/timeseries.ts @@ -38,13 +38,11 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should show the "Convert to Lens" menu item for a count aggregation', async () => { - const visPanel = await panelActions.getPanelHeading('Timeseries - Basic'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(true); + expect(await panelActions.canConvertToLensByTitle('Timeseries - Basic')).to.eql(true); }); it('visualizes field to Lens and loads fields to the dimesion editor', async () => { - const visPanel = await panelActions.getPanelHeading('Timeseries - Basic'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Timeseries - Basic'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { const dimensions = await testSubjects.findAll('lns-dimensionTrigger'); @@ -55,24 +53,21 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should preserve app filters in lens', async () => { - const visPanel = await panelActions.getPanelHeading('Timeseries - With filter'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Timeseries - With filter'); await lens.waitForVisualization('xyVisChart'); expect(await filterBar.hasFilter('extension', 'css')).to.be(true); }); it('should preserve query in lens', async () => { - const visPanel = await panelActions.getPanelHeading('Timeseries - With query'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Timeseries - With query'); await lens.waitForVisualization('xyVisChart'); expect(await queryBar.getQueryString()).to.equal('machine.os : ios'); }); it('should draw a reference line', async () => { - const visPanel = await panelActions.getPanelHeading('Timeseries - Reference line'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Timeseries - Reference line'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { const layers = await find.allByCssSelector(`[data-test-subj^="lns-layerPanel-"]`); @@ -92,8 +87,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert metric agg with params', async () => { - const visPanel = await panelActions.getPanelHeading('Timeseries - Agg with params'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Timeseries - Agg with params'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { expect(await lens.getLayerCount()).to.be(1); @@ -108,18 +102,19 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should not allow converting of invalid panel', async () => { - const visPanel = await panelActions.getPanelHeading('Timeseries - Invalid panel'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Timeseries - Invalid panel')).to.eql( + false + ); }); it('should not allow converting of unsupported aggregations', async () => { - const visPanel = await panelActions.getPanelHeading('Timeseries - Unsupported aggregations'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect( + await panelActions.canConvertToLensByTitle('Timeseries - Unsupported aggregations') + ).to.eql(false); }); it('should convert parent pipeline aggregation with terms', async () => { - const visPanel = await panelActions.getPanelHeading('Timeseries - Parent pipeline agg'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Timeseries - Parent pipeline agg'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { expect(await lens.getLayerCount()).to.be(1); @@ -133,8 +128,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert sibling pipeline aggregation with terms', async () => { - const visPanel = await panelActions.getPanelHeading('Timeseries - Sibling pipeline agg'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Timeseries - Sibling pipeline agg'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { expect(await lens.getLayerCount()).to.be(1); @@ -148,20 +142,14 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should bring the ignore global filters configured at series level over', async () => { - const visPanel = await panelActions.getPanelHeading( - 'Timeseries - Ignore global filters series' - ); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Timeseries - Ignore global filters series'); await lens.waitForVisualization('xyVisChart'); expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true); }); it('should bring the ignore global filters configured at panel level over', async () => { - const visPanel = await panelActions.getPanelHeading( - 'Timeseries - Ignore global filters panel' - ); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Timeseries - Ignore global filters panel'); await lens.waitForVisualization('xyVisChart'); expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true); diff --git a/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/top_n.ts b/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/top_n.ts index e9872a6b776d3..e0286c78bfb33 100644 --- a/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/top_n.ts +++ b/x-pack/test_serverless/functional/test_suites/common/visualizations/group3/open_in_lens/tsvb/top_n.ts @@ -37,33 +37,31 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should show the "Convert to Lens" menu item for a count aggregation', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - Basic'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(true); + expect(await panelActions.canConvertToLensByTitle('Top N - Basic')).to.eql(true); }); it('should not allow converting of invalid panel', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - Invalid panel'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Top N - Invalid panel')).to.eql(false); }); it('should not allow converting of unsupported aggregations', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - Unsupported agg'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Top N - Unsupported agg')).to.eql(false); }); it('should hide the "Convert to Lens" menu item for a sibling pipeline aggregations', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - Sibling pipeline agg'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Top N - Sibling pipeline agg')).to.eql( + false + ); }); it('should hide the "Convert to Lens" menu item for a parent pipeline aggregations', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - Parent pipeline agg'); - expect(await panelActions.canConvertToLens(visPanel)).to.eql(false); + expect(await panelActions.canConvertToLensByTitle('Top N - Parent pipeline agg')).to.eql( + false + ); }); it('should convert to horizontal bar', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - Horizontal bar'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Top N - Horizontal bar'); await lens.waitForVisualization('xyVisChart'); const chartSwitcher = await testSubjects.find('lnsChartSwitchPopover'); @@ -79,8 +77,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert group by to vertical axis', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - Group by'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Top N - Group by'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { @@ -95,8 +92,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert last value mode to reduced time range', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - Last value'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Top N - Last value'); await lens.waitForVisualization('xyVisChart'); await lens.openDimensionEditor('lnsXY_yDimensionPanel > lns-dimensionTrigger'); @@ -114,8 +110,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should convert static value to the separate layer with y dimension', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - Static value'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Top N - Static value'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { @@ -129,8 +124,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('visualizes field to Lens and loads fields to the dimesion editor', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - Basic'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Top N - Basic'); await lens.waitForVisualization('xyVisChart'); await retry.try(async () => { @@ -140,31 +134,27 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); it('should preserve app filters in lens', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - With filter'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Top N - With filter'); await lens.waitForVisualization('xyVisChart'); expect(await filterBar.hasFilter('extension', 'css')).to.be(true); }); it('should preserve query in lens', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - With query'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Top N - With query'); await lens.waitForVisualization('xyVisChart'); expect(await queryBar.getQueryString()).to.equal('machine.os : ios'); }); it('should bring the ignore global filters configured at series level over', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - Ignore global filters series'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Top N - Ignore global filters series'); await lens.waitForVisualization('xyVisChart'); expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true); }); it('should bring the ignore global filters configured at panel level over', async () => { - const visPanel = await panelActions.getPanelHeading('Top N - Ignore global filters panel'); - await panelActions.convertToLens(visPanel); + await panelActions.convertToLensByTitle('Top N - Ignore global filters panel'); await lens.waitForVisualization('xyVisChart'); expect(await testSubjects.exists('lnsChangeIndexPatternIgnoringFilters')).to.be(true); }); diff --git a/x-pack/test_serverless/functional/test_suites/observability/cases/attachment_framework.ts b/x-pack/test_serverless/functional/test_suites/observability/cases/attachment_framework.ts index 72fb345fe012c..c429fef23fdd9 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/cases/attachment_framework.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/cases/attachment_framework.ts @@ -8,6 +8,8 @@ import { expect } from 'expect'; import { FtrProviderContext } from '../../../ftr_provider_context'; +const ADD_TO_CASE_DATA_TEST_SUBJ = 'embeddablePanelAction-embeddable_addToExistingCase'; + export default ({ getPageObject, getService }: FtrProviderContext) => { const dashboard = getPageObject('dashboard'); const lens = getPageObject('lens'); @@ -22,6 +24,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { const find = getService('find'); const toasts = getService('toasts'); const retry = getService('retry'); + const dashboardPanelActions = getService('dashboardPanelActions'); describe('Cases persistable attachments', function () { describe('lens visualization', () => { @@ -55,9 +58,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { it('adds lens visualization to a new case', async () => { const caseTitle = 'case created in observability from my dashboard with lens visualization'; - await testSubjects.click('embeddablePanelToggleMenuIcon'); - await testSubjects.click('embeddablePanelMore-mainMenu'); - await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase'); + await dashboardPanelActions.clickContextMenuItem(ADD_TO_CASE_DATA_TEST_SUBJ); await retry.waitFor('wait for the modal to open', async () => { return ( @@ -108,10 +109,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'dashboards' }); - await testSubjects.click('embeddablePanelToggleMenuIcon'); - await testSubjects.click('embeddablePanelMore-mainMenu'); - await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase'); - + await dashboardPanelActions.clickContextMenuItem(ADD_TO_CASE_DATA_TEST_SUBJ); // verify that solution filter is not visible await testSubjects.missingOrFail('options-filter-popover-button-owner'); diff --git a/x-pack/test_serverless/functional/test_suites/search/cases/attachment_framework.ts b/x-pack/test_serverless/functional/test_suites/search/cases/attachment_framework.ts index e4290903bdeb9..5e742332b1de6 100644 --- a/x-pack/test_serverless/functional/test_suites/search/cases/attachment_framework.ts +++ b/x-pack/test_serverless/functional/test_suites/search/cases/attachment_framework.ts @@ -8,7 +8,6 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default ({ getPageObject, getService }: FtrProviderContext) => { - const testSubjects = getService('testSubjects'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dashboard = getPageObject('dashboard'); @@ -17,6 +16,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { const svlCommonNavigation = getPageObject('svlCommonNavigation'); const svlCommonPage = getPageObject('svlCommonPage'); const settings = getPageObject('settings'); + const dashboardPanelActions = getService('dashboardPanelActions'); describe('persistable attachment', () => { before(async () => { @@ -49,9 +49,9 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { }); it('does not show actions to add lens visualization to case', async () => { - await testSubjects.click('embeddablePanelToggleMenuIcon'); - await testSubjects.click('embeddablePanelMore-mainMenu'); - await testSubjects.missingOrFail('embeddablePanelAction-embeddable_addToExistingCase'); + await dashboardPanelActions.expectMissingPanelAction( + 'embeddablePanelAction-embeddable_addToExistingCase' + ); }); }); }); diff --git a/x-pack/test_serverless/functional/test_suites/security/ftr/cases/attachment_framework.ts b/x-pack/test_serverless/functional/test_suites/security/ftr/cases/attachment_framework.ts index 63259b94fec12..ab186f44418d0 100644 --- a/x-pack/test_serverless/functional/test_suites/security/ftr/cases/attachment_framework.ts +++ b/x-pack/test_serverless/functional/test_suites/security/ftr/cases/attachment_framework.ts @@ -8,6 +8,8 @@ import { expect } from 'expect'; import { FtrProviderContext } from '../../../../ftr_provider_context'; +const ADD_TO_CASE_DATA_TEST_SUBJ = 'embeddablePanelAction-embeddable_addToExistingCase'; + export default ({ getPageObject, getService }: FtrProviderContext) => { const common = getPageObject('common'); const dashboard = getPageObject('dashboard'); @@ -20,6 +22,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { const retry = getService('retry'); const header = getPageObject('header'); const toasts = getService('toasts'); + const dashboardPanelActions = getService('dashboardPanelActions'); describe('Cases persistable attachments', () => { describe('lens visualization', () => { @@ -47,9 +50,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { const caseTitle = 'case created in security solution from my dashboard with lens visualization'; - await testSubjects.click('embeddablePanelToggleMenuIcon'); - await testSubjects.click('embeddablePanelMore-mainMenu'); - await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase'); + await dashboardPanelActions.clickContextMenuItem(ADD_TO_CASE_DATA_TEST_SUBJ); await retry.waitFor('wait for the modal to open', async () => { return ( @@ -106,9 +107,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => { await testSubjects.click('edit-unsaved-New-Dashboard'); } - await testSubjects.click('embeddablePanelToggleMenuIcon'); - await testSubjects.click('embeddablePanelMore-mainMenu'); - await testSubjects.click('embeddablePanelAction-embeddable_addToExistingCase'); + await dashboardPanelActions.clickContextMenuItem(ADD_TO_CASE_DATA_TEST_SUBJ); // verify that solution filter is not visible await testSubjects.missingOrFail('options-filter-popover-button-owner'); diff --git a/x-pack/test_serverless/shared/lib/security/kibana_roles/project_controller_security_roles.yml b/x-pack/test_serverless/shared/lib/security/kibana_roles/project_controller_security_roles.yml index 9e1e542df8e87..0c60ac2aa0427 100644 --- a/x-pack/test_serverless/shared/lib/security/kibana_roles/project_controller_security_roles.yml +++ b/x-pack/test_serverless/shared/lib/security/kibana_roles/project_controller_security_roles.yml @@ -46,6 +46,7 @@ viewer: - feature_siem.endpoint_list_read - feature_securitySolutionCases.read - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.read - feature_osquery.read @@ -124,6 +125,7 @@ editor: - feature_siem.file_operations_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.all - feature_osquery.all @@ -172,6 +174,7 @@ t1_analyst: - feature_siem.endpoint_list_read - feature_securitySolutionCases.read - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.read - feature_osquery.read @@ -226,6 +229,7 @@ t2_analyst: - feature_siem.endpoint_list_read - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.read - feature_osquery.read @@ -295,6 +299,7 @@ t3_analyst: - feature_siem.scan_operations_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.all - feature_osquery.all @@ -351,6 +356,7 @@ threat_intelligence_analyst: - feature_siem.blocklist_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.read - feature_osquery.all @@ -418,6 +424,7 @@ rule_author: - feature_siem.actions_log_management_read - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.read - feature_builtInAlerts.all - feature_osquery.all @@ -489,6 +496,7 @@ soc_manager: - feature_siem.scan_operations_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_osquery.all @@ -548,6 +556,7 @@ detections_admin: - feature_siem.crud_alerts - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_dev_tools.all @@ -606,6 +615,7 @@ platform_engineer: - feature_siem.actions_log_management_read - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_fleet.all @@ -678,6 +688,7 @@ endpoint_operations_analyst: - feature_siem.scan_operations_all - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_osquery.all @@ -744,6 +755,7 @@ endpoint_policy_manager: - feature_siem.blocklist_all # Elastic Defend Policy Management - feature_securitySolutionCases.all - feature_securitySolutionAssistant.all + - feature_securitySolutionAttackDiscovery.all - feature_actions.all - feature_builtInAlerts.all - feature_osquery.all diff --git a/yarn.lock b/yarn.lock index 73ced2baa9476..ba1d7486d0107 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1767,10 +1767,10 @@ resolved "https://registry.yarnpkg.com/@elastic/eslint-plugin-eui/-/eslint-plugin-eui-0.0.2.tgz#56b9ef03984a05cc213772ae3713ea8ef47b0314" integrity sha512-IoxURM5zraoQ7C8f+mJb9HYSENiZGgRVcG4tLQxE61yHNNRDXtGDWTZh8N1KIHcsqN1CEPETjuzBXkJYF/fDiQ== -"@elastic/eui@95.6.0": - version "95.6.0" - resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-95.6.0.tgz#432845333bd0d64aa816222d192db4715cc75987" - integrity sha512-OnErgFixCcYcDpH3iu1fIG5FxoJ+mmHtKOVI/aqeC0beEeJJSZd8uqcLh4iJf9tfCEb+ApykTIuRGi6XTcpvjw== +"@elastic/eui@95.7.0": + version "95.7.0" + resolved "https://registry.yarnpkg.com/@elastic/eui/-/eui-95.7.0.tgz#50edc43d3aac1a1ea87ec56a04ec0bc91e7e32a1" + integrity sha512-T6tihdAtE3JhXaTMHagidXWB5Sv6c++5vHdPj7kyYGjT1fDPpJ/fuTZTfH2GJLc56g63zBdDNMkLnXZYb0ld4Q== dependencies: "@hello-pangea/dnd" "^16.6.0" "@types/lodash" "^4.14.202" @@ -1857,6 +1857,17 @@ "@elastic/react-search-ui-views" "1.20.2" "@elastic/search-ui" "1.20.2" +"@elastic/request-converter@^8.15.3": + version "8.15.3" + resolved "https://registry.yarnpkg.com/@elastic/request-converter/-/request-converter-8.15.3.tgz#0d2753e689a8e5c1f1167a883f8beb863b31b3f0" + integrity sha512-sUhVQReQ1VPn4qRlsYyjDOp340LZxYmaQCcu1HgKSYr1NR7pdSUhbSxmEbl/sH4HXh7Avq4bRf14vBvtHi19kA== + dependencies: + child-process-promise "^2.2.1" + commander "^12.1.0" + find-my-way-ts "^0.1.2" + handlebars "^4.7.8" + prettier "^2.8.8" + "@elastic/request-crypto@2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@elastic/request-crypto/-/request-crypto-2.0.2.tgz#4e5216783be82371012857a76da75195828d3f45" @@ -4848,6 +4859,10 @@ version "0.0.0" uid "" +"@kbn/entity-manager-fixture-plugin@link:x-pack/test/api_integration/apis/entity_manager/fixture_plugin": + version "0.0.0" + uid "" + "@kbn/entityManager-plugin@link:x-pack/plugins/observability_solution/entity_manager": version "0.0.0" uid "" @@ -5328,6 +5343,10 @@ version "0.0.0" uid "" +"@kbn/investigation-shared@link:packages/kbn-investigation-shared": + version "0.0.0" + uid "" + "@kbn/io-ts-utils@link:packages/kbn-io-ts-utils": version "0.0.0" uid "" @@ -14108,6 +14127,15 @@ cheerio@^1.0.0-rc.12, cheerio@^1.0.0-rc.3: parse5 "^7.0.0" parse5-htmlparser2-tree-adapter "^7.0.0" +child-process-promise@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/child-process-promise/-/child-process-promise-2.2.1.tgz#4730a11ef610fad450b8f223c79d31d7bdad8074" + integrity sha512-Fi4aNdqBsr0mv+jgWxcZ/7rAIC2mgihrptyVI4foh/rrjY/3BNjfP9+oaiFx/fzim+1ZyCNBae0DlyfQhSugog== + dependencies: + cross-spawn "^4.0.2" + node-version "^1.0.0" + promise-polyfill "^6.0.1" + chokidar@3.5.3, chokidar@^2.1.2, chokidar@^2.1.8, chokidar@^3.4.0, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.1, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" @@ -14568,6 +14596,11 @@ commander@^10.0.1: resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== +commander@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3" + integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA== + commander@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" @@ -14961,6 +14994,14 @@ cronstrue@^1.51.0: resolved "https://registry.yarnpkg.com/cronstrue/-/cronstrue-1.51.0.tgz#7a63153d61d940344049037628da38a60784c8e2" integrity sha512-fSRAz/MV0TRjeNZKAsovmH/MSsly7+8np4XsfsrjOOz7sjxLrE9SmedRYAs3nPAtLLC5UsMpvenjXYRz463bMA== +cross-spawn@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" + integrity sha512-yAXz/pA1tD8Gtg2S98Ekf/sewp3Lcp3YoFKJ4Hkp5h5yLWnKVTDU0kwjKJ8NDCYcfTLfyGkzTikst+jWypT1iA== + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -16613,9 +16654,9 @@ element-resize-detector@^1.2.2: batch-processor "1.0.0" elliptic@^6.0.0, elliptic@^6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + version "6.5.7" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.7.tgz#8ec4da2cb2939926a1b9a73619d768207e647c8b" + integrity sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q== dependencies: bn.js "^4.11.9" brorand "^1.1.0" @@ -18152,6 +18193,11 @@ find-cypress-specs@^1.41.4: spec-change "^1.10.0" ts-node "^10.9.1" +find-my-way-ts@^0.1.2: + version "0.1.5" + resolved "https://registry.yarnpkg.com/find-my-way-ts/-/find-my-way-ts-0.1.5.tgz#9de9494f19e0319d4f6366bb91d6bf7952af7874" + integrity sha512-4GOTMrpGQVzsCH2ruUn2vmwzV/02zF4q+ybhCIrw/Rkt3L8KWcycdC6aJMctJzwN4fXD4SD5F/4B9Sksh5rE0A== + find-root@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4" @@ -19192,7 +19238,7 @@ handle-thing@^2.0.0: resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.0.tgz#0e039695ff50c93fc288557d696f3c1dc6776754" integrity sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ== -handlebars@4.7.8, handlebars@^4.7.6, handlebars@^4.7.7: +handlebars@4.7.8, handlebars@^4.7.6, handlebars@^4.7.7, handlebars@^4.7.8: version "4.7.8" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9" integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ== @@ -22590,7 +22636,7 @@ lru-cache@10.2.0, "lru-cache@^9.1.1 || ^10.0.0": resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.2.0.tgz#0bd445ca57363465900f4d1f9bd8db343a4d95c3" integrity sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q== -lru-cache@^4.0.0, lru-cache@^4.1.5: +lru-cache@^4.0.0, lru-cache@^4.0.1, lru-cache@^4.1.5: version "4.1.5" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== @@ -24157,6 +24203,11 @@ node-source-walk@^6.0.0, node-source-walk@^6.0.1, node-source-walk@^6.0.2: dependencies: "@babel/parser" "^7.21.8" +node-version@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.2.0.tgz#34fde3ffa8e1149bd323983479dda620e1b5060d" + integrity sha512-ma6oU4Sk0qOoKEAymVoTvk8EdXEobdS7m/mAGhDJ8Rouugho48crHBORAmy5BoOcv8wraPM6xumapQp5hl4iIQ== + nodemailer@^6.9.14: version "6.9.14" resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.9.14.tgz#845fda981f9fd5ac264f4446af908a7c78027f75" @@ -26023,6 +26074,11 @@ promise-inflight@^1.0.1: resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= +promise-polyfill@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-6.1.0.tgz#dfa96943ea9c121fca4de9b5868cb39d3472e057" + integrity sha512-g0LWaH0gFsxovsU7R5LrrhHhWAWiHRnh1GPrhXnPgYsDkIqjRYUYSZEsej/wtleDrz5xVSIDbeKfidztp2XHFQ== + promise-polyfill@^8.1.3: version "8.1.3" resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-8.1.3.tgz#8c99b3cf53f3a91c68226ffde7bde81d7f904116" @@ -30186,10 +30242,10 @@ terser@^4.1.2, terser@^4.6.3: source-map "~0.6.1" source-map-support "~0.5.12" -terser@^5.26.0, terser@^5.3.4, terser@^5.31.3, terser@^5.9.0: - version "5.31.3" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.3.tgz#b24b7beb46062f4653f049eea4f0cd165d0f0c38" - integrity sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA== +terser@^5.26.0, terser@^5.3.4, terser@^5.31.4, terser@^5.9.0: + version "5.31.6" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.6.tgz#c63858a0f0703988d0266a82fcbf2d7ba76422b1" + integrity sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2"