From 22583d0cfe06e25dee251064919388d16b62ac06 Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 11 Oct 2023 17:52:47 -0700 Subject: [PATCH 1/8] [OAS] Add serverless connector APIs --- x-pack/plugins/actions/docs/openapi/README.md | 12 +- ...t_connector_types_serverless_response.yaml | 20 ++ .../openapi/components/schemas/features.yaml | 7 +- .../actions@connector@{connectorid}.yaml | 212 ++++++++++++++++++ .../openapi/paths/api@actions@connector.yaml | 71 ++++++ ...ions@connector@{connectorid}@_execute.yaml | 100 +++++++++ .../paths/api@actions@connector_types.yaml | 66 ++++++ .../openapi/paths/api@actions@connectors.yaml | 63 ++++++ ...{spaceid}@api@actions@connector_types.yaml | 2 +- 9 files changed, 545 insertions(+), 8 deletions(-) create mode 100644 x-pack/plugins/actions/docs/openapi/components/examples/get_connector_types_serverless_response.yaml create mode 100644 x-pack/plugins/actions/docs/openapi/paths/actions@connector@{connectorid}.yaml create mode 100644 x-pack/plugins/actions/docs/openapi/paths/api@actions@connector.yaml create mode 100644 x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}@_execute.yaml create mode 100644 x-pack/plugins/actions/docs/openapi/paths/api@actions@connector_types.yaml create mode 100644 x-pack/plugins/actions/docs/openapi/paths/api@actions@connectors.yaml diff --git a/x-pack/plugins/actions/docs/openapi/README.md b/x-pack/plugins/actions/docs/openapi/README.md index cb0ebce144876..bec098c744bc2 100644 --- a/x-pack/plugins/actions/docs/openapi/README.md +++ b/x-pack/plugins/actions/docs/openapi/README.md @@ -17,18 +17,22 @@ It is possible to validate the docs before bundling them with the following command in the `x-pack/plugins/actions/docs/openapi/` folder: ``` - npx swagger-cli validate entrypoint.yaml + npx swagger-cli validate entrypoint.yaml + npx swagger-cli validate entrypoint_serverless.yaml ``` Then you can generate the `bundled` files by running the following commands: ``` - npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml - npx @redocly/cli bundle entrypoint.yaml --output bundled.json --ext json + npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml + npx @redocly/cli bundle entrypoint.yaml --output bundled.json --ext json + npx @redocly/cli bundle entrypoint_serverless.yaml --output bundled_serverless.yaml --ext yaml + npx @redocly/cli bundle entrypoint_serverless.yaml --output bundled_serverless.json --ext json ``` You can run additional linting with the following command: ``` - npx @redocly/cli lint bundled.json + npx @redocly/cli lint bundled.json + npx @redocly/cli lint bundled_serverless.json ``` diff --git a/x-pack/plugins/actions/docs/openapi/components/examples/get_connector_types_serverless_response.yaml b/x-pack/plugins/actions/docs/openapi/components/examples/get_connector_types_serverless_response.yaml new file mode 100644 index 0000000000000..96eff6e72f247 --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/components/examples/get_connector_types_serverless_response.yaml @@ -0,0 +1,20 @@ +summary: A list of connector types for the `generativeAI` feature. +value: + - id: .gen-ai + name: OpenAI + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: enterprise + supported_feature_ids: + - generativeAI + is_system_action_type: false + - id: .bedrock + name: AWS Bedrock + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: enterprise + supported_feature_ids: + - generativeAI + is_system_action_type: false diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/features.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/features.yaml index 059e91cd79c7e..e75b745957552 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/features.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/features.yaml @@ -1,8 +1,9 @@ type: string description: > - The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`. + The feature that uses the connector. enum: - alerting - cases - - uptime - - siem \ No newline at end of file + - generativeAI + - siem + - uptime \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/paths/actions@connector@{connectorid}.yaml b/x-pack/plugins/actions/docs/openapi/paths/actions@connector@{connectorid}.yaml new file mode 100644 index 0000000000000..af1568a1a67f9 --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/paths/actions@connector@{connectorid}.yaml @@ -0,0 +1,212 @@ +get: + summary: Retrieves a connector by ID. + operationId: getConnector + description: > + You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + tags: + - connectors + parameters: + - $ref: '../components/parameters/connector_id.yaml' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '../components/schemas/connector_response_properties.yaml' + examples: + getConnectorResponse: + $ref: '../components/examples/get_connector_response.yaml' + '401': + $ref: '../components/responses/401.yaml' + '404': + description: Object is not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + example: Not Found + message: + type: string + example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" + statusCode: + type: integer + example: 404 + servers: + - url: https://localhost:5601 + +delete: + summary: Deletes a connector. + operationId: deleteConnector + description: > + You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + WARNING: When you delete a connector, it cannot be recovered. + tags: + - connectors + parameters: + - $ref: '../components/headers/kbn_xsrf.yaml' + - $ref: '../components/parameters/connector_id.yaml' + responses: + '204': + description: Indicates a successful call. + '401': + $ref: '../components/responses/401.yaml' + '404': + description: Object is not found. + content: + application/json: + schema: + type: object + properties: + error: + type: string + example: Not Found + message: + type: string + example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" + statusCode: + type: integer + example: 404 + servers: + - url: https://localhost:5601 + +post: + summary: Creates a connector. + operationId: createConnectorId + description: > + You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + tags: + - connectors + parameters: + - $ref: '../components/headers/kbn_xsrf.yaml' + - in: path + name: connectorId + description: A UUID v1 or v4 identifier for the connector. If you omit this parameter, an identifier is randomly generated. + required: true + schema: + type: string + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + requestBody: + required: true + content: + application/json: + schema: + title: Create connector request body properties + description: The properties vary depending on the connector type. + oneOf: + - $ref: '../components/schemas/create_connector_request_cases_webhook.yaml' + - $ref: '../components/schemas/create_connector_request_d3security.yaml' + - $ref: '../components/schemas/create_connector_request_email.yaml' + - $ref: '../components/schemas/create_connector_request_genai.yaml' + - $ref: '../components/schemas/create_connector_request_index.yaml' + - $ref: '../components/schemas/create_connector_request_jira.yaml' + - $ref: '../components/schemas/create_connector_request_opsgenie.yaml' + - $ref: '../components/schemas/create_connector_request_pagerduty.yaml' + - $ref: '../components/schemas/create_connector_request_resilient.yaml' + - $ref: '../components/schemas/create_connector_request_serverlog.yaml' + - $ref: '../components/schemas/create_connector_request_servicenow.yaml' + - $ref: '../components/schemas/create_connector_request_servicenow_itom.yaml' + - $ref: '../components/schemas/create_connector_request_servicenow_sir.yaml' + - $ref: '../components/schemas/create_connector_request_slack_api.yaml' + - $ref: '../components/schemas/create_connector_request_slack_webhook.yaml' + - $ref: '../components/schemas/create_connector_request_swimlane.yaml' + - $ref: '../components/schemas/create_connector_request_teams.yaml' + - $ref: '../components/schemas/create_connector_request_tines.yaml' + - $ref: '../components/schemas/create_connector_request_torq.yaml' + - $ref: '../components/schemas/create_connector_request_webhook.yaml' + - $ref: '../components/schemas/create_connector_request_xmatters.yaml' + discriminator: + propertyName: connector_type_id + examples: + createIndexConnectorRequest: + $ref: '../components/examples/create_index_connector_request.yaml' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '../components/schemas/connector_response_properties.yaml' + examples: + createIndexConnectorResponse: + $ref: '../components/examples/create_index_connector_response.yaml' + '401': + $ref: '../components/responses/401.yaml' + servers: + - url: https://localhost:5601 + +put: + summary: Updates the attributes for a connector. + operationId: updateConnector + description: > + You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + tags: + - connectors + parameters: + - $ref: '../components/headers/kbn_xsrf.yaml' + - $ref: '../components/parameters/connector_id.yaml' + requestBody: + required: true + content: + application/json: + schema: + title: Update connector request body properties + description: The properties vary depending on the connector type. + oneOf: + - $ref: '../components/schemas/update_connector_request_cases_webhook.yaml' + - $ref: '../components/schemas/update_connector_request_d3security.yaml' + - $ref: '../components/schemas/update_connector_request_email.yaml' + - $ref: '../components/schemas/create_connector_request_genai.yaml' + - $ref: '../components/schemas/update_connector_request_index.yaml' + - $ref: '../components/schemas/update_connector_request_jira.yaml' + - $ref: '../components/schemas/update_connector_request_opsgenie.yaml' + - $ref: '../components/schemas/update_connector_request_pagerduty.yaml' + - $ref: '../components/schemas/update_connector_request_resilient.yaml' + - $ref: '../components/schemas/update_connector_request_serverlog.yaml' + - $ref: '../components/schemas/update_connector_request_servicenow.yaml' + - $ref: '../components/schemas/update_connector_request_servicenow_itom.yaml' + - $ref: '../components/schemas/update_connector_request_slack_api.yaml' + - $ref: '../components/schemas/update_connector_request_slack_webhook.yaml' + - $ref: '../components/schemas/update_connector_request_swimlane.yaml' + - $ref: '../components/schemas/update_connector_request_teams.yaml' + - $ref: '../components/schemas/update_connector_request_tines.yaml' + - $ref: '../components/schemas/update_connector_request_torq.yaml' + - $ref: '../components/schemas/update_connector_request_webhook.yaml' + - $ref: '../components/schemas/update_connector_request_xmatters.yaml' + examples: + updateIndexConnectorRequest: + $ref: '../components/examples/update_index_connector_request.yaml' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '../components/schemas/connector_response_properties.yaml' + '400': + description: Indicates a bad request. + content: + application/json: + schema: + type: object + properties: + error: + type: string + example: Bad Request + message: + type: string + example: "error validating action type config: [index]: expected value of type [string] but got [undefined]" + statusCode: + type: integer + example: 400 + '401': + $ref: '../components/responses/401.yaml' + '404': + $ref: '../components/responses/404.yaml' + servers: + - url: https://localhost:5601 +servers: + - url: https://localhost:5601 diff --git a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector.yaml b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector.yaml new file mode 100644 index 0000000000000..23c46ce6bfb0a --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector.yaml @@ -0,0 +1,71 @@ +post: + summary: Creates a connector. + operationId: createConnector + description: > + You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + tags: + - connectors + parameters: + - $ref: '../components/headers/kbn_xsrf.yaml' + requestBody: + required: true + content: + application/json: + schema: + title: Create connector request body properties + description: The properties vary depending on the connector type. + oneOf: + - $ref: '../components/schemas/create_connector_request_cases_webhook.yaml' + - $ref: '../components/schemas/create_connector_request_d3security.yaml' + - $ref: '../components/schemas/create_connector_request_email.yaml' + - $ref: '../components/schemas/create_connector_request_genai.yaml' + - $ref: '../components/schemas/create_connector_request_index.yaml' + - $ref: '../components/schemas/create_connector_request_jira.yaml' + - $ref: '../components/schemas/create_connector_request_opsgenie.yaml' + - $ref: '../components/schemas/create_connector_request_pagerduty.yaml' + - $ref: '../components/schemas/create_connector_request_resilient.yaml' + - $ref: '../components/schemas/create_connector_request_serverlog.yaml' + - $ref: '../components/schemas/create_connector_request_servicenow.yaml' + - $ref: '../components/schemas/create_connector_request_servicenow_itom.yaml' + - $ref: '../components/schemas/create_connector_request_servicenow_sir.yaml' + - $ref: '../components/schemas/create_connector_request_slack_api.yaml' + - $ref: '../components/schemas/create_connector_request_slack_webhook.yaml' + - $ref: '../components/schemas/create_connector_request_swimlane.yaml' + - $ref: '../components/schemas/create_connector_request_teams.yaml' + - $ref: '../components/schemas/create_connector_request_tines.yaml' + - $ref: '../components/schemas/create_connector_request_torq.yaml' + - $ref: '../components/schemas/create_connector_request_webhook.yaml' + - $ref: '../components/schemas/create_connector_request_xmatters.yaml' + discriminator: + propertyName: connector_type_id + examples: + createEmailConnectorRequest: + $ref: '../components/examples/create_email_connector_request.yaml' + createIndexConnectorRequest: + $ref: '../components/examples/create_index_connector_request.yaml' + createWebhookConnectorRequest: + $ref: '../components/examples/create_webhook_connector_request.yaml' + createXmattersConnectorRequest: + $ref: '../components/examples/create_xmatters_connector_request.yaml' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '../components/schemas/connector_response_properties.yaml' + examples: + createEmailConnectorResponse: + $ref: '../components/examples/create_email_connector_response.yaml' + createIndexConnectorResponse: + $ref: '../components/examples/create_index_connector_response.yaml' + createWebhookConnectorResponse: + $ref: '../components/examples/create_webhook_connector_response.yaml' + createXmattersConnectorResponse: + $ref: '../components/examples/create_xmatters_connector_response.yaml' + '401': + $ref: '../components/responses/401.yaml' + servers: + - url: https://localhost:5601 +servers: + - url: https://localhost:5601 diff --git a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}@_execute.yaml b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}@_execute.yaml new file mode 100644 index 0000000000000..3841b19b8a82e --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}@_execute.yaml @@ -0,0 +1,100 @@ +post: + summary: Runs a connector. + operationId: runConnector + 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. + tags: + - connectors + parameters: + - $ref: '../components/headers/kbn_xsrf.yaml' + - $ref: '../components/parameters/connector_id.yaml' + requestBody: + required: true + content: + application/json: + schema: + title: Run connector request body properties + description: The properties vary depending on the connector type. + type: object + required: + - params + properties: + params: + oneOf: + - $ref: '../components/schemas/run_connector_params_documents.yaml' + - $ref: '../components/schemas/run_connector_params_level_message.yaml' + - title: Subaction parameters + description: Test an action that involves a subaction. + oneOf: + - $ref: '../components/schemas/run_connector_subaction_addevent.yaml' + - $ref: '../components/schemas/run_connector_subaction_closealert.yaml' + - $ref: '../components/schemas/run_connector_subaction_createalert.yaml' + - $ref: '../components/schemas/run_connector_subaction_fieldsbyissuetype.yaml' + - $ref: '../components/schemas/run_connector_subaction_getchoices.yaml' + - $ref: '../components/schemas/run_connector_subaction_getfields.yaml' + - $ref: '../components/schemas/run_connector_subaction_getincident.yaml' + - $ref: '../components/schemas/run_connector_subaction_issue.yaml' + - $ref: '../components/schemas/run_connector_subaction_issues.yaml' + - $ref: '../components/schemas/run_connector_subaction_issuetypes.yaml' + - $ref: '../components/schemas/run_connector_subaction_pushtoservice.yaml' + discriminator: + propertyName: subAction + examples: + runIndexConnectorRequest: + $ref: '../components/examples/run_index_connector_request.yaml' + runJiraConnectorRequest: + $ref: '../components/examples/run_jira_connector_request.yaml' + runServerLogConnectorRequest: + $ref: '../components/examples/run_server_log_connector_request.yaml' + runServiceNowITOMConnectorRequest: + $ref: '../components/examples/run_servicenow_itom_connector_request.yaml' + runSwimlaneConnectorRequest: + $ref: '../components/examples/run_swimlane_connector_request.yaml' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + required: + - connector_id + - status + properties: + connector_id: + type: string + description: The identifier for the connector. + data: + oneOf: + - type: object + description: Information returned from the action. + additionalProperties: true + - type: array + description: An array of information returned from the action. + items: + type: object + status: + type: string + description: The status of the action. + enum: + - error + - ok + examples: + runIndexConnectorResponse: + $ref: '../components/examples/run_index_connector_response.yaml' + runJiraConnectorResponse: + $ref: '../components/examples/run_jira_connector_response.yaml' + runServerLogConnectorResponse: + $ref: '../components/examples/run_server_log_connector_response.yaml' + runServiceNowITOMConnectorResponse: + $ref: '../components/examples/run_servicenow_itom_connector_response.yaml' + runSwimlaneConnectorResponse: + $ref: '../components/examples/run_swimlane_connector_response.yaml' + '401': + $ref: '../components/responses/401.yaml' + servers: + - url: https://localhost:5601 +servers: + - url: https://localhost:5601 diff --git a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector_types.yaml b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector_types.yaml new file mode 100644 index 0000000000000..0b96b75464b1c --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector_types.yaml @@ -0,0 +1,66 @@ +get: + summary: Retrieves a list of all connector types. + operationId: getConnectorTypes + tags: + - connectors + parameters: + - in: query + name: feature_id + description: A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). + schema: + $ref: '../components/schemas/features.yaml' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + title: Get connector types response body properties + description: The properties vary for each connector type. + type: array + items: + type: object + properties: + enabled: + type: boolean + description: Indicates whether the connector type is enabled in Kibana. + example: true + enabled_in_config: + type: boolean + description: Indicates whether the connector type is enabled in the Kibana configuration file. + example: true + enabled_in_license: + type: boolean + description: Indicates whether the connector is enabled in the license. + example: true + id: + $ref: '../components/schemas/connector_types.yaml' + is_system_action_type: + type: boolean + example: false + minimum_license_required: + type: string + description: The license that is required to use the connector type. + example: basic + name: + type: string + description: The name of the connector type. + example: Index + supported_feature_ids: + type: array + description: The features that are supported by the connector type. + items: + $ref: '../components/schemas/features.yaml' + example: + - alerting + - cases + - siem + examples: + getConnectorTypesServerlessResponse: + $ref: '../components/examples/get_connector_types_serverless_response.yaml' + '401': + $ref: '../components/responses/401.yaml' + servers: + - url: https://localhost:5601 +servers: + - url: https://localhost:5601 diff --git a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connectors.yaml b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connectors.yaml new file mode 100644 index 0000000000000..f34b01d2887bd --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connectors.yaml @@ -0,0 +1,63 @@ +get: + summary: Retrieves all connectors. + operationId: getConnectors + description: > + You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. + tags: + - connectors + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: array + items: + title: Get connectors response body properties + description: The properties vary for each connector type. + type: object + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + - referenced_by_count + properties: + connector_type_id: + $ref: '../components/schemas/connector_types.yaml' + config: + type: object + description: The configuration for the connector. Configuration properties vary depending on the connector type. + additionalProperties: true + nullable: true + id: + type: string + description: The identifier for the connector. + example: b0766e10-d190-11ec-b04c-776c77d14fca + is_deprecated: + $ref: '../components/schemas/is_deprecated.yaml' + is_missing_secrets: + $ref: '../components/schemas/is_missing_secrets.yaml' + is_preconfigured: + $ref: '../components/schemas/is_preconfigured.yaml' + is_system_action: + $ref: '../components/schemas/is_system_action.yaml' + name: + type: string + description: The display name for the connector. + example: my-connector + referenced_by_count: + type: integer + description: Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated. + example: 2 + default: 0 + examples: + getConnectorsResponse: + $ref: '../components/examples/get_connectors_response.yaml' + '401': + $ref: '../components/responses/401.yaml' + servers: + - url: https://localhost:5601 +servers: + - url: https://localhost:5601 diff --git a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector_types.yaml b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector_types.yaml index c100102306747..173427e8f6c2a 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector_types.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector_types.yaml @@ -1,6 +1,6 @@ get: summary: Retrieves a list of all connector types. - operationId: getConnectorTypes + operationId: getConnectorTypesInSpace description: > You do not need any Kibana feature privileges to run this API. tags: From aa1b596ccdc1e1ea7c7bc37d1cc84579a61eae34 Mon Sep 17 00:00:00 2001 From: lcawl Date: Wed, 11 Oct 2023 17:53:14 -0700 Subject: [PATCH 2/8] Fix snake case --- .../docs/openapi/bundled_serverless.json | 248 ++++++++++++++++++ .../docs/openapi/bundled_serverless.yaml | 173 ++++++++++++ .../docs/openapi/entrypoint_serverless.yaml | 33 +++ 3 files changed, 454 insertions(+) create mode 100644 x-pack/plugins/actions/docs/openapi/bundled_serverless.json create mode 100644 x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml create mode 100644 x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml diff --git a/x-pack/plugins/actions/docs/openapi/bundled_serverless.json b/x-pack/plugins/actions/docs/openapi/bundled_serverless.json new file mode 100644 index 0000000000000..7779ebf2c61b6 --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/bundled_serverless.json @@ -0,0 +1,248 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Connectors", + "description": "OpenAPI schema for connectors in Serverless projects", + "version": "0.1", + "contact": { + "name": "Connectors Team" + }, + "license": { + "name": "Elastic License 2.0", + "url": "https://www.elastic.co/licensing/elastic-license" + } + }, + "servers": [ + { + "url": "http://localhost:5601", + "description": "local" + } + ], + "security": [ + { + "apiKeyAuth": [] + } + ], + "tags": [ + { + "name": "connectors", + "description": "Connector APIs enable you to create and manage connectors." + } + ], + "paths": { + "/api/actions/connector_types": { + "get": { + "summary": "Retrieves a list of all connector types.", + "operationId": "getConnectorTypes", + "tags": [ + "connectors" + ], + "parameters": [ + { + "in": "query", + "name": "feature_id", + "description": "A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases).", + "schema": { + "$ref": "#/components/schemas/features" + } + } + ], + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "title": "Get connector types response body properties", + "description": "The properties vary for each connector type.", + "type": "array", + "items": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Indicates whether the connector type is enabled in Kibana.", + "example": true + }, + "enabled_in_config": { + "type": "boolean", + "description": "Indicates whether the connector type is enabled in the Kibana configuration file.", + "example": true + }, + "enabled_in_license": { + "type": "boolean", + "description": "Indicates whether the connector is enabled in the license.", + "example": true + }, + "id": { + "$ref": "#/components/schemas/connector_types" + }, + "is_system_action_type": { + "type": "boolean", + "example": false + }, + "minimum_license_required": { + "type": "string", + "description": "The license that is required to use the connector type.", + "example": "basic" + }, + "name": { + "type": "string", + "description": "The name of the connector type.", + "example": "Index" + }, + "supported_feature_ids": { + "type": "array", + "description": "The features that are supported by the connector type.", + "items": { + "$ref": "#/components/schemas/features" + }, + "example": [ + "alerting", + "cases", + "siem" + ] + } + } + } + }, + "examples": { + "getConnectorTypesServerlessResponse": { + "$ref": "#/components/examples/get_connector_types_serverless_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + } + }, + "components": { + "securitySchemes": { + "apiKeyAuth": { + "type": "apiKey", + "in": "header", + "name": "ApiKey" + } + }, + "schemas": { + "features": { + "type": "string", + "description": "The feature that uses the connector.\n", + "enum": [ + "alerting", + "cases", + "generativeAI", + "siem", + "uptime" + ] + }, + "connector_types": { + "title": "Connector types", + "type": "string", + "description": "The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`.", + "enum": [ + ".cases-webhook", + ".d3security", + ".email", + ".gen-ai", + ".index", + ".jira", + ".opsgenie", + ".pagerduty", + ".resilient", + ".servicenow", + ".servicenow-itom", + ".servicenow-sir", + ".server-log", + ".slack", + ".slack_api", + ".swimlane", + ".teams", + ".tines", + ".torq", + ".webhook", + ".xmatters" + ], + "example": ".server-log" + } + }, + "examples": { + "get_connector_types_serverless_response": { + "summary": "A list of connector types for the `generativeAI` feature.", + "value": [ + { + "id": ".gen-ai", + "name": "OpenAI", + "enabled": true, + "enabled_in_config": true, + "enabled_in_license": true, + "minimum_license_required": "enterprise", + "supported_feature_ids": [ + "generativeAI" + ], + "is_system_action_type": false + }, + { + "id": ".bedrock", + "name": "AWS Bedrock", + "enabled": true, + "enabled_in_config": true, + "enabled_in_license": true, + "minimum_license_required": "enterprise", + "supported_feature_ids": [ + "generativeAI" + ], + "is_system_action_type": false + } + ] + } + }, + "responses": { + "401": { + "description": "Authorization information is missing or invalid.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Unauthorized response", + "properties": { + "error": { + "type": "string", + "example": "Unauthorized", + "enum": [ + "Unauthorized" + ] + }, + "message": { + "type": "string" + }, + "statusCode": { + "type": "integer", + "example": 401, + "enum": [ + 401 + ] + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml b/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml new file mode 100644 index 0000000000000..1ed0a8ad49c64 --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml @@ -0,0 +1,173 @@ +openapi: 3.0.1 +info: + title: Connectors + description: OpenAPI schema for connectors in Serverless projects + version: '0.1' + contact: + name: Connectors Team + license: + name: Elastic License 2.0 + url: https://www.elastic.co/licensing/elastic-license +servers: + - url: http://localhost:5601 + description: local +security: + - apiKeyAuth: [] +tags: + - name: connectors + description: Connector APIs enable you to create and manage connectors. +paths: + /api/actions/connector_types: + get: + summary: Retrieves a list of all connector types. + operationId: getConnectorTypes + tags: + - connectors + parameters: + - in: query + name: feature_id + description: A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). + schema: + $ref: '#/components/schemas/features' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + title: Get connector types response body properties + description: The properties vary for each connector type. + type: array + items: + type: object + properties: + enabled: + type: boolean + description: Indicates whether the connector type is enabled in Kibana. + example: true + enabled_in_config: + type: boolean + description: Indicates whether the connector type is enabled in the Kibana configuration file. + example: true + enabled_in_license: + type: boolean + description: Indicates whether the connector is enabled in the license. + example: true + id: + $ref: '#/components/schemas/connector_types' + is_system_action_type: + type: boolean + example: false + minimum_license_required: + type: string + description: The license that is required to use the connector type. + example: basic + name: + type: string + description: The name of the connector type. + example: Index + supported_feature_ids: + type: array + description: The features that are supported by the connector type. + items: + $ref: '#/components/schemas/features' + example: + - alerting + - cases + - siem + examples: + getConnectorTypesServerlessResponse: + $ref: '#/components/examples/get_connector_types_serverless_response' + '401': + $ref: '#/components/responses/401' + servers: + - url: https://localhost:5601 + servers: + - url: https://localhost:5601 +components: + securitySchemes: + apiKeyAuth: + type: apiKey + in: header + name: ApiKey + schemas: + features: + type: string + description: | + The feature that uses the connector. + enum: + - alerting + - cases + - generativeAI + - siem + - uptime + connector_types: + title: Connector types + type: string + description: The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. + enum: + - .cases-webhook + - .d3security + - .email + - .gen-ai + - .index + - .jira + - .opsgenie + - .pagerduty + - .resilient + - .servicenow + - .servicenow-itom + - .servicenow-sir + - .server-log + - .slack + - .slack_api + - .swimlane + - .teams + - .tines + - .torq + - .webhook + - .xmatters + example: .server-log + examples: + get_connector_types_serverless_response: + summary: A list of connector types for the `generativeAI` feature. + value: + - id: .gen-ai + name: OpenAI + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: enterprise + supported_feature_ids: + - generativeAI + is_system_action_type: false + - id: .bedrock + name: AWS Bedrock + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: enterprise + supported_feature_ids: + - generativeAI + is_system_action_type: false + responses: + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + type: object + title: Unauthorized response + properties: + error: + type: string + example: Unauthorized + enum: + - Unauthorized + message: + type: string + statusCode: + type: integer + example: 401 + enum: + - 401 diff --git a/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml b/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml new file mode 100644 index 0000000000000..b679989ce6e80 --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml @@ -0,0 +1,33 @@ +openapi: 3.0.1 +info: + title: Connectors + description: OpenAPI schema for connectors in Serverless projects + version: '0.1' + contact: + name: Connectors Team + license: + name: Elastic License 2.0 + url: https://www.elastic.co/licensing/elastic-license +tags: + - name: connectors + description: Connector APIs enable you to create and manage connectors. +servers: + - url: 'http://localhost:5601' + description: local +paths: + # '/api/actions/connector': + # $ref: 'paths/api@actions@connector.yaml' + # '/api/actions/connector/{connectorId}': + # $ref: 'paths/api@actions@connector@{connectorid}.yaml' + # '/api/actions/connectors': + # $ref: paths/api@actions@connectors.yaml + '/api/actions/connector_types': + $ref: paths/api@actions@connector_types.yaml +components: + securitySchemes: + apiKeyAuth: + type: apiKey + in: header + name: ApiKey +security: + - apiKeyAuth: [] From ab6f5c62976dd1d207bbc98ee3ca7b0a5a2b65c1 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 12 Oct 2023 12:58:34 -0700 Subject: [PATCH 3/8] [OAS] Serverless create connector --- x-pack/plugins/actions/docs/openapi/README.md | 28 +- .../plugins/actions/docs/openapi/bundled.json | 297 +- .../plugins/actions/docs/openapi/bundled.yaml | 170 +- .../docs/openapi/bundled_serverless.json | 3029 ++++++++++++++++- .../docs/openapi/bundled_serverless.yaml | 2189 +++++++++++- ...onnector_types_generativeai_response.yaml} | 0 .../schemas/create_connector_request.yaml | 27 + .../docs/openapi/entrypoint_serverless.yaml | 6 +- .../openapi/paths/api@actions@connector.yaml | 29 +- .../paths/api@actions@connector_types.yaml | 2 +- .../s@{spaceid}@api@actions@connector.yaml | 30 +- ...{spaceid}@api@actions@connector_types.yaml | 2 +- 12 files changed, 5458 insertions(+), 351 deletions(-) rename x-pack/plugins/actions/docs/openapi/components/examples/{get_connector_types_serverless_response.yaml => get_connector_types_generativeai_response.yaml} (100%) create mode 100644 x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request.yaml diff --git a/x-pack/plugins/actions/docs/openapi/README.md b/x-pack/plugins/actions/docs/openapi/README.md index bec098c744bc2..2bce08f0b1a4c 100644 --- a/x-pack/plugins/actions/docs/openapi/README.md +++ b/x-pack/plugins/actions/docs/openapi/README.md @@ -16,23 +16,23 @@ A guide about the openApi specification can be found at [https://swagger.io/docs It is possible to validate the docs before bundling them with the following command in the `x-pack/plugins/actions/docs/openapi/` folder: - ``` - npx swagger-cli validate entrypoint.yaml - npx swagger-cli validate entrypoint_serverless.yaml - ``` +``` +npx swagger-cli validate entrypoint.yaml +npx swagger-cli validate entrypoint_serverless.yaml +``` Then you can generate the `bundled` files by running the following commands: - ``` - npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml - npx @redocly/cli bundle entrypoint.yaml --output bundled.json --ext json - npx @redocly/cli bundle entrypoint_serverless.yaml --output bundled_serverless.yaml --ext yaml - npx @redocly/cli bundle entrypoint_serverless.yaml --output bundled_serverless.json --ext json - ``` +``` +npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml +npx @redocly/cli bundle entrypoint.yaml --output bundled.json --ext json +npx @redocly/cli bundle entrypoint_serverless.yaml --output bundled_serverless.yaml --ext yaml +npx @redocly/cli bundle entrypoint_serverless.yaml --output bundled_serverless.json --ext json +``` You can run additional linting with the following command: - ``` - npx @redocly/cli lint bundled.json - npx @redocly/cli lint bundled_serverless.json - ``` +``` +npx @redocly/cli lint bundled.json +npx @redocly/cli lint bundled_serverless.json +``` diff --git a/x-pack/plugins/actions/docs/openapi/bundled.json b/x-pack/plugins/actions/docs/openapi/bundled.json index 1db5f55b1c744..1512f8e49764b 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.json +++ b/x-pack/plugins/actions/docs/openapi/bundled.json @@ -36,7 +36,7 @@ "/s/{spaceId}/api/actions/connector": { "post": { "summary": "Creates a connector.", - "operationId": "createConnector", + "operationId": "createConnectorWithSpaceId", "description": "You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", "tags": [ "connectors" @@ -54,79 +54,7 @@ "content": { "application/json": { "schema": { - "title": "Create connector request body properties", - "description": "The properties vary depending on the connector type.", - "oneOf": [ - { - "$ref": "#/components/schemas/create_connector_request_bedrock" - }, - { - "$ref": "#/components/schemas/create_connector_request_cases_webhook" - }, - { - "$ref": "#/components/schemas/create_connector_request_d3security" - }, - { - "$ref": "#/components/schemas/create_connector_request_email" - }, - { - "$ref": "#/components/schemas/create_connector_request_genai" - }, - { - "$ref": "#/components/schemas/create_connector_request_index" - }, - { - "$ref": "#/components/schemas/create_connector_request_jira" - }, - { - "$ref": "#/components/schemas/create_connector_request_opsgenie" - }, - { - "$ref": "#/components/schemas/create_connector_request_pagerduty" - }, - { - "$ref": "#/components/schemas/create_connector_request_resilient" - }, - { - "$ref": "#/components/schemas/create_connector_request_serverlog" - }, - { - "$ref": "#/components/schemas/create_connector_request_servicenow" - }, - { - "$ref": "#/components/schemas/create_connector_request_servicenow_itom" - }, - { - "$ref": "#/components/schemas/create_connector_request_servicenow_sir" - }, - { - "$ref": "#/components/schemas/create_connector_request_slack_api" - }, - { - "$ref": "#/components/schemas/create_connector_request_slack_webhook" - }, - { - "$ref": "#/components/schemas/create_connector_request_swimlane" - }, - { - "$ref": "#/components/schemas/create_connector_request_teams" - }, - { - "$ref": "#/components/schemas/create_connector_request_tines" - }, - { - "$ref": "#/components/schemas/create_connector_request_torq" - }, - { - "$ref": "#/components/schemas/create_connector_request_webhook" - }, - { - "$ref": "#/components/schemas/create_connector_request_xmatters" - } - ], - "discriminator": { - "propertyName": "connector_type_id" - } + "$ref": "#/components/schemas/create_connector_request" }, "examples": { "createEmailConnectorRequest": { @@ -699,7 +627,7 @@ "/s/{spaceId}/api/actions/connector_types": { "get": { "summary": "Retrieves a list of all connector types.", - "operationId": "getConnectorTypes", + "operationId": "getConnectorTypesWithSpaceId", "description": "You do not need any Kibana feature privileges to run this API.\n", "tags": [ "connectors" @@ -1432,76 +1360,6 @@ } }, "schemas": { - "config_properties_bedrock": { - "title": "Connector request properties for an Amazon Bedrock connector", - "description": "Defines properties for connectors when type is `.bedrock`.", - "type": "object", - "required": [ - "apiUrl" - ], - "properties": { - "apiUrl": { - "type": "string", - "description": "The Amazon Bedrock request URL." - }, - "defaultModel": { - "type": "string", - "description": "The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models.\n", - "default": "anthropic.claude-v2" - } - } - }, - "secrets_properties_bedrock": { - "title": "Connector secrets properties for an Amazon Bedrock connector", - "description": "Defines secrets for connectors when type is `.bedrock`.", - "type": "object", - "required": [ - "accessKey", - "secret" - ], - "properties": { - "accessKey": { - "type": "string", - "description": "The AWS access key for authentication." - }, - "secret": { - "type": "string", - "description": "The AWS secret for authentication." - } - } - }, - "create_connector_request_bedrock": { - "title": "Create Amazon Bedrock connector request", - "description": "The Amazon Bedrock connector uses axios to send a POST request to Amazon Bedrock.", - "type": "object", - "required": [ - "config", - "connector_type_id", - "name", - "secrets" - ], - "properties": { - "config": { - "$ref": "#/components/schemas/config_properties_bedrock" - }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".bedrock" - ], - "example": ".bedrock" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "secrets": { - "$ref": "#/components/schemas/secrets_properties_bedrock" - } - } - }, "config_properties_cases_webhook": { "title": "Connector request properties for Webhook - Case Management connector", "required": [ @@ -3188,6 +3046,78 @@ } } }, + "create_connector_request": { + "title": "Create connector request body properties", + "description": "The properties vary depending on the connector type.", + "oneOf": [ + { + "$ref": "#/components/schemas/create_connector_request_cases_webhook" + }, + { + "$ref": "#/components/schemas/create_connector_request_d3security" + }, + { + "$ref": "#/components/schemas/create_connector_request_email" + }, + { + "$ref": "#/components/schemas/create_connector_request_genai" + }, + { + "$ref": "#/components/schemas/create_connector_request_index" + }, + { + "$ref": "#/components/schemas/create_connector_request_jira" + }, + { + "$ref": "#/components/schemas/create_connector_request_opsgenie" + }, + { + "$ref": "#/components/schemas/create_connector_request_pagerduty" + }, + { + "$ref": "#/components/schemas/create_connector_request_resilient" + }, + { + "$ref": "#/components/schemas/create_connector_request_serverlog" + }, + { + "$ref": "#/components/schemas/create_connector_request_servicenow" + }, + { + "$ref": "#/components/schemas/create_connector_request_servicenow_itom" + }, + { + "$ref": "#/components/schemas/create_connector_request_servicenow_sir" + }, + { + "$ref": "#/components/schemas/create_connector_request_slack_api" + }, + { + "$ref": "#/components/schemas/create_connector_request_slack_webhook" + }, + { + "$ref": "#/components/schemas/create_connector_request_swimlane" + }, + { + "$ref": "#/components/schemas/create_connector_request_teams" + }, + { + "$ref": "#/components/schemas/create_connector_request_tines" + }, + { + "$ref": "#/components/schemas/create_connector_request_torq" + }, + { + "$ref": "#/components/schemas/create_connector_request_webhook" + }, + { + "$ref": "#/components/schemas/create_connector_request_xmatters" + } + ], + "discriminator": { + "propertyName": "connector_type_id" + } + }, "is_deprecated": { "type": "boolean", "description": "Indicates whether the connector type is deprecated.", @@ -4149,6 +4079,76 @@ "propertyName": "connector_type_id" } }, + "config_properties_bedrock": { + "title": "Connector request properties for an Amazon Bedrock connector", + "description": "Defines properties for connectors when type is `.bedrock`.", + "type": "object", + "required": [ + "apiUrl" + ], + "properties": { + "apiUrl": { + "type": "string", + "description": "The Amazon Bedrock request URL." + }, + "defaultModel": { + "type": "string", + "description": "The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models.\n", + "default": "anthropic.claude-v2" + } + } + }, + "secrets_properties_bedrock": { + "title": "Connector secrets properties for an Amazon Bedrock connector", + "description": "Defines secrets for connectors when type is `.bedrock`.", + "type": "object", + "required": [ + "accessKey", + "secret" + ], + "properties": { + "accessKey": { + "type": "string", + "description": "The AWS access key for authentication." + }, + "secret": { + "type": "string", + "description": "The AWS secret for authentication." + } + } + }, + "create_connector_request_bedrock": { + "title": "Create Amazon Bedrock connector request", + "description": "The Amazon Bedrock connector uses axios to send a POST request to Amazon Bedrock.", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_bedrock" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".bedrock" + ], + "example": ".bedrock" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_bedrock" + } + } + }, "update_connector_request_cases_webhook": { "title": "Update Webhook - Case Managment connector request", "type": "object", @@ -4556,12 +4556,13 @@ }, "features": { "type": "string", - "description": "The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`.\n", + "description": "The feature that uses the connector.\n", "enum": [ "alerting", "cases", - "uptime", - "siem" + "generativeAI", + "siem", + "uptime" ] }, "run_connector_params_documents": { diff --git a/x-pack/plugins/actions/docs/openapi/bundled.yaml b/x-pack/plugins/actions/docs/openapi/bundled.yaml index 9fb7caccd1f17..36183db489d27 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.yaml +++ b/x-pack/plugins/actions/docs/openapi/bundled.yaml @@ -21,7 +21,7 @@ paths: /s/{spaceId}/api/actions/connector: post: summary: Creates a connector. - operationId: createConnector + operationId: createConnectorWithSpaceId description: | You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: @@ -34,33 +34,7 @@ paths: content: application/json: schema: - title: Create connector request body properties - description: The properties vary depending on the connector type. - oneOf: - - $ref: '#/components/schemas/create_connector_request_bedrock' - - $ref: '#/components/schemas/create_connector_request_cases_webhook' - - $ref: '#/components/schemas/create_connector_request_d3security' - - $ref: '#/components/schemas/create_connector_request_email' - - $ref: '#/components/schemas/create_connector_request_genai' - - $ref: '#/components/schemas/create_connector_request_index' - - $ref: '#/components/schemas/create_connector_request_jira' - - $ref: '#/components/schemas/create_connector_request_opsgenie' - - $ref: '#/components/schemas/create_connector_request_pagerduty' - - $ref: '#/components/schemas/create_connector_request_resilient' - - $ref: '#/components/schemas/create_connector_request_serverlog' - - $ref: '#/components/schemas/create_connector_request_servicenow' - - $ref: '#/components/schemas/create_connector_request_servicenow_itom' - - $ref: '#/components/schemas/create_connector_request_servicenow_sir' - - $ref: '#/components/schemas/create_connector_request_slack_api' - - $ref: '#/components/schemas/create_connector_request_slack_webhook' - - $ref: '#/components/schemas/create_connector_request_swimlane' - - $ref: '#/components/schemas/create_connector_request_teams' - - $ref: '#/components/schemas/create_connector_request_tines' - - $ref: '#/components/schemas/create_connector_request_torq' - - $ref: '#/components/schemas/create_connector_request_webhook' - - $ref: '#/components/schemas/create_connector_request_xmatters' - discriminator: - propertyName: connector_type_id + $ref: '#/components/schemas/create_connector_request' examples: createEmailConnectorRequest: $ref: '#/components/examples/create_email_connector_request' @@ -376,7 +350,7 @@ paths: /s/{spaceId}/api/actions/connector_types: get: summary: Retrieves a list of all connector types. - operationId: getConnectorTypes + operationId: getConnectorTypesWithSpaceId description: | You do not need any Kibana feature privileges to run this API. tags: @@ -821,59 +795,6 @@ components: type: string example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad schemas: - config_properties_bedrock: - title: Connector request properties for an Amazon Bedrock connector - description: Defines properties for connectors when type is `.bedrock`. - type: object - required: - - apiUrl - properties: - apiUrl: - type: string - description: The Amazon Bedrock request URL. - defaultModel: - type: string - description: | - The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models. - default: anthropic.claude-v2 - secrets_properties_bedrock: - title: Connector secrets properties for an Amazon Bedrock connector - description: Defines secrets for connectors when type is `.bedrock`. - type: object - required: - - accessKey - - secret - properties: - accessKey: - type: string - description: The AWS access key for authentication. - secret: - type: string - description: The AWS secret for authentication. - create_connector_request_bedrock: - title: Create Amazon Bedrock connector request - description: The Amazon Bedrock connector uses axios to send a POST request to Amazon Bedrock. - type: object - required: - - config - - connector_type_id - - name - - secrets - properties: - config: - $ref: '#/components/schemas/config_properties_bedrock' - connector_type_id: - type: string - description: The type of connector. - enum: - - .bedrock - example: .bedrock - name: - type: string - description: The display name for the connector. - example: my-connector - secrets: - $ref: '#/components/schemas/secrets_properties_bedrock' config_properties_cases_webhook: title: Connector request properties for Webhook - Case Management connector required: @@ -2192,6 +2113,33 @@ components: example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_xmatters' + create_connector_request: + title: Create connector request body properties + description: The properties vary depending on the connector type. + oneOf: + - $ref: '#/components/schemas/create_connector_request_cases_webhook' + - $ref: '#/components/schemas/create_connector_request_d3security' + - $ref: '#/components/schemas/create_connector_request_email' + - $ref: '#/components/schemas/create_connector_request_genai' + - $ref: '#/components/schemas/create_connector_request_index' + - $ref: '#/components/schemas/create_connector_request_jira' + - $ref: '#/components/schemas/create_connector_request_opsgenie' + - $ref: '#/components/schemas/create_connector_request_pagerduty' + - $ref: '#/components/schemas/create_connector_request_resilient' + - $ref: '#/components/schemas/create_connector_request_serverlog' + - $ref: '#/components/schemas/create_connector_request_servicenow' + - $ref: '#/components/schemas/create_connector_request_servicenow_itom' + - $ref: '#/components/schemas/create_connector_request_servicenow_sir' + - $ref: '#/components/schemas/create_connector_request_slack_api' + - $ref: '#/components/schemas/create_connector_request_slack_webhook' + - $ref: '#/components/schemas/create_connector_request_swimlane' + - $ref: '#/components/schemas/create_connector_request_teams' + - $ref: '#/components/schemas/create_connector_request_tines' + - $ref: '#/components/schemas/create_connector_request_torq' + - $ref: '#/components/schemas/create_connector_request_webhook' + - $ref: '#/components/schemas/create_connector_request_xmatters' + discriminator: + propertyName: connector_type_id is_deprecated: type: boolean description: Indicates whether the connector type is deprecated. @@ -2868,6 +2816,59 @@ components: - $ref: '#/components/schemas/connector_response_properties_xmatters' discriminator: propertyName: connector_type_id + config_properties_bedrock: + title: Connector request properties for an Amazon Bedrock connector + description: Defines properties for connectors when type is `.bedrock`. + type: object + required: + - apiUrl + properties: + apiUrl: + type: string + description: The Amazon Bedrock request URL. + defaultModel: + type: string + description: | + The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models. + default: anthropic.claude-v2 + secrets_properties_bedrock: + title: Connector secrets properties for an Amazon Bedrock connector + description: Defines secrets for connectors when type is `.bedrock`. + type: object + required: + - accessKey + - secret + properties: + accessKey: + type: string + description: The AWS access key for authentication. + secret: + type: string + description: The AWS secret for authentication. + create_connector_request_bedrock: + title: Create Amazon Bedrock connector request + description: The Amazon Bedrock connector uses axios to send a POST request to Amazon Bedrock. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_bedrock' + connector_type_id: + type: string + description: The type of connector. + enum: + - .bedrock + example: .bedrock + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_bedrock' update_connector_request_cases_webhook: title: Update Webhook - Case Managment connector request type: object @@ -3166,12 +3167,13 @@ components: features: type: string description: | - The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`. + The feature that uses the connector. enum: - alerting - cases - - uptime + - generativeAI - siem + - uptime run_connector_params_documents: title: Index connector parameters description: Test an action that indexes a document into Elasticsearch. diff --git a/x-pack/plugins/actions/docs/openapi/bundled_serverless.json b/x-pack/plugins/actions/docs/openapi/bundled_serverless.json index 7779ebf2c61b6..014fb7824a3d0 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled_serverless.json +++ b/x-pack/plugins/actions/docs/openapi/bundled_serverless.json @@ -30,6 +30,83 @@ } ], "paths": { + "/api/actions/connector": { + "post": { + "summary": "Creates a connector.", + "operationId": "createConnector", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_connector_request" + }, + "examples": { + "createEmailConnectorRequest": { + "$ref": "#/components/examples/create_email_connector_request" + }, + "createIndexConnectorRequest": { + "$ref": "#/components/examples/create_index_connector_request" + }, + "createWebhookConnectorRequest": { + "$ref": "#/components/examples/create_webhook_connector_request" + }, + "createXmattersConnectorRequest": { + "$ref": "#/components/examples/create_xmatters_connector_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connector_response_properties" + }, + "examples": { + "createEmailConnectorResponse": { + "$ref": "#/components/examples/create_email_connector_response" + }, + "createIndexConnectorResponse": { + "$ref": "#/components/examples/create_index_connector_response" + }, + "createWebhookConnectorResponse": { + "$ref": "#/components/examples/create_webhook_connector_response" + }, + "createXmattersConnectorResponse": { + "$ref": "#/components/examples/create_xmatters_connector_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, "/api/actions/connector_types": { "get": { "summary": "Retrieves a list of all connector types.", @@ -108,7 +185,7 @@ }, "examples": { "getConnectorTypesServerlessResponse": { - "$ref": "#/components/examples/get_connector_types_serverless_response" + "$ref": "#/components/examples/get_connector_types_generativeai_response" } } } @@ -139,50 +216,2918 @@ "name": "ApiKey" } }, + "parameters": { + "kbn_xsrf": { + "schema": { + "type": "string" + }, + "in": "header", + "name": "kbn-xsrf", + "description": "Cross-site request forgery protection", + "required": true + } + }, "schemas": { - "features": { - "type": "string", - "description": "The feature that uses the connector.\n", - "enum": [ - "alerting", - "cases", - "generativeAI", - "siem", - "uptime" - ] + "config_properties_cases_webhook": { + "title": "Connector request properties for Webhook - Case Management connector", + "required": [ + "createIncidentJson", + "createIncidentResponseKey", + "createIncidentUrl", + "getIncidentResponseExternalTitleKey", + "getIncidentUrl", + "updateIncidentJson", + "updateIncidentUrl", + "viewIncidentUrl" + ], + "description": "Defines properties for connectors when type is `.cases-webhook`.", + "type": "object", + "properties": { + "createCommentJson": { + "type": "string", + "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.\n", + "example": { + "body": { + "[object Object]": null + } + } + }, + "createCommentMethod": { + "type": "string", + "description": "The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`.\n", + "default": "put", + "enum": [ + "patch", + "post", + "put" + ] + }, + "createCommentUrl": { + "type": "string", + "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.\n", + "example": "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}/comment" + }, + "createIncidentJson": { + "type": "string", + "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.\n", + "example": { + "fields": { + "summary": { + "[object Object]": null + }, + "description": { + "[object Object]": null + }, + "labels": { + "[object Object]": null + } + } + } + }, + "createIncidentMethod": { + "type": "string", + "description": "The REST API HTTP request method to create a case in the third-party system. Valid values are `patch`, `post`, and `put`.\n", + "enum": [ + "patch", + "post", + "put" + ], + "default": "post" + }, + "createIncidentResponseKey": { + "type": "string", + "description": "The JSON key in the create case response that contains the external case ID." + }, + "createIncidentUrl": { + "type": "string", + "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.\n" + }, + "getIncidentResponseExternalTitleKey": { + "type": "string", + "description": "The JSON key in get case response that contains the external case title." + }, + "getIncidentUrl": { + "type": "string", + "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.\n", + "example": "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}" + }, + "hasAuth": { + "type": "boolean", + "description": "If true, a username and password for login type authentication must be provided.", + "default": true + }, + "headers": { + "type": "string", + "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.\n" + }, + "updateIncidentJson": { + "type": "string", + "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.\n", + "example": { + "fields": { + "summary": { + "[object Object]": null + }, + "description": { + "[object Object]": null + }, + "labels": { + "[object Object]": null + } + } + } + }, + "updateIncidentMethod": { + "type": "string", + "description": "The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`.\n", + "default": "put", + "enum": [ + "patch", + "post", + "put" + ] + }, + "updateIncidentUrl": { + "type": "string", + "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.\n", + "example": "https://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}}" + }, + "viewIncidentUrl": { + "type": "string", + "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.\n", + "example": "https://testing-jira.atlassian.net/browse/{{{external.system.title}}}" + } + } }, - "connector_types": { - "title": "Connector types", - "type": "string", - "description": "The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`.", - "enum": [ - ".cases-webhook", - ".d3security", - ".email", - ".gen-ai", - ".index", - ".jira", - ".opsgenie", - ".pagerduty", - ".resilient", - ".servicenow", - ".servicenow-itom", - ".servicenow-sir", - ".server-log", - ".slack", - ".slack_api", - ".swimlane", - ".teams", - ".tines", - ".torq", - ".webhook", - ".xmatters" + "secrets_properties_cases_webhook": { + "title": "Connector secrets properties for Webhook - Case Management connector", + "type": "object", + "properties": { + "password": { + "type": "string", + "description": "The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required." + }, + "user": { + "type": "string", + "description": "The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required." + } + } + }, + "create_connector_request_cases_webhook": { + "title": "Create Webhook - Case Managment connector request", + "description": "The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name" ], - "example": ".server-log" - } - }, - "examples": { - "get_connector_types_serverless_response": { + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_cases_webhook" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".cases-webhook" + ], + "example": ".cases-webhook" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_cases_webhook" + } + } + }, + "config_properties_d3security": { + "title": "Connector request properties for a D3 Security connector", + "description": "Defines properties for connectors when type is `.d3security`.", + "type": "object", + "required": [ + "url" + ], + "properties": { + "url": { + "type": "string", + "description": "The D3 Security API request URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n" + } + } + }, + "secrets_properties_d3security": { + "title": "Connector secrets properties for a D3 Security connector", + "description": "Defines secrets for connectors when type is `.d3security`.", + "required": [ + "token" + ], + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The D3 Security token." + } + } + }, + "create_connector_request_d3security": { + "title": "Create D3 Security connector request", + "description": "The connector uses axios to send a POST request to a D3 Security endpoint.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_d3security" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".d3security" + ], + "example": ".d3security" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_d3security" + } + } + }, + "config_properties_email": { + "title": "Connector request properties for an email connector", + "description": "Defines properties for connectors when type is `.email`.", + "required": [ + "from" + ], + "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.\n", + "type": "string", + "nullable": true + }, + "from": { + "description": "The from address for all emails sent by the connector. It must be specified in `user@host-name` format.\n", + "type": "string" + }, + "hasAuth": { + "description": "Specifies whether a user and password are required inside the secrets configuration.\n", + "default": true, + "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. \n", + "type": "string" + }, + "oauthTokenUrl": { + "type": "string", + "nullable": true + }, + "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. \n", + "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.\n", + "type": "boolean" + }, + "service": { + "description": "The name of the email service.\n", + "type": "string", + "enum": [ + "elastic_cloud", + "exchange_server", + "gmail", + "other", + "outlook365", + "ses" + ] + }, + "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.\n", + "type": "string", + "nullable": true + } + } + }, + "secrets_properties_email": { + "title": "Connector secrets properties for an email connector", + "description": "Defines secrets for connectors when type is `.email`.", + "type": "object", + "properties": { + "clientSecret": { + "type": "string", + "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.\n" + }, + "password": { + "type": "string", + "description": "The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required.\n" + }, + "user": { + "type": "string", + "description": "The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required.\n" + } + } + }, + "create_connector_request_email": { + "title": "Create email connector request", + "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.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_email" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".email" + ], + "example": ".email" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_email" + } + } + }, + "config_properties_genai": { + "title": "Connector request properties for an OpenAI connector", + "description": "Defines properties for connectors when type is `.gen-ai`.", + "oneOf": [ + { + "type": "object", + "required": [ + "apiProvider", + "apiUrl" + ], + "properties": { + "apiProvider": { + "type": "string", + "description": "The OpenAI API provider.", + "enum": [ + "Azure OpenAI" + ] + }, + "apiUrl": { + "type": "string", + "description": "The OpenAI API endpoint." + } + } + }, + { + "type": "object", + "required": [ + "apiProvider", + "apiUrl" + ], + "properties": { + "apiProvider": { + "type": "string", + "description": "The OpenAI API provider.", + "enum": [ + "OpenAI" + ] + }, + "apiUrl": { + "type": "string", + "description": "The OpenAI API endpoint." + }, + "defaultModel": { + "type": "string", + "description": "The default model to use for requests." + } + } + } + ], + "discriminator": { + "propertyName": "apiProvider" + } + }, + "secrets_properties_genai": { + "title": "Connector secrets properties for an OpenAI connector", + "description": "Defines secrets for connectors when type is `.gen-ai`.", + "type": "object", + "properties": { + "apiKey": { + "type": "string", + "description": "The OpenAI API key." + } + } + }, + "create_connector_request_genai": { + "title": "Create OpenAI connector request", + "description": "The OpenAI connector uses axios to send a POST request to either OpenAI or Azure OpenAPI.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_genai" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".gen-ai" + ], + "example": ".gen-ai" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_genai" + } + } + }, + "config_properties_index": { + "title": "Connector request properties for an index connector", + "required": [ + "index" + ], + "description": "Defines properties for connectors when type is `.index`.", + "type": "object", + "properties": { + "executionTimeField": { + "description": "A field that indicates when the document was indexed.", + "default": null, + "type": "string", + "nullable": true + }, + "index": { + "description": "The Elasticsearch index to be written to.", + "type": "string" + }, + "refresh": { + "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.\n", + "default": false, + "type": "boolean" + } + } + }, + "create_connector_request_index": { + "title": "Create index connector request", + "description": "The index connector indexes a document into Elasticsearch.", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_index" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".index" + ], + "example": ".index" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + } + } + }, + "config_properties_jira": { + "title": "Connector request properties for a Jira connector", + "required": [ + "apiUrl", + "projectKey" + ], + "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" + } + } + }, + "secrets_properties_jira": { + "title": "Connector secrets properties for a Jira connector", + "required": [ + "apiToken", + "email" + ], + "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" + } + } + }, + "create_connector_request_jira": { + "title": "Create Jira connector request", + "description": "The Jira connector uses the REST API v2 to create Jira issues.", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_jira" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".jira" + ], + "example": ".jira" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_jira" + } + } + }, + "config_properties_opsgenie": { + "title": "Connector request properties for an Opsgenie connector", + "required": [ + "apiUrl" + ], + "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.\n", + "type": "string" + } + } + }, + "secrets_properties_opsgenie": { + "title": "Connector secrets properties for an Opsgenie connector", + "required": [ + "apiKey" + ], + "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" + } + } + }, + "create_connector_request_opsgenie": { + "title": "Create Opsgenie connector request", + "description": "The Opsgenie connector uses the Opsgenie alert API.", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_opsgenie" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".opsgenie" + ], + "example": ".opsgenie" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_opsgenie" + } + } + }, + "config_properties_pagerduty": { + "title": "Connector request properties for a PagerDuty connector", + "description": "Defines properties for connectors when type is `.pagerduty`.", + "type": "object", + "properties": { + "apiUrl": { + "description": "The PagerDuty event URL.", + "type": "string", + "nullable": true, + "example": "https://events.pagerduty.com/v2/enqueue" + } + } + }, + "secrets_properties_pagerduty": { + "title": "Connector secrets properties for a PagerDuty connector", + "description": "Defines secrets for connectors when type is `.pagerduty`.", + "type": "object", + "required": [ + "routingKey" + ], + "properties": { + "routingKey": { + "description": "A 32 character PagerDuty Integration Key for an integration on a service.\n", + "type": "string" + } + } + }, + "create_connector_request_pagerduty": { + "title": "Create PagerDuty connector request", + "description": "The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_pagerduty" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".pagerduty" + ], + "example": ".pagerduty" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_pagerduty" + } + } + }, + "config_properties_resilient": { + "title": "Connector request properties for a IBM Resilient connector", + "required": [ + "apiUrl", + "orgId" + ], + "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" + } + } + }, + "secrets_properties_resilient": { + "title": "Connector secrets properties for IBM Resilient connector", + "required": [ + "apiKeyId", + "apiKeySecret" + ], + "description": "Defines secrets for connectors when type is `.resilient`.", + "type": "object", + "properties": { + "apiKeyId": { + "type": "string", + "description": "The authentication key ID for HTTP Basic authentication." + }, + "apiKeySecret": { + "type": "string", + "description": "The authentication key secret for HTTP Basic authentication." + } + } + }, + "create_connector_request_resilient": { + "title": "Create IBM Resilient connector request", + "description": "The IBM Resilient connector uses the RESILIENT REST v2 to create IBM Resilient incidents.", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_resilient" + }, + "connector_type_id": { + "description": "The type of connector.", + "type": "string", + "example": ".resilient", + "enum": [ + ".resilient" + ] + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_resilient" + } + } + }, + "create_connector_request_serverlog": { + "title": "Create server log connector request", + "description": "This connector writes an entry to the Kibana server log.", + "type": "object", + "required": [ + "connector_type_id", + "name" + ], + "properties": { + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".server-log" + ], + "example": ".server-log" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + } + } + }, + "config_properties_servicenow": { + "title": "Connector request properties for a ServiceNow ITSM connector", + "required": [ + "apiUrl" + ], + "description": "Defines properties for connectors when type is `.servicenow`.", + "type": "object", + "properties": { + "apiUrl": { + "type": "string", + "description": "The ServiceNow instance URL." + }, + "clientId": { + "description": "The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`.\n", + "type": "string" + }, + "isOAuth": { + "description": "The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth).\n", + "default": false, + "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`.\n", + "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`.\n", + "type": "string" + }, + "usesTableApi": { + "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.\n", + "default": true, + "type": "boolean" + } + } + }, + "secrets_properties_servicenow": { + "title": "Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors", + "description": "Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`.", + "type": "object", + "properties": { + "clientSecret": { + "type": "string", + "description": "The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`." + }, + "password": { + "type": "string", + "description": "The password for HTTP basic authentication. This property is required when `isOAuth` is `false`." + }, + "privateKey": { + "type": "string", + "description": "The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`." + }, + "privateKeyPassword": { + "type": "string", + "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." + }, + "username": { + "type": "string", + "description": "The username for HTTP basic authentication. This property is required when `isOAuth` is `false`." + } + } + }, + "create_connector_request_servicenow": { + "title": "Create ServiceNow ITSM connector request", + "description": "The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".servicenow" + ], + "example": ".servicenow" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_servicenow" + } + } + }, + "config_properties_servicenow_itom": { + "title": "Connector request properties for a ServiceNow ITSM connector", + "required": [ + "apiUrl" + ], + "description": "Defines properties for connectors when type is `.servicenow`.", + "type": "object", + "properties": { + "apiUrl": { + "type": "string", + "description": "The ServiceNow instance URL." + }, + "clientId": { + "description": "The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`.\n", + "type": "string" + }, + "isOAuth": { + "description": "The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth).\n", + "default": false, + "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`.\n", + "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`.\n", + "type": "string" + } + } + }, + "create_connector_request_servicenow_itom": { + "title": "Create ServiceNow ITOM connector request", + "description": "The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow_itom" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".servicenow-itom" + ], + "example": ".servicenow-itom" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_servicenow" + } + } + }, + "create_connector_request_servicenow_sir": { + "title": "Create ServiceNow SecOps connector request", + "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.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".servicenow-sir" + ], + "example": ".servicenow-sir" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_servicenow" + } + } + }, + "secrets_properties_slack_api": { + "title": "Connector secrets properties for a Web API Slack connector", + "description": "Defines secrets for connectors when type is `.slack`.", + "required": [ + "token" + ], + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "Slack bot user OAuth token." + } + } + }, + "create_connector_request_slack_api": { + "title": "Create Slack connector request", + "description": "The Slack connector uses Slack Incoming Webhooks.", + "type": "object", + "required": [ + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".slack_api" + ], + "example": ".slack_api" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_slack_api" + } + } + }, + "secrets_properties_slack_webhook": { + "title": "Connector secrets properties for a Webhook Slack connector", + "description": "Defines secrets for connectors when type is `.slack`.", + "required": [ + "webhookUrl" + ], + "type": "object", + "properties": { + "webhookUrl": { + "type": "string", + "description": "Slack webhook url." + } + } + }, + "create_connector_request_slack_webhook": { + "title": "Create Slack connector request", + "description": "The Slack connector uses Slack Incoming Webhooks.", + "type": "object", + "required": [ + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".slack" + ], + "example": ".slack" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_slack_webhook" + } + } + }, + "config_properties_swimlane": { + "title": "Connector request properties for a Swimlane connector", + "required": [ + "apiUrl", + "appId", + "connectorType" + ], + "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`.", + "type": "string", + "enum": [ + "all", + "alerts", + "cases" + ] + }, + "mappings": { + "title": "Connector mappings properties for a Swimlane connector", + "description": "The field mapping.", + "type": "object", + "properties": { + "alertIdConfig": { + "title": "Alert identifier mapping", + "description": "Mapping for the alert ID.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + }, + "caseIdConfig": { + "title": "Case identifier mapping", + "description": "Mapping for the case ID.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + }, + "caseNameConfig": { + "title": "Case name mapping", + "description": "Mapping for the case name.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + }, + "commentsConfig": { + "title": "Case comment mapping", + "description": "Mapping for the case comments.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + }, + "descriptionConfig": { + "title": "Case description mapping", + "description": "Mapping for the case description.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + }, + "ruleNameConfig": { + "title": "Rule name mapping", + "description": "Mapping for the name of the alert's rule.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + }, + "severityConfig": { + "title": "Severity mapping", + "description": "Mapping for the severity.", + "type": "object", + "required": [ + "fieldType", + "id", + "key", + "name" + ], + "properties": { + "fieldType": { + "type": "string", + "description": "The type of field in Swimlane." + }, + "id": { + "type": "string", + "description": "The identifier for the field in Swimlane." + }, + "key": { + "type": "string", + "description": "The key for the field in Swimlane." + }, + "name": { + "type": "string", + "description": "The name of the field in Swimlane." + } + } + } + } + } + } + }, + "secrets_properties_swimlane": { + "title": "Connector secrets properties for a Swimlane connector", + "description": "Defines secrets for connectors when type is `.swimlane`.", + "type": "object", + "properties": { + "apiToken": { + "description": "Swimlane API authentication token.", + "type": "string" + } + } + }, + "create_connector_request_swimlane": { + "title": "Create Swimlane connector request", + "description": "The Swimlane connector uses the Swimlane REST API to create Swimlane records.", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_swimlane" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".swimlane" + ], + "example": ".swimlane" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_swimlane" + } + } + }, + "secrets_properties_teams": { + "title": "Connector secrets properties for a Microsoft Teams connector", + "description": "Defines secrets for connectors when type is `.teams`.", + "type": "object", + "required": [ + "webhookUrl" + ], + "properties": { + "webhookUrl": { + "type": "string", + "description": "The URL of the incoming webhook. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n" + } + } + }, + "create_connector_request_teams": { + "title": "Create Microsoft Teams connector request", + "description": "The Microsoft Teams connector uses Incoming Webhooks.", + "type": "object", + "required": [ + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".teams" + ], + "example": ".teams" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_teams" + } + } + }, + "config_properties_tines": { + "title": "Connector request properties for a Tines connector", + "description": "Defines properties for connectors when type is `.tines`.", + "type": "object", + "required": [ + "url" + ], + "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.\n", + "type": "string" + } + } + }, + "secrets_properties_tines": { + "title": "Connector secrets properties for a Tines connector", + "description": "Defines secrets for connectors when type is `.tines`.", + "type": "object", + "required": [ + "email", + "token" + ], + "properties": { + "email": { + "description": "The email used to sign in to Tines.", + "type": "string" + }, + "token": { + "description": "The Tines API token.", + "type": "string" + } + } + }, + "create_connector_request_tines": { + "title": "Create Tines connector request", + "description": "The Tines connector uses Tines Webhook actions to send events via POST request.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_tines" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".tines" + ], + "example": ".tines" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_tines" + } + } + }, + "config_properties_torq": { + "title": "Connector request properties for a Torq connector", + "description": "Defines properties for connectors when type is `.torq`.", + "type": "object", + "required": [ + "webhookIntegrationUrl" + ], + "properties": { + "webhookIntegrationUrl": { + "description": "The endpoint URL of the Elastic Security integration in Torq.", + "type": "string" + } + } + }, + "secrets_properties_torq": { + "title": "Connector secrets properties for a Torq connector", + "description": "Defines secrets for connectors when type is `.torq`.", + "type": "object", + "required": [ + "token" + ], + "properties": { + "token": { + "description": "The secret of the webhook authentication header.", + "type": "string" + } + } + }, + "create_connector_request_torq": { + "title": "Create Torq connector request", + "description": "The Torq connector uses a Torq webhook to trigger workflows with Kibana actions.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_torq" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".torq" + ], + "example": ".torq" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_torq" + } + } + }, + "config_properties_webhook": { + "title": "Connector request properties for a Webhook connector", + "description": "Defines properties for connectors when type is `.webhook`.", + "type": "object", + "properties": { + "authType": { + "type": "string", + "enum": [ + "webhook-authentication-basic", + "webhook-authentication-ssl", + "null" + ], + "description": "The type of authentication to use: basic, SSL, or none.\n" + }, + "ca": { + "type": "string", + "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.\n" + }, + "certType": { + "type": "string", + "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.\n", + "enum": [ + "ssl-crt-key", + "ssl-pfx" + ] + }, + "hasAuth": { + "type": "boolean", + "description": "If `true`, a user name and password must be provided for login type authentication.\n" + }, + "headers": { + "type": "object", + "nullable": true, + "description": "A set of key-value pairs sent as headers with the request." + }, + "method": { + "type": "string", + "default": "post", + "enum": [ + "post", + "put" + ], + "description": "The HTTP request method, either `post` or `put`.\n" + }, + "url": { + "type": "string", + "description": "The request URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts.\n" + }, + "verificationMode": { + "type": "string", + "enum": [ + "certificate", + "full", + "none" + ], + "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.\n" + } + } + }, + "secrets_properties_webhook": { + "title": "Connector secrets properties for a Webhook connector", + "description": "Defines secrets for connectors when type is `.webhook`.", + "type": "object", + "properties": { + "crt": { + "type": "string", + "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." + }, + "key": { + "type": "string", + "description": "If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-crt-key`, it is a base64 encoded version of the KEY file." + }, + "pfx": { + "type": "string", + "description": "If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-pfx`, it is a base64 encoded version of the PFX or P12 file." + }, + "password": { + "type": "string", + "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.\n" + }, + "user": { + "type": "string", + "description": "The username for HTTP basic authentication. If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required.\n" + } + } + }, + "create_connector_request_webhook": { + "title": "Create Webhook connector request", + "description": "The Webhook connector uses axios to send a POST or PUT request to a web service.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_webhook" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".webhook" + ], + "example": ".webhook" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_webhook" + } + } + }, + "config_properties_xmatters": { + "title": "Connector request properties for an xMatters connector", + "description": "Defines properties for connectors when type is `.xmatters`.", + "type": "object", + "properties": { + "configUrl": { + "description": "The request URL for the Elastic Alerts trigger in xMatters. It is applicable only when `usesBasic` is `true`.\n", + "type": "string", + "nullable": true + }, + "usesBasic": { + "description": "Specifies whether the connector uses HTTP basic authentication (`true`) or URL authentication (`false`).", + "type": "boolean", + "default": true + } + } + }, + "secrets_properties_xmatters": { + "title": "Connector secrets properties for an xMatters connector", + "description": "Defines secrets for connectors when type is `.xmatters`.", + "type": "object", + "properties": { + "password": { + "description": "A user name for HTTP basic authentication. It is applicable only when `usesBasic` is `true`.\n", + "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`.\n", + "type": "string" + }, + "user": { + "description": "A password for HTTP basic authentication. It is applicable only when `usesBasic` is `true`.\n", + "type": "string" + } + } + }, + "create_connector_request_xmatters": { + "title": "Create xMatters connector request", + "description": "The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources.\n", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_xmatters" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".xmatters" + ], + "example": ".xmatters" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_xmatters" + } + } + }, + "create_connector_request": { + "title": "Create connector request body properties", + "description": "The properties vary depending on the connector type.", + "oneOf": [ + { + "$ref": "#/components/schemas/create_connector_request_cases_webhook" + }, + { + "$ref": "#/components/schemas/create_connector_request_d3security" + }, + { + "$ref": "#/components/schemas/create_connector_request_email" + }, + { + "$ref": "#/components/schemas/create_connector_request_genai" + }, + { + "$ref": "#/components/schemas/create_connector_request_index" + }, + { + "$ref": "#/components/schemas/create_connector_request_jira" + }, + { + "$ref": "#/components/schemas/create_connector_request_opsgenie" + }, + { + "$ref": "#/components/schemas/create_connector_request_pagerduty" + }, + { + "$ref": "#/components/schemas/create_connector_request_resilient" + }, + { + "$ref": "#/components/schemas/create_connector_request_serverlog" + }, + { + "$ref": "#/components/schemas/create_connector_request_servicenow" + }, + { + "$ref": "#/components/schemas/create_connector_request_servicenow_itom" + }, + { + "$ref": "#/components/schemas/create_connector_request_servicenow_sir" + }, + { + "$ref": "#/components/schemas/create_connector_request_slack_api" + }, + { + "$ref": "#/components/schemas/create_connector_request_slack_webhook" + }, + { + "$ref": "#/components/schemas/create_connector_request_swimlane" + }, + { + "$ref": "#/components/schemas/create_connector_request_teams" + }, + { + "$ref": "#/components/schemas/create_connector_request_tines" + }, + { + "$ref": "#/components/schemas/create_connector_request_torq" + }, + { + "$ref": "#/components/schemas/create_connector_request_webhook" + }, + { + "$ref": "#/components/schemas/create_connector_request_xmatters" + } + ], + "discriminator": { + "propertyName": "connector_type_id" + } + }, + "is_deprecated": { + "type": "boolean", + "description": "Indicates whether the connector type is deprecated.", + "example": false + }, + "is_missing_secrets": { + "type": "boolean", + "description": "Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type.", + "example": false + }, + "is_preconfigured": { + "type": "boolean", + "description": "Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response.", + "example": false + }, + "is_system_action": { + "type": "boolean", + "description": "Indicates whether the connector is used for system actions.", + "example": false + }, + "connector_response_properties_cases_webhook": { + "title": "Connector request properties for a Webhook - Case Management connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_cases_webhook" + }, + "connector_type_id": { + "description": "The type of connector.", + "type": "string", + "enum": [ + ".cases-webhook" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_d3security": { + "title": "Connector response properties for a D3 Security connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_d3security" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".d3security" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_email": { + "title": "Connector response properties for an email connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_email" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".email" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_index": { + "title": "Connector response properties for an index connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_index" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".index" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_jira": { + "title": "Connector response properties for a Jira connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_jira" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".jira" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_opsgenie": { + "title": "Connector response properties for an Opsgenie connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_opsgenie" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".opsgenie" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_pagerduty": { + "title": "Connector response properties for a PagerDuty connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_pagerduty" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".pagerduty" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_resilient": { + "title": "Connector response properties for a IBM Resilient connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_resilient" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".resilient" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_serverlog": { + "title": "Connector response properties for a server log connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "type": "object", + "nullable": true + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".server-log" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_servicenow": { + "title": "Connector response properties for a ServiceNow ITSM connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".servicenow" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_servicenow_itom": { + "title": "Connector response properties for a ServiceNow ITOM connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow_itom" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".servicenow-itom" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_servicenow_sir": { + "title": "Connector response properties for a ServiceNow SecOps connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".servicenow-sir" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_slack_api": { + "title": "Connector response properties for a Slack connector", + "type": "object", + "required": [ + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".slack_api" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_slack_webhook": { + "title": "Connector response properties for a Slack connector", + "type": "object", + "required": [ + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".slack" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_swimlane": { + "title": "Connector response properties for a Swimlane connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_swimlane" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".swimlane" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_teams": { + "title": "Connector response properties for a Microsoft Teams connector", + "type": "object", + "required": [ + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "type": "object" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".teams" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_tines": { + "title": "Connector response properties for a Tines connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_tines" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".tines" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_torq": { + "title": "Connector response properties for a Torq connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_torq" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".torq" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_webhook": { + "title": "Connector response properties for a Webhook connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_webhook" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".webhook" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties_xmatters": { + "title": "Connector response properties for an xMatters connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_xmatters" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".xmatters" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "connector_response_properties": { + "title": "Connector response properties", + "description": "The properties vary depending on the connector type.", + "oneOf": [ + { + "$ref": "#/components/schemas/connector_response_properties_cases_webhook" + }, + { + "$ref": "#/components/schemas/connector_response_properties_d3security" + }, + { + "$ref": "#/components/schemas/connector_response_properties_email" + }, + { + "$ref": "#/components/schemas/connector_response_properties_index" + }, + { + "$ref": "#/components/schemas/connector_response_properties_jira" + }, + { + "$ref": "#/components/schemas/connector_response_properties_opsgenie" + }, + { + "$ref": "#/components/schemas/connector_response_properties_pagerduty" + }, + { + "$ref": "#/components/schemas/connector_response_properties_resilient" + }, + { + "$ref": "#/components/schemas/connector_response_properties_serverlog" + }, + { + "$ref": "#/components/schemas/connector_response_properties_servicenow" + }, + { + "$ref": "#/components/schemas/connector_response_properties_servicenow_itom" + }, + { + "$ref": "#/components/schemas/connector_response_properties_servicenow_sir" + }, + { + "$ref": "#/components/schemas/connector_response_properties_slack_api" + }, + { + "$ref": "#/components/schemas/connector_response_properties_slack_webhook" + }, + { + "$ref": "#/components/schemas/connector_response_properties_swimlane" + }, + { + "$ref": "#/components/schemas/connector_response_properties_teams" + }, + { + "$ref": "#/components/schemas/connector_response_properties_tines" + }, + { + "$ref": "#/components/schemas/connector_response_properties_torq" + }, + { + "$ref": "#/components/schemas/connector_response_properties_webhook" + }, + { + "$ref": "#/components/schemas/connector_response_properties_xmatters" + } + ], + "discriminator": { + "propertyName": "connector_type_id" + } + }, + "features": { + "type": "string", + "description": "The feature that uses the connector.\n", + "enum": [ + "alerting", + "cases", + "generativeAI", + "siem", + "uptime" + ] + }, + "connector_types": { + "title": "Connector types", + "type": "string", + "description": "The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`.", + "enum": [ + ".bedrock", + ".cases-webhook", + ".d3security", + ".email", + ".gen-ai", + ".index", + ".jira", + ".opsgenie", + ".pagerduty", + ".resilient", + ".servicenow", + ".servicenow-itom", + ".servicenow-sir", + ".server-log", + ".slack", + ".slack_api", + ".swimlane", + ".teams", + ".tines", + ".torq", + ".webhook", + ".xmatters" + ], + "example": ".server-log" + } + }, + "examples": { + "create_email_connector_request": { + "summary": "Create an email connector.", + "value": { + "name": "email-connector-1", + "connector_type_id": ".email", + "config": { + "from": "tester@example.com", + "hasAuth": true, + "host": "https://example.com", + "port": 1025, + "secure": false, + "service": "other" + }, + "secrets": { + "user": "username", + "password": "password" + } + } + }, + "create_index_connector_request": { + "summary": "Create an index connector.", + "value": { + "name": "my-connector", + "connector_type_id": ".index", + "config": { + "index": "test-index" + } + } + }, + "create_webhook_connector_request": { + "summary": "Create a webhook connector with SSL authentication.", + "value": { + "name": "my-webhook-connector", + "connector_type_id": ".webhook", + "config": { + "method": "post", + "url": "https://example.com", + "authType": "webhook-authentication-ssl", + "certType": "ssl-crt-key" + }, + "secrets": { + "crt": "QmFnIEF0dH...", + "key": "LS0tLS1CRUdJ...", + "password": "my-passphrase" + } + } + }, + "create_xmatters_connector_request": { + "summary": "Create an xMatters connector with URL authentication.", + "value": { + "name": "my-xmatters-connector", + "connector_type_id": ".xmatters", + "config": { + "usesBasic": false + }, + "secrets": { + "secretsUrl": "https://example.com?apiKey=xxxxx" + } + } + }, + "create_email_connector_response": { + "summary": "A new email connector.", + "value": { + "id": "90a82c60-478f-11ee-a343-f98a117c727f", + "connector_type_id": ".email", + "name": "email-connector-1", + "config": { + "from": "tester@example.com", + "service": "other", + "host": "https://example.com", + "port": 1025, + "secure": false, + "hasAuth": true, + "tenantId": null, + "clientId": null, + "oauthTokenUrl": null + }, + "is_preconfigured": false, + "is_deprecated": false, + "is_missing_secrets": false, + "is_system_action": false + } + }, + "create_index_connector_response": { + "summary": "A new index connector.", + "value": { + "id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad", + "connector_type_id": ".index", + "name": "my-connector", + "config": { + "index": "test-index", + "refresh": false, + "executionTimeField": null + }, + "is_preconfigured": false, + "is_deprecated": false, + "is_missing_secrets": false, + "is_system_action": false + } + }, + "create_webhook_connector_response": { + "summary": "A new webhook connector.", + "value": { + "id": "900eb010-3b9d-11ee-a642-8ffbb94e38bd", + "name": "my-webhook-connector", + "config": { + "method": "post", + "url": "https://example.com", + "authType": "webhook-authentication-ssl", + "certType": "ssl-crt-key", + "verificationMode": "full", + "headers": null, + "hasAuth": true + }, + "connector_type_id": ".webhook", + "is_preconfigured": false, + "is_deprecated": false, + "is_missing_secrets": false, + "is_system_action": false + } + }, + "create_xmatters_connector_response": { + "summary": "A new xMatters connector.", + "value": { + "id": "4d2d8da0-4d1f-11ee-9367-577408be4681", + "name": "my-xmatters-connector", + "config": { + "usesBasic": false, + "configUrl": null + }, + "connector_type_id": ".xmatters", + "is_preconfigured": false, + "is_deprecated": false, + "is_missing_secrets": false, + "is_system_action": false + } + }, + "get_connector_types_generativeai_response": { "summary": "A list of connector types for the `generativeAI` feature.", "value": [ { diff --git a/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml b/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml index 1ed0a8ad49c64..b29422a788b30 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml +++ b/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml @@ -17,6 +17,51 @@ tags: - name: connectors description: Connector APIs enable you to create and manage connectors. paths: + /api/actions/connector: + post: + summary: Creates a connector. + operationId: createConnector + tags: + - connectors + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/create_connector_request' + examples: + createEmailConnectorRequest: + $ref: '#/components/examples/create_email_connector_request' + createIndexConnectorRequest: + $ref: '#/components/examples/create_index_connector_request' + createWebhookConnectorRequest: + $ref: '#/components/examples/create_webhook_connector_request' + createXmattersConnectorRequest: + $ref: '#/components/examples/create_xmatters_connector_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/connector_response_properties' + examples: + createEmailConnectorResponse: + $ref: '#/components/examples/create_email_connector_response' + createIndexConnectorResponse: + $ref: '#/components/examples/create_index_connector_response' + createWebhookConnectorResponse: + $ref: '#/components/examples/create_webhook_connector_response' + createXmattersConnectorResponse: + $ref: '#/components/examples/create_xmatters_connector_response' + '401': + $ref: '#/components/responses/401' + servers: + - url: https://localhost:5601 + servers: + - url: https://localhost:5601 /api/actions/connector_types: get: summary: Retrieves a list of all connector types. @@ -77,7 +122,7 @@ paths: - siem examples: getConnectorTypesServerlessResponse: - $ref: '#/components/examples/get_connector_types_serverless_response' + $ref: '#/components/examples/get_connector_types_generativeai_response' '401': $ref: '#/components/responses/401' servers: @@ -90,7 +135,2036 @@ components: type: apiKey in: header name: ApiKey + parameters: + kbn_xsrf: + schema: + type: string + in: header + name: kbn-xsrf + description: Cross-site request forgery protection + required: true schemas: + config_properties_cases_webhook: + title: Connector request properties for Webhook - Case Management connector + required: + - createIncidentJson + - createIncidentResponseKey + - createIncidentUrl + - getIncidentResponseExternalTitleKey + - getIncidentUrl + - updateIncidentJson + - updateIncidentUrl + - viewIncidentUrl + description: Defines properties for connectors when type is `.cases-webhook`. + type: object + properties: + createCommentJson: + type: string + 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: + '[object Object]': null + createCommentMethod: + type: string + description: | + The REST API HTTP request method to create a case comment in the third-party system. Valid values are `patch`, `post`, and `put`. + default: put + enum: + - patch + - post + - put + createCommentUrl: + type: string + 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://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}}/comment + createIncidentJson: + type: string + 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: + '[object Object]': null + description: + '[object Object]': null + labels: + '[object Object]': null + createIncidentMethod: + type: string + 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 + default: post + createIncidentResponseKey: + type: string + description: The JSON key in the create case response that contains the external case ID. + createIncidentUrl: + type: string + 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. + getIncidentResponseExternalTitleKey: + type: string + description: The JSON key in get case response that contains the external case title. + getIncidentUrl: + type: string + 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://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.id}}} + hasAuth: + type: boolean + description: If true, a username and password for login type authentication must be provided. + default: true + headers: + type: string + 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. + updateIncidentJson: + type: string + 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: + '[object Object]': null + description: + '[object Object]': null + labels: + '[object Object]': null + updateIncidentMethod: + type: string + description: | + The REST API HTTP request method to update the case in the third-party system. Valid values are `patch`, `post`, and `put`. + default: put + enum: + - patch + - post + - put + updateIncidentUrl: + type: string + 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://testing-jira.atlassian.net/rest/api/2/issue/{{{external.system.ID}}} + viewIncidentUrl: + type: string + 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}}} + secrets_properties_cases_webhook: + title: Connector secrets properties for Webhook - Case Management connector + type: object + properties: + password: + type: string + description: The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. + user: + type: string + description: The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. + create_connector_request_cases_webhook: + title: Create Webhook - Case Managment connector request + description: | + The Webhook - Case Management connector uses axios to send POST, PUT, and GET requests to a case management RESTful API web service. + type: object + required: + - config + - connector_type_id + - name + properties: + config: + $ref: '#/components/schemas/config_properties_cases_webhook' + connector_type_id: + type: string + description: The type of connector. + enum: + - .cases-webhook + example: .cases-webhook + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_cases_webhook' + config_properties_d3security: + title: Connector request properties for a D3 Security connector + description: Defines properties for connectors when type is `.d3security`. + type: object + required: + - url + properties: + url: + type: string + description: | + The D3 Security API request URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. + secrets_properties_d3security: + title: Connector secrets properties for a D3 Security connector + description: Defines secrets for connectors when type is `.d3security`. + required: + - token + type: object + properties: + token: + type: string + description: The D3 Security token. + create_connector_request_d3security: + title: Create D3 Security connector request + description: | + The connector uses axios to send a POST request to a D3 Security endpoint. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_d3security' + connector_type_id: + type: string + description: The type of connector. + enum: + - .d3security + example: .d3security + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_d3security' + config_properties_email: + title: Connector request properties for an email connector + description: Defines properties for connectors when type is `.email`. + required: + - from + 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. + type: string + nullable: true + from: + description: | + The from address for all emails sent by the connector. It must be specified in `user@host-name` format. + type: string + hasAuth: + description: | + Specifies whether a user and password are required inside the secrets configuration. + default: true + 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: + type: string + nullable: true + 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. + type: string + enum: + - elastic_cloud + - exchange_server + - gmail + - other + - outlook365 + - ses + 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. + type: string + nullable: true + secrets_properties_email: + title: Connector secrets properties for an email connector + description: Defines secrets for connectors when type is `.email`. + type: object + properties: + clientSecret: + type: string + 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. + password: + type: string + description: | + The password for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. + user: + type: string + description: | + The username for HTTP basic authentication. If `hasAuth` is set to `true`, this property is required. + create_connector_request_email: + title: Create email connector request + 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. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_email' + connector_type_id: + type: string + description: The type of connector. + enum: + - .email + example: .email + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_email' + config_properties_genai: + title: Connector request properties for an OpenAI connector + description: Defines properties for connectors when type is `.gen-ai`. + oneOf: + - type: object + required: + - apiProvider + - apiUrl + properties: + apiProvider: + type: string + description: The OpenAI API provider. + enum: + - Azure OpenAI + apiUrl: + type: string + description: The OpenAI API endpoint. + - type: object + required: + - apiProvider + - apiUrl + properties: + apiProvider: + type: string + description: The OpenAI API provider. + enum: + - OpenAI + apiUrl: + type: string + description: The OpenAI API endpoint. + defaultModel: + type: string + description: The default model to use for requests. + discriminator: + propertyName: apiProvider + secrets_properties_genai: + title: Connector secrets properties for an OpenAI connector + description: Defines secrets for connectors when type is `.gen-ai`. + type: object + properties: + apiKey: + type: string + description: The OpenAI API key. + create_connector_request_genai: + title: Create OpenAI connector request + description: | + The OpenAI connector uses axios to send a POST request to either OpenAI or Azure OpenAPI. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_genai' + connector_type_id: + type: string + description: The type of connector. + enum: + - .gen-ai + example: .gen-ai + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_genai' + config_properties_index: + title: Connector request properties for an index connector + required: + - index + description: Defines properties for connectors when type is `.index`. + type: object + properties: + executionTimeField: + description: A field that indicates when the document was indexed. + default: null + type: string + nullable: true + index: + description: The Elasticsearch index to be written to. + type: string + refresh: + 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. + default: false + type: boolean + create_connector_request_index: + title: Create index connector request + description: The index connector indexes a document into Elasticsearch. + type: object + required: + - config + - connector_type_id + - name + properties: + config: + $ref: '#/components/schemas/config_properties_index' + connector_type_id: + type: string + description: The type of connector. + enum: + - .index + example: .index + name: + type: string + description: The display name for the connector. + example: my-connector + config_properties_jira: + title: Connector request properties for a Jira connector + required: + - apiUrl + - projectKey + 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 + secrets_properties_jira: + title: Connector secrets properties for a Jira connector + required: + - apiToken + - email + 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 + create_connector_request_jira: + title: Create Jira connector request + description: The Jira connector uses the REST API v2 to create Jira issues. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_jira' + connector_type_id: + type: string + description: The type of connector. + enum: + - .jira + example: .jira + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_jira' + config_properties_opsgenie: + title: Connector request properties for an Opsgenie connector + required: + - apiUrl + 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 + secrets_properties_opsgenie: + title: Connector secrets properties for an Opsgenie connector + required: + - apiKey + 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 + create_connector_request_opsgenie: + title: Create Opsgenie connector request + description: The Opsgenie connector uses the Opsgenie alert API. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_opsgenie' + connector_type_id: + type: string + description: The type of connector. + enum: + - .opsgenie + example: .opsgenie + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_opsgenie' + config_properties_pagerduty: + title: Connector request properties for a PagerDuty connector + description: Defines properties for connectors when type is `.pagerduty`. + type: object + properties: + apiUrl: + description: The PagerDuty event URL. + type: string + nullable: true + example: https://events.pagerduty.com/v2/enqueue + secrets_properties_pagerduty: + title: Connector secrets properties for a PagerDuty connector + description: Defines secrets for connectors when type is `.pagerduty`. + type: object + required: + - routingKey + properties: + routingKey: + description: | + A 32 character PagerDuty Integration Key for an integration on a service. + type: string + create_connector_request_pagerduty: + title: Create PagerDuty connector request + description: | + The PagerDuty connector uses the v2 Events API to trigger, acknowledge, and resolve PagerDuty alerts. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_pagerduty' + connector_type_id: + type: string + description: The type of connector. + enum: + - .pagerduty + example: .pagerduty + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_pagerduty' + config_properties_resilient: + title: Connector request properties for a IBM Resilient connector + required: + - apiUrl + - orgId + 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 + secrets_properties_resilient: + title: Connector secrets properties for IBM Resilient connector + required: + - apiKeyId + - apiKeySecret + description: Defines secrets for connectors when type is `.resilient`. + type: object + properties: + apiKeyId: + type: string + description: The authentication key ID for HTTP Basic authentication. + apiKeySecret: + type: string + description: The authentication key secret for HTTP Basic authentication. + create_connector_request_resilient: + title: Create IBM Resilient connector request + description: The IBM Resilient connector uses the RESILIENT REST v2 to create IBM Resilient incidents. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_resilient' + connector_type_id: + description: The type of connector. + type: string + example: .resilient + enum: + - .resilient + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_resilient' + create_connector_request_serverlog: + title: Create server log connector request + description: This connector writes an entry to the Kibana server log. + type: object + required: + - connector_type_id + - name + properties: + connector_type_id: + type: string + description: The type of connector. + enum: + - .server-log + example: .server-log + name: + type: string + description: The display name for the connector. + example: my-connector + config_properties_servicenow: + title: Connector request properties for a ServiceNow ITSM connector + required: + - apiUrl + description: Defines properties for connectors when type is `.servicenow`. + type: object + properties: + apiUrl: + type: string + description: The ServiceNow instance URL. + clientId: + description: | + The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. + type: string + isOAuth: + description: | + The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). + default: false + 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: + 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. + default: true + type: boolean + secrets_properties_servicenow: + title: Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors + description: Defines secrets for connectors when type is `.servicenow`, `.servicenow-sir`, or `.servicenow-itom`. + type: object + properties: + clientSecret: + type: string + description: The client secret assigned to your OAuth application. This property is required when `isOAuth` is `true`. + password: + type: string + description: The password for HTTP basic authentication. This property is required when `isOAuth` is `false`. + privateKey: + type: string + description: The RSA private key that you created for use in ServiceNow. This property is required when `isOAuth` is `true`. + privateKeyPassword: + type: string + 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. + username: + type: string + description: The username for HTTP basic authentication. This property is required when `isOAuth` is `false`. + create_connector_request_servicenow: + title: Create ServiceNow ITSM connector request + description: | + The ServiceNow ITSM connector uses the import set API to create ServiceNow incidents. You can use the connector for rule actions and cases. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow' + connector_type_id: + type: string + description: The type of connector. + enum: + - .servicenow + example: .servicenow + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_servicenow' + config_properties_servicenow_itom: + title: Connector request properties for a ServiceNow ITSM connector + required: + - apiUrl + description: Defines properties for connectors when type is `.servicenow`. + type: object + properties: + apiUrl: + type: string + description: The ServiceNow instance URL. + clientId: + description: | + The client ID assigned to your OAuth application. This property is required when `isOAuth` is `true`. + type: string + isOAuth: + description: | + The type of authentication to use. The default value is false, which means basic authentication is used instead of open authorization (OAuth). + default: false + 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 + create_connector_request_servicenow_itom: + title: Create ServiceNow ITOM connector request + description: | + The ServiceNow ITOM connector uses the event API to create ServiceNow events. You can use the connector for rule actions. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow_itom' + connector_type_id: + type: string + description: The type of connector. + enum: + - .servicenow-itom + example: .servicenow-itom + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_servicenow' + create_connector_request_servicenow_sir: + title: Create ServiceNow SecOps connector request + 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. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow' + connector_type_id: + type: string + description: The type of connector. + enum: + - .servicenow-sir + example: .servicenow-sir + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_servicenow' + secrets_properties_slack_api: + title: Connector secrets properties for a Web API Slack connector + description: Defines secrets for connectors when type is `.slack`. + required: + - token + type: object + properties: + token: + type: string + description: Slack bot user OAuth token. + create_connector_request_slack_api: + title: Create Slack connector request + description: The Slack connector uses Slack Incoming Webhooks. + type: object + required: + - connector_type_id + - name + - secrets + properties: + connector_type_id: + type: string + description: The type of connector. + enum: + - .slack_api + example: .slack_api + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_slack_api' + secrets_properties_slack_webhook: + title: Connector secrets properties for a Webhook Slack connector + description: Defines secrets for connectors when type is `.slack`. + required: + - webhookUrl + type: object + properties: + webhookUrl: + type: string + description: Slack webhook url. + create_connector_request_slack_webhook: + title: Create Slack connector request + description: The Slack connector uses Slack Incoming Webhooks. + type: object + required: + - connector_type_id + - name + - secrets + properties: + connector_type_id: + type: string + description: The type of connector. + enum: + - .slack + example: .slack + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_slack_webhook' + config_properties_swimlane: + title: Connector request properties for a Swimlane connector + required: + - apiUrl + - appId + - connectorType + 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`. + type: string + enum: + - all + - alerts + - cases + mappings: + title: Connector mappings properties for a Swimlane connector + description: The field mapping. + type: object + properties: + alertIdConfig: + title: Alert identifier mapping + description: Mapping for the alert ID. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. + caseIdConfig: + title: Case identifier mapping + description: Mapping for the case ID. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. + caseNameConfig: + title: Case name mapping + description: Mapping for the case name. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. + commentsConfig: + title: Case comment mapping + description: Mapping for the case comments. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. + descriptionConfig: + title: Case description mapping + description: Mapping for the case description. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. + ruleNameConfig: + title: Rule name mapping + description: Mapping for the name of the alert's rule. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. + severityConfig: + title: Severity mapping + description: Mapping for the severity. + type: object + required: + - fieldType + - id + - key + - name + properties: + fieldType: + type: string + description: The type of field in Swimlane. + id: + type: string + description: The identifier for the field in Swimlane. + key: + type: string + description: The key for the field in Swimlane. + name: + type: string + description: The name of the field in Swimlane. + secrets_properties_swimlane: + title: Connector secrets properties for a Swimlane connector + description: Defines secrets for connectors when type is `.swimlane`. + type: object + properties: + apiToken: + description: Swimlane API authentication token. + type: string + create_connector_request_swimlane: + title: Create Swimlane connector request + description: The Swimlane connector uses the Swimlane REST API to create Swimlane records. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_swimlane' + connector_type_id: + type: string + description: The type of connector. + enum: + - .swimlane + example: .swimlane + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_swimlane' + secrets_properties_teams: + title: Connector secrets properties for a Microsoft Teams connector + description: Defines secrets for connectors when type is `.teams`. + type: object + required: + - webhookUrl + properties: + webhookUrl: + type: string + description: | + The URL of the incoming webhook. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. + create_connector_request_teams: + title: Create Microsoft Teams connector request + description: The Microsoft Teams connector uses Incoming Webhooks. + type: object + required: + - connector_type_id + - name + - secrets + properties: + connector_type_id: + type: string + description: The type of connector. + enum: + - .teams + example: .teams + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_teams' + config_properties_tines: + title: Connector request properties for a Tines connector + description: Defines properties for connectors when type is `.tines`. + type: object + required: + - url + 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 + secrets_properties_tines: + title: Connector secrets properties for a Tines connector + description: Defines secrets for connectors when type is `.tines`. + type: object + required: + - email + - token + properties: + email: + description: The email used to sign in to Tines. + type: string + token: + description: The Tines API token. + type: string + create_connector_request_tines: + title: Create Tines connector request + description: | + The Tines connector uses Tines Webhook actions to send events via POST request. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_tines' + connector_type_id: + type: string + description: The type of connector. + enum: + - .tines + example: .tines + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_tines' + config_properties_torq: + title: Connector request properties for a Torq connector + description: Defines properties for connectors when type is `.torq`. + type: object + required: + - webhookIntegrationUrl + properties: + webhookIntegrationUrl: + description: The endpoint URL of the Elastic Security integration in Torq. + type: string + secrets_properties_torq: + title: Connector secrets properties for a Torq connector + description: Defines secrets for connectors when type is `.torq`. + type: object + required: + - token + properties: + token: + description: The secret of the webhook authentication header. + type: string + create_connector_request_torq: + title: Create Torq connector request + description: | + The Torq connector uses a Torq webhook to trigger workflows with Kibana actions. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_torq' + connector_type_id: + type: string + description: The type of connector. + enum: + - .torq + example: .torq + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_torq' + config_properties_webhook: + title: Connector request properties for a Webhook connector + description: Defines properties for connectors when type is `.webhook`. + type: object + properties: + authType: + type: string + enum: + - webhook-authentication-basic + - webhook-authentication-ssl + - 'null' + description: | + The type of authentication to use: basic, SSL, or none. + ca: + type: string + 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. + certType: + type: string + 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 + hasAuth: + type: boolean + description: | + If `true`, a user name and password must be provided for login type authentication. + headers: + type: object + nullable: true + description: A set of key-value pairs sent as headers with the request. + method: + type: string + default: post + enum: + - post + - put + description: | + The HTTP request method, either `post` or `put`. + url: + type: string + description: | + The request URL. If you are using the `xpack.actions.allowedHosts` setting, add the hostname to the allowed hosts. + verificationMode: + type: string + enum: + - certificate + - full + - none + 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. + secrets_properties_webhook: + title: Connector secrets properties for a Webhook connector + description: Defines secrets for connectors when type is `.webhook`. + type: object + properties: + crt: + type: string + 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. + key: + type: string + description: If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-crt-key`, it is a base64 encoded version of the KEY file. + pfx: + type: string + description: If `authType` is `webhook-authentication-ssl` and `certType` is `ssl-pfx`, it is a base64 encoded version of the PFX or P12 file. + password: + type: string + 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. + user: + type: string + description: | + The username for HTTP basic authentication. If `hasAuth` is set to `true` and `authType` is `webhook-authentication-basic`, this property is required. + create_connector_request_webhook: + title: Create Webhook connector request + description: | + The Webhook connector uses axios to send a POST or PUT request to a web service. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_webhook' + connector_type_id: + type: string + description: The type of connector. + enum: + - .webhook + example: .webhook + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_webhook' + config_properties_xmatters: + title: Connector request properties for an xMatters connector + description: Defines properties for connectors when type is `.xmatters`. + type: object + properties: + configUrl: + description: | + The request URL for the Elastic Alerts trigger in xMatters. It is applicable only when `usesBasic` is `true`. + type: string + nullable: true + usesBasic: + description: Specifies whether the connector uses HTTP basic authentication (`true`) or URL authentication (`false`). + type: boolean + default: true + secrets_properties_xmatters: + title: Connector secrets properties for an xMatters connector + description: Defines secrets for connectors when type is `.xmatters`. + type: object + 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 + create_connector_request_xmatters: + title: Create xMatters connector request + description: | + The xMatters connector uses the xMatters Workflow for Elastic to send actionable alerts to on-call xMatters resources. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_xmatters' + connector_type_id: + type: string + description: The type of connector. + enum: + - .xmatters + example: .xmatters + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_xmatters' + create_connector_request: + title: Create connector request body properties + description: The properties vary depending on the connector type. + oneOf: + - $ref: '#/components/schemas/create_connector_request_cases_webhook' + - $ref: '#/components/schemas/create_connector_request_d3security' + - $ref: '#/components/schemas/create_connector_request_email' + - $ref: '#/components/schemas/create_connector_request_genai' + - $ref: '#/components/schemas/create_connector_request_index' + - $ref: '#/components/schemas/create_connector_request_jira' + - $ref: '#/components/schemas/create_connector_request_opsgenie' + - $ref: '#/components/schemas/create_connector_request_pagerduty' + - $ref: '#/components/schemas/create_connector_request_resilient' + - $ref: '#/components/schemas/create_connector_request_serverlog' + - $ref: '#/components/schemas/create_connector_request_servicenow' + - $ref: '#/components/schemas/create_connector_request_servicenow_itom' + - $ref: '#/components/schemas/create_connector_request_servicenow_sir' + - $ref: '#/components/schemas/create_connector_request_slack_api' + - $ref: '#/components/schemas/create_connector_request_slack_webhook' + - $ref: '#/components/schemas/create_connector_request_swimlane' + - $ref: '#/components/schemas/create_connector_request_teams' + - $ref: '#/components/schemas/create_connector_request_tines' + - $ref: '#/components/schemas/create_connector_request_torq' + - $ref: '#/components/schemas/create_connector_request_webhook' + - $ref: '#/components/schemas/create_connector_request_xmatters' + discriminator: + propertyName: connector_type_id + is_deprecated: + type: boolean + description: Indicates whether the connector type is deprecated. + example: false + is_missing_secrets: + type: boolean + description: Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. + example: false + is_preconfigured: + type: boolean + description: Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + example: false + is_system_action: + type: boolean + description: Indicates whether the connector is used for system actions. + example: false + connector_response_properties_cases_webhook: + title: Connector request properties for a Webhook - Case Management connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_cases_webhook' + connector_type_id: + description: The type of connector. + type: string + enum: + - .cases-webhook + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_d3security: + title: Connector response properties for a D3 Security connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_d3security' + connector_type_id: + type: string + description: The type of connector. + enum: + - .d3security + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_email: + title: Connector response properties for an email connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_email' + connector_type_id: + type: string + description: The type of connector. + enum: + - .email + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_index: + title: Connector response properties for an index connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_index' + connector_type_id: + type: string + description: The type of connector. + enum: + - .index + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_jira: + title: Connector response properties for a Jira connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_jira' + connector_type_id: + type: string + description: The type of connector. + enum: + - .jira + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_opsgenie: + title: Connector response properties for an Opsgenie connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_opsgenie' + connector_type_id: + type: string + description: The type of connector. + enum: + - .opsgenie + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_pagerduty: + title: Connector response properties for a PagerDuty connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_pagerduty' + connector_type_id: + type: string + description: The type of connector. + enum: + - .pagerduty + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_resilient: + title: Connector response properties for a IBM Resilient connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_resilient' + connector_type_id: + type: string + description: The type of connector. + enum: + - .resilient + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_serverlog: + title: Connector response properties for a server log connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + type: object + nullable: true + connector_type_id: + type: string + description: The type of connector. + enum: + - .server-log + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_servicenow: + title: Connector response properties for a ServiceNow ITSM connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow' + connector_type_id: + type: string + description: The type of connector. + enum: + - .servicenow + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_servicenow_itom: + title: Connector response properties for a ServiceNow ITOM connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow_itom' + connector_type_id: + type: string + description: The type of connector. + enum: + - .servicenow-itom + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_servicenow_sir: + title: Connector response properties for a ServiceNow SecOps connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow' + connector_type_id: + type: string + description: The type of connector. + enum: + - .servicenow-sir + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_slack_api: + title: Connector response properties for a Slack connector + type: object + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + connector_type_id: + type: string + description: The type of connector. + enum: + - .slack_api + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_slack_webhook: + title: Connector response properties for a Slack connector + type: object + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + connector_type_id: + type: string + description: The type of connector. + enum: + - .slack + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_swimlane: + title: Connector response properties for a Swimlane connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_swimlane' + connector_type_id: + type: string + description: The type of connector. + enum: + - .swimlane + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_teams: + title: Connector response properties for a Microsoft Teams connector + type: object + required: + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + type: object + connector_type_id: + type: string + description: The type of connector. + enum: + - .teams + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_tines: + title: Connector response properties for a Tines connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_tines' + connector_type_id: + type: string + description: The type of connector. + enum: + - .tines + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_torq: + title: Connector response properties for a Torq connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_torq' + connector_type_id: + type: string + description: The type of connector. + enum: + - .torq + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_webhook: + title: Connector response properties for a Webhook connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_webhook' + connector_type_id: + type: string + description: The type of connector. + enum: + - .webhook + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties_xmatters: + title: Connector response properties for an xMatters connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_xmatters' + connector_type_id: + type: string + description: The type of connector. + enum: + - .xmatters + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. + connector_response_properties: + title: Connector response properties + description: The properties vary depending on the connector type. + oneOf: + - $ref: '#/components/schemas/connector_response_properties_cases_webhook' + - $ref: '#/components/schemas/connector_response_properties_d3security' + - $ref: '#/components/schemas/connector_response_properties_email' + - $ref: '#/components/schemas/connector_response_properties_index' + - $ref: '#/components/schemas/connector_response_properties_jira' + - $ref: '#/components/schemas/connector_response_properties_opsgenie' + - $ref: '#/components/schemas/connector_response_properties_pagerduty' + - $ref: '#/components/schemas/connector_response_properties_resilient' + - $ref: '#/components/schemas/connector_response_properties_serverlog' + - $ref: '#/components/schemas/connector_response_properties_servicenow' + - $ref: '#/components/schemas/connector_response_properties_servicenow_itom' + - $ref: '#/components/schemas/connector_response_properties_servicenow_sir' + - $ref: '#/components/schemas/connector_response_properties_slack_api' + - $ref: '#/components/schemas/connector_response_properties_slack_webhook' + - $ref: '#/components/schemas/connector_response_properties_swimlane' + - $ref: '#/components/schemas/connector_response_properties_teams' + - $ref: '#/components/schemas/connector_response_properties_tines' + - $ref: '#/components/schemas/connector_response_properties_torq' + - $ref: '#/components/schemas/connector_response_properties_webhook' + - $ref: '#/components/schemas/connector_response_properties_xmatters' + discriminator: + propertyName: connector_type_id features: type: string description: | @@ -106,6 +2180,7 @@ components: type: string description: The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. enum: + - .bedrock - .cases-webhook - .d3security - .email @@ -129,7 +2204,117 @@ components: - .xmatters example: .server-log examples: - get_connector_types_serverless_response: + create_email_connector_request: + summary: Create an email connector. + value: + name: email-connector-1 + connector_type_id: .email + config: + from: tester@example.com + hasAuth: true + host: https://example.com + port: 1025 + secure: false + service: other + secrets: + user: username + password: password + create_index_connector_request: + summary: Create an index connector. + value: + name: my-connector + connector_type_id: .index + config: + index: test-index + create_webhook_connector_request: + summary: Create a webhook connector with SSL authentication. + value: + name: my-webhook-connector + connector_type_id: .webhook + config: + method: post + url: https://example.com + authType: webhook-authentication-ssl + certType: ssl-crt-key + secrets: + crt: QmFnIEF0dH... + key: LS0tLS1CRUdJ... + password: my-passphrase + create_xmatters_connector_request: + summary: Create an xMatters connector with URL authentication. + value: + name: my-xmatters-connector + connector_type_id: .xmatters + config: + usesBasic: false + secrets: + secretsUrl: https://example.com?apiKey=xxxxx + create_email_connector_response: + summary: A new email connector. + value: + id: 90a82c60-478f-11ee-a343-f98a117c727f + connector_type_id: .email + name: email-connector-1 + config: + from: tester@example.com + service: other + host: https://example.com + port: 1025 + secure: false + hasAuth: true + tenantId: null + clientId: null + oauthTokenUrl: null + is_preconfigured: false + is_deprecated: false + is_missing_secrets: false + is_system_action: false + create_index_connector_response: + summary: A new index connector. + value: + id: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + connector_type_id: .index + name: my-connector + config: + index: test-index + refresh: false + executionTimeField: null + is_preconfigured: false + is_deprecated: false + is_missing_secrets: false + is_system_action: false + create_webhook_connector_response: + summary: A new webhook connector. + value: + id: 900eb010-3b9d-11ee-a642-8ffbb94e38bd + name: my-webhook-connector + config: + method: post + url: https://example.com + authType: webhook-authentication-ssl + certType: ssl-crt-key + verificationMode: full + headers: null + hasAuth: true + connector_type_id: .webhook + is_preconfigured: false + is_deprecated: false + is_missing_secrets: false + is_system_action: false + create_xmatters_connector_response: + summary: A new xMatters connector. + value: + id: 4d2d8da0-4d1f-11ee-9367-577408be4681 + name: my-xmatters-connector + config: + usesBasic: false + configUrl: null + connector_type_id: .xmatters + is_preconfigured: false + is_deprecated: false + is_missing_secrets: false + is_system_action: false + get_connector_types_generativeai_response: summary: A list of connector types for the `generativeAI` feature. value: - id: .gen-ai diff --git a/x-pack/plugins/actions/docs/openapi/components/examples/get_connector_types_serverless_response.yaml b/x-pack/plugins/actions/docs/openapi/components/examples/get_connector_types_generativeai_response.yaml similarity index 100% rename from x-pack/plugins/actions/docs/openapi/components/examples/get_connector_types_serverless_response.yaml rename to x-pack/plugins/actions/docs/openapi/components/examples/get_connector_types_generativeai_response.yaml diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request.yaml new file mode 100644 index 0000000000000..ce85b2183391f --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request.yaml @@ -0,0 +1,27 @@ +title: Create connector request body properties +description: The properties vary depending on the connector type. +oneOf: + - $ref: 'create_connector_request_cases_webhook.yaml' + - $ref: 'create_connector_request_d3security.yaml' + - $ref: 'create_connector_request_email.yaml' + - $ref: 'create_connector_request_genai.yaml' + - $ref: 'create_connector_request_index.yaml' + - $ref: 'create_connector_request_jira.yaml' + - $ref: 'create_connector_request_opsgenie.yaml' + - $ref: 'create_connector_request_pagerduty.yaml' + - $ref: 'create_connector_request_resilient.yaml' + - $ref: 'create_connector_request_serverlog.yaml' + - $ref: 'create_connector_request_servicenow.yaml' + - $ref: 'create_connector_request_servicenow_itom.yaml' + - $ref: 'create_connector_request_servicenow_sir.yaml' + - $ref: 'create_connector_request_slack_api.yaml' + - $ref: 'create_connector_request_slack_webhook.yaml' + - $ref: 'create_connector_request_swimlane.yaml' + - $ref: 'create_connector_request_teams.yaml' + - $ref: 'create_connector_request_tines.yaml' + - $ref: 'create_connector_request_torq.yaml' + - $ref: 'create_connector_request_webhook.yaml' + - $ref: 'create_connector_request_xmatters.yaml' +discriminator: + propertyName: connector_type_id + \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml b/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml index b679989ce6e80..9e52f19f57d6b 100644 --- a/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml +++ b/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml @@ -15,13 +15,13 @@ servers: - url: 'http://localhost:5601' description: local paths: - # '/api/actions/connector': - # $ref: 'paths/api@actions@connector.yaml' + '/api/actions/connector': + $ref: 'paths/api@actions@connector.yaml' # '/api/actions/connector/{connectorId}': # $ref: 'paths/api@actions@connector@{connectorid}.yaml' # '/api/actions/connectors': # $ref: paths/api@actions@connectors.yaml - '/api/actions/connector_types': + '/api/actions/connector_types': $ref: paths/api@actions@connector_types.yaml components: securitySchemes: diff --git a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector.yaml b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector.yaml index 23c46ce6bfb0a..9c5e69a53e24f 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector.yaml @@ -1,8 +1,6 @@ post: summary: Creates a connector. operationId: createConnector - description: > - You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: - connectors parameters: @@ -12,32 +10,7 @@ post: content: application/json: schema: - title: Create connector request body properties - description: The properties vary depending on the connector type. - oneOf: - - $ref: '../components/schemas/create_connector_request_cases_webhook.yaml' - - $ref: '../components/schemas/create_connector_request_d3security.yaml' - - $ref: '../components/schemas/create_connector_request_email.yaml' - - $ref: '../components/schemas/create_connector_request_genai.yaml' - - $ref: '../components/schemas/create_connector_request_index.yaml' - - $ref: '../components/schemas/create_connector_request_jira.yaml' - - $ref: '../components/schemas/create_connector_request_opsgenie.yaml' - - $ref: '../components/schemas/create_connector_request_pagerduty.yaml' - - $ref: '../components/schemas/create_connector_request_resilient.yaml' - - $ref: '../components/schemas/create_connector_request_serverlog.yaml' - - $ref: '../components/schemas/create_connector_request_servicenow.yaml' - - $ref: '../components/schemas/create_connector_request_servicenow_itom.yaml' - - $ref: '../components/schemas/create_connector_request_servicenow_sir.yaml' - - $ref: '../components/schemas/create_connector_request_slack_api.yaml' - - $ref: '../components/schemas/create_connector_request_slack_webhook.yaml' - - $ref: '../components/schemas/create_connector_request_swimlane.yaml' - - $ref: '../components/schemas/create_connector_request_teams.yaml' - - $ref: '../components/schemas/create_connector_request_tines.yaml' - - $ref: '../components/schemas/create_connector_request_torq.yaml' - - $ref: '../components/schemas/create_connector_request_webhook.yaml' - - $ref: '../components/schemas/create_connector_request_xmatters.yaml' - discriminator: - propertyName: connector_type_id + $ref: '../components/schemas/create_connector_request.yaml' examples: createEmailConnectorRequest: $ref: '../components/examples/create_email_connector_request.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector_types.yaml b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector_types.yaml index 0b96b75464b1c..30247d47b24c9 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector_types.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector_types.yaml @@ -57,7 +57,7 @@ get: - siem examples: getConnectorTypesServerlessResponse: - $ref: '../components/examples/get_connector_types_serverless_response.yaml' + $ref: '../components/examples/get_connector_types_generativeai_response.yaml' '401': $ref: '../components/responses/401.yaml' servers: diff --git a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector.yaml b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector.yaml index 64712858fa8a0..86e8cc1d0bfe0 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector.yaml @@ -1,6 +1,6 @@ post: summary: Creates a connector. - operationId: createConnector + operationId: createConnectorWithSpaceId description: > You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: @@ -13,33 +13,7 @@ post: content: application/json: schema: - title: Create connector request body properties - description: The properties vary depending on the connector type. - oneOf: - - $ref: '../components/schemas/create_connector_request_bedrock.yaml' - - $ref: '../components/schemas/create_connector_request_cases_webhook.yaml' - - $ref: '../components/schemas/create_connector_request_d3security.yaml' - - $ref: '../components/schemas/create_connector_request_email.yaml' - - $ref: '../components/schemas/create_connector_request_genai.yaml' - - $ref: '../components/schemas/create_connector_request_index.yaml' - - $ref: '../components/schemas/create_connector_request_jira.yaml' - - $ref: '../components/schemas/create_connector_request_opsgenie.yaml' - - $ref: '../components/schemas/create_connector_request_pagerduty.yaml' - - $ref: '../components/schemas/create_connector_request_resilient.yaml' - - $ref: '../components/schemas/create_connector_request_serverlog.yaml' - - $ref: '../components/schemas/create_connector_request_servicenow.yaml' - - $ref: '../components/schemas/create_connector_request_servicenow_itom.yaml' - - $ref: '../components/schemas/create_connector_request_servicenow_sir.yaml' - - $ref: '../components/schemas/create_connector_request_slack_api.yaml' - - $ref: '../components/schemas/create_connector_request_slack_webhook.yaml' - - $ref: '../components/schemas/create_connector_request_swimlane.yaml' - - $ref: '../components/schemas/create_connector_request_teams.yaml' - - $ref: '../components/schemas/create_connector_request_tines.yaml' - - $ref: '../components/schemas/create_connector_request_torq.yaml' - - $ref: '../components/schemas/create_connector_request_webhook.yaml' - - $ref: '../components/schemas/create_connector_request_xmatters.yaml' - discriminator: - propertyName: connector_type_id + $ref: '../components/schemas/create_connector_request.yaml' examples: createEmailConnectorRequest: $ref: '../components/examples/create_email_connector_request.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector_types.yaml b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector_types.yaml index 173427e8f6c2a..1dfdfe775a292 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector_types.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector_types.yaml @@ -1,6 +1,6 @@ get: summary: Retrieves a list of all connector types. - operationId: getConnectorTypesInSpace + operationId: getConnectorTypesWithSpaceId description: > You do not need any Kibana feature privileges to run this API. tags: From 5a5dfe08efd4167409b486d31423d2fc5b977365 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 12 Oct 2023 14:02:51 -0700 Subject: [PATCH 4/8] [OAS] Add Serverless get all connectors API --- .../plugins/actions/docs/openapi/bundled.json | 159 +++++++++--------- .../plugins/actions/docs/openapi/bundled.yaml | 127 +++++++------- .../docs/openapi/bundled_serverless.json | 155 +++++++++++++++-- .../docs/openapi/bundled_serverless.yaml | 111 ++++++++++-- ...tor_response_properties_cases_webhook.yaml | 3 +- ...nector_response_properties_d3security.yaml | 3 +- .../connector_response_properties_email.yaml | 3 +- .../connector_response_properties_genai.yaml | 3 +- .../connector_response_properties_index.yaml | 5 +- .../connector_response_properties_jira.yaml | 3 +- ...onnector_response_properties_opsgenie.yaml | 3 +- ...nnector_response_properties_pagerduty.yaml | 3 +- ...nnector_response_properties_resilient.yaml | 3 +- ...nnector_response_properties_serverlog.yaml | 3 +- ...nector_response_properties_servicenow.yaml | 3 +- ...r_response_properties_servicenow_itom.yaml | 3 +- ...or_response_properties_servicenow_sir.yaml | 3 +- ...nnector_response_properties_slack_api.yaml | 2 + ...tor_response_properties_slack_webhook.yaml | 2 + ...onnector_response_properties_swimlane.yaml | 3 +- .../connector_response_properties_teams.yaml | 2 + .../connector_response_properties_tines.yaml | 3 +- .../connector_response_properties_torq.yaml | 3 +- ...connector_response_properties_webhook.yaml | 4 +- ...onnector_response_properties_xmatters.yaml | 3 +- .../components/schemas/is_preconfigured.yaml | 4 +- .../schemas/referenced_by_count.yaml | 6 + .../docs/openapi/entrypoint_serverless.yaml | 4 +- .../openapi/paths/api@actions@connectors.yaml | 42 +---- .../s@{spaceid}@api@actions@connectors.yaml | 42 +---- 30 files changed, 426 insertions(+), 287 deletions(-) create mode 100644 x-pack/plugins/actions/docs/openapi/components/schemas/referenced_by_count.yaml diff --git a/x-pack/plugins/actions/docs/openapi/bundled.json b/x-pack/plugins/actions/docs/openapi/bundled.json index 1512f8e49764b..25a9fb06f8bbc 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.json +++ b/x-pack/plugins/actions/docs/openapi/bundled.json @@ -530,7 +530,7 @@ "/s/{spaceId}/api/actions/connectors": { "get": { "summary": "Retrieves all connectors.", - "operationId": "getConnectors", + "operationId": "getConnectorsWithSpaceId", "description": "You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", "tags": [ "connectors" @@ -548,56 +548,7 @@ "schema": { "type": "array", "items": { - "title": "Get connectors response body properties", - "description": "The properties vary for each connector type.", - "type": "object", - "required": [ - "connector_type_id", - "id", - "is_deprecated", - "is_preconfigured", - "name", - "referenced_by_count" - ], - "properties": { - "connector_type_id": { - "$ref": "#/components/schemas/connector_types" - }, - "config": { - "type": "object", - "description": "The configuration for the connector. Configuration properties vary depending on the connector type.", - "additionalProperties": true, - "nullable": true - }, - "id": { - "type": "string", - "description": "The identifier for the connector.", - "example": "b0766e10-d190-11ec-b04c-776c77d14fca" - }, - "is_deprecated": { - "$ref": "#/components/schemas/is_deprecated" - }, - "is_missing_secrets": { - "$ref": "#/components/schemas/is_missing_secrets" - }, - "is_preconfigured": { - "$ref": "#/components/schemas/is_preconfigured" - }, - "is_system_action": { - "$ref": "#/components/schemas/is_system_action" - }, - "name": { - "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" - }, - "referenced_by_count": { - "type": "integer", - "description": "Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated.", - "example": 2, - "default": 0 - } - } + "$ref": "#/components/schemas/connector_response_properties" } }, "examples": { @@ -3130,7 +3081,7 @@ }, "is_preconfigured": { "type": "boolean", - "description": "Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response.", + "description": "Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. \n", "example": false }, "is_system_action": { @@ -3138,11 +3089,15 @@ "description": "Indicates whether the connector is used for system actions.", "example": false }, + "referenced_by_count": { + "type": "integer", + "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.\n", + "example": 2 + }, "connector_response_properties_cases_webhook": { "title": "Connector request properties for a Webhook - Case Management connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3179,6 +3134,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3186,7 +3144,6 @@ "title": "Connector response properties for a D3 Security connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3223,6 +3180,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3230,7 +3190,6 @@ "title": "Connector response properties for an email connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3267,6 +3226,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3274,7 +3236,6 @@ "title": "Connector response properties for an index connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3311,6 +3272,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3318,7 +3282,6 @@ "title": "Connector response properties for a Jira connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3355,6 +3318,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3362,7 +3328,6 @@ "title": "Connector response properties for an Opsgenie connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3399,6 +3364,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3406,7 +3374,6 @@ "title": "Connector response properties for a PagerDuty connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3443,6 +3410,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3450,7 +3420,6 @@ "title": "Connector response properties for a IBM Resilient connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3487,6 +3456,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3494,7 +3466,6 @@ "title": "Connector response properties for a server log connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3532,6 +3503,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3539,7 +3513,6 @@ "title": "Connector response properties for a ServiceNow ITSM connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3576,6 +3549,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3583,7 +3559,6 @@ "title": "Connector response properties for a ServiceNow ITOM connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3620,6 +3595,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3627,7 +3605,6 @@ "title": "Connector response properties for a ServiceNow SecOps connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3664,6 +3641,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3704,6 +3684,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3744,6 +3727,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3751,7 +3737,6 @@ "title": "Connector response properties for a Swimlane connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3788,6 +3773,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3831,6 +3819,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3838,7 +3829,6 @@ "title": "Connector response properties for a Tines connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3875,6 +3865,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3882,7 +3875,6 @@ "title": "Connector response properties for a Torq connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3919,6 +3911,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3926,7 +3921,6 @@ "title": "Connector response properties for a Webhook connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -3963,6 +3957,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3970,7 +3967,6 @@ "title": "Connector response properties for an xMatters connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -4007,6 +4003,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -4524,6 +4523,17 @@ } } }, + "features": { + "type": "string", + "description": "The feature that uses the connector.\n", + "enum": [ + "alerting", + "cases", + "generativeAI", + "siem", + "uptime" + ] + }, "connector_types": { "title": "Connector types", "type": "string", @@ -4554,17 +4564,6 @@ ], "example": ".server-log" }, - "features": { - "type": "string", - "description": "The feature that uses the connector.\n", - "enum": [ - "alerting", - "cases", - "generativeAI", - "siem", - "uptime" - ] - }, "run_connector_params_documents": { "title": "Index connector parameters", "description": "Test an action that indexes a document into Elasticsearch.", diff --git a/x-pack/plugins/actions/docs/openapi/bundled.yaml b/x-pack/plugins/actions/docs/openapi/bundled.yaml index 36183db489d27..ba98502e91ff6 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.yaml +++ b/x-pack/plugins/actions/docs/openapi/bundled.yaml @@ -284,7 +284,7 @@ paths: /s/{spaceId}/api/actions/connectors: get: summary: Retrieves all connectors. - operationId: getConnectors + operationId: getConnectorsWithSpaceId description: | You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: @@ -299,45 +299,7 @@ paths: schema: type: array items: - title: Get connectors response body properties - description: The properties vary for each connector type. - type: object - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - - referenced_by_count - properties: - connector_type_id: - $ref: '#/components/schemas/connector_types' - config: - type: object - description: The configuration for the connector. Configuration properties vary depending on the connector type. - additionalProperties: true - nullable: true - id: - type: string - description: The identifier for the connector. - example: b0766e10-d190-11ec-b04c-776c77d14fca - is_deprecated: - $ref: '#/components/schemas/is_deprecated' - is_missing_secrets: - $ref: '#/components/schemas/is_missing_secrets' - is_preconfigured: - $ref: '#/components/schemas/is_preconfigured' - is_system_action: - $ref: '#/components/schemas/is_system_action' - name: - type: string - description: The display name for the connector. - example: my-connector - referenced_by_count: - type: integer - description: Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated. - example: 2 - default: 0 + $ref: '#/components/schemas/connector_response_properties' examples: getConnectorsResponse: $ref: '#/components/examples/get_connectors_response' @@ -2150,17 +2112,22 @@ components: example: false is_preconfigured: type: boolean - description: Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + description: | + Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. example: false is_system_action: type: boolean description: Indicates whether the connector is used for system actions. example: false + referenced_by_count: + type: integer + 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 connector_response_properties_cases_webhook: title: Connector request properties for a Webhook - Case Management connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2188,11 +2155,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_d3security: title: Connector response properties for a D3 Security connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2220,11 +2188,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_email: title: Connector response properties for an email connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2252,11 +2221,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_index: title: Connector response properties for an index connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2284,11 +2254,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_jira: title: Connector response properties for a Jira connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2316,11 +2287,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_opsgenie: title: Connector response properties for an Opsgenie connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2348,11 +2320,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_pagerduty: title: Connector response properties for a PagerDuty connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2380,11 +2353,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_resilient: title: Connector response properties for a IBM Resilient connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2412,11 +2386,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_serverlog: title: Connector response properties for a server log connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2445,11 +2420,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_servicenow: title: Connector response properties for a ServiceNow ITSM connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2477,11 +2453,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_servicenow_itom: title: Connector response properties for a ServiceNow ITOM connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2509,11 +2486,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_servicenow_sir: title: Connector response properties for a ServiceNow SecOps connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2541,6 +2519,8 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_slack_api: title: Connector response properties for a Slack connector type: object @@ -2570,6 +2550,8 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_slack_webhook: title: Connector response properties for a Slack connector type: object @@ -2599,11 +2581,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_swimlane: title: Connector response properties for a Swimlane connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2631,6 +2614,8 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_teams: title: Connector response properties for a Microsoft Teams connector type: object @@ -2662,11 +2647,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_tines: title: Connector response properties for a Tines connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2694,11 +2680,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_torq: title: Connector response properties for a Torq connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2726,11 +2713,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_webhook: title: Connector response properties for a Webhook connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2758,11 +2746,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_xmatters: title: Connector response properties for an xMatters connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2790,6 +2779,8 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties: title: Connector response properties description: The properties vary depending on the connector type. @@ -3136,6 +3127,16 @@ components: description: The display name for the connector. secrets: $ref: '#/components/schemas/secrets_properties_xmatters' + features: + type: string + description: | + The feature that uses the connector. + enum: + - alerting + - cases + - generativeAI + - siem + - uptime connector_types: title: Connector types type: string @@ -3164,16 +3165,6 @@ components: - .webhook - .xmatters example: .server-log - features: - type: string - description: | - The feature that uses the connector. - enum: - - alerting - - cases - - generativeAI - - siem - - uptime run_connector_params_documents: title: Index connector parameters description: Test an action that indexes a document into Elasticsearch. diff --git a/x-pack/plugins/actions/docs/openapi/bundled_serverless.json b/x-pack/plugins/actions/docs/openapi/bundled_serverless.json index 014fb7824a3d0..a1ae64fa3c625 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled_serverless.json +++ b/x-pack/plugins/actions/docs/openapi/bundled_serverless.json @@ -107,6 +107,48 @@ } ] }, + "/api/actions/connectors": { + "get": { + "summary": "Retrieves all connectors.", + "operationId": "getConnectors", + "tags": [ + "connectors" + ], + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector_response_properties" + } + }, + "examples": { + "getConnectorsResponse": { + "$ref": "#/components/examples/get_connectors_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, "/api/actions/connector_types": { "get": { "summary": "Retrieves a list of all connector types.", @@ -1998,7 +2040,7 @@ }, "is_preconfigured": { "type": "boolean", - "description": "Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response.", + "description": "Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. \n", "example": false }, "is_system_action": { @@ -2006,11 +2048,15 @@ "description": "Indicates whether the connector is used for system actions.", "example": false }, + "referenced_by_count": { + "type": "integer", + "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.\n", + "example": 2 + }, "connector_response_properties_cases_webhook": { "title": "Connector request properties for a Webhook - Case Management connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2047,6 +2093,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2054,7 +2103,6 @@ "title": "Connector response properties for a D3 Security connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2091,6 +2139,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2098,7 +2149,6 @@ "title": "Connector response properties for an email connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2135,6 +2185,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2142,7 +2195,6 @@ "title": "Connector response properties for an index connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2179,6 +2231,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2186,7 +2241,6 @@ "title": "Connector response properties for a Jira connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2223,6 +2277,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2230,7 +2287,6 @@ "title": "Connector response properties for an Opsgenie connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2267,6 +2323,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2274,7 +2333,6 @@ "title": "Connector response properties for a PagerDuty connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2311,6 +2369,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2318,7 +2379,6 @@ "title": "Connector response properties for a IBM Resilient connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2355,6 +2415,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2362,7 +2425,6 @@ "title": "Connector response properties for a server log connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2400,6 +2462,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2407,7 +2472,6 @@ "title": "Connector response properties for a ServiceNow ITSM connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2444,6 +2508,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2451,7 +2518,6 @@ "title": "Connector response properties for a ServiceNow ITOM connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2488,6 +2554,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2495,7 +2564,6 @@ "title": "Connector response properties for a ServiceNow SecOps connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2532,6 +2600,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2572,6 +2643,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2612,6 +2686,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2619,7 +2696,6 @@ "title": "Connector response properties for a Swimlane connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2656,6 +2732,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2699,6 +2778,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2706,7 +2788,6 @@ "title": "Connector response properties for a Tines connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2743,6 +2824,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2750,7 +2834,6 @@ "title": "Connector response properties for a Torq connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2787,6 +2870,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2794,7 +2880,6 @@ "title": "Connector response properties for a Webhook connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2831,6 +2916,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -2838,7 +2926,6 @@ "title": "Connector response properties for an xMatters connector", "type": "object", "required": [ - "config", "connector_type_id", "id", "is_deprecated", @@ -2875,6 +2962,9 @@ "name": { "type": "string", "description": "The display name for the connector." + }, + "referenced_by_count": { + "$ref": "#/components/schemas/referenced_by_count" } } }, @@ -3127,6 +3217,35 @@ "is_system_action": false } }, + "get_connectors_response": { + "summary": "A list of connectors", + "value": [ + { + "id": "preconfigured-email-connector", + "name": "my-preconfigured-email-notification", + "connector_type_id": ".email", + "is_preconfigured": true, + "is_deprecated": false, + "referenced_by_count": 0, + "is_system_action": false + }, + { + "id": "e07d0c80-8b8b-11ed-a780-3b746c987a81", + "name": "my-index-connector", + "config": { + "index": "test-index", + "refresh": false, + "executionTimeField": null + }, + "connector_type_id": ".index", + "is_preconfigured": false, + "is_deprecated": false, + "referenced_by_count": 2, + "is_missing_secrets": false, + "is_system_action": false + } + ] + }, "get_connector_types_generativeai_response": { "summary": "A list of connector types for the `generativeAI` feature.", "value": [ diff --git a/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml b/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml index b29422a788b30..845dbcbf1a7b9 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml +++ b/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml @@ -62,6 +62,30 @@ paths: - url: https://localhost:5601 servers: - url: https://localhost:5601 + /api/actions/connectors: + get: + summary: Retrieves all connectors. + operationId: getConnectors + tags: + - connectors + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/connector_response_properties' + examples: + getConnectorsResponse: + $ref: '#/components/examples/get_connectors_response' + '401': + $ref: '#/components/responses/401' + servers: + - url: https://localhost:5601 + servers: + - url: https://localhost:5601 /api/actions/connector_types: get: summary: Retrieves a list of all connector types. @@ -1499,17 +1523,22 @@ components: example: false is_preconfigured: type: boolean - description: Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. + description: | + Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. example: false is_system_action: type: boolean description: Indicates whether the connector is used for system actions. example: false + referenced_by_count: + type: integer + 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 connector_response_properties_cases_webhook: title: Connector request properties for a Webhook - Case Management connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -1537,11 +1566,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_d3security: title: Connector response properties for a D3 Security connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -1569,11 +1599,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_email: title: Connector response properties for an email connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -1601,11 +1632,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_index: title: Connector response properties for an index connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -1633,11 +1665,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_jira: title: Connector response properties for a Jira connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -1665,11 +1698,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_opsgenie: title: Connector response properties for an Opsgenie connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -1697,11 +1731,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_pagerduty: title: Connector response properties for a PagerDuty connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -1729,11 +1764,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_resilient: title: Connector response properties for a IBM Resilient connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -1761,11 +1797,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_serverlog: title: Connector response properties for a server log connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -1794,11 +1831,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_servicenow: title: Connector response properties for a ServiceNow ITSM connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -1826,11 +1864,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_servicenow_itom: title: Connector response properties for a ServiceNow ITOM connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -1858,11 +1897,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_servicenow_sir: title: Connector response properties for a ServiceNow SecOps connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -1890,6 +1930,8 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_slack_api: title: Connector response properties for a Slack connector type: object @@ -1919,6 +1961,8 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_slack_webhook: title: Connector response properties for a Slack connector type: object @@ -1948,11 +1992,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_swimlane: title: Connector response properties for a Swimlane connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -1980,6 +2025,8 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_teams: title: Connector response properties for a Microsoft Teams connector type: object @@ -2011,11 +2058,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_tines: title: Connector response properties for a Tines connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2043,11 +2091,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_torq: title: Connector response properties for a Torq connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2075,11 +2124,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_webhook: title: Connector response properties for a Webhook connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2107,11 +2157,12 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties_xmatters: title: Connector response properties for an xMatters connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -2139,6 +2190,8 @@ components: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: '#/components/schemas/referenced_by_count' connector_response_properties: title: Connector response properties description: The properties vary depending on the connector type. @@ -2314,6 +2367,28 @@ components: is_deprecated: false is_missing_secrets: false is_system_action: false + get_connectors_response: + summary: A list of connectors + value: + - id: preconfigured-email-connector + name: my-preconfigured-email-notification + connector_type_id: .email + is_preconfigured: true + is_deprecated: false + referenced_by_count: 0 + is_system_action: false + - id: e07d0c80-8b8b-11ed-a780-3b746c987a81 + name: my-index-connector + config: + index: test-index + refresh: false + executionTimeField: null + connector_type_id: .index + is_preconfigured: false + is_deprecated: false + referenced_by_count: 2 + is_missing_secrets: false + is_system_action: false get_connector_types_generativeai_response: summary: A list of connector types for the `generativeAI` feature. value: diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_cases_webhook.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_cases_webhook.yaml index 70e9a48910c80..29b746e4d1f67 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_cases_webhook.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_cases_webhook.yaml @@ -1,7 +1,6 @@ title: Connector request properties for a Webhook - Case Management connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_d3security.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_d3security.yaml index 694b7c011b84a..e089b079b9077 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_d3security.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_d3security.yaml @@ -1,7 +1,6 @@ title: Connector response properties for a D3 Security connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_email.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_email.yaml index b84dff4f53106..cfe6e97fc61a9 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_email.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_email.yaml @@ -1,7 +1,6 @@ title: Connector response properties for an email connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_genai.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_genai.yaml index 928147ed87a69..0d1bbb93f854d 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_genai.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_genai.yaml @@ -1,7 +1,6 @@ title: Connector response properties for an OpenAI connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_index.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_index.yaml index 5e76416f25210..8e5fe0ba9b892 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_index.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_index.yaml @@ -1,7 +1,6 @@ title: Connector response properties for an index connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -28,4 +27,6 @@ properties: $ref: 'is_system_action.yaml' name: type: string - description: The display name for the connector. \ No newline at end of file + description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_jira.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_jira.yaml index f61381af96396..b822d82ba10f9 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_jira.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_jira.yaml @@ -1,7 +1,6 @@ title: Connector response properties for a Jira connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_opsgenie.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_opsgenie.yaml index f44f79f8e7013..9ac5d91b25c80 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_opsgenie.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_opsgenie.yaml @@ -1,7 +1,6 @@ title: Connector response properties for an Opsgenie connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_pagerduty.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_pagerduty.yaml index 0002e684c2f5e..f8616900b01d0 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_pagerduty.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_pagerduty.yaml @@ -1,7 +1,6 @@ title: Connector response properties for a PagerDuty connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_resilient.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_resilient.yaml index fc2a239d29a4e..489e5ab27abfc 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_resilient.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_resilient.yaml @@ -1,7 +1,6 @@ title: Connector response properties for a IBM Resilient connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_serverlog.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_serverlog.yaml index bd41b62a114c7..a397e668102a6 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_serverlog.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_serverlog.yaml @@ -1,7 +1,6 @@ title: Connector response properties for a server log connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -30,3 +29,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_servicenow.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_servicenow.yaml index 104e7174467a4..98ac4d3daf31d 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_servicenow.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_servicenow.yaml @@ -1,7 +1,6 @@ title: Connector response properties for a ServiceNow ITSM connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_servicenow_itom.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_servicenow_itom.yaml index 5651629365bbd..27cfe9d0dca6a 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_servicenow_itom.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_servicenow_itom.yaml @@ -1,7 +1,6 @@ title: Connector response properties for a ServiceNow ITOM connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_servicenow_sir.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_servicenow_sir.yaml index 4b24b3c0e7a62..9d5a2b7ab2e2e 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_servicenow_sir.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_servicenow_sir.yaml @@ -1,7 +1,6 @@ title: Connector response properties for a ServiceNow SecOps connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_api.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_api.yaml index 76510f2511dd2..56c4f488a35af 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_api.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_api.yaml @@ -26,3 +26,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_webhook.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_webhook.yaml index 7b0de9d2c27ca..a9dfd3dc9e857 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_webhook.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_slack_webhook.yaml @@ -26,3 +26,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_swimlane.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_swimlane.yaml index ea645598de5b7..4c239f21a5db5 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_swimlane.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_swimlane.yaml @@ -1,7 +1,6 @@ title: Connector response properties for a Swimlane connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_teams.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_teams.yaml index 3e0dc777efa98..939f4014763d9 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_teams.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_teams.yaml @@ -28,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_tines.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_tines.yaml index 1468becee8551..5fcd24511580f 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_tines.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_tines.yaml @@ -1,7 +1,6 @@ title: Connector response properties for a Tines connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_torq.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_torq.yaml index 135d5e9db6cb4..b22b6f0a872fc 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_torq.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_torq.yaml @@ -1,7 +1,6 @@ title: Connector response properties for a Torq connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_webhook.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_webhook.yaml index 8d0dfdac5fbe6..3469f52c5965d 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_webhook.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_webhook.yaml @@ -1,7 +1,6 @@ title: Connector response properties for a Webhook connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,6 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' + diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_xmatters.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_xmatters.yaml index 3f9e35eba8d6a..ead2e18149522 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_xmatters.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties_xmatters.yaml @@ -1,7 +1,6 @@ title: Connector response properties for an xMatters connector type: object required: - - config - connector_type_id - id - is_deprecated @@ -29,3 +28,5 @@ properties: name: type: string description: The display name for the connector. + referenced_by_count: + $ref: 'referenced_by_count.yaml' \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/is_preconfigured.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/is_preconfigured.yaml index 11991d878721a..e38741c83718e 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/is_preconfigured.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/is_preconfigured.yaml @@ -1,3 +1,5 @@ type: boolean -description: Indicates whether it is a preconfigured connector. If true, the `config` and `is_missing_secrets` properties are omitted from the response. +description: > + Indicates whether it is a preconfigured connector. + If true, the `config` and `is_missing_secrets` properties are omitted from the response. example: false \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/referenced_by_count.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/referenced_by_count.yaml new file mode 100644 index 0000000000000..61579fa3dc6ce --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/referenced_by_count.yaml @@ -0,0 +1,6 @@ +type: integer +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 \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml b/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml index 9e52f19f57d6b..bb00c1bd2d3fd 100644 --- a/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml +++ b/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml @@ -19,8 +19,8 @@ paths: $ref: 'paths/api@actions@connector.yaml' # '/api/actions/connector/{connectorId}': # $ref: 'paths/api@actions@connector@{connectorid}.yaml' - # '/api/actions/connectors': - # $ref: paths/api@actions@connectors.yaml + '/api/actions/connectors': + $ref: paths/api@actions@connectors.yaml '/api/actions/connector_types': $ref: paths/api@actions@connector_types.yaml components: diff --git a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connectors.yaml b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connectors.yaml index f34b01d2887bd..b350251dde206 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connectors.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connectors.yaml @@ -1,8 +1,6 @@ get: summary: Retrieves all connectors. operationId: getConnectors - description: > - You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: - connectors responses: @@ -13,45 +11,7 @@ get: schema: type: array items: - title: Get connectors response body properties - description: The properties vary for each connector type. - type: object - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - - referenced_by_count - properties: - connector_type_id: - $ref: '../components/schemas/connector_types.yaml' - config: - type: object - description: The configuration for the connector. Configuration properties vary depending on the connector type. - additionalProperties: true - nullable: true - id: - type: string - description: The identifier for the connector. - example: b0766e10-d190-11ec-b04c-776c77d14fca - is_deprecated: - $ref: '../components/schemas/is_deprecated.yaml' - is_missing_secrets: - $ref: '../components/schemas/is_missing_secrets.yaml' - is_preconfigured: - $ref: '../components/schemas/is_preconfigured.yaml' - is_system_action: - $ref: '../components/schemas/is_system_action.yaml' - name: - type: string - description: The display name for the connector. - example: my-connector - referenced_by_count: - type: integer - description: Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated. - example: 2 - default: 0 + $ref: '../components/schemas/connector_response_properties.yaml' examples: getConnectorsResponse: $ref: '../components/examples/get_connectors_response.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connectors.yaml b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connectors.yaml index caec98d7bf5e3..7f5d5944ba520 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connectors.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connectors.yaml @@ -1,6 +1,6 @@ get: summary: Retrieves all connectors. - operationId: getConnectors + operationId: getConnectorsWithSpaceId description: > You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: @@ -15,45 +15,7 @@ get: schema: type: array items: - title: Get connectors response body properties - description: The properties vary for each connector type. - type: object - required: - - connector_type_id - - id - - is_deprecated - - is_preconfigured - - name - - referenced_by_count - properties: - connector_type_id: - $ref: '../components/schemas/connector_types.yaml' - config: - type: object - description: The configuration for the connector. Configuration properties vary depending on the connector type. - additionalProperties: true - nullable: true - id: - type: string - description: The identifier for the connector. - example: b0766e10-d190-11ec-b04c-776c77d14fca - is_deprecated: - $ref: '../components/schemas/is_deprecated.yaml' - is_missing_secrets: - $ref: '../components/schemas/is_missing_secrets.yaml' - is_preconfigured: - $ref: '../components/schemas/is_preconfigured.yaml' - is_system_action: - $ref: '../components/schemas/is_system_action.yaml' - name: - type: string - description: The display name for the connector. - example: my-connector - referenced_by_count: - type: integer - description: Indicates the number of saved objects that reference the connector. If `is_preconfigured` is true, this value is not calculated. - example: 2 - default: 0 + $ref: '../components/schemas/connector_response_properties.yaml' examples: getConnectorsResponse: $ref: '../components/examples/get_connectors_response.yaml' From 5eeac7347eccbd96ca2165fdfb455d387acbbdf0 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 12 Oct 2023 14:13:58 -0700 Subject: [PATCH 5/8] [OAS] Add Serverless get connector API --- .../plugins/actions/docs/openapi/bundled.json | 33 +-- .../plugins/actions/docs/openapi/bundled.yaml | 26 +-- .../docs/openapi/bundled_serverless.json | 96 ++++++++ .../docs/openapi/bundled_serverless.yaml | 64 ++++++ .../examples/get_connector_response.yaml | 2 +- .../docs/openapi/entrypoint_serverless.yaml | 4 +- .../actions@connector@{connectorid}.yaml | 212 ------------------ .../api@actions@connector@{connectorid}.yaml | 196 ++++++++++++++++ ...}@api@actions@connector@{connectorid}.yaml | 24 +- 9 files changed, 376 insertions(+), 281 deletions(-) delete mode 100644 x-pack/plugins/actions/docs/openapi/paths/actions@connector@{connectorid}.yaml create mode 100644 x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}.yaml diff --git a/x-pack/plugins/actions/docs/openapi/bundled.json b/x-pack/plugins/actions/docs/openapi/bundled.json index 25a9fb06f8bbc..be9456353acb6 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.json +++ b/x-pack/plugins/actions/docs/openapi/bundled.json @@ -117,7 +117,7 @@ "/s/{spaceId}/api/actions/connector/{connectorId}": { "get": { "summary": "Retrieves a connector by ID.", - "operationId": "getConnector", + "operationId": "getConnectorWithSpaceId", "description": "You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", "tags": [ "connectors" @@ -150,28 +150,7 @@ "$ref": "#/components/responses/401" }, "404": { - "description": "Object is not found.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "string", - "example": "Not Found" - }, - "message": { - "type": "string", - "example": "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" - }, - "statusCode": { - "type": "integer", - "example": 404 - } - } - } - } - } + "$ref": "#/components/responses/404" } }, "servers": [ @@ -182,7 +161,7 @@ }, "delete": { "summary": "Deletes a connector.", - "operationId": "deleteConnector", + "operationId": "deleteConnectorWithSpaceId", "description": "You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered.\n", "tags": [ "connectors" @@ -238,7 +217,7 @@ }, "post": { "summary": "Creates a connector.", - "operationId": "createConnectorId", + "operationId": "createConnectorIdWithSpaceId", "description": "You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", "tags": [ "connectors" @@ -376,7 +355,7 @@ }, "put": { "summary": "Updates the attributes for a connector.", - "operationId": "updateConnector", + "operationId": "updateConnectorWithSpaceId", "description": "You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", "tags": [ "connectors" @@ -5417,7 +5396,7 @@ } }, "get_connector_response": { - "summary": "A list of connector types", + "summary": "Get connector details.", "value": { "id": "df770e30-8b8b-11ed-a780-3b746c987a81", "name": "my_server_log_connector", diff --git a/x-pack/plugins/actions/docs/openapi/bundled.yaml b/x-pack/plugins/actions/docs/openapi/bundled.yaml index ba98502e91ff6..a486f9e84e588 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.yaml +++ b/x-pack/plugins/actions/docs/openapi/bundled.yaml @@ -69,7 +69,7 @@ paths: /s/{spaceId}/api/actions/connector/{connectorId}: get: summary: Retrieves a connector by ID. - operationId: getConnector + operationId: getConnectorWithSpaceId description: | You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: @@ -90,26 +90,12 @@ paths: '401': $ref: '#/components/responses/401' '404': - description: Object is not found. - content: - application/json: - schema: - type: object - properties: - error: - type: string - example: Not Found - message: - type: string - example: Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found - statusCode: - type: integer - example: 404 + $ref: '#/components/responses/404' servers: - url: https://localhost:5601 delete: summary: Deletes a connector. - operationId: deleteConnector + operationId: deleteConnectorWithSpaceId description: | You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. tags: @@ -143,7 +129,7 @@ paths: - url: https://localhost:5601 post: summary: Creates a connector. - operationId: createConnectorId + operationId: createConnectorIdWithSpaceId description: | You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: @@ -209,7 +195,7 @@ paths: - url: https://localhost:5601 put: summary: Updates the attributes for a connector. - operationId: updateConnector + operationId: updateConnectorWithSpaceId description: | You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: @@ -3788,7 +3774,7 @@ components: is_missing_secrets: false is_system_action: false get_connector_response: - summary: A list of connector types + summary: Get connector details. value: id: df770e30-8b8b-11ed-a780-3b746c987a81 name: my_server_log_connector diff --git a/x-pack/plugins/actions/docs/openapi/bundled_serverless.json b/x-pack/plugins/actions/docs/openapi/bundled_serverless.json index a1ae64fa3c625..57249280659e7 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled_serverless.json +++ b/x-pack/plugins/actions/docs/openapi/bundled_serverless.json @@ -107,6 +107,48 @@ } ] }, + "/api/actions/connector/{connectorId}": { + "get": { + "summary": "Retrieves a connector by ID.", + "operationId": "getConnector", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/connector_id" + } + ], + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connector_response_properties" + }, + "examples": { + "getConnectorResponse": { + "$ref": "#/components/examples/get_connector_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + } + }, "/api/actions/connectors": { "get": { "summary": "Retrieves all connectors.", @@ -267,6 +309,16 @@ "name": "kbn-xsrf", "description": "Cross-site request forgery protection", "required": true + }, + "connector_id": { + "in": "path", + "name": "connectorId", + "description": "An identifier for the connector.", + "required": true, + "schema": { + "type": "string", + "example": "df770e30-8b8b-11ed-a780-3b746c987a81" + } } }, "schemas": { @@ -3217,6 +3269,19 @@ "is_system_action": false } }, + "get_connector_response": { + "summary": "Get connector details.", + "value": { + "id": "df770e30-8b8b-11ed-a780-3b746c987a81", + "name": "my_server_log_connector", + "config": {}, + "connector_type_id": ".server-log", + "is_preconfigured": false, + "is_deprecated": false, + "is_missing_secrets": false, + "is_system_action": false + } + }, "get_connectors_response": { "summary": "A list of connectors", "value": [ @@ -3306,6 +3371,37 @@ } } } + }, + "404": { + "description": "Object is not found.", + "content": { + "application/json": { + "schema": { + "type": "object", + "title": "Not found response", + "properties": { + "error": { + "type": "string", + "example": "Not Found", + "enum": [ + "Not Found" + ] + }, + "message": { + "type": "string", + "example": "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" + }, + "statusCode": { + "type": "integer", + "example": 404, + "enum": [ + 404 + ] + } + } + } + } + } } } } diff --git a/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml b/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml index 845dbcbf1a7b9..5f0acb1ab32ff 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml +++ b/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml @@ -62,6 +62,30 @@ paths: - url: https://localhost:5601 servers: - url: https://localhost:5601 + /api/actions/connector/{connectorId}: + get: + summary: Retrieves a connector by ID. + operationId: getConnector + tags: + - connectors + parameters: + - $ref: '#/components/parameters/connector_id' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/connector_response_properties' + examples: + getConnectorResponse: + $ref: '#/components/examples/get_connector_response' + '401': + $ref: '#/components/responses/401' + '404': + $ref: '#/components/responses/404' + servers: + - url: https://localhost:5601 /api/actions/connectors: get: summary: Retrieves all connectors. @@ -167,6 +191,14 @@ components: name: kbn-xsrf description: Cross-site request forgery protection required: true + connector_id: + in: path + name: connectorId + description: An identifier for the connector. + required: true + schema: + type: string + example: df770e30-8b8b-11ed-a780-3b746c987a81 schemas: config_properties_cases_webhook: title: Connector request properties for Webhook - Case Management connector @@ -2367,6 +2399,17 @@ components: is_deprecated: false is_missing_secrets: false is_system_action: false + get_connector_response: + summary: Get connector details. + value: + id: df770e30-8b8b-11ed-a780-3b746c987a81 + name: my_server_log_connector + config: {} + connector_type_id: .server-log + is_preconfigured: false + is_deprecated: false + is_missing_secrets: false + is_system_action: false get_connectors_response: summary: A list of connectors value: @@ -2431,3 +2474,24 @@ components: example: 401 enum: - 401 + '404': + description: Object is not found. + content: + application/json: + schema: + type: object + title: Not found response + properties: + error: + type: string + example: Not Found + enum: + - Not Found + message: + type: string + example: Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found + statusCode: + type: integer + example: 404 + enum: + - 404 diff --git a/x-pack/plugins/actions/docs/openapi/components/examples/get_connector_response.yaml b/x-pack/plugins/actions/docs/openapi/components/examples/get_connector_response.yaml index 6de6a030140e6..0c5ff80fe5884 100644 --- a/x-pack/plugins/actions/docs/openapi/components/examples/get_connector_response.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/examples/get_connector_response.yaml @@ -1,4 +1,4 @@ -summary: A list of connector types +summary: Get connector details. value: id: df770e30-8b8b-11ed-a780-3b746c987a81 name: my_server_log_connector diff --git a/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml b/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml index bb00c1bd2d3fd..1cfccf790903a 100644 --- a/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml +++ b/x-pack/plugins/actions/docs/openapi/entrypoint_serverless.yaml @@ -17,8 +17,8 @@ servers: paths: '/api/actions/connector': $ref: 'paths/api@actions@connector.yaml' - # '/api/actions/connector/{connectorId}': - # $ref: 'paths/api@actions@connector@{connectorid}.yaml' + '/api/actions/connector/{connectorId}': + $ref: 'paths/api@actions@connector@{connectorid}.yaml' '/api/actions/connectors': $ref: paths/api@actions@connectors.yaml '/api/actions/connector_types': diff --git a/x-pack/plugins/actions/docs/openapi/paths/actions@connector@{connectorid}.yaml b/x-pack/plugins/actions/docs/openapi/paths/actions@connector@{connectorid}.yaml deleted file mode 100644 index af1568a1a67f9..0000000000000 --- a/x-pack/plugins/actions/docs/openapi/paths/actions@connector@{connectorid}.yaml +++ /dev/null @@ -1,212 +0,0 @@ -get: - summary: Retrieves a connector by ID. - operationId: getConnector - description: > - You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - tags: - - connectors - parameters: - - $ref: '../components/parameters/connector_id.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '../components/schemas/connector_response_properties.yaml' - examples: - getConnectorResponse: - $ref: '../components/examples/get_connector_response.yaml' - '401': - $ref: '../components/responses/401.yaml' - '404': - description: Object is not found. - content: - application/json: - schema: - type: object - properties: - error: - type: string - example: Not Found - message: - type: string - example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" - statusCode: - type: integer - example: 404 - servers: - - url: https://localhost:5601 - -delete: - summary: Deletes a connector. - operationId: deleteConnector - description: > - You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - WARNING: When you delete a connector, it cannot be recovered. - tags: - - connectors - parameters: - - $ref: '../components/headers/kbn_xsrf.yaml' - - $ref: '../components/parameters/connector_id.yaml' - responses: - '204': - description: Indicates a successful call. - '401': - $ref: '../components/responses/401.yaml' - '404': - description: Object is not found. - content: - application/json: - schema: - type: object - properties: - error: - type: string - example: Not Found - message: - type: string - example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" - statusCode: - type: integer - example: 404 - servers: - - url: https://localhost:5601 - -post: - summary: Creates a connector. - operationId: createConnectorId - description: > - You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - tags: - - connectors - parameters: - - $ref: '../components/headers/kbn_xsrf.yaml' - - in: path - name: connectorId - description: A UUID v1 or v4 identifier for the connector. If you omit this parameter, an identifier is randomly generated. - required: true - schema: - type: string - example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 - requestBody: - required: true - content: - application/json: - schema: - title: Create connector request body properties - description: The properties vary depending on the connector type. - oneOf: - - $ref: '../components/schemas/create_connector_request_cases_webhook.yaml' - - $ref: '../components/schemas/create_connector_request_d3security.yaml' - - $ref: '../components/schemas/create_connector_request_email.yaml' - - $ref: '../components/schemas/create_connector_request_genai.yaml' - - $ref: '../components/schemas/create_connector_request_index.yaml' - - $ref: '../components/schemas/create_connector_request_jira.yaml' - - $ref: '../components/schemas/create_connector_request_opsgenie.yaml' - - $ref: '../components/schemas/create_connector_request_pagerduty.yaml' - - $ref: '../components/schemas/create_connector_request_resilient.yaml' - - $ref: '../components/schemas/create_connector_request_serverlog.yaml' - - $ref: '../components/schemas/create_connector_request_servicenow.yaml' - - $ref: '../components/schemas/create_connector_request_servicenow_itom.yaml' - - $ref: '../components/schemas/create_connector_request_servicenow_sir.yaml' - - $ref: '../components/schemas/create_connector_request_slack_api.yaml' - - $ref: '../components/schemas/create_connector_request_slack_webhook.yaml' - - $ref: '../components/schemas/create_connector_request_swimlane.yaml' - - $ref: '../components/schemas/create_connector_request_teams.yaml' - - $ref: '../components/schemas/create_connector_request_tines.yaml' - - $ref: '../components/schemas/create_connector_request_torq.yaml' - - $ref: '../components/schemas/create_connector_request_webhook.yaml' - - $ref: '../components/schemas/create_connector_request_xmatters.yaml' - discriminator: - propertyName: connector_type_id - examples: - createIndexConnectorRequest: - $ref: '../components/examples/create_index_connector_request.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '../components/schemas/connector_response_properties.yaml' - examples: - createIndexConnectorResponse: - $ref: '../components/examples/create_index_connector_response.yaml' - '401': - $ref: '../components/responses/401.yaml' - servers: - - url: https://localhost:5601 - -put: - summary: Updates the attributes for a connector. - operationId: updateConnector - description: > - You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - tags: - - connectors - parameters: - - $ref: '../components/headers/kbn_xsrf.yaml' - - $ref: '../components/parameters/connector_id.yaml' - requestBody: - required: true - content: - application/json: - schema: - title: Update connector request body properties - description: The properties vary depending on the connector type. - oneOf: - - $ref: '../components/schemas/update_connector_request_cases_webhook.yaml' - - $ref: '../components/schemas/update_connector_request_d3security.yaml' - - $ref: '../components/schemas/update_connector_request_email.yaml' - - $ref: '../components/schemas/create_connector_request_genai.yaml' - - $ref: '../components/schemas/update_connector_request_index.yaml' - - $ref: '../components/schemas/update_connector_request_jira.yaml' - - $ref: '../components/schemas/update_connector_request_opsgenie.yaml' - - $ref: '../components/schemas/update_connector_request_pagerduty.yaml' - - $ref: '../components/schemas/update_connector_request_resilient.yaml' - - $ref: '../components/schemas/update_connector_request_serverlog.yaml' - - $ref: '../components/schemas/update_connector_request_servicenow.yaml' - - $ref: '../components/schemas/update_connector_request_servicenow_itom.yaml' - - $ref: '../components/schemas/update_connector_request_slack_api.yaml' - - $ref: '../components/schemas/update_connector_request_slack_webhook.yaml' - - $ref: '../components/schemas/update_connector_request_swimlane.yaml' - - $ref: '../components/schemas/update_connector_request_teams.yaml' - - $ref: '../components/schemas/update_connector_request_tines.yaml' - - $ref: '../components/schemas/update_connector_request_torq.yaml' - - $ref: '../components/schemas/update_connector_request_webhook.yaml' - - $ref: '../components/schemas/update_connector_request_xmatters.yaml' - examples: - updateIndexConnectorRequest: - $ref: '../components/examples/update_index_connector_request.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '../components/schemas/connector_response_properties.yaml' - '400': - description: Indicates a bad request. - content: - application/json: - schema: - type: object - properties: - error: - type: string - example: Bad Request - message: - type: string - example: "error validating action type config: [index]: expected value of type [string] but got [undefined]" - statusCode: - type: integer - example: 400 - '401': - $ref: '../components/responses/401.yaml' - '404': - $ref: '../components/responses/404.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}.yaml b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}.yaml new file mode 100644 index 0000000000000..2e0049e7c628d --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}.yaml @@ -0,0 +1,196 @@ +get: + summary: Retrieves a connector by ID. + operationId: getConnector + tags: + - connectors + parameters: + - $ref: '../components/parameters/connector_id.yaml' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '../components/schemas/connector_response_properties.yaml' + examples: + getConnectorResponse: + $ref: '../components/examples/get_connector_response.yaml' + '401': + $ref: '../components/responses/401.yaml' + '404': + $ref: '../components/responses/404.yaml' + servers: + - url: https://localhost:5601 + +# delete: +# summary: Deletes a connector. +# operationId: deleteConnector +# description: > +# You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. +# WARNING: When you delete a connector, it cannot be recovered. +# tags: +# - connectors +# parameters: +# - $ref: '../components/headers/kbn_xsrf.yaml' +# - $ref: '../components/parameters/connector_id.yaml' +# responses: +# '204': +# description: Indicates a successful call. +# '401': +# $ref: '../components/responses/401.yaml' +# '404': +# description: Object is not found. +# content: +# application/json: +# schema: +# type: object +# properties: +# error: +# type: string +# example: Not Found +# message: +# type: string +# example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" +# statusCode: +# type: integer +# example: 404 +# servers: +# - url: https://localhost:5601 + +# post: +# summary: Creates a connector. +# operationId: createConnectorId +# description: > +# You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. +# tags: +# - connectors +# parameters: +# - $ref: '../components/headers/kbn_xsrf.yaml' +# - in: path +# name: connectorId +# description: A UUID v1 or v4 identifier for the connector. If you omit this parameter, an identifier is randomly generated. +# required: true +# schema: +# type: string +# example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 +# requestBody: +# required: true +# content: +# application/json: +# schema: +# title: Create connector request body properties +# description: The properties vary depending on the connector type. +# oneOf: +# - $ref: '../components/schemas/create_connector_request_cases_webhook.yaml' +# - $ref: '../components/schemas/create_connector_request_d3security.yaml' +# - $ref: '../components/schemas/create_connector_request_email.yaml' +# - $ref: '../components/schemas/create_connector_request_genai.yaml' +# - $ref: '../components/schemas/create_connector_request_index.yaml' +# - $ref: '../components/schemas/create_connector_request_jira.yaml' +# - $ref: '../components/schemas/create_connector_request_opsgenie.yaml' +# - $ref: '../components/schemas/create_connector_request_pagerduty.yaml' +# - $ref: '../components/schemas/create_connector_request_resilient.yaml' +# - $ref: '../components/schemas/create_connector_request_serverlog.yaml' +# - $ref: '../components/schemas/create_connector_request_servicenow.yaml' +# - $ref: '../components/schemas/create_connector_request_servicenow_itom.yaml' +# - $ref: '../components/schemas/create_connector_request_servicenow_sir.yaml' +# - $ref: '../components/schemas/create_connector_request_slack_api.yaml' +# - $ref: '../components/schemas/create_connector_request_slack_webhook.yaml' +# - $ref: '../components/schemas/create_connector_request_swimlane.yaml' +# - $ref: '../components/schemas/create_connector_request_teams.yaml' +# - $ref: '../components/schemas/create_connector_request_tines.yaml' +# - $ref: '../components/schemas/create_connector_request_torq.yaml' +# - $ref: '../components/schemas/create_connector_request_webhook.yaml' +# - $ref: '../components/schemas/create_connector_request_xmatters.yaml' +# discriminator: +# propertyName: connector_type_id +# examples: +# createIndexConnectorRequest: +# $ref: '../components/examples/create_index_connector_request.yaml' +# responses: +# '200': +# description: Indicates a successful call. +# content: +# application/json: +# schema: +# $ref: '../components/schemas/connector_response_properties.yaml' +# examples: +# createIndexConnectorResponse: +# $ref: '../components/examples/create_index_connector_response.yaml' +# '401': +# $ref: '../components/responses/401.yaml' +# servers: +# - url: https://localhost:5601 + +# put: +# summary: Updates the attributes for a connector. +# operationId: updateConnector +# description: > +# You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. +# tags: +# - connectors +# parameters: +# - $ref: '../components/headers/kbn_xsrf.yaml' +# - $ref: '../components/parameters/connector_id.yaml' +# requestBody: +# required: true +# content: +# application/json: +# schema: +# title: Update connector request body properties +# description: The properties vary depending on the connector type. +# oneOf: +# - $ref: '../components/schemas/update_connector_request_cases_webhook.yaml' +# - $ref: '../components/schemas/update_connector_request_d3security.yaml' +# - $ref: '../components/schemas/update_connector_request_email.yaml' +# - $ref: '../components/schemas/create_connector_request_genai.yaml' +# - $ref: '../components/schemas/update_connector_request_index.yaml' +# - $ref: '../components/schemas/update_connector_request_jira.yaml' +# - $ref: '../components/schemas/update_connector_request_opsgenie.yaml' +# - $ref: '../components/schemas/update_connector_request_pagerduty.yaml' +# - $ref: '../components/schemas/update_connector_request_resilient.yaml' +# - $ref: '../components/schemas/update_connector_request_serverlog.yaml' +# - $ref: '../components/schemas/update_connector_request_servicenow.yaml' +# - $ref: '../components/schemas/update_connector_request_servicenow_itom.yaml' +# - $ref: '../components/schemas/update_connector_request_slack_api.yaml' +# - $ref: '../components/schemas/update_connector_request_slack_webhook.yaml' +# - $ref: '../components/schemas/update_connector_request_swimlane.yaml' +# - $ref: '../components/schemas/update_connector_request_teams.yaml' +# - $ref: '../components/schemas/update_connector_request_tines.yaml' +# - $ref: '../components/schemas/update_connector_request_torq.yaml' +# - $ref: '../components/schemas/update_connector_request_webhook.yaml' +# - $ref: '../components/schemas/update_connector_request_xmatters.yaml' +# examples: +# updateIndexConnectorRequest: +# $ref: '../components/examples/update_index_connector_request.yaml' +# responses: +# '200': +# description: Indicates a successful call. +# content: +# application/json: +# schema: +# $ref: '../components/schemas/connector_response_properties.yaml' +# '400': +# description: Indicates a bad request. +# content: +# application/json: +# schema: +# type: object +# properties: +# error: +# type: string +# example: Bad Request +# message: +# type: string +# example: "error validating action type config: [index]: expected value of type [string] but got [undefined]" +# statusCode: +# type: integer +# example: 400 +# '401': +# $ref: '../components/responses/401.yaml' +# '404': +# $ref: '../components/responses/404.yaml' +# servers: +# - url: https://localhost:5601 +# servers: +# - url: https://localhost:5601 diff --git a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml index 7c1d402efaca4..a764f469e4542 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml @@ -1,6 +1,6 @@ get: summary: Retrieves a connector by ID. - operationId: getConnector + operationId: getConnectorWithSpaceId description: > You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: @@ -21,27 +21,13 @@ get: '401': $ref: '../components/responses/401.yaml' '404': - description: Object is not found. - content: - application/json: - schema: - type: object - properties: - error: - type: string - example: Not Found - message: - type: string - example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" - statusCode: - type: integer - example: 404 + $ref: '../components/responses/404.yaml' servers: - url: https://localhost:5601 delete: summary: Deletes a connector. - operationId: deleteConnector + operationId: deleteConnectorWithSpaceId description: > You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. WARNING: When you delete a connector, it cannot be recovered. @@ -77,7 +63,7 @@ delete: post: summary: Creates a connector. - operationId: createConnectorId + operationId: createConnectorIdWithSpaceId description: > You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: @@ -144,7 +130,7 @@ post: put: summary: Updates the attributes for a connector. - operationId: updateConnector + operationId: updateConnectorWithSpaceId description: > You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: From e1d18f793f8e84bfe9b0924b0301f1aa4f28da9e Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 12 Oct 2023 15:48:43 -0700 Subject: [PATCH 6/8] [OAS] Add Serverless update connector API --- .../plugins/actions/docs/openapi/bundled.json | 412 +++++---- .../plugins/actions/docs/openapi/bundled.yaml | 224 ++--- .../docs/openapi/bundled_serverless.json | 816 ++++++++++++++++-- .../docs/openapi/bundled_serverless.yaml | 471 ++++++++++ .../openapi/components/responses/400.yaml | 15 + .../connector_response_properties.yaml | 1 + .../schemas/create_connector_request.yaml | 1 + .../schemas/update_connector_request.yaml | 24 + .../api@actions@connector@{connectorid}.yaml | 209 ++--- ...}@api@actions@connector@{connectorid}.yaml | 69 +- 10 files changed, 1667 insertions(+), 575 deletions(-) create mode 100644 x-pack/plugins/actions/docs/openapi/components/responses/400.yaml create mode 100644 x-pack/plugins/actions/docs/openapi/components/schemas/update_connector_request.yaml diff --git a/x-pack/plugins/actions/docs/openapi/bundled.json b/x-pack/plugins/actions/docs/openapi/bundled.json index be9456353acb6..d1fb839c0f3fd 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.json +++ b/x-pack/plugins/actions/docs/openapi/bundled.json @@ -245,79 +245,7 @@ "content": { "application/json": { "schema": { - "title": "Create connector request body properties", - "description": "The properties vary depending on the connector type.", - "oneOf": [ - { - "$ref": "#/components/schemas/create_connector_request_bedrock" - }, - { - "$ref": "#/components/schemas/create_connector_request_cases_webhook" - }, - { - "$ref": "#/components/schemas/create_connector_request_d3security" - }, - { - "$ref": "#/components/schemas/create_connector_request_email" - }, - { - "$ref": "#/components/schemas/create_connector_request_genai" - }, - { - "$ref": "#/components/schemas/create_connector_request_index" - }, - { - "$ref": "#/components/schemas/create_connector_request_jira" - }, - { - "$ref": "#/components/schemas/create_connector_request_opsgenie" - }, - { - "$ref": "#/components/schemas/create_connector_request_pagerduty" - }, - { - "$ref": "#/components/schemas/create_connector_request_resilient" - }, - { - "$ref": "#/components/schemas/create_connector_request_serverlog" - }, - { - "$ref": "#/components/schemas/create_connector_request_servicenow" - }, - { - "$ref": "#/components/schemas/create_connector_request_servicenow_itom" - }, - { - "$ref": "#/components/schemas/create_connector_request_servicenow_sir" - }, - { - "$ref": "#/components/schemas/create_connector_request_slack_api" - }, - { - "$ref": "#/components/schemas/create_connector_request_slack_webhook" - }, - { - "$ref": "#/components/schemas/create_connector_request_swimlane" - }, - { - "$ref": "#/components/schemas/create_connector_request_teams" - }, - { - "$ref": "#/components/schemas/create_connector_request_tines" - }, - { - "$ref": "#/components/schemas/create_connector_request_torq" - }, - { - "$ref": "#/components/schemas/create_connector_request_webhook" - }, - { - "$ref": "#/components/schemas/create_connector_request_xmatters" - } - ], - "discriminator": { - "propertyName": "connector_type_id" - } + "$ref": "#/components/schemas/create_connector_request" }, "examples": { "createIndexConnectorRequest": { @@ -376,73 +304,7 @@ "content": { "application/json": { "schema": { - "title": "Update connector request body properties", - "description": "The properties vary depending on the connector type.", - "oneOf": [ - { - "$ref": "#/components/schemas/create_connector_request_bedrock" - }, - { - "$ref": "#/components/schemas/update_connector_request_cases_webhook" - }, - { - "$ref": "#/components/schemas/update_connector_request_d3security" - }, - { - "$ref": "#/components/schemas/update_connector_request_email" - }, - { - "$ref": "#/components/schemas/create_connector_request_genai" - }, - { - "$ref": "#/components/schemas/update_connector_request_index" - }, - { - "$ref": "#/components/schemas/update_connector_request_jira" - }, - { - "$ref": "#/components/schemas/update_connector_request_opsgenie" - }, - { - "$ref": "#/components/schemas/update_connector_request_pagerduty" - }, - { - "$ref": "#/components/schemas/update_connector_request_resilient" - }, - { - "$ref": "#/components/schemas/update_connector_request_serverlog" - }, - { - "$ref": "#/components/schemas/update_connector_request_servicenow" - }, - { - "$ref": "#/components/schemas/update_connector_request_servicenow_itom" - }, - { - "$ref": "#/components/schemas/update_connector_request_slack_api" - }, - { - "$ref": "#/components/schemas/update_connector_request_slack_webhook" - }, - { - "$ref": "#/components/schemas/update_connector_request_swimlane" - }, - { - "$ref": "#/components/schemas/update_connector_request_teams" - }, - { - "$ref": "#/components/schemas/update_connector_request_tines" - }, - { - "$ref": "#/components/schemas/update_connector_request_torq" - }, - { - "$ref": "#/components/schemas/update_connector_request_webhook" - }, - { - "$ref": "#/components/schemas/update_connector_request_xmatters" - } - ] + "$ref": "#/components/schemas/update_connector_request" }, "examples": { "updateIndexConnectorRequest": { @@ -464,28 +326,7 @@ } }, "400": { - "description": "Indicates a bad request.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "string", - "example": "Bad Request" - }, - "message": { - "type": "string", - "example": "error validating action type config: [index]: expected value of type [string] but got [undefined]" - }, - "statusCode": { - "type": "integer", - "example": 400 - } - } - } - } - } + "$ref": "#/components/responses/401" }, "401": { "$ref": "#/components/responses/401" @@ -1290,6 +1131,76 @@ } }, "schemas": { + "config_properties_bedrock": { + "title": "Connector request properties for an Amazon Bedrock connector", + "description": "Defines properties for connectors when type is `.bedrock`.", + "type": "object", + "required": [ + "apiUrl" + ], + "properties": { + "apiUrl": { + "type": "string", + "description": "The Amazon Bedrock request URL." + }, + "defaultModel": { + "type": "string", + "description": "The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models.\n", + "default": "anthropic.claude-v2" + } + } + }, + "secrets_properties_bedrock": { + "title": "Connector secrets properties for an Amazon Bedrock connector", + "description": "Defines secrets for connectors when type is `.bedrock`.", + "type": "object", + "required": [ + "accessKey", + "secret" + ], + "properties": { + "accessKey": { + "type": "string", + "description": "The AWS access key for authentication." + }, + "secret": { + "type": "string", + "description": "The AWS secret for authentication." + } + } + }, + "create_connector_request_bedrock": { + "title": "Create Amazon Bedrock connector request", + "description": "The Amazon Bedrock connector uses axios to send a POST request to Amazon Bedrock.", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_bedrock" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".bedrock" + ], + "example": ".bedrock" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_bedrock" + } + } + }, "config_properties_cases_webhook": { "title": "Connector request properties for Webhook - Case Management connector", "required": [ @@ -2980,6 +2891,9 @@ "title": "Create connector request body properties", "description": "The properties vary depending on the connector type.", "oneOf": [ + { + "$ref": "#/components/schemas/create_connector_request_bedrock" + }, { "$ref": "#/components/schemas/create_connector_request_cases_webhook" }, @@ -3068,6 +2982,50 @@ "description": "Indicates whether the connector is used for system actions.", "example": false }, + "connector_response_properties_bedrock": { + "title": "Connector response properties for an Amazon Bedrock connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_bedrock" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".bedrock" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, "referenced_by_count": { "type": "integer", "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.\n", @@ -3992,6 +3950,9 @@ "title": "Connector response properties", "description": "The properties vary depending on the connector type.", "oneOf": [ + { + "$ref": "#/components/schemas/connector_response_properties_bedrock" + }, { "$ref": "#/components/schemas/connector_response_properties_cases_webhook" }, @@ -4057,70 +4018,20 @@ "propertyName": "connector_type_id" } }, - "config_properties_bedrock": { - "title": "Connector request properties for an Amazon Bedrock connector", - "description": "Defines properties for connectors when type is `.bedrock`.", - "type": "object", - "required": [ - "apiUrl" - ], - "properties": { - "apiUrl": { - "type": "string", - "description": "The Amazon Bedrock request URL." - }, - "defaultModel": { - "type": "string", - "description": "The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models.\n", - "default": "anthropic.claude-v2" - } - } - }, - "secrets_properties_bedrock": { - "title": "Connector secrets properties for an Amazon Bedrock connector", - "description": "Defines secrets for connectors when type is `.bedrock`.", - "type": "object", - "required": [ - "accessKey", - "secret" - ], - "properties": { - "accessKey": { - "type": "string", - "description": "The AWS access key for authentication." - }, - "secret": { - "type": "string", - "description": "The AWS secret for authentication." - } - } - }, - "create_connector_request_bedrock": { - "title": "Create Amazon Bedrock connector request", - "description": "The Amazon Bedrock connector uses axios to send a POST request to Amazon Bedrock.", + "update_connector_request_bedrock": { + "title": "Update Amazon Bedrock connector request", "type": "object", "required": [ "config", - "connector_type_id", - "name", - "secrets" + "name" ], "properties": { "config": { "$ref": "#/components/schemas/config_properties_bedrock" }, - "connector_type_id": { - "type": "string", - "description": "The type of connector.", - "enum": [ - ".bedrock" - ], - "example": ".bedrock" - }, "name": { "type": "string", - "description": "The display name for the connector.", - "example": "my-connector" + "description": "The display name for the connector." }, "secrets": { "$ref": "#/components/schemas/secrets_properties_bedrock" @@ -4502,6 +4413,75 @@ } } }, + "update_connector_request": { + "title": "Update connector request body properties", + "description": "The properties vary depending on the connector type.", + "oneOf": [ + { + "$ref": "#/components/schemas/update_connector_request_bedrock" + }, + { + "$ref": "#/components/schemas/update_connector_request_cases_webhook" + }, + { + "$ref": "#/components/schemas/update_connector_request_d3security" + }, + { + "$ref": "#/components/schemas/update_connector_request_email" + }, + { + "$ref": "#/components/schemas/create_connector_request_genai" + }, + { + "$ref": "#/components/schemas/update_connector_request_index" + }, + { + "$ref": "#/components/schemas/update_connector_request_jira" + }, + { + "$ref": "#/components/schemas/update_connector_request_opsgenie" + }, + { + "$ref": "#/components/schemas/update_connector_request_pagerduty" + }, + { + "$ref": "#/components/schemas/update_connector_request_resilient" + }, + { + "$ref": "#/components/schemas/update_connector_request_serverlog" + }, + { + "$ref": "#/components/schemas/update_connector_request_servicenow" + }, + { + "$ref": "#/components/schemas/update_connector_request_servicenow_itom" + }, + { + "$ref": "#/components/schemas/update_connector_request_slack_api" + }, + { + "$ref": "#/components/schemas/update_connector_request_slack_webhook" + }, + { + "$ref": "#/components/schemas/update_connector_request_swimlane" + }, + { + "$ref": "#/components/schemas/update_connector_request_teams" + }, + { + "$ref": "#/components/schemas/update_connector_request_tines" + }, + { + "$ref": "#/components/schemas/update_connector_request_torq" + }, + { + "$ref": "#/components/schemas/update_connector_request_webhook" + }, + { + "$ref": "#/components/schemas/update_connector_request_xmatters" + } + ] + }, "features": { "type": "string", "description": "The feature that uses the connector.\n", diff --git a/x-pack/plugins/actions/docs/openapi/bundled.yaml b/x-pack/plugins/actions/docs/openapi/bundled.yaml index a486f9e84e588..4d8961549cdf7 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.yaml +++ b/x-pack/plugins/actions/docs/openapi/bundled.yaml @@ -149,33 +149,7 @@ paths: content: application/json: schema: - title: Create connector request body properties - description: The properties vary depending on the connector type. - oneOf: - - $ref: '#/components/schemas/create_connector_request_bedrock' - - $ref: '#/components/schemas/create_connector_request_cases_webhook' - - $ref: '#/components/schemas/create_connector_request_d3security' - - $ref: '#/components/schemas/create_connector_request_email' - - $ref: '#/components/schemas/create_connector_request_genai' - - $ref: '#/components/schemas/create_connector_request_index' - - $ref: '#/components/schemas/create_connector_request_jira' - - $ref: '#/components/schemas/create_connector_request_opsgenie' - - $ref: '#/components/schemas/create_connector_request_pagerduty' - - $ref: '#/components/schemas/create_connector_request_resilient' - - $ref: '#/components/schemas/create_connector_request_serverlog' - - $ref: '#/components/schemas/create_connector_request_servicenow' - - $ref: '#/components/schemas/create_connector_request_servicenow_itom' - - $ref: '#/components/schemas/create_connector_request_servicenow_sir' - - $ref: '#/components/schemas/create_connector_request_slack_api' - - $ref: '#/components/schemas/create_connector_request_slack_webhook' - - $ref: '#/components/schemas/create_connector_request_swimlane' - - $ref: '#/components/schemas/create_connector_request_teams' - - $ref: '#/components/schemas/create_connector_request_tines' - - $ref: '#/components/schemas/create_connector_request_torq' - - $ref: '#/components/schemas/create_connector_request_webhook' - - $ref: '#/components/schemas/create_connector_request_xmatters' - discriminator: - propertyName: connector_type_id + $ref: '#/components/schemas/create_connector_request' examples: createIndexConnectorRequest: $ref: '#/components/examples/create_index_connector_request' @@ -209,30 +183,7 @@ paths: content: application/json: schema: - title: Update connector request body properties - description: The properties vary depending on the connector type. - oneOf: - - $ref: '#/components/schemas/create_connector_request_bedrock' - - $ref: '#/components/schemas/update_connector_request_cases_webhook' - - $ref: '#/components/schemas/update_connector_request_d3security' - - $ref: '#/components/schemas/update_connector_request_email' - - $ref: '#/components/schemas/create_connector_request_genai' - - $ref: '#/components/schemas/update_connector_request_index' - - $ref: '#/components/schemas/update_connector_request_jira' - - $ref: '#/components/schemas/update_connector_request_opsgenie' - - $ref: '#/components/schemas/update_connector_request_pagerduty' - - $ref: '#/components/schemas/update_connector_request_resilient' - - $ref: '#/components/schemas/update_connector_request_serverlog' - - $ref: '#/components/schemas/update_connector_request_servicenow' - - $ref: '#/components/schemas/update_connector_request_servicenow_itom' - - $ref: '#/components/schemas/update_connector_request_slack_api' - - $ref: '#/components/schemas/update_connector_request_slack_webhook' - - $ref: '#/components/schemas/update_connector_request_swimlane' - - $ref: '#/components/schemas/update_connector_request_teams' - - $ref: '#/components/schemas/update_connector_request_tines' - - $ref: '#/components/schemas/update_connector_request_torq' - - $ref: '#/components/schemas/update_connector_request_webhook' - - $ref: '#/components/schemas/update_connector_request_xmatters' + $ref: '#/components/schemas/update_connector_request' examples: updateIndexConnectorRequest: $ref: '#/components/examples/update_index_connector_request' @@ -244,21 +195,7 @@ paths: schema: $ref: '#/components/schemas/connector_response_properties' '400': - description: Indicates a bad request. - content: - application/json: - schema: - type: object - properties: - error: - type: string - example: Bad Request - message: - type: string - example: 'error validating action type config: [index]: expected value of type [string] but got [undefined]' - statusCode: - type: integer - example: 400 + $ref: '#/components/responses/401' '401': $ref: '#/components/responses/401' '404': @@ -743,6 +680,59 @@ components: type: string example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad schemas: + config_properties_bedrock: + title: Connector request properties for an Amazon Bedrock connector + description: Defines properties for connectors when type is `.bedrock`. + type: object + required: + - apiUrl + properties: + apiUrl: + type: string + description: The Amazon Bedrock request URL. + defaultModel: + type: string + description: | + The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models. + default: anthropic.claude-v2 + secrets_properties_bedrock: + title: Connector secrets properties for an Amazon Bedrock connector + description: Defines secrets for connectors when type is `.bedrock`. + type: object + required: + - accessKey + - secret + properties: + accessKey: + type: string + description: The AWS access key for authentication. + secret: + type: string + description: The AWS secret for authentication. + create_connector_request_bedrock: + title: Create Amazon Bedrock connector request + description: The Amazon Bedrock connector uses axios to send a POST request to Amazon Bedrock. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_bedrock' + connector_type_id: + type: string + description: The type of connector. + enum: + - .bedrock + example: .bedrock + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_bedrock' config_properties_cases_webhook: title: Connector request properties for Webhook - Case Management connector required: @@ -2065,6 +2055,7 @@ components: title: Create connector request body properties description: The properties vary depending on the connector type. oneOf: + - $ref: '#/components/schemas/create_connector_request_bedrock' - $ref: '#/components/schemas/create_connector_request_cases_webhook' - $ref: '#/components/schemas/create_connector_request_d3security' - $ref: '#/components/schemas/create_connector_request_email' @@ -2105,6 +2096,38 @@ components: type: boolean description: Indicates whether the connector is used for system actions. example: false + connector_response_properties_bedrock: + title: Connector response properties for an Amazon Bedrock connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_bedrock' + connector_type_id: + type: string + description: The type of connector. + enum: + - .bedrock + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. referenced_by_count: type: integer description: | @@ -2771,6 +2794,7 @@ components: title: Connector response properties description: The properties vary depending on the connector type. oneOf: + - $ref: '#/components/schemas/connector_response_properties_bedrock' - $ref: '#/components/schemas/connector_response_properties_cases_webhook' - $ref: '#/components/schemas/connector_response_properties_d3security' - $ref: '#/components/schemas/connector_response_properties_email' @@ -2793,57 +2817,18 @@ components: - $ref: '#/components/schemas/connector_response_properties_xmatters' discriminator: propertyName: connector_type_id - config_properties_bedrock: - title: Connector request properties for an Amazon Bedrock connector - description: Defines properties for connectors when type is `.bedrock`. - type: object - required: - - apiUrl - properties: - apiUrl: - type: string - description: The Amazon Bedrock request URL. - defaultModel: - type: string - description: | - The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models. - default: anthropic.claude-v2 - secrets_properties_bedrock: - title: Connector secrets properties for an Amazon Bedrock connector - description: Defines secrets for connectors when type is `.bedrock`. - type: object - required: - - accessKey - - secret - properties: - accessKey: - type: string - description: The AWS access key for authentication. - secret: - type: string - description: The AWS secret for authentication. - create_connector_request_bedrock: - title: Create Amazon Bedrock connector request - description: The Amazon Bedrock connector uses axios to send a POST request to Amazon Bedrock. + update_connector_request_bedrock: + title: Update Amazon Bedrock connector request type: object required: - config - - connector_type_id - name - - secrets properties: config: $ref: '#/components/schemas/config_properties_bedrock' - connector_type_id: - type: string - description: The type of connector. - enum: - - .bedrock - example: .bedrock name: type: string description: The display name for the connector. - example: my-connector secrets: $ref: '#/components/schemas/secrets_properties_bedrock' update_connector_request_cases_webhook: @@ -3113,6 +3098,31 @@ components: description: The display name for the connector. secrets: $ref: '#/components/schemas/secrets_properties_xmatters' + update_connector_request: + title: Update connector request body properties + description: The properties vary depending on the connector type. + oneOf: + - $ref: '#/components/schemas/update_connector_request_bedrock' + - $ref: '#/components/schemas/update_connector_request_cases_webhook' + - $ref: '#/components/schemas/update_connector_request_d3security' + - $ref: '#/components/schemas/update_connector_request_email' + - $ref: '#/components/schemas/create_connector_request_genai' + - $ref: '#/components/schemas/update_connector_request_index' + - $ref: '#/components/schemas/update_connector_request_jira' + - $ref: '#/components/schemas/update_connector_request_opsgenie' + - $ref: '#/components/schemas/update_connector_request_pagerduty' + - $ref: '#/components/schemas/update_connector_request_resilient' + - $ref: '#/components/schemas/update_connector_request_serverlog' + - $ref: '#/components/schemas/update_connector_request_servicenow' + - $ref: '#/components/schemas/update_connector_request_servicenow_itom' + - $ref: '#/components/schemas/update_connector_request_slack_api' + - $ref: '#/components/schemas/update_connector_request_slack_webhook' + - $ref: '#/components/schemas/update_connector_request_swimlane' + - $ref: '#/components/schemas/update_connector_request_teams' + - $ref: '#/components/schemas/update_connector_request_tines' + - $ref: '#/components/schemas/update_connector_request_torq' + - $ref: '#/components/schemas/update_connector_request_webhook' + - $ref: '#/components/schemas/update_connector_request_xmatters' features: type: string description: | diff --git a/x-pack/plugins/actions/docs/openapi/bundled_serverless.json b/x-pack/plugins/actions/docs/openapi/bundled_serverless.json index 57249280659e7..3c2c5f74f0b03 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled_serverless.json +++ b/x-pack/plugins/actions/docs/openapi/bundled_serverless.json @@ -147,7 +147,130 @@ "url": "https://localhost:5601" } ] - } + }, + "post": { + "summary": "Creates a connector.", + "operationId": "createConnectorId", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "in": "path", + "name": "connectorId", + "description": "A UUID v1 or v4 identifier for the connector. If you omit this parameter, an identifier is randomly generated.\n", + "required": true, + "schema": { + "type": "string", + "example": "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_connector_request" + }, + "examples": { + "createIndexConnectorRequest": { + "$ref": "#/components/examples/create_index_connector_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connector_response_properties" + }, + "examples": { + "createIndexConnectorResponse": { + "$ref": "#/components/examples/create_index_connector_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "put": { + "summary": "Updates the attributes for a connector.", + "operationId": "updateConnector", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/connector_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/update_connector_request" + }, + "examples": { + "updateIndexConnectorRequest": { + "$ref": "#/components/examples/update_index_connector_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connector_response_properties" + } + } + } + }, + "400": { + "$ref": "#/components/responses/401" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] }, "/api/actions/connectors": { "get": { @@ -322,6 +445,76 @@ } }, "schemas": { + "config_properties_bedrock": { + "title": "Connector request properties for an Amazon Bedrock connector", + "description": "Defines properties for connectors when type is `.bedrock`.", + "type": "object", + "required": [ + "apiUrl" + ], + "properties": { + "apiUrl": { + "type": "string", + "description": "The Amazon Bedrock request URL." + }, + "defaultModel": { + "type": "string", + "description": "The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models.\n", + "default": "anthropic.claude-v2" + } + } + }, + "secrets_properties_bedrock": { + "title": "Connector secrets properties for an Amazon Bedrock connector", + "description": "Defines secrets for connectors when type is `.bedrock`.", + "type": "object", + "required": [ + "accessKey", + "secret" + ], + "properties": { + "accessKey": { + "type": "string", + "description": "The AWS access key for authentication." + }, + "secret": { + "type": "string", + "description": "The AWS secret for authentication." + } + } + }, + "create_connector_request_bedrock": { + "title": "Create Amazon Bedrock connector request", + "description": "The Amazon Bedrock connector uses axios to send a POST request to Amazon Bedrock.", + "type": "object", + "required": [ + "config", + "connector_type_id", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_bedrock" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".bedrock" + ], + "example": ".bedrock" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_bedrock" + } + } + }, "config_properties_cases_webhook": { "title": "Connector request properties for Webhook - Case Management connector", "required": [ @@ -2012,6 +2205,9 @@ "title": "Create connector request body properties", "description": "The properties vary depending on the connector type.", "oneOf": [ + { + "$ref": "#/components/schemas/create_connector_request_bedrock" + }, { "$ref": "#/components/schemas/create_connector_request_cases_webhook" }, @@ -2100,6 +2296,50 @@ "description": "Indicates whether the connector is used for system actions.", "example": false }, + "connector_response_properties_bedrock": { + "title": "Connector response properties for an Amazon Bedrock connector", + "type": "object", + "required": [ + "config", + "connector_type_id", + "id", + "is_deprecated", + "is_preconfigured", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_bedrock" + }, + "connector_type_id": { + "type": "string", + "description": "The type of connector.", + "enum": [ + ".bedrock" + ] + }, + "id": { + "type": "string", + "description": "The identifier for the connector." + }, + "is_deprecated": { + "$ref": "#/components/schemas/is_deprecated" + }, + "is_missing_secrets": { + "$ref": "#/components/schemas/is_missing_secrets" + }, + "is_preconfigured": { + "$ref": "#/components/schemas/is_preconfigured" + }, + "is_system_action": { + "$ref": "#/components/schemas/is_system_action" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, "referenced_by_count": { "type": "integer", "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.\n", @@ -3024,6 +3264,9 @@ "title": "Connector response properties", "description": "The properties vary depending on the connector type.", "oneOf": [ + { + "$ref": "#/components/schemas/connector_response_properties_bedrock" + }, { "$ref": "#/components/schemas/connector_response_properties_cases_webhook" }, @@ -3089,57 +3332,521 @@ "propertyName": "connector_type_id" } }, - "features": { - "type": "string", - "description": "The feature that uses the connector.\n", - "enum": [ - "alerting", - "cases", - "generativeAI", - "siem", - "uptime" - ] - }, - "connector_types": { - "title": "Connector types", - "type": "string", - "description": "The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`.", - "enum": [ - ".bedrock", - ".cases-webhook", - ".d3security", - ".email", - ".gen-ai", - ".index", - ".jira", - ".opsgenie", - ".pagerduty", - ".resilient", - ".servicenow", - ".servicenow-itom", - ".servicenow-sir", - ".server-log", - ".slack", - ".slack_api", - ".swimlane", - ".teams", - ".tines", - ".torq", - ".webhook", - ".xmatters" + "update_connector_request_bedrock": { + "title": "Update Amazon Bedrock connector request", + "type": "object", + "required": [ + "config", + "name" ], - "example": ".server-log" - } - }, - "examples": { - "create_email_connector_request": { - "summary": "Create an email connector.", - "value": { - "name": "email-connector-1", - "connector_type_id": ".email", + "properties": { "config": { - "from": "tester@example.com", - "hasAuth": true, + "$ref": "#/components/schemas/config_properties_bedrock" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_bedrock" + } + } + }, + "update_connector_request_cases_webhook": { + "title": "Update Webhook - Case Managment connector request", + "type": "object", + "required": [ + "config", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_cases_webhook" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_cases_webhook" + } + } + }, + "update_connector_request_d3security": { + "title": "Update D3 Security connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_d3security" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_d3security" + } + } + }, + "update_connector_request_email": { + "title": "Update email connector request", + "type": "object", + "required": [ + "config", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_email" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_email" + } + } + }, + "update_connector_request_index": { + "title": "Update index connector request", + "type": "object", + "required": [ + "config", + "name" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_index" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "update_connector_request_jira": { + "title": "Update Jira connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_jira" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_jira" + } + } + }, + "update_connector_request_opsgenie": { + "title": "Update Opsgenie connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_opsgenie" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_opsgenie" + } + } + }, + "update_connector_request_pagerduty": { + "title": "Update PagerDuty connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_pagerduty" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_pagerduty" + } + } + }, + "update_connector_request_resilient": { + "title": "Update IBM Resilient connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_resilient" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_resilient" + } + } + }, + "update_connector_request_serverlog": { + "title": "Update server log connector request", + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "The display name for the connector." + } + } + }, + "update_connector_request_servicenow": { + "title": "Update ServiceNow ITSM connector or ServiceNow SecOps request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_servicenow" + } + } + }, + "update_connector_request_servicenow_itom": { + "title": "Create ServiceNow ITOM connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_servicenow_itom" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_servicenow" + } + } + }, + "update_connector_request_slack_api": { + "title": "Update Slack connector request", + "type": "object", + "required": [ + "name", + "secrets" + ], + "properties": { + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_slack_api" + } + } + }, + "update_connector_request_slack_webhook": { + "title": "Update Slack connector request", + "type": "object", + "required": [ + "name", + "secrets" + ], + "properties": { + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_slack_webhook" + } + } + }, + "update_connector_request_swimlane": { + "title": "Update Swimlane connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_swimlane" + }, + "name": { + "type": "string", + "description": "The display name for the connector.", + "example": "my-connector" + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_swimlane" + } + } + }, + "update_connector_request_teams": { + "title": "Update Microsoft Teams connector request", + "type": "object", + "required": [ + "name", + "secrets" + ], + "properties": { + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_teams" + } + } + }, + "update_connector_request_tines": { + "title": "Update Tines connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_tines" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_tines" + } + } + }, + "update_connector_request_torq": { + "title": "Update Torq connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_torq" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_torq" + } + } + }, + "update_connector_request_webhook": { + "title": "Update Webhook connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_webhook" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_webhook" + } + } + }, + "update_connector_request_xmatters": { + "title": "Update xMatters connector request", + "type": "object", + "required": [ + "config", + "name", + "secrets" + ], + "properties": { + "config": { + "$ref": "#/components/schemas/config_properties_xmatters" + }, + "name": { + "type": "string", + "description": "The display name for the connector." + }, + "secrets": { + "$ref": "#/components/schemas/secrets_properties_xmatters" + } + } + }, + "update_connector_request": { + "title": "Update connector request body properties", + "description": "The properties vary depending on the connector type.", + "oneOf": [ + { + "$ref": "#/components/schemas/update_connector_request_bedrock" + }, + { + "$ref": "#/components/schemas/update_connector_request_cases_webhook" + }, + { + "$ref": "#/components/schemas/update_connector_request_d3security" + }, + { + "$ref": "#/components/schemas/update_connector_request_email" + }, + { + "$ref": "#/components/schemas/create_connector_request_genai" + }, + { + "$ref": "#/components/schemas/update_connector_request_index" + }, + { + "$ref": "#/components/schemas/update_connector_request_jira" + }, + { + "$ref": "#/components/schemas/update_connector_request_opsgenie" + }, + { + "$ref": "#/components/schemas/update_connector_request_pagerduty" + }, + { + "$ref": "#/components/schemas/update_connector_request_resilient" + }, + { + "$ref": "#/components/schemas/update_connector_request_serverlog" + }, + { + "$ref": "#/components/schemas/update_connector_request_servicenow" + }, + { + "$ref": "#/components/schemas/update_connector_request_servicenow_itom" + }, + { + "$ref": "#/components/schemas/update_connector_request_slack_api" + }, + { + "$ref": "#/components/schemas/update_connector_request_slack_webhook" + }, + { + "$ref": "#/components/schemas/update_connector_request_swimlane" + }, + { + "$ref": "#/components/schemas/update_connector_request_teams" + }, + { + "$ref": "#/components/schemas/update_connector_request_tines" + }, + { + "$ref": "#/components/schemas/update_connector_request_torq" + }, + { + "$ref": "#/components/schemas/update_connector_request_webhook" + }, + { + "$ref": "#/components/schemas/update_connector_request_xmatters" + } + ] + }, + "features": { + "type": "string", + "description": "The feature that uses the connector.\n", + "enum": [ + "alerting", + "cases", + "generativeAI", + "siem", + "uptime" + ] + }, + "connector_types": { + "title": "Connector types", + "type": "string", + "description": "The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`.", + "enum": [ + ".bedrock", + ".cases-webhook", + ".d3security", + ".email", + ".gen-ai", + ".index", + ".jira", + ".opsgenie", + ".pagerduty", + ".resilient", + ".servicenow", + ".servicenow-itom", + ".servicenow-sir", + ".server-log", + ".slack", + ".slack_api", + ".swimlane", + ".teams", + ".tines", + ".torq", + ".webhook", + ".xmatters" + ], + "example": ".server-log" + } + }, + "examples": { + "create_email_connector_request": { + "summary": "Create an email connector.", + "value": { + "name": "email-connector-1", + "connector_type_id": ".email", + "config": { + "from": "tester@example.com", + "hasAuth": true, "host": "https://example.com", "port": 1025, "secure": false, @@ -3282,6 +3989,15 @@ "is_system_action": false } }, + "update_index_connector_request": { + "summary": "Update an index connector.", + "value": { + "name": "updated-connector", + "config": { + "index": "updated-index" + } + } + }, "get_connectors_response": { "summary": "A list of connectors", "value": [ diff --git a/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml b/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml index 5f0acb1ab32ff..a58cc0eb17d07 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml +++ b/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml @@ -86,6 +86,78 @@ paths: $ref: '#/components/responses/404' servers: - url: https://localhost:5601 + post: + summary: Creates a connector. + operationId: createConnectorId + tags: + - connectors + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - in: path + name: connectorId + description: | + A UUID v1 or v4 identifier for the connector. If you omit this parameter, an identifier is randomly generated. + required: true + schema: + type: string + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/create_connector_request' + examples: + createIndexConnectorRequest: + $ref: '#/components/examples/create_index_connector_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/connector_response_properties' + examples: + createIndexConnectorResponse: + $ref: '#/components/examples/create_index_connector_response' + '401': + $ref: '#/components/responses/401' + servers: + - url: https://localhost:5601 + put: + summary: Updates the attributes for a connector. + operationId: updateConnector + tags: + - connectors + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/connector_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/update_connector_request' + examples: + updateIndexConnectorRequest: + $ref: '#/components/examples/update_index_connector_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/connector_response_properties' + '400': + $ref: '#/components/responses/401' + '401': + $ref: '#/components/responses/401' + '404': + $ref: '#/components/responses/404' + servers: + - url: https://localhost:5601 + servers: + - url: https://localhost:5601 /api/actions/connectors: get: summary: Retrieves all connectors. @@ -200,6 +272,59 @@ components: type: string example: df770e30-8b8b-11ed-a780-3b746c987a81 schemas: + config_properties_bedrock: + title: Connector request properties for an Amazon Bedrock connector + description: Defines properties for connectors when type is `.bedrock`. + type: object + required: + - apiUrl + properties: + apiUrl: + type: string + description: The Amazon Bedrock request URL. + defaultModel: + type: string + description: | + The generative artificial intelligence model for Amazon Bedrock to use. Current support is for the Anthropic Claude models. + default: anthropic.claude-v2 + secrets_properties_bedrock: + title: Connector secrets properties for an Amazon Bedrock connector + description: Defines secrets for connectors when type is `.bedrock`. + type: object + required: + - accessKey + - secret + properties: + accessKey: + type: string + description: The AWS access key for authentication. + secret: + type: string + description: The AWS secret for authentication. + create_connector_request_bedrock: + title: Create Amazon Bedrock connector request + description: The Amazon Bedrock connector uses axios to send a POST request to Amazon Bedrock. + type: object + required: + - config + - connector_type_id + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_bedrock' + connector_type_id: + type: string + description: The type of connector. + enum: + - .bedrock + example: .bedrock + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_bedrock' config_properties_cases_webhook: title: Connector request properties for Webhook - Case Management connector required: @@ -1522,6 +1647,7 @@ components: title: Create connector request body properties description: The properties vary depending on the connector type. oneOf: + - $ref: '#/components/schemas/create_connector_request_bedrock' - $ref: '#/components/schemas/create_connector_request_cases_webhook' - $ref: '#/components/schemas/create_connector_request_d3security' - $ref: '#/components/schemas/create_connector_request_email' @@ -1562,6 +1688,38 @@ components: type: boolean description: Indicates whether the connector is used for system actions. example: false + connector_response_properties_bedrock: + title: Connector response properties for an Amazon Bedrock connector + type: object + required: + - config + - connector_type_id + - id + - is_deprecated + - is_preconfigured + - name + properties: + config: + $ref: '#/components/schemas/config_properties_bedrock' + connector_type_id: + type: string + description: The type of connector. + enum: + - .bedrock + id: + type: string + description: The identifier for the connector. + is_deprecated: + $ref: '#/components/schemas/is_deprecated' + is_missing_secrets: + $ref: '#/components/schemas/is_missing_secrets' + is_preconfigured: + $ref: '#/components/schemas/is_preconfigured' + is_system_action: + $ref: '#/components/schemas/is_system_action' + name: + type: string + description: The display name for the connector. referenced_by_count: type: integer description: | @@ -2228,6 +2386,7 @@ components: title: Connector response properties description: The properties vary depending on the connector type. oneOf: + - $ref: '#/components/schemas/connector_response_properties_bedrock' - $ref: '#/components/schemas/connector_response_properties_cases_webhook' - $ref: '#/components/schemas/connector_response_properties_d3security' - $ref: '#/components/schemas/connector_response_properties_email' @@ -2250,6 +2409,312 @@ components: - $ref: '#/components/schemas/connector_response_properties_xmatters' discriminator: propertyName: connector_type_id + update_connector_request_bedrock: + title: Update Amazon Bedrock connector request + type: object + required: + - config + - name + properties: + config: + $ref: '#/components/schemas/config_properties_bedrock' + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_bedrock' + update_connector_request_cases_webhook: + title: Update Webhook - Case Managment connector request + type: object + required: + - config + - name + properties: + config: + $ref: '#/components/schemas/config_properties_cases_webhook' + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_cases_webhook' + update_connector_request_d3security: + title: Update D3 Security connector request + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_d3security' + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_d3security' + update_connector_request_email: + title: Update email connector request + type: object + required: + - config + - name + properties: + config: + $ref: '#/components/schemas/config_properties_email' + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_email' + update_connector_request_index: + title: Update index connector request + type: object + required: + - config + - name + properties: + config: + $ref: '#/components/schemas/config_properties_index' + name: + type: string + description: The display name for the connector. + update_connector_request_jira: + title: Update Jira connector request + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_jira' + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_jira' + update_connector_request_opsgenie: + title: Update Opsgenie connector request + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_opsgenie' + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_opsgenie' + update_connector_request_pagerduty: + title: Update PagerDuty connector request + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_pagerduty' + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_pagerduty' + update_connector_request_resilient: + title: Update IBM Resilient connector request + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_resilient' + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_resilient' + update_connector_request_serverlog: + title: Update server log connector request + type: object + required: + - name + properties: + name: + type: string + description: The display name for the connector. + update_connector_request_servicenow: + title: Update ServiceNow ITSM connector or ServiceNow SecOps request + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow' + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_servicenow' + update_connector_request_servicenow_itom: + title: Create ServiceNow ITOM connector request + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_servicenow_itom' + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_servicenow' + update_connector_request_slack_api: + title: Update Slack connector request + type: object + required: + - name + - secrets + properties: + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_slack_api' + update_connector_request_slack_webhook: + title: Update Slack connector request + type: object + required: + - name + - secrets + properties: + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_slack_webhook' + update_connector_request_swimlane: + title: Update Swimlane connector request + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_swimlane' + name: + type: string + description: The display name for the connector. + example: my-connector + secrets: + $ref: '#/components/schemas/secrets_properties_swimlane' + update_connector_request_teams: + title: Update Microsoft Teams connector request + type: object + required: + - name + - secrets + properties: + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_teams' + update_connector_request_tines: + title: Update Tines connector request + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_tines' + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_tines' + update_connector_request_torq: + title: Update Torq connector request + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_torq' + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_torq' + update_connector_request_webhook: + title: Update Webhook connector request + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_webhook' + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_webhook' + update_connector_request_xmatters: + title: Update xMatters connector request + type: object + required: + - config + - name + - secrets + properties: + config: + $ref: '#/components/schemas/config_properties_xmatters' + name: + type: string + description: The display name for the connector. + secrets: + $ref: '#/components/schemas/secrets_properties_xmatters' + update_connector_request: + title: Update connector request body properties + description: The properties vary depending on the connector type. + oneOf: + - $ref: '#/components/schemas/update_connector_request_bedrock' + - $ref: '#/components/schemas/update_connector_request_cases_webhook' + - $ref: '#/components/schemas/update_connector_request_d3security' + - $ref: '#/components/schemas/update_connector_request_email' + - $ref: '#/components/schemas/create_connector_request_genai' + - $ref: '#/components/schemas/update_connector_request_index' + - $ref: '#/components/schemas/update_connector_request_jira' + - $ref: '#/components/schemas/update_connector_request_opsgenie' + - $ref: '#/components/schemas/update_connector_request_pagerduty' + - $ref: '#/components/schemas/update_connector_request_resilient' + - $ref: '#/components/schemas/update_connector_request_serverlog' + - $ref: '#/components/schemas/update_connector_request_servicenow' + - $ref: '#/components/schemas/update_connector_request_servicenow_itom' + - $ref: '#/components/schemas/update_connector_request_slack_api' + - $ref: '#/components/schemas/update_connector_request_slack_webhook' + - $ref: '#/components/schemas/update_connector_request_swimlane' + - $ref: '#/components/schemas/update_connector_request_teams' + - $ref: '#/components/schemas/update_connector_request_tines' + - $ref: '#/components/schemas/update_connector_request_torq' + - $ref: '#/components/schemas/update_connector_request_webhook' + - $ref: '#/components/schemas/update_connector_request_xmatters' features: type: string description: | @@ -2410,6 +2875,12 @@ components: is_deprecated: false is_missing_secrets: false is_system_action: false + update_index_connector_request: + summary: Update an index connector. + value: + name: updated-connector + config: + index: updated-index get_connectors_response: summary: A list of connectors value: diff --git a/x-pack/plugins/actions/docs/openapi/components/responses/400.yaml b/x-pack/plugins/actions/docs/openapi/components/responses/400.yaml new file mode 100644 index 0000000000000..263623dd1fb4c --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/components/responses/400.yaml @@ -0,0 +1,15 @@ +description: Indicates a bad request. +content: + application/json: + schema: + type: object + properties: + error: + type: string + example: Bad Request + message: + type: string + example: "error validating action type config: [index]: expected value of type [string] but got [undefined]" + statusCode: + type: integer + example: 400 \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties.yaml index edef270fd75ae..4b4213b769e3b 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/connector_response_properties.yaml @@ -1,6 +1,7 @@ title: Connector response properties description: The properties vary depending on the connector type. oneOf: + - $ref: 'connector_response_properties_bedrock.yaml' - $ref: 'connector_response_properties_cases_webhook.yaml' - $ref: 'connector_response_properties_d3security.yaml' - $ref: 'connector_response_properties_email.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request.yaml index ce85b2183391f..3bcf6cc0c3ccb 100644 --- a/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request.yaml +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/create_connector_request.yaml @@ -1,6 +1,7 @@ title: Create connector request body properties description: The properties vary depending on the connector type. oneOf: + - $ref: 'create_connector_request_bedrock.yaml' - $ref: 'create_connector_request_cases_webhook.yaml' - $ref: 'create_connector_request_d3security.yaml' - $ref: 'create_connector_request_email.yaml' diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/update_connector_request.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/update_connector_request.yaml new file mode 100644 index 0000000000000..269cd79847277 --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/update_connector_request.yaml @@ -0,0 +1,24 @@ +title: Update connector request body properties +description: The properties vary depending on the connector type. +oneOf: + - $ref: 'update_connector_request_bedrock.yaml' + - $ref: 'update_connector_request_cases_webhook.yaml' + - $ref: 'update_connector_request_d3security.yaml' + - $ref: 'update_connector_request_email.yaml' + - $ref: 'create_connector_request_genai.yaml' + - $ref: 'update_connector_request_index.yaml' + - $ref: 'update_connector_request_jira.yaml' + - $ref: 'update_connector_request_opsgenie.yaml' + - $ref: 'update_connector_request_pagerduty.yaml' + - $ref: 'update_connector_request_resilient.yaml' + - $ref: 'update_connector_request_serverlog.yaml' + - $ref: 'update_connector_request_servicenow.yaml' + - $ref: 'update_connector_request_servicenow_itom.yaml' + - $ref: 'update_connector_request_slack_api.yaml' + - $ref: 'update_connector_request_slack_webhook.yaml' + - $ref: 'update_connector_request_swimlane.yaml' + - $ref: 'update_connector_request_teams.yaml' + - $ref: 'update_connector_request_tines.yaml' + - $ref: 'update_connector_request_torq.yaml' + - $ref: 'update_connector_request_webhook.yaml' + - $ref: 'update_connector_request_xmatters.yaml' \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}.yaml b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}.yaml index 2e0049e7c628d..f7c8310856544 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}.yaml @@ -57,140 +57,77 @@ get: # servers: # - url: https://localhost:5601 -# post: -# summary: Creates a connector. -# operationId: createConnectorId -# description: > -# You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. -# tags: -# - connectors -# parameters: -# - $ref: '../components/headers/kbn_xsrf.yaml' -# - in: path -# name: connectorId -# description: A UUID v1 or v4 identifier for the connector. If you omit this parameter, an identifier is randomly generated. -# required: true -# schema: -# type: string -# example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 -# requestBody: -# required: true -# content: -# application/json: -# schema: -# title: Create connector request body properties -# description: The properties vary depending on the connector type. -# oneOf: -# - $ref: '../components/schemas/create_connector_request_cases_webhook.yaml' -# - $ref: '../components/schemas/create_connector_request_d3security.yaml' -# - $ref: '../components/schemas/create_connector_request_email.yaml' -# - $ref: '../components/schemas/create_connector_request_genai.yaml' -# - $ref: '../components/schemas/create_connector_request_index.yaml' -# - $ref: '../components/schemas/create_connector_request_jira.yaml' -# - $ref: '../components/schemas/create_connector_request_opsgenie.yaml' -# - $ref: '../components/schemas/create_connector_request_pagerduty.yaml' -# - $ref: '../components/schemas/create_connector_request_resilient.yaml' -# - $ref: '../components/schemas/create_connector_request_serverlog.yaml' -# - $ref: '../components/schemas/create_connector_request_servicenow.yaml' -# - $ref: '../components/schemas/create_connector_request_servicenow_itom.yaml' -# - $ref: '../components/schemas/create_connector_request_servicenow_sir.yaml' -# - $ref: '../components/schemas/create_connector_request_slack_api.yaml' -# - $ref: '../components/schemas/create_connector_request_slack_webhook.yaml' -# - $ref: '../components/schemas/create_connector_request_swimlane.yaml' -# - $ref: '../components/schemas/create_connector_request_teams.yaml' -# - $ref: '../components/schemas/create_connector_request_tines.yaml' -# - $ref: '../components/schemas/create_connector_request_torq.yaml' -# - $ref: '../components/schemas/create_connector_request_webhook.yaml' -# - $ref: '../components/schemas/create_connector_request_xmatters.yaml' -# discriminator: -# propertyName: connector_type_id -# examples: -# createIndexConnectorRequest: -# $ref: '../components/examples/create_index_connector_request.yaml' -# responses: -# '200': -# description: Indicates a successful call. -# content: -# application/json: -# schema: -# $ref: '../components/schemas/connector_response_properties.yaml' -# examples: -# createIndexConnectorResponse: -# $ref: '../components/examples/create_index_connector_response.yaml' -# '401': -# $ref: '../components/responses/401.yaml' -# servers: -# - url: https://localhost:5601 +post: + summary: Creates a connector. + operationId: createConnectorId + tags: + - connectors + parameters: + - $ref: '../components/headers/kbn_xsrf.yaml' + - in: path + name: connectorId + description: > + A UUID v1 or v4 identifier for the connector. + If you omit this parameter, an identifier is randomly generated. + required: true + schema: + type: string + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + requestBody: + required: true + content: + application/json: + schema: + $ref: '../components/schemas/create_connector_request.yaml' + examples: + createIndexConnectorRequest: + $ref: '../components/examples/create_index_connector_request.yaml' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '../components/schemas/connector_response_properties.yaml' + examples: + createIndexConnectorResponse: + $ref: '../components/examples/create_index_connector_response.yaml' + '401': + $ref: '../components/responses/401.yaml' + servers: + - url: https://localhost:5601 -# put: -# summary: Updates the attributes for a connector. -# operationId: updateConnector -# description: > -# You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. -# tags: -# - connectors -# parameters: -# - $ref: '../components/headers/kbn_xsrf.yaml' -# - $ref: '../components/parameters/connector_id.yaml' -# requestBody: -# required: true -# content: -# application/json: -# schema: -# title: Update connector request body properties -# description: The properties vary depending on the connector type. -# oneOf: -# - $ref: '../components/schemas/update_connector_request_cases_webhook.yaml' -# - $ref: '../components/schemas/update_connector_request_d3security.yaml' -# - $ref: '../components/schemas/update_connector_request_email.yaml' -# - $ref: '../components/schemas/create_connector_request_genai.yaml' -# - $ref: '../components/schemas/update_connector_request_index.yaml' -# - $ref: '../components/schemas/update_connector_request_jira.yaml' -# - $ref: '../components/schemas/update_connector_request_opsgenie.yaml' -# - $ref: '../components/schemas/update_connector_request_pagerduty.yaml' -# - $ref: '../components/schemas/update_connector_request_resilient.yaml' -# - $ref: '../components/schemas/update_connector_request_serverlog.yaml' -# - $ref: '../components/schemas/update_connector_request_servicenow.yaml' -# - $ref: '../components/schemas/update_connector_request_servicenow_itom.yaml' -# - $ref: '../components/schemas/update_connector_request_slack_api.yaml' -# - $ref: '../components/schemas/update_connector_request_slack_webhook.yaml' -# - $ref: '../components/schemas/update_connector_request_swimlane.yaml' -# - $ref: '../components/schemas/update_connector_request_teams.yaml' -# - $ref: '../components/schemas/update_connector_request_tines.yaml' -# - $ref: '../components/schemas/update_connector_request_torq.yaml' -# - $ref: '../components/schemas/update_connector_request_webhook.yaml' -# - $ref: '../components/schemas/update_connector_request_xmatters.yaml' -# examples: -# updateIndexConnectorRequest: -# $ref: '../components/examples/update_index_connector_request.yaml' -# responses: -# '200': -# description: Indicates a successful call. -# content: -# application/json: -# schema: -# $ref: '../components/schemas/connector_response_properties.yaml' -# '400': -# description: Indicates a bad request. -# content: -# application/json: -# schema: -# type: object -# properties: -# error: -# type: string -# example: Bad Request -# message: -# type: string -# example: "error validating action type config: [index]: expected value of type [string] but got [undefined]" -# statusCode: -# type: integer -# example: 400 -# '401': -# $ref: '../components/responses/401.yaml' -# '404': -# $ref: '../components/responses/404.yaml' -# servers: -# - url: https://localhost:5601 -# servers: -# - url: https://localhost:5601 +put: + summary: Updates the attributes for a connector. + operationId: updateConnector + tags: + - connectors + parameters: + - $ref: '../components/headers/kbn_xsrf.yaml' + - $ref: '../components/parameters/connector_id.yaml' + requestBody: + required: true + content: + application/json: + schema: + $ref: '../components/schemas/update_connector_request.yaml' + examples: + updateIndexConnectorRequest: + $ref: '../components/examples/update_index_connector_request.yaml' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '../components/schemas/connector_response_properties.yaml' + '400': + $ref: '../components/responses/401.yaml' + '401': + $ref: '../components/responses/401.yaml' + '404': + $ref: '../components/responses/404.yaml' + servers: + - url: https://localhost:5601 +servers: + - url: https://localhost:5601 diff --git a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml index a764f469e4542..1165dd0647bc5 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml @@ -83,33 +83,7 @@ post: content: application/json: schema: - title: Create connector request body properties - description: The properties vary depending on the connector type. - oneOf: - - $ref: '../components/schemas/create_connector_request_bedrock.yaml' - - $ref: '../components/schemas/create_connector_request_cases_webhook.yaml' - - $ref: '../components/schemas/create_connector_request_d3security.yaml' - - $ref: '../components/schemas/create_connector_request_email.yaml' - - $ref: '../components/schemas/create_connector_request_genai.yaml' - - $ref: '../components/schemas/create_connector_request_index.yaml' - - $ref: '../components/schemas/create_connector_request_jira.yaml' - - $ref: '../components/schemas/create_connector_request_opsgenie.yaml' - - $ref: '../components/schemas/create_connector_request_pagerduty.yaml' - - $ref: '../components/schemas/create_connector_request_resilient.yaml' - - $ref: '../components/schemas/create_connector_request_serverlog.yaml' - - $ref: '../components/schemas/create_connector_request_servicenow.yaml' - - $ref: '../components/schemas/create_connector_request_servicenow_itom.yaml' - - $ref: '../components/schemas/create_connector_request_servicenow_sir.yaml' - - $ref: '../components/schemas/create_connector_request_slack_api.yaml' - - $ref: '../components/schemas/create_connector_request_slack_webhook.yaml' - - $ref: '../components/schemas/create_connector_request_swimlane.yaml' - - $ref: '../components/schemas/create_connector_request_teams.yaml' - - $ref: '../components/schemas/create_connector_request_tines.yaml' - - $ref: '../components/schemas/create_connector_request_torq.yaml' - - $ref: '../components/schemas/create_connector_request_webhook.yaml' - - $ref: '../components/schemas/create_connector_request_xmatters.yaml' - discriminator: - propertyName: connector_type_id + $ref: '../components/schemas/create_connector_request.yaml' examples: createIndexConnectorRequest: $ref: '../components/examples/create_index_connector_request.yaml' @@ -144,30 +118,7 @@ put: content: application/json: schema: - title: Update connector request body properties - description: The properties vary depending on the connector type. - oneOf: - - $ref: '../components/schemas/create_connector_request_bedrock.yaml' - - $ref: '../components/schemas/update_connector_request_cases_webhook.yaml' - - $ref: '../components/schemas/update_connector_request_d3security.yaml' - - $ref: '../components/schemas/update_connector_request_email.yaml' - - $ref: '../components/schemas/create_connector_request_genai.yaml' - - $ref: '../components/schemas/update_connector_request_index.yaml' - - $ref: '../components/schemas/update_connector_request_jira.yaml' - - $ref: '../components/schemas/update_connector_request_opsgenie.yaml' - - $ref: '../components/schemas/update_connector_request_pagerduty.yaml' - - $ref: '../components/schemas/update_connector_request_resilient.yaml' - - $ref: '../components/schemas/update_connector_request_serverlog.yaml' - - $ref: '../components/schemas/update_connector_request_servicenow.yaml' - - $ref: '../components/schemas/update_connector_request_servicenow_itom.yaml' - - $ref: '../components/schemas/update_connector_request_slack_api.yaml' - - $ref: '../components/schemas/update_connector_request_slack_webhook.yaml' - - $ref: '../components/schemas/update_connector_request_swimlane.yaml' - - $ref: '../components/schemas/update_connector_request_teams.yaml' - - $ref: '../components/schemas/update_connector_request_tines.yaml' - - $ref: '../components/schemas/update_connector_request_torq.yaml' - - $ref: '../components/schemas/update_connector_request_webhook.yaml' - - $ref: '../components/schemas/update_connector_request_xmatters.yaml' + $ref: '../components/schemas/update_connector_request.yaml' examples: updateIndexConnectorRequest: $ref: '../components/examples/update_index_connector_request.yaml' @@ -179,21 +130,7 @@ put: schema: $ref: '../components/schemas/connector_response_properties.yaml' '400': - description: Indicates a bad request. - content: - application/json: - schema: - type: object - properties: - error: - type: string - example: Bad Request - message: - type: string - example: "error validating action type config: [index]: expected value of type [string] but got [undefined]" - statusCode: - type: integer - example: 400 + $ref: '../components/responses/401.yaml' '401': $ref: '../components/responses/401.yaml' '404': From f79ba16bd8165cc25dbf59d7b428bca91a5e3082 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 12 Oct 2023 15:56:22 -0700 Subject: [PATCH 7/8] [OAS] Add Serverless delete connector API --- .../plugins/actions/docs/openapi/bundled.json | 23 +--- .../plugins/actions/docs/openapi/bundled.yaml | 16 +-- .../docs/openapi/bundled_serverless.json | 31 ++++++ .../docs/openapi/bundled_serverless.yaml | 17 +++ .../api@actions@connector@{connectorid}.yaml | 51 +++------ ...ions@connector@{connectorid}@_execute.yaml | 100 ------------------ ...}@api@actions@connector@{connectorid}.yaml | 16 +-- 7 files changed, 68 insertions(+), 186 deletions(-) delete mode 100644 x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}@_execute.yaml diff --git a/x-pack/plugins/actions/docs/openapi/bundled.json b/x-pack/plugins/actions/docs/openapi/bundled.json index d1fb839c0f3fd..fc3564f190151 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.json +++ b/x-pack/plugins/actions/docs/openapi/bundled.json @@ -185,28 +185,7 @@ "$ref": "#/components/responses/401" }, "404": { - "description": "Object is not found.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "error": { - "type": "string", - "example": "Not Found" - }, - "message": { - "type": "string", - "example": "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" - }, - "statusCode": { - "type": "integer", - "example": 404 - } - } - } - } - } + "$ref": "#/components/responses/404" } }, "servers": [ diff --git a/x-pack/plugins/actions/docs/openapi/bundled.yaml b/x-pack/plugins/actions/docs/openapi/bundled.yaml index 4d8961549cdf7..1651674d10697 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.yaml +++ b/x-pack/plugins/actions/docs/openapi/bundled.yaml @@ -110,21 +110,7 @@ paths: '401': $ref: '#/components/responses/401' '404': - description: Object is not found. - content: - application/json: - schema: - type: object - properties: - error: - type: string - example: Not Found - message: - type: string - example: Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found - statusCode: - type: integer - example: 404 + $ref: '#/components/responses/404' servers: - url: https://localhost:5601 post: diff --git a/x-pack/plugins/actions/docs/openapi/bundled_serverless.json b/x-pack/plugins/actions/docs/openapi/bundled_serverless.json index 3c2c5f74f0b03..25d7b7484ae8d 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled_serverless.json +++ b/x-pack/plugins/actions/docs/openapi/bundled_serverless.json @@ -148,6 +148,37 @@ } ] }, + "delete": { + "summary": "Deletes a connector.", + "operationId": "deleteConnector", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/connector_id" + } + ], + "responses": { + "204": { + "description": "Indicates a successful call." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, "post": { "summary": "Creates a connector.", "operationId": "createConnectorId", diff --git a/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml b/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml index a58cc0eb17d07..b66a820c1b77d 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml +++ b/x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml @@ -86,6 +86,23 @@ paths: $ref: '#/components/responses/404' servers: - url: https://localhost:5601 + delete: + summary: Deletes a connector. + operationId: deleteConnector + tags: + - connectors + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/connector_id' + responses: + '204': + description: Indicates a successful call. + '401': + $ref: '#/components/responses/401' + '404': + $ref: '#/components/responses/404' + servers: + - url: https://localhost:5601 post: summary: Creates a connector. operationId: createConnectorId diff --git a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}.yaml b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}.yaml index f7c8310856544..f9f483f747635 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}.yaml @@ -22,40 +22,23 @@ get: servers: - url: https://localhost:5601 -# delete: -# summary: Deletes a connector. -# operationId: deleteConnector -# description: > -# You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. -# WARNING: When you delete a connector, it cannot be recovered. -# tags: -# - connectors -# parameters: -# - $ref: '../components/headers/kbn_xsrf.yaml' -# - $ref: '../components/parameters/connector_id.yaml' -# responses: -# '204': -# description: Indicates a successful call. -# '401': -# $ref: '../components/responses/401.yaml' -# '404': -# description: Object is not found. -# content: -# application/json: -# schema: -# type: object -# properties: -# error: -# type: string -# example: Not Found -# message: -# type: string -# example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" -# statusCode: -# type: integer -# example: 404 -# servers: -# - url: https://localhost:5601 +delete: + summary: Deletes a connector. + operationId: deleteConnector + tags: + - connectors + parameters: + - $ref: '../components/headers/kbn_xsrf.yaml' + - $ref: '../components/parameters/connector_id.yaml' + responses: + '204': + description: Indicates a successful call. + '401': + $ref: '../components/responses/401.yaml' + '404': + $ref: '../components/responses/404.yaml' + servers: + - url: https://localhost:5601 post: summary: Creates a connector. diff --git a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}@_execute.yaml b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}@_execute.yaml deleted file mode 100644 index 3841b19b8a82e..0000000000000 --- a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}@_execute.yaml +++ /dev/null @@ -1,100 +0,0 @@ -post: - summary: Runs a connector. - operationId: runConnector - 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. - tags: - - connectors - parameters: - - $ref: '../components/headers/kbn_xsrf.yaml' - - $ref: '../components/parameters/connector_id.yaml' - requestBody: - required: true - content: - application/json: - schema: - title: Run connector request body properties - description: The properties vary depending on the connector type. - type: object - required: - - params - properties: - params: - oneOf: - - $ref: '../components/schemas/run_connector_params_documents.yaml' - - $ref: '../components/schemas/run_connector_params_level_message.yaml' - - title: Subaction parameters - description: Test an action that involves a subaction. - oneOf: - - $ref: '../components/schemas/run_connector_subaction_addevent.yaml' - - $ref: '../components/schemas/run_connector_subaction_closealert.yaml' - - $ref: '../components/schemas/run_connector_subaction_createalert.yaml' - - $ref: '../components/schemas/run_connector_subaction_fieldsbyissuetype.yaml' - - $ref: '../components/schemas/run_connector_subaction_getchoices.yaml' - - $ref: '../components/schemas/run_connector_subaction_getfields.yaml' - - $ref: '../components/schemas/run_connector_subaction_getincident.yaml' - - $ref: '../components/schemas/run_connector_subaction_issue.yaml' - - $ref: '../components/schemas/run_connector_subaction_issues.yaml' - - $ref: '../components/schemas/run_connector_subaction_issuetypes.yaml' - - $ref: '../components/schemas/run_connector_subaction_pushtoservice.yaml' - discriminator: - propertyName: subAction - examples: - runIndexConnectorRequest: - $ref: '../components/examples/run_index_connector_request.yaml' - runJiraConnectorRequest: - $ref: '../components/examples/run_jira_connector_request.yaml' - runServerLogConnectorRequest: - $ref: '../components/examples/run_server_log_connector_request.yaml' - runServiceNowITOMConnectorRequest: - $ref: '../components/examples/run_servicenow_itom_connector_request.yaml' - runSwimlaneConnectorRequest: - $ref: '../components/examples/run_swimlane_connector_request.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: object - required: - - connector_id - - status - properties: - connector_id: - type: string - description: The identifier for the connector. - data: - oneOf: - - type: object - description: Information returned from the action. - additionalProperties: true - - type: array - description: An array of information returned from the action. - items: - type: object - status: - type: string - description: The status of the action. - enum: - - error - - ok - examples: - runIndexConnectorResponse: - $ref: '../components/examples/run_index_connector_response.yaml' - runJiraConnectorResponse: - $ref: '../components/examples/run_jira_connector_response.yaml' - runServerLogConnectorResponse: - $ref: '../components/examples/run_server_log_connector_response.yaml' - runServiceNowITOMConnectorResponse: - $ref: '../components/examples/run_servicenow_itom_connector_response.yaml' - runSwimlaneConnectorResponse: - $ref: '../components/examples/run_swimlane_connector_response.yaml' - '401': - $ref: '../components/responses/401.yaml' - servers: - - url: https://localhost:5601 -servers: - - url: https://localhost:5601 diff --git a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml index 1165dd0647bc5..0edbd0a0ed2d1 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml @@ -43,21 +43,7 @@ delete: '401': $ref: '../components/responses/401.yaml' '404': - description: Object is not found. - content: - application/json: - schema: - type: object - properties: - error: - type: string - example: Not Found - message: - type: string - example: "Saved object [action/baf33fc0-920c-11ed-b36a-874bd1548a00] not found" - statusCode: - type: integer - example: 404 + $ref: '../components/responses/404.yaml' servers: - url: https://localhost:5601 From a735f2e82f1e6b412b9ef37c952040abeb2f9a48 Mon Sep 17 00:00:00 2001 From: lcawl Date: Thu, 12 Oct 2023 16:11:07 -0700 Subject: [PATCH 8/8] [OAS] Add run connector API in default space --- .../plugins/actions/docs/openapi/bundled.json | 982 ++++++++++++++---- .../plugins/actions/docs/openapi/bundled.yaml | 600 ++++++++--- .../schemas/run_connector_request.yaml | 26 + .../actions/docs/openapi/entrypoint.yaml | 28 +- ...ions@connector@{connectorid}@_execute.yaml | 75 ++ ...ions@connector@{connectorid}@_execute.yaml | 29 +- 6 files changed, 1370 insertions(+), 370 deletions(-) create mode 100644 x-pack/plugins/actions/docs/openapi/components/schemas/run_connector_request.yaml create mode 100644 x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}@_execute.yaml diff --git a/x-pack/plugins/actions/docs/openapi/bundled.json b/x-pack/plugins/actions/docs/openapi/bundled.json index fc3564f190151..06ef16a71f200 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.json +++ b/x-pack/plugins/actions/docs/openapi/bundled.json @@ -33,6 +33,542 @@ } ], "paths": { + "/api/actions/connector": { + "post": { + "summary": "Creates a connector.", + "operationId": "createConnector", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_connector_request" + }, + "examples": { + "createEmailConnectorRequest": { + "$ref": "#/components/examples/create_email_connector_request" + }, + "createIndexConnectorRequest": { + "$ref": "#/components/examples/create_index_connector_request" + }, + "createWebhookConnectorRequest": { + "$ref": "#/components/examples/create_webhook_connector_request" + }, + "createXmattersConnectorRequest": { + "$ref": "#/components/examples/create_xmatters_connector_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connector_response_properties" + }, + "examples": { + "createEmailConnectorResponse": { + "$ref": "#/components/examples/create_email_connector_response" + }, + "createIndexConnectorResponse": { + "$ref": "#/components/examples/create_index_connector_response" + }, + "createWebhookConnectorResponse": { + "$ref": "#/components/examples/create_webhook_connector_response" + }, + "createXmattersConnectorResponse": { + "$ref": "#/components/examples/create_xmatters_connector_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/api/actions/connector/{connectorId}": { + "get": { + "summary": "Retrieves a connector by ID.", + "operationId": "getConnector", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/connector_id" + } + ], + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connector_response_properties" + }, + "examples": { + "getConnectorResponse": { + "$ref": "#/components/examples/get_connector_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "delete": { + "summary": "Deletes a connector.", + "operationId": "deleteConnector", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/connector_id" + } + ], + "responses": { + "204": { + "description": "Indicates a successful call." + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "post": { + "summary": "Creates a connector.", + "operationId": "createConnectorId", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "in": "path", + "name": "connectorId", + "description": "A UUID v1 or v4 identifier for the connector. If you omit this parameter, an identifier is randomly generated.\n", + "required": true, + "schema": { + "type": "string", + "example": "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/create_connector_request" + }, + "examples": { + "createIndexConnectorRequest": { + "$ref": "#/components/examples/create_index_connector_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connector_response_properties" + }, + "examples": { + "createIndexConnectorResponse": { + "$ref": "#/components/examples/create_index_connector_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "put": { + "summary": "Updates the attributes for a connector.", + "operationId": "updateConnector", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/connector_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/update_connector_request" + }, + "examples": { + "updateIndexConnectorRequest": { + "$ref": "#/components/examples/update_index_connector_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connector_response_properties" + } + } + } + }, + "400": { + "$ref": "#/components/responses/401" + }, + "401": { + "$ref": "#/components/responses/401" + }, + "404": { + "$ref": "#/components/responses/404" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/api/actions/connector/{connectorId}/_execute": { + "post": { + "summary": "Runs a connector.", + "operationId": "runConnector", + "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.\n", + "tags": [ + "connectors" + ], + "parameters": [ + { + "$ref": "#/components/parameters/kbn_xsrf" + }, + { + "$ref": "#/components/parameters/connector_id" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/run_connector_request" + }, + "examples": { + "runIndexConnectorRequest": { + "$ref": "#/components/examples/run_index_connector_request" + }, + "runJiraConnectorRequest": { + "$ref": "#/components/examples/run_jira_connector_request" + }, + "runServerLogConnectorRequest": { + "$ref": "#/components/examples/run_server_log_connector_request" + }, + "runServiceNowITOMConnectorRequest": { + "$ref": "#/components/examples/run_servicenow_itom_connector_request" + }, + "runSwimlaneConnectorRequest": { + "$ref": "#/components/examples/run_swimlane_connector_request" + } + } + } + } + }, + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "connector_id", + "status" + ], + "properties": { + "connector_id": { + "type": "string", + "description": "The identifier for the connector." + }, + "data": { + "oneOf": [ + { + "type": "object", + "description": "Information returned from the action.", + "additionalProperties": true + }, + { + "type": "array", + "description": "An array of information returned from the action.", + "items": { + "type": "object" + } + } + ] + }, + "status": { + "type": "string", + "description": "The status of the action.", + "enum": [ + "error", + "ok" + ] + } + } + }, + "examples": { + "runIndexConnectorResponse": { + "$ref": "#/components/examples/run_index_connector_response" + }, + "runJiraConnectorResponse": { + "$ref": "#/components/examples/run_jira_connector_response" + }, + "runServerLogConnectorResponse": { + "$ref": "#/components/examples/run_server_log_connector_response" + }, + "runServiceNowITOMConnectorResponse": { + "$ref": "#/components/examples/run_servicenow_itom_connector_response" + }, + "runSwimlaneConnectorResponse": { + "$ref": "#/components/examples/run_swimlane_connector_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/api/actions/connectors": { + "get": { + "summary": "Retrieves all connectors.", + "operationId": "getConnectors", + "tags": [ + "connectors" + ], + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector_response_properties" + } + }, + "examples": { + "getConnectorsResponse": { + "$ref": "#/components/examples/get_connectors_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "/api/actions/connector_types": { + "get": { + "summary": "Retrieves a list of all connector types.", + "operationId": "getConnectorTypes", + "tags": [ + "connectors" + ], + "parameters": [ + { + "in": "query", + "name": "feature_id", + "description": "A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases).", + "schema": { + "$ref": "#/components/schemas/features" + } + } + ], + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "title": "Get connector types response body properties", + "description": "The properties vary for each connector type.", + "type": "array", + "items": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Indicates whether the connector type is enabled in Kibana.", + "example": true + }, + "enabled_in_config": { + "type": "boolean", + "description": "Indicates whether the connector type is enabled in the Kibana configuration file.", + "example": true + }, + "enabled_in_license": { + "type": "boolean", + "description": "Indicates whether the connector is enabled in the license.", + "example": true + }, + "id": { + "$ref": "#/components/schemas/connector_types" + }, + "is_system_action_type": { + "type": "boolean", + "example": false + }, + "minimum_license_required": { + "type": "string", + "description": "The license that is required to use the connector type.", + "example": "basic" + }, + "name": { + "type": "string", + "description": "The name of the connector type.", + "example": "Index" + }, + "supported_feature_ids": { + "type": "array", + "description": "The features that are supported by the connector type.", + "items": { + "$ref": "#/components/schemas/features" + }, + "example": [ + "alerting", + "cases", + "siem" + ] + } + } + } + }, + "examples": { + "getConnectorTypesServerlessResponse": { + "$ref": "#/components/examples/get_connector_types_generativeai_response" + } + } + } + } + }, + "401": { + "$ref": "#/components/responses/401" + } + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, + "servers": [ + { + "url": "https://localhost:5601" + } + ] + }, "/s/{spaceId}/api/actions/connector": { "post": { "summary": "Creates a connector.", @@ -477,7 +1013,7 @@ "/s/{spaceId}/api/actions/connector/{connectorId}/_execute": { "post": { "summary": "Runs a connector.", - "operationId": "runConnector", + "operationId": "runConnectorWithSpaceId", "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.\n", "tags": [ "connectors" @@ -498,66 +1034,7 @@ "content": { "application/json": { "schema": { - "title": "Run connector request body properties", - "description": "The properties vary depending on the connector type.", - "type": "object", - "required": [ - "params" - ], - "properties": { - "params": { - "oneOf": [ - { - "$ref": "#/components/schemas/run_connector_params_documents" - }, - { - "$ref": "#/components/schemas/run_connector_params_level_message" - }, - { - "title": "Subaction parameters", - "description": "Test an action that involves a subaction.", - "oneOf": [ - { - "$ref": "#/components/schemas/run_connector_subaction_addevent" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_closealert" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_createalert" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_fieldsbyissuetype" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_getchoices" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_getfields" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_getincident" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_issue" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_issues" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_issuetypes" - }, - { - "$ref": "#/components/schemas/run_connector_subaction_pushtoservice" - } - ], - "discriminator": { - "propertyName": "subAction" - } - } - ] - } - } + "$ref": "#/components/schemas/run_connector_request" }, "examples": { "runIndexConnectorRequest": { @@ -1078,24 +1555,24 @@ "description": "Cross-site request forgery protection", "required": true }, - "space_id": { + "connector_id": { "in": "path", - "name": "spaceId", - "description": "An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.", + "name": "connectorId", + "description": "An identifier for the connector.", "required": true, "schema": { "type": "string", - "example": "default" + "example": "df770e30-8b8b-11ed-a780-3b746c987a81" } }, - "connector_id": { + "space_id": { "in": "path", - "name": "connectorId", - "description": "An identifier for the connector.", + "name": "spaceId", + "description": "An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.", "required": true, "schema": { "type": "string", - "example": "df770e30-8b8b-11ed-a780-3b746c987a81" + "example": "default" } }, "action_id": { @@ -4435,72 +4912,31 @@ { "$ref": "#/components/schemas/update_connector_request_servicenow_itom" }, - { - "$ref": "#/components/schemas/update_connector_request_slack_api" - }, - { - "$ref": "#/components/schemas/update_connector_request_slack_webhook" - }, - { - "$ref": "#/components/schemas/update_connector_request_swimlane" - }, - { - "$ref": "#/components/schemas/update_connector_request_teams" - }, - { - "$ref": "#/components/schemas/update_connector_request_tines" - }, - { - "$ref": "#/components/schemas/update_connector_request_torq" - }, - { - "$ref": "#/components/schemas/update_connector_request_webhook" - }, - { - "$ref": "#/components/schemas/update_connector_request_xmatters" - } - ] - }, - "features": { - "type": "string", - "description": "The feature that uses the connector.\n", - "enum": [ - "alerting", - "cases", - "generativeAI", - "siem", - "uptime" - ] - }, - "connector_types": { - "title": "Connector types", - "type": "string", - "description": "The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`.", - "enum": [ - ".bedrock", - ".cases-webhook", - ".d3security", - ".email", - ".gen-ai", - ".index", - ".jira", - ".opsgenie", - ".pagerduty", - ".resilient", - ".servicenow", - ".servicenow-itom", - ".servicenow-sir", - ".server-log", - ".slack", - ".slack_api", - ".swimlane", - ".teams", - ".tines", - ".torq", - ".webhook", - ".xmatters" - ], - "example": ".server-log" + { + "$ref": "#/components/schemas/update_connector_request_slack_api" + }, + { + "$ref": "#/components/schemas/update_connector_request_slack_webhook" + }, + { + "$ref": "#/components/schemas/update_connector_request_swimlane" + }, + { + "$ref": "#/components/schemas/update_connector_request_teams" + }, + { + "$ref": "#/components/schemas/update_connector_request_tines" + }, + { + "$ref": "#/components/schemas/update_connector_request_torq" + }, + { + "$ref": "#/components/schemas/update_connector_request_webhook" + }, + { + "$ref": "#/components/schemas/update_connector_request_xmatters" + } + ] }, "run_connector_params_documents": { "title": "Index connector parameters", @@ -5184,6 +5620,109 @@ } } }, + "run_connector_request": { + "title": "Run connector request body properties", + "description": "The properties vary depending on the connector type.", + "type": "object", + "required": [ + "params" + ], + "properties": { + "params": { + "oneOf": [ + { + "$ref": "#/components/schemas/run_connector_params_documents" + }, + { + "$ref": "#/components/schemas/run_connector_params_level_message" + }, + { + "title": "Subaction parameters", + "description": "Test an action that involves a subaction.", + "oneOf": [ + { + "$ref": "#/components/schemas/run_connector_subaction_addevent" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_closealert" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_createalert" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_fieldsbyissuetype" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_getchoices" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_getfields" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_getincident" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_issue" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_issues" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_issuetypes" + }, + { + "$ref": "#/components/schemas/run_connector_subaction_pushtoservice" + } + ], + "discriminator": { + "propertyName": "subAction" + } + } + ] + } + } + }, + "features": { + "type": "string", + "description": "The feature that uses the connector.\n", + "enum": [ + "alerting", + "cases", + "generativeAI", + "siem", + "uptime" + ] + }, + "connector_types": { + "title": "Connector types", + "type": "string", + "description": "The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`.", + "enum": [ + ".bedrock", + ".cases-webhook", + ".d3security", + ".email", + ".gen-ai", + ".index", + ".jira", + ".opsgenie", + ".pagerduty", + ".resilient", + ".servicenow", + ".servicenow-itom", + ".servicenow-sir", + ".server-log", + ".slack", + ".slack_api", + ".swimlane", + ".teams", + ".tines", + ".torq", + ".webhook", + ".xmatters" + ], + "example": ".server-log" + }, "action_response_properties": { "title": "Action response properties", "description": "The properties vary depending on the action type.", @@ -5376,78 +5915,6 @@ } } }, - "get_connectors_response": { - "summary": "A list of connectors", - "value": [ - { - "id": "preconfigured-email-connector", - "name": "my-preconfigured-email-notification", - "connector_type_id": ".email", - "is_preconfigured": true, - "is_deprecated": false, - "referenced_by_count": 0, - "is_system_action": false - }, - { - "id": "e07d0c80-8b8b-11ed-a780-3b746c987a81", - "name": "my-index-connector", - "config": { - "index": "test-index", - "refresh": false, - "executionTimeField": null - }, - "connector_type_id": ".index", - "is_preconfigured": false, - "is_deprecated": false, - "referenced_by_count": 2, - "is_missing_secrets": false, - "is_system_action": false - } - ] - }, - "get_connector_types_response": { - "summary": "A list of connector types", - "value": [ - { - "id": ".swimlane", - "name": "Swimlane", - "enabled": true, - "enabled_in_config": true, - "enabled_in_license": true, - "minimum_license_required": "gold", - "supported_feature_ids": [ - "alerting", - "cases", - "siem" - ] - }, - { - "id": ".index", - "name": "Index", - "enabled": true, - "enabled_in_config": true, - "enabled_in_license": true, - "minimum_license_required": "basic", - "supported_feature_ids": [ - "alerting", - "uptime", - "siem" - ] - }, - { - "id": ".server-log", - "name": "Server log", - "enabled": true, - "enabled_in_config": true, - "enabled_in_license": true, - "minimum_license_required": "basic", - "supported_feature_ids": [ - "alerting", - "uptime" - ] - } - ] - }, "run_index_connector_request": { "summary": "Run an index connector.", "value": { @@ -5664,6 +6131,107 @@ }, "status": "ok" } + }, + "get_connectors_response": { + "summary": "A list of connectors", + "value": [ + { + "id": "preconfigured-email-connector", + "name": "my-preconfigured-email-notification", + "connector_type_id": ".email", + "is_preconfigured": true, + "is_deprecated": false, + "referenced_by_count": 0, + "is_system_action": false + }, + { + "id": "e07d0c80-8b8b-11ed-a780-3b746c987a81", + "name": "my-index-connector", + "config": { + "index": "test-index", + "refresh": false, + "executionTimeField": null + }, + "connector_type_id": ".index", + "is_preconfigured": false, + "is_deprecated": false, + "referenced_by_count": 2, + "is_missing_secrets": false, + "is_system_action": false + } + ] + }, + "get_connector_types_generativeai_response": { + "summary": "A list of connector types for the `generativeAI` feature.", + "value": [ + { + "id": ".gen-ai", + "name": "OpenAI", + "enabled": true, + "enabled_in_config": true, + "enabled_in_license": true, + "minimum_license_required": "enterprise", + "supported_feature_ids": [ + "generativeAI" + ], + "is_system_action_type": false + }, + { + "id": ".bedrock", + "name": "AWS Bedrock", + "enabled": true, + "enabled_in_config": true, + "enabled_in_license": true, + "minimum_license_required": "enterprise", + "supported_feature_ids": [ + "generativeAI" + ], + "is_system_action_type": false + } + ] + }, + "get_connector_types_response": { + "summary": "A list of connector types", + "value": [ + { + "id": ".swimlane", + "name": "Swimlane", + "enabled": true, + "enabled_in_config": true, + "enabled_in_license": true, + "minimum_license_required": "gold", + "supported_feature_ids": [ + "alerting", + "cases", + "siem" + ] + }, + { + "id": ".index", + "name": "Index", + "enabled": true, + "enabled_in_config": true, + "enabled_in_license": true, + "minimum_license_required": "basic", + "supported_feature_ids": [ + "alerting", + "uptime", + "siem" + ] + }, + { + "id": ".server-log", + "name": "Server log", + "enabled": true, + "enabled_in_config": true, + "enabled_in_license": true, + "minimum_license_required": "basic", + "supported_feature_ids": [ + "alerting", + "uptime" + ] + } + ] } }, "responses": { diff --git a/x-pack/plugins/actions/docs/openapi/bundled.yaml b/x-pack/plugins/actions/docs/openapi/bundled.yaml index 1651674d10697..099757a354f9e 100644 --- a/x-pack/plugins/actions/docs/openapi/bundled.yaml +++ b/x-pack/plugins/actions/docs/openapi/bundled.yaml @@ -18,6 +18,329 @@ tags: - name: connectors description: Connector APIs enable you to create and manage connectors. paths: + /api/actions/connector: + post: + summary: Creates a connector. + operationId: createConnector + tags: + - connectors + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/create_connector_request' + examples: + createEmailConnectorRequest: + $ref: '#/components/examples/create_email_connector_request' + createIndexConnectorRequest: + $ref: '#/components/examples/create_index_connector_request' + createWebhookConnectorRequest: + $ref: '#/components/examples/create_webhook_connector_request' + createXmattersConnectorRequest: + $ref: '#/components/examples/create_xmatters_connector_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/connector_response_properties' + examples: + createEmailConnectorResponse: + $ref: '#/components/examples/create_email_connector_response' + createIndexConnectorResponse: + $ref: '#/components/examples/create_index_connector_response' + createWebhookConnectorResponse: + $ref: '#/components/examples/create_webhook_connector_response' + createXmattersConnectorResponse: + $ref: '#/components/examples/create_xmatters_connector_response' + '401': + $ref: '#/components/responses/401' + servers: + - url: https://localhost:5601 + servers: + - url: https://localhost:5601 + /api/actions/connector/{connectorId}: + get: + summary: Retrieves a connector by ID. + operationId: getConnector + tags: + - connectors + parameters: + - $ref: '#/components/parameters/connector_id' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/connector_response_properties' + examples: + getConnectorResponse: + $ref: '#/components/examples/get_connector_response' + '401': + $ref: '#/components/responses/401' + '404': + $ref: '#/components/responses/404' + servers: + - url: https://localhost:5601 + delete: + summary: Deletes a connector. + operationId: deleteConnector + tags: + - connectors + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/connector_id' + responses: + '204': + description: Indicates a successful call. + '401': + $ref: '#/components/responses/401' + '404': + $ref: '#/components/responses/404' + servers: + - url: https://localhost:5601 + post: + summary: Creates a connector. + operationId: createConnectorId + tags: + - connectors + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - in: path + name: connectorId + description: | + A UUID v1 or v4 identifier for the connector. If you omit this parameter, an identifier is randomly generated. + required: true + schema: + type: string + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/create_connector_request' + examples: + createIndexConnectorRequest: + $ref: '#/components/examples/create_index_connector_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/connector_response_properties' + examples: + createIndexConnectorResponse: + $ref: '#/components/examples/create_index_connector_response' + '401': + $ref: '#/components/responses/401' + servers: + - url: https://localhost:5601 + put: + summary: Updates the attributes for a connector. + operationId: updateConnector + tags: + - connectors + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/connector_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/update_connector_request' + examples: + updateIndexConnectorRequest: + $ref: '#/components/examples/update_index_connector_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/connector_response_properties' + '400': + $ref: '#/components/responses/401' + '401': + $ref: '#/components/responses/401' + '404': + $ref: '#/components/responses/404' + servers: + - url: https://localhost:5601 + servers: + - url: https://localhost:5601 + /api/actions/connector/{connectorId}/_execute: + post: + summary: Runs a connector. + operationId: runConnector + 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. + tags: + - connectors + parameters: + - $ref: '#/components/parameters/kbn_xsrf' + - $ref: '#/components/parameters/connector_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/run_connector_request' + examples: + runIndexConnectorRequest: + $ref: '#/components/examples/run_index_connector_request' + runJiraConnectorRequest: + $ref: '#/components/examples/run_jira_connector_request' + runServerLogConnectorRequest: + $ref: '#/components/examples/run_server_log_connector_request' + runServiceNowITOMConnectorRequest: + $ref: '#/components/examples/run_servicenow_itom_connector_request' + runSwimlaneConnectorRequest: + $ref: '#/components/examples/run_swimlane_connector_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + required: + - connector_id + - status + properties: + connector_id: + type: string + description: The identifier for the connector. + data: + oneOf: + - type: object + description: Information returned from the action. + additionalProperties: true + - type: array + description: An array of information returned from the action. + items: + type: object + status: + type: string + description: The status of the action. + enum: + - error + - ok + examples: + runIndexConnectorResponse: + $ref: '#/components/examples/run_index_connector_response' + runJiraConnectorResponse: + $ref: '#/components/examples/run_jira_connector_response' + runServerLogConnectorResponse: + $ref: '#/components/examples/run_server_log_connector_response' + runServiceNowITOMConnectorResponse: + $ref: '#/components/examples/run_servicenow_itom_connector_response' + runSwimlaneConnectorResponse: + $ref: '#/components/examples/run_swimlane_connector_response' + '401': + $ref: '#/components/responses/401' + servers: + - url: https://localhost:5601 + servers: + - url: https://localhost:5601 + /api/actions/connectors: + get: + summary: Retrieves all connectors. + operationId: getConnectors + tags: + - connectors + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/connector_response_properties' + examples: + getConnectorsResponse: + $ref: '#/components/examples/get_connectors_response' + '401': + $ref: '#/components/responses/401' + servers: + - url: https://localhost:5601 + servers: + - url: https://localhost:5601 + /api/actions/connector_types: + get: + summary: Retrieves a list of all connector types. + operationId: getConnectorTypes + tags: + - connectors + parameters: + - in: query + name: feature_id + description: A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). + schema: + $ref: '#/components/schemas/features' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + title: Get connector types response body properties + description: The properties vary for each connector type. + type: array + items: + type: object + properties: + enabled: + type: boolean + description: Indicates whether the connector type is enabled in Kibana. + example: true + enabled_in_config: + type: boolean + description: Indicates whether the connector type is enabled in the Kibana configuration file. + example: true + enabled_in_license: + type: boolean + description: Indicates whether the connector is enabled in the license. + example: true + id: + $ref: '#/components/schemas/connector_types' + is_system_action_type: + type: boolean + example: false + minimum_license_required: + type: string + description: The license that is required to use the connector type. + example: basic + name: + type: string + description: The name of the connector type. + example: Index + supported_feature_ids: + type: array + description: The features that are supported by the connector type. + items: + $ref: '#/components/schemas/features' + example: + - alerting + - cases + - siem + examples: + getConnectorTypesServerlessResponse: + $ref: '#/components/examples/get_connector_types_generativeai_response' + '401': + $ref: '#/components/responses/401' + servers: + - url: https://localhost:5601 + servers: + - url: https://localhost:5601 /s/{spaceId}/api/actions/connector: post: summary: Creates a connector. @@ -288,7 +611,7 @@ paths: /s/{spaceId}/api/actions/connector/{connectorId}/_execute: post: summary: Runs a connector. - operationId: runConnector + operationId: runConnectorWithSpaceId 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. tags: @@ -302,32 +625,7 @@ paths: content: application/json: schema: - title: Run connector request body properties - description: The properties vary depending on the connector type. - type: object - required: - - params - properties: - params: - oneOf: - - $ref: '#/components/schemas/run_connector_params_documents' - - $ref: '#/components/schemas/run_connector_params_level_message' - - title: Subaction parameters - description: Test an action that involves a subaction. - oneOf: - - $ref: '#/components/schemas/run_connector_subaction_addevent' - - $ref: '#/components/schemas/run_connector_subaction_closealert' - - $ref: '#/components/schemas/run_connector_subaction_createalert' - - $ref: '#/components/schemas/run_connector_subaction_fieldsbyissuetype' - - $ref: '#/components/schemas/run_connector_subaction_getchoices' - - $ref: '#/components/schemas/run_connector_subaction_getfields' - - $ref: '#/components/schemas/run_connector_subaction_getincident' - - $ref: '#/components/schemas/run_connector_subaction_issue' - - $ref: '#/components/schemas/run_connector_subaction_issues' - - $ref: '#/components/schemas/run_connector_subaction_issuetypes' - - $ref: '#/components/schemas/run_connector_subaction_pushtoservice' - discriminator: - propertyName: subAction + $ref: '#/components/schemas/run_connector_request' examples: runIndexConnectorRequest: $ref: '#/components/examples/run_index_connector_request' @@ -641,14 +939,6 @@ components: name: kbn-xsrf description: Cross-site request forgery protection required: true - space_id: - in: path - name: spaceId - description: An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - required: true - schema: - type: string - example: default connector_id: in: path name: connectorId @@ -657,6 +947,14 @@ components: schema: type: string example: df770e30-8b8b-11ed-a780-3b746c987a81 + space_id: + in: path + name: spaceId + description: An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. + required: true + schema: + type: string + example: default action_id: in: path name: actionId @@ -3109,44 +3407,6 @@ components: - $ref: '#/components/schemas/update_connector_request_torq' - $ref: '#/components/schemas/update_connector_request_webhook' - $ref: '#/components/schemas/update_connector_request_xmatters' - features: - type: string - description: | - The feature that uses the connector. - enum: - - alerting - - cases - - generativeAI - - siem - - uptime - connector_types: - title: Connector types - type: string - description: The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. - enum: - - .bedrock - - .cases-webhook - - .d3security - - .email - - .gen-ai - - .index - - .jira - - .opsgenie - - .pagerduty - - .resilient - - .servicenow - - .servicenow-itom - - .servicenow-sir - - .server-log - - .slack - - .slack_api - - .swimlane - - .teams - - .tines - - .torq - - .webhook - - .xmatters - example: .server-log run_connector_params_documents: title: Index connector parameters description: Test an action that indexes a document into Elasticsearch. @@ -3636,6 +3896,71 @@ components: urgency: type: string description: The urgency of the incident for ServiceNow ITSM connectors. + run_connector_request: + title: Run connector request body properties + description: The properties vary depending on the connector type. + type: object + required: + - params + properties: + params: + oneOf: + - $ref: '#/components/schemas/run_connector_params_documents' + - $ref: '#/components/schemas/run_connector_params_level_message' + - title: Subaction parameters + description: Test an action that involves a subaction. + oneOf: + - $ref: '#/components/schemas/run_connector_subaction_addevent' + - $ref: '#/components/schemas/run_connector_subaction_closealert' + - $ref: '#/components/schemas/run_connector_subaction_createalert' + - $ref: '#/components/schemas/run_connector_subaction_fieldsbyissuetype' + - $ref: '#/components/schemas/run_connector_subaction_getchoices' + - $ref: '#/components/schemas/run_connector_subaction_getfields' + - $ref: '#/components/schemas/run_connector_subaction_getincident' + - $ref: '#/components/schemas/run_connector_subaction_issue' + - $ref: '#/components/schemas/run_connector_subaction_issues' + - $ref: '#/components/schemas/run_connector_subaction_issuetypes' + - $ref: '#/components/schemas/run_connector_subaction_pushtoservice' + discriminator: + propertyName: subAction + features: + type: string + description: | + The feature that uses the connector. + enum: + - alerting + - cases + - generativeAI + - siem + - uptime + connector_types: + title: Connector types + type: string + description: The type of connector. For example, `.email`, `.index`, `.jira`, `.opsgenie`, or `.server-log`. + enum: + - .bedrock + - .cases-webhook + - .d3security + - .email + - .gen-ai + - .index + - .jira + - .opsgenie + - .pagerduty + - .resilient + - .servicenow + - .servicenow-itom + - .servicenow-sir + - .server-log + - .slack + - .slack_api + - .swimlane + - .teams + - .tines + - .torq + - .webhook + - .xmatters + example: .server-log action_response_properties: title: Action response properties description: The properties vary depending on the action type. @@ -3786,60 +4111,6 @@ components: name: updated-connector config: index: updated-index - get_connectors_response: - summary: A list of connectors - value: - - id: preconfigured-email-connector - name: my-preconfigured-email-notification - connector_type_id: .email - is_preconfigured: true - is_deprecated: false - referenced_by_count: 0 - is_system_action: false - - id: e07d0c80-8b8b-11ed-a780-3b746c987a81 - name: my-index-connector - config: - index: test-index - refresh: false - executionTimeField: null - connector_type_id: .index - is_preconfigured: false - is_deprecated: false - referenced_by_count: 2 - is_missing_secrets: false - is_system_action: false - get_connector_types_response: - summary: A list of connector types - value: - - id: .swimlane - name: Swimlane - enabled: true - enabled_in_config: true - enabled_in_license: true - minimum_license_required: gold - supported_feature_ids: - - alerting - - cases - - siem - - id: .index - name: Index - enabled: true - enabled_in_config: true - enabled_in_license: true - minimum_license_required: basic - supported_feature_ids: - - alerting - - uptime - - siem - - id: .server-log - name: Server log - enabled: true - enabled_in_config: true - enabled_in_license: true - minimum_license_required: basic - supported_feature_ids: - - alerting - - uptime run_index_connector_request: summary: Run an index connector. value: @@ -3980,6 +4251,81 @@ components: - commentId: 1 pushedDate: '2022-09-08T16:52:27.865Z' status: ok + get_connectors_response: + summary: A list of connectors + value: + - id: preconfigured-email-connector + name: my-preconfigured-email-notification + connector_type_id: .email + is_preconfigured: true + is_deprecated: false + referenced_by_count: 0 + is_system_action: false + - id: e07d0c80-8b8b-11ed-a780-3b746c987a81 + name: my-index-connector + config: + index: test-index + refresh: false + executionTimeField: null + connector_type_id: .index + is_preconfigured: false + is_deprecated: false + referenced_by_count: 2 + is_missing_secrets: false + is_system_action: false + get_connector_types_generativeai_response: + summary: A list of connector types for the `generativeAI` feature. + value: + - id: .gen-ai + name: OpenAI + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: enterprise + supported_feature_ids: + - generativeAI + is_system_action_type: false + - id: .bedrock + name: AWS Bedrock + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: enterprise + supported_feature_ids: + - generativeAI + is_system_action_type: false + get_connector_types_response: + summary: A list of connector types + value: + - id: .swimlane + name: Swimlane + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: gold + supported_feature_ids: + - alerting + - cases + - siem + - id: .index + name: Index + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: basic + supported_feature_ids: + - alerting + - uptime + - siem + - id: .server-log + name: Server log + enabled: true + enabled_in_config: true + enabled_in_license: true + minimum_license_required: basic + supported_feature_ids: + - alerting + - uptime responses: '401': description: Authorization information is missing or invalid. diff --git a/x-pack/plugins/actions/docs/openapi/components/schemas/run_connector_request.yaml b/x-pack/plugins/actions/docs/openapi/components/schemas/run_connector_request.yaml new file mode 100644 index 0000000000000..a313de571b501 --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/components/schemas/run_connector_request.yaml @@ -0,0 +1,26 @@ +title: Run connector request body properties +description: The properties vary depending on the connector type. +type: object +required: + - params +properties: + params: + oneOf: + - $ref: 'run_connector_params_documents.yaml' + - $ref: 'run_connector_params_level_message.yaml' + - title: Subaction parameters + description: Test an action that involves a subaction. + oneOf: + - $ref: 'run_connector_subaction_addevent.yaml' + - $ref: 'run_connector_subaction_closealert.yaml' + - $ref: 'run_connector_subaction_createalert.yaml' + - $ref: 'run_connector_subaction_fieldsbyissuetype.yaml' + - $ref: 'run_connector_subaction_getchoices.yaml' + - $ref: 'run_connector_subaction_getfields.yaml' + - $ref: 'run_connector_subaction_getincident.yaml' + - $ref: 'run_connector_subaction_issue.yaml' + - $ref: 'run_connector_subaction_issues.yaml' + - $ref: 'run_connector_subaction_issuetypes.yaml' + - $ref: 'run_connector_subaction_pushtoservice.yaml' + discriminator: + propertyName: subAction \ No newline at end of file diff --git a/x-pack/plugins/actions/docs/openapi/entrypoint.yaml b/x-pack/plugins/actions/docs/openapi/entrypoint.yaml index 04e844607f827..1f85d4a44c37b 100644 --- a/x-pack/plugins/actions/docs/openapi/entrypoint.yaml +++ b/x-pack/plugins/actions/docs/openapi/entrypoint.yaml @@ -15,24 +15,34 @@ servers: - url: 'http://localhost:5601' description: local paths: - '/s/{spaceId}/api/actions/connector': + '/api/actions/connector': + $ref: 'paths/api@actions@connector.yaml' + '/api/actions/connector/{connectorId}': + $ref: 'paths/api@actions@connector@{connectorid}.yaml' + '/api/actions/connector/{connectorId}/_execute': + $ref: paths/api@actions@connector@{connectorid}@_execute.yaml + '/api/actions/connectors': + $ref: paths/api@actions@connectors.yaml + '/api/actions/connector_types': + $ref: paths/api@actions@connector_types.yaml + '/s/{spaceId}/api/actions/connector': $ref: 'paths/s@{spaceid}@api@actions@connector.yaml' - '/s/{spaceId}/api/actions/connector/{connectorId}': + '/s/{spaceId}/api/actions/connector/{connectorId}': $ref: 'paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml' - '/s/{spaceId}/api/actions/connectors': + '/s/{spaceId}/api/actions/connectors': $ref: paths/s@{spaceid}@api@actions@connectors.yaml - '/s/{spaceId}/api/actions/connector_types': + '/s/{spaceId}/api/actions/connector_types': $ref: paths/s@{spaceid}@api@actions@connector_types.yaml - '/s/{spaceId}/api/actions/connector/{connectorId}/_execute': + '/s/{spaceId}/api/actions/connector/{connectorId}/_execute': $ref: paths/s@{spaceid}@api@actions@connector@{connectorid}@_execute.yaml # Deprecated endpoints: - '/s/{spaceId}/api/actions/action/{actionId}': + '/s/{spaceId}/api/actions/action/{actionId}': $ref: 'paths/s@{spaceid}@api@actions@action@{actionid}.yaml' - '/s/{spaceId}/api/actions': + '/s/{spaceId}/api/actions': $ref: 'paths/s@{spaceid}@api@actions.yaml' - '/s/{spaceId}/api/actions/list_action_types': + '/s/{spaceId}/api/actions/list_action_types': $ref: 'paths/s@{spaceid}@api@actions@list_action_types.yaml' - '/s/{spaceId}/api/actions/action/{actionId}/_execute': + '/s/{spaceId}/api/actions/action/{actionId}/_execute': $ref: 'paths/s@{spaceid}@api@actions@action@{actionid}@_execute.yaml' components: securitySchemes: diff --git a/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}@_execute.yaml b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}@_execute.yaml new file mode 100644 index 0000000000000..a876584ca4e8e --- /dev/null +++ b/x-pack/plugins/actions/docs/openapi/paths/api@actions@connector@{connectorid}@_execute.yaml @@ -0,0 +1,75 @@ +post: + summary: Runs a connector. + operationId: runConnector + 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. + tags: + - connectors + parameters: + - $ref: '../components/headers/kbn_xsrf.yaml' + - $ref: '../components/parameters/connector_id.yaml' + requestBody: + required: true + content: + application/json: + schema: + $ref: '../components/schemas/run_connector_request.yaml' + examples: + runIndexConnectorRequest: + $ref: '../components/examples/run_index_connector_request.yaml' + runJiraConnectorRequest: + $ref: '../components/examples/run_jira_connector_request.yaml' + runServerLogConnectorRequest: + $ref: '../components/examples/run_server_log_connector_request.yaml' + runServiceNowITOMConnectorRequest: + $ref: '../components/examples/run_servicenow_itom_connector_request.yaml' + runSwimlaneConnectorRequest: + $ref: '../components/examples/run_swimlane_connector_request.yaml' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + required: + - connector_id + - status + properties: + connector_id: + type: string + description: The identifier for the connector. + data: + oneOf: + - type: object + description: Information returned from the action. + additionalProperties: true + - type: array + description: An array of information returned from the action. + items: + type: object + status: + type: string + description: The status of the action. + enum: + - error + - ok + examples: + runIndexConnectorResponse: + $ref: '../components/examples/run_index_connector_response.yaml' + runJiraConnectorResponse: + $ref: '../components/examples/run_jira_connector_response.yaml' + runServerLogConnectorResponse: + $ref: '../components/examples/run_server_log_connector_response.yaml' + runServiceNowITOMConnectorResponse: + $ref: '../components/examples/run_servicenow_itom_connector_response.yaml' + runSwimlaneConnectorResponse: + $ref: '../components/examples/run_swimlane_connector_response.yaml' + '401': + $ref: '../components/responses/401.yaml' + servers: + - url: https://localhost:5601 +servers: + - url: https://localhost:5601 diff --git a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}@_execute.yaml b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}@_execute.yaml index 9301b563bd958..f94419bcae81d 100644 --- a/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}@_execute.yaml +++ b/x-pack/plugins/actions/docs/openapi/paths/s@{spaceid}@api@actions@connector@{connectorid}@_execute.yaml @@ -1,6 +1,6 @@ post: summary: Runs a connector. - operationId: runConnector + operationId: runConnectorWithSpaceId 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. @@ -16,32 +16,7 @@ post: content: application/json: schema: - title: Run connector request body properties - description: The properties vary depending on the connector type. - type: object - required: - - params - properties: - params: - oneOf: - - $ref: '../components/schemas/run_connector_params_documents.yaml' - - $ref: '../components/schemas/run_connector_params_level_message.yaml' - - title: Subaction parameters - description: Test an action that involves a subaction. - oneOf: - - $ref: '../components/schemas/run_connector_subaction_addevent.yaml' - - $ref: '../components/schemas/run_connector_subaction_closealert.yaml' - - $ref: '../components/schemas/run_connector_subaction_createalert.yaml' - - $ref: '../components/schemas/run_connector_subaction_fieldsbyissuetype.yaml' - - $ref: '../components/schemas/run_connector_subaction_getchoices.yaml' - - $ref: '../components/schemas/run_connector_subaction_getfields.yaml' - - $ref: '../components/schemas/run_connector_subaction_getincident.yaml' - - $ref: '../components/schemas/run_connector_subaction_issue.yaml' - - $ref: '../components/schemas/run_connector_subaction_issues.yaml' - - $ref: '../components/schemas/run_connector_subaction_issuetypes.yaml' - - $ref: '../components/schemas/run_connector_subaction_pushtoservice.yaml' - discriminator: - propertyName: subAction + $ref: '../components/schemas/run_connector_request.yaml' examples: runIndexConnectorRequest: $ref: '../components/examples/run_index_connector_request.yaml'