From 0faa6002d264438ed8fa55c6790af8de003f8e8a Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 28 Aug 2024 14:26:28 -0700 Subject: [PATCH 1/3] [OAS] Automate connector APIs --- .buildkite/scripts/steps/capture_oas_snapshot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/scripts/steps/capture_oas_snapshot.sh b/.buildkite/scripts/steps/capture_oas_snapshot.sh index fadd7276b47cc..2685cd4cd8e7f 100755 --- a/.buildkite/scripts/steps/capture_oas_snapshot.sh +++ b/.buildkite/scripts/steps/capture_oas_snapshot.sh @@ -5,7 +5,7 @@ set -euo pipefail source .buildkite/scripts/common/util.sh echo --- Capture OAS snapshot -cmd="node scripts/capture_oas_snapshot --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules" +cmd="node scripts/capture_oas_snapshot --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions" if is_pr && ! is_auto_commit_disabled; then cmd="$cmd --update" fi From d908c4ad387c7f1a97a621485a943fc8f050ee7b Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 28 Aug 2024 14:47:43 -0700 Subject: [PATCH 2/3] Update OpenAPI doc scripts to omit manual connector files --- oas_docs/scripts/merge_ess_oas.js | 1 - oas_docs/scripts/merge_ess_oas_staging.js | 1 - oas_docs/scripts/merge_serverless_oas.js | 1 - oas_docs/scripts/merge_serverless_oas_staging.js | 1 - 4 files changed, 4 deletions(-) diff --git a/oas_docs/scripts/merge_ess_oas.js b/oas_docs/scripts/merge_ess_oas.js index f54f7081889f4..52620dffd1389 100644 --- a/oas_docs/scripts/merge_ess_oas.js +++ b/oas_docs/scripts/merge_ess_oas.js @@ -14,7 +14,6 @@ const { REPO_ROOT } = require('@kbn/repo-info'); await merge({ sourceGlobs: [ `${REPO_ROOT}/oas_docs/bundle.json`, - `${REPO_ROOT}/x-pack/plugins/actions/docs/openapi/bundled.yaml`, `${REPO_ROOT}/x-pack/plugins/alerting/docs/openapi/bundled.yaml`, `${REPO_ROOT}/x-pack/plugins/cases/docs/openapi/bundled.yaml`, `${REPO_ROOT}/src/plugins/data_views/docs/openapi/bundled.yaml`, diff --git a/oas_docs/scripts/merge_ess_oas_staging.js b/oas_docs/scripts/merge_ess_oas_staging.js index 72b2aae4a4eff..7613672b6ac97 100644 --- a/oas_docs/scripts/merge_ess_oas_staging.js +++ b/oas_docs/scripts/merge_ess_oas_staging.js @@ -14,7 +14,6 @@ const { REPO_ROOT } = require('@kbn/repo-info'); await merge({ sourceGlobs: [ `${REPO_ROOT}/oas_docs/bundle.json`, - `${REPO_ROOT}/x-pack/plugins/actions/docs/openapi/bundled.yaml`, `${REPO_ROOT}/x-pack/plugins/alerting/docs/openapi/bundled.yaml`, `${REPO_ROOT}/x-pack/plugins/cases/docs/openapi/bundled.yaml`, `${REPO_ROOT}/src/plugins/data_views/docs/openapi/bundled.yaml`, diff --git a/oas_docs/scripts/merge_serverless_oas.js b/oas_docs/scripts/merge_serverless_oas.js index 67ae00522741e..e6fa2e2f2abca 100644 --- a/oas_docs/scripts/merge_serverless_oas.js +++ b/oas_docs/scripts/merge_serverless_oas.js @@ -14,7 +14,6 @@ const { REPO_ROOT } = require('@kbn/repo-info'); 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`, diff --git a/oas_docs/scripts/merge_serverless_oas_staging.js b/oas_docs/scripts/merge_serverless_oas_staging.js index ea932fc08f291..aa3df010ac15f 100644 --- a/oas_docs/scripts/merge_serverless_oas_staging.js +++ b/oas_docs/scripts/merge_serverless_oas_staging.js @@ -14,7 +14,6 @@ const { REPO_ROOT } = require('@kbn/repo-info'); 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`, From fbb3d3f6190cfed0c086be7d89bded4e7467a42a Mon Sep 17 00:00:00 2001 From: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Date: Thu, 29 Aug 2024 18:21:42 +0000 Subject: [PATCH 3/3] [CI] Auto-commit changed files from 'node scripts/capture_oas_snapshot --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --update' --- oas_docs/bundle.json | 712 ++++++++++++++++++++++++++++++++ oas_docs/bundle.serverless.json | 712 ++++++++++++++++++++++++++++++++ 2 files changed, 1424 insertions(+) diff --git a/oas_docs/bundle.json b/oas_docs/bundle.json index 1f5b3e095ea7a..f810ef1c95d8a 100644 --- a/oas_docs/bundle.json +++ b/oas_docs/bundle.json @@ -344,6 +344,715 @@ }, "openapi": "3.0.0", "paths": { + "/api/actions": { + "get": { + "deprecated": true, + "operationId": "%2Fapi%2Factions#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" + } + } + ], + "responses": {}, + "summary": "Get all connectors", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/action": { + "post": { + "deprecated": true, + "operationId": "%2Fapi%2Factions%2Faction#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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "actionTypeId": { + "description": "The connector type identifier.", + "type": "string" + }, + "config": { + "additionalProperties": {}, + "default": {}, + "type": "object" + }, + "name": { + "description": "The display name for the connector.", + "type": "string" + }, + "secrets": { + "additionalProperties": {}, + "default": {}, + "type": "object" + } + }, + "required": [ + "name", + "actionTypeId" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Create a connector", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/action/{id}": { + "delete": { + "deprecated": true, + "description": "WARNING: When you delete a connector, it cannot be recovered.", + "operationId": "%2Fapi%2Factions%2Faction%2F%7Bid%7D#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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Indicates a successful call." + } + }, + "summary": "Delete a connector", + "tags": [ + "connectors" + ] + }, + "get": { + "deprecated": true, + "operationId": "%2Fapi%2Factions%2Faction%2F%7Bid%7D#1", + "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": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Get connector information", + "tags": [ + "connectors" + ] + }, + "put": { + "deprecated": true, + "operationId": "%2Fapi%2Factions%2Faction%2F%7Bid%7D#2", + "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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "config": { + "additionalProperties": {}, + "default": {}, + "type": "object" + }, + "name": { + "type": "string" + }, + "secrets": { + "additionalProperties": {}, + "default": {}, + "type": "object" + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Update a connector", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/action/{id}/_execute": { + "post": { + "deprecated": true, + "operationId": "%2Fapi%2Factions%2Faction%2F%7Bid%7D%2F_execute#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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "params": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "params" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Run a connector", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/connector/{id}": { + "delete": { + "description": "WARNING: When you delete a connector, it cannot be recovered.", + "operationId": "%2Fapi%2Factions%2Fconnector%2F%7Bid%7D#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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Indicates a successful call." + } + }, + "summary": "Delete a connector", + "tags": [ + "connectors" + ] + }, + "get": { + "operationId": "%2Fapi%2Factions%2Fconnector%2F%7Bid%7D#1", + "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": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Get connector information", + "tags": [ + "connectors" + ] + }, + "post": { + "operationId": "%2Fapi%2Factions%2Fconnector%2F%7Bid%3F%7D#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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "path", + "name": "id", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "config": { + "additionalProperties": {}, + "default": {}, + "type": "object" + }, + "connector_type_id": { + "description": "The type of connector.", + "type": "string" + }, + "name": { + "description": "The display name for the connector.", + "type": "string" + }, + "secrets": { + "additionalProperties": {}, + "default": {}, + "type": "object" + } + }, + "required": [ + "name", + "connector_type_id" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Create a connector", + "tags": [ + "connectors" + ] + }, + "put": { + "operationId": "%2Fapi%2Factions%2Fconnector%2F%7Bid%7D#2", + "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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "config": { + "additionalProperties": {}, + "default": {}, + "type": "object" + }, + "name": { + "description": "The display name for the connector.", + "type": "string" + }, + "secrets": { + "additionalProperties": {}, + "default": {}, + "type": "object" + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Update a connector", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/connector/{id}/_execute": { + "post": { + "description": "You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems.", + "operationId": "%2Fapi%2Factions%2Fconnector%2F%7Bid%7D%2F_execute#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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "params": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "params" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Run a connector", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/connector_types": { + "get": { + "description": "You do not need any Kibana feature privileges to run this API.", + "operationId": "%2Fapi%2Factions%2Fconnector_types#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": "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", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": {}, + "summary": "Get connector types", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/connectors": { + "get": { + "operationId": "%2Fapi%2Factions%2Fconnectors#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" + } + } + ], + "responses": {}, + "summary": "Get all connectors", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/list_action_types": { + "get": { + "deprecated": true, + "operationId": "%2Fapi%2Factions%2Flist_action_types#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" + } + } + ], + "responses": {}, + "summary": "Get connector types", + "tags": [ + "connectors" + ] + } + }, "/api/alerting/rule/{id}": { "delete": { "operationId": "%2Fapi%2Falerting%2Frule%2F%7Bid%7D#2", @@ -5154,6 +5863,9 @@ { "name": "alerting" }, + { + "name": "connectors" + }, { "name": "system" } diff --git a/oas_docs/bundle.serverless.json b/oas_docs/bundle.serverless.json index 1f5b3e095ea7a..f810ef1c95d8a 100644 --- a/oas_docs/bundle.serverless.json +++ b/oas_docs/bundle.serverless.json @@ -344,6 +344,715 @@ }, "openapi": "3.0.0", "paths": { + "/api/actions": { + "get": { + "deprecated": true, + "operationId": "%2Fapi%2Factions#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" + } + } + ], + "responses": {}, + "summary": "Get all connectors", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/action": { + "post": { + "deprecated": true, + "operationId": "%2Fapi%2Factions%2Faction#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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "actionTypeId": { + "description": "The connector type identifier.", + "type": "string" + }, + "config": { + "additionalProperties": {}, + "default": {}, + "type": "object" + }, + "name": { + "description": "The display name for the connector.", + "type": "string" + }, + "secrets": { + "additionalProperties": {}, + "default": {}, + "type": "object" + } + }, + "required": [ + "name", + "actionTypeId" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Create a connector", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/action/{id}": { + "delete": { + "deprecated": true, + "description": "WARNING: When you delete a connector, it cannot be recovered.", + "operationId": "%2Fapi%2Factions%2Faction%2F%7Bid%7D#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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Indicates a successful call." + } + }, + "summary": "Delete a connector", + "tags": [ + "connectors" + ] + }, + "get": { + "deprecated": true, + "operationId": "%2Fapi%2Factions%2Faction%2F%7Bid%7D#1", + "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": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Get connector information", + "tags": [ + "connectors" + ] + }, + "put": { + "deprecated": true, + "operationId": "%2Fapi%2Factions%2Faction%2F%7Bid%7D#2", + "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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "config": { + "additionalProperties": {}, + "default": {}, + "type": "object" + }, + "name": { + "type": "string" + }, + "secrets": { + "additionalProperties": {}, + "default": {}, + "type": "object" + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Update a connector", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/action/{id}/_execute": { + "post": { + "deprecated": true, + "operationId": "%2Fapi%2Factions%2Faction%2F%7Bid%7D%2F_execute#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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "params": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "params" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Run a connector", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/connector/{id}": { + "delete": { + "description": "WARNING: When you delete a connector, it cannot be recovered.", + "operationId": "%2Fapi%2Factions%2Fconnector%2F%7Bid%7D#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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Indicates a successful call." + } + }, + "summary": "Delete a connector", + "tags": [ + "connectors" + ] + }, + "get": { + "operationId": "%2Fapi%2Factions%2Fconnector%2F%7Bid%7D#1", + "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": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Get connector information", + "tags": [ + "connectors" + ] + }, + "post": { + "operationId": "%2Fapi%2Factions%2Fconnector%2F%7Bid%3F%7D#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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "in": "path", + "name": "id", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "config": { + "additionalProperties": {}, + "default": {}, + "type": "object" + }, + "connector_type_id": { + "description": "The type of connector.", + "type": "string" + }, + "name": { + "description": "The display name for the connector.", + "type": "string" + }, + "secrets": { + "additionalProperties": {}, + "default": {}, + "type": "object" + } + }, + "required": [ + "name", + "connector_type_id" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Create a connector", + "tags": [ + "connectors" + ] + }, + "put": { + "operationId": "%2Fapi%2Factions%2Fconnector%2F%7Bid%7D#2", + "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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "config": { + "additionalProperties": {}, + "default": {}, + "type": "object" + }, + "name": { + "description": "The display name for the connector.", + "type": "string" + }, + "secrets": { + "additionalProperties": {}, + "default": {}, + "type": "object" + } + }, + "required": [ + "name" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Update a connector", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/connector/{id}/_execute": { + "post": { + "description": "You can use this API to test an action that involves interaction with Kibana services or integrations with third-party systems.", + "operationId": "%2Fapi%2Factions%2Fconnector%2F%7Bid%7D%2F_execute#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": "A required header to protect against CSRF attacks", + "in": "header", + "name": "kbn-xsrf", + "required": true, + "schema": { + "example": "true", + "type": "string" + } + }, + { + "description": "An identifier for the connector.", + "in": "path", + "name": "id", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json; Elastic-Api-Version=2023-10-31": { + "schema": { + "additionalProperties": false, + "properties": { + "params": { + "additionalProperties": {}, + "type": "object" + } + }, + "required": [ + "params" + ], + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call." + } + }, + "summary": "Run a connector", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/connector_types": { + "get": { + "description": "You do not need any Kibana feature privileges to run this API.", + "operationId": "%2Fapi%2Factions%2Fconnector_types#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": "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", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": {}, + "summary": "Get connector types", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/connectors": { + "get": { + "operationId": "%2Fapi%2Factions%2Fconnectors#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" + } + } + ], + "responses": {}, + "summary": "Get all connectors", + "tags": [ + "connectors" + ] + } + }, + "/api/actions/list_action_types": { + "get": { + "deprecated": true, + "operationId": "%2Fapi%2Factions%2Flist_action_types#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" + } + } + ], + "responses": {}, + "summary": "Get connector types", + "tags": [ + "connectors" + ] + } + }, "/api/alerting/rule/{id}": { "delete": { "operationId": "%2Fapi%2Falerting%2Frule%2F%7Bid%7D#2", @@ -5154,6 +5863,9 @@ { "name": "alerting" }, + { + "name": "connectors" + }, { "name": "system" }