mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
# Backport This will backport the following commits from `main` to `8.6`: - [Add open API specification for list connector types (#145951)](https://github.com/elastic/kibana/pull/145951) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Lisa Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2022-11-24T18:30:51Z","message":"Add open API specification for list connector types (#145951)","sha":"94b67781e8d56171a58b72ad2bb68171de4b67ea","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","docs","Feature:Actions/ConnectorTypes","v8.6.0","v8.7.0"],"number":145951,"url":"https://github.com/elastic/kibana/pull/145951","mergeCommit":{"message":"Add open API specification for list connector types (#145951)","sha":"94b67781e8d56171a58b72ad2bb68171de4b67ea"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/145951","number":145951,"mergeCommit":{"message":"Add open API specification for list connector types (#145951)","sha":"94b67781e8d56171a58b72ad2bb68171de4b67ea"}}]}] BACKPORT--> Co-authored-by: Lisa Cawley <lcawley@elastic.co>
This commit is contained in:
parent
ae23e97a67
commit
a08c594582
15 changed files with 705 additions and 10 deletions
|
@ -14,15 +14,18 @@ or a similar tool that can generate HTML output from OAS.
|
|||
. Generate HTML output. For example:
|
||||
|
||||
```
|
||||
openapi-generator-cli generate -g html -i ~/kibana/x-pack/plugins/cases/docs/openapi/bundled.yaml -o ~/kibana/docs/api-generated/cases -t ~/kibana/docs/api-generated/template
|
||||
openapi-generator-cli generate -g html -i $GIT_HOME/kibana/x-pack/plugins/cases/docs/openapi/bundled.yaml -o $GIT_HOME/kibana/docs/api-generated/cases -t $GIT_HOME/kibana/docs/api-generated/template
|
||||
|
||||
openapi-generator-cli generate -g html -i ~/kibana/x-pack/plugins/ml/common/openapi/ml_apis_v3.yaml -o ~/kibana/docs/api-generated/machine-learning -t ~/kibana/docs/api-generated/template
|
||||
openapi-generator-cli generate -g html -i $GIT_HOME/kibana/x-pack/plugins/actions/docs/openapi/bundled.yaml -o $GIT_HOME/kibana/docs/api-generated/connectors -t $GIT_HOME/kibana/docs/api-generated/template
|
||||
|
||||
openapi-generator-cli generate -g html -i $GIT_HOME/kibana/x-pack/plugins/ml/common/openapi/ml_apis_v3.yaml -o $GIT_HOME/kibana/docs/api-generated/machine-learning -t $GIT_HOME/kibana/docs/api-generated/template
|
||||
```
|
||||
|
||||
. Rename the output files. For example:
|
||||
```
|
||||
mv ~/kibana/docs/api-generated/cases/index.html case-apis-passthru.asciidoc
|
||||
mv ~/kibana/docs/api-generated/machine-learning/index.html ml-apis-passthru.adoc
|
||||
mv $GIT_HOME/kibana/docs/api-generated/cases/index.html $GIT_HOME/kibana/docs/api-generated/cases/case-apis-passthru.asciidoc
|
||||
mv $GIT_HOME/kibana/docs/api-generated/connectors/index.html $GIT_HOME/kibana/docs/api-generated/connectors/connector-apis-passthru.asciidoc
|
||||
mv $GIT_HOME/kibana/docs/api-generated/machine-learning/index.html $GIT_HOME/kibana/docs/api-generated/machine-learning/ml-apis-passthru.adoc
|
||||
```
|
||||
|
||||
. If you're creating a new set of API output, you will need to have a page that incorporates the output by using passthrough blocks. For more information, refer to [Asciidoctor docs](https://docs.asciidoctor.org/asciidoc/latest/pass/pass-block/)
|
||||
|
|
113
docs/api-generated/connectors/connector-apis-passthru.asciidoc
Normal file
113
docs/api-generated/connectors/connector-apis-passthru.asciidoc
Normal file
|
@ -0,0 +1,113 @@
|
|||
////
|
||||
This content is generated from the open API specification.
|
||||
Any modifications made to this file will be overwritten.
|
||||
////
|
||||
|
||||
++++
|
||||
<div class="openapi">
|
||||
<h2>Access</h2>
|
||||
<ol>
|
||||
<li>APIKey KeyParamName:ApiKey KeyInQuery:false KeyInHeader:true</li>
|
||||
<li>HTTP Basic Authentication</li>
|
||||
</ol>
|
||||
|
||||
<h2><a name="__Methods">Methods</a></h2>
|
||||
[ Jump to <a href="#__Models">Models</a> ]
|
||||
|
||||
<h3>Table of Contents </h3>
|
||||
<div class="method-summary"></div>
|
||||
<h4><a href="#Cases">Cases</a></h4>
|
||||
<ul>
|
||||
<li><a href="#getConnectorTypes"><code><span class="http-method">get</span> /s/{spaceId}/api/actions/connector_types</code></a></li>
|
||||
</ul>
|
||||
|
||||
<h1><a name="Cases">Cases</a></h1>
|
||||
<div class="method"><a name="getConnectorTypes"/>
|
||||
<div class="method-path">
|
||||
<a class="up" href="#__Methods">Up</a>
|
||||
<pre class="get"><code class="huge"><span class="http-method">get</span> /s/{spaceId}/api/actions/connector_types</code></pre></div>
|
||||
<div class="method-summary">Retrieves a list of all connector types. (<span class="nickname">getConnectorTypes</span>)</div>
|
||||
<div class="method-notes">You do not need any Kibana feature privileges to run this API.</div>
|
||||
|
||||
<h3 class="field-label">Path parameters</h3>
|
||||
<div class="field-items">
|
||||
<div class="param">spaceId (required)</div>
|
||||
|
||||
<div class="param-desc"><span class="param-type">Path Parameter</span> — An identifier for the space. If <code>/s/</code> and the identifier are omitted from the path, the default space is used. default: null </div>
|
||||
</div> <!-- field-items -->
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 class="field-label">Query parameters</h3>
|
||||
<div class="field-items">
|
||||
<div class="param">feature_id (optional)</div>
|
||||
|
||||
<div class="param-desc"><span class="param-type">Query Parameter</span> — A filter to limit the retrieved connector types to those that support a specific feature (such as alerting or cases). default: null </div>
|
||||
</div> <!-- field-items -->
|
||||
|
||||
|
||||
<h3 class="field-label">Return type</h3>
|
||||
<div class="return-type">
|
||||
array[<a href="#getConnectorTypes_200_response_inner">getConnectorTypes_200_response_inner</a>]
|
||||
|
||||
</div>
|
||||
|
||||
<!--Todo: process Response Object and its headers, schema, examples -->
|
||||
|
||||
<h3 class="field-label">Example data</h3>
|
||||
<div class="example-data-content-type">Content-Type: application/json</div>
|
||||
<pre class="example"><code>{
|
||||
"supported_feature_ids" : [ "alerting", "uptime", "siem" ],
|
||||
"name" : "Index",
|
||||
"enabled_in_license" : true,
|
||||
"id" : ".index",
|
||||
"enabled_in_config" : true,
|
||||
"minimum_license_required" : "basic",
|
||||
"enabled" : true
|
||||
}</code></pre>
|
||||
|
||||
<h3 class="field-label">Produces</h3>
|
||||
This API call produces the following media types according to the <span class="header">Accept</span> request header;
|
||||
the media type will be conveyed by the <span class="header">Content-Type</span> response header.
|
||||
<ul>
|
||||
<li><code>application/json</code></li>
|
||||
</ul>
|
||||
|
||||
<h3 class="field-label">Responses</h3>
|
||||
<h4 class="field-label">200</h4>
|
||||
Indicates a successful call.
|
||||
|
||||
</div> <!-- method -->
|
||||
<hr/>
|
||||
|
||||
<h2><a name="__Models">Models</a></h2>
|
||||
[ Jump to <a href="#__Methods">Methods</a> ]
|
||||
|
||||
<h3>Table of Contents</h3>
|
||||
<ol>
|
||||
<li><a href="#features"><code>features</code> - </a></li>
|
||||
<li><a href="#getConnectorTypes_200_response_inner"><code>getConnectorTypes_200_response_inner</code> - </a></li>
|
||||
</ol>
|
||||
|
||||
<div class="model">
|
||||
<h3><a name="features"><code>features</code> - </a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<div class='model-description'>The feature that uses the connector. Valid values are <code>alerting</code>, <code>cases</code>, <code>uptime</code>, and <code>siem</code>.</div>
|
||||
<div class="field-items">
|
||||
</div> <!-- field-items -->
|
||||
</div>
|
||||
<div class="model">
|
||||
<h3><a name="getConnectorTypes_200_response_inner"><code>getConnectorTypes_200_response_inner</code> - </a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<div class='model-description'></div>
|
||||
<div class="field-items">
|
||||
<div class="param">enabled (optional)</div><div class="param-desc"><span class="param-type"><a href="#boolean">Boolean</a></span> Indicates whether the connector type is enabled in Kibana. </div>
|
||||
<div class="param">enabled_in_config (optional)</div><div class="param-desc"><span class="param-type"><a href="#boolean">Boolean</a></span> Indicates whether the connector type is enabled in the Kibana <code>.yml</code> file. </div>
|
||||
<div class="param">enabled_in_license (optional)</div><div class="param-desc"><span class="param-type"><a href="#boolean">Boolean</a></span> Indicates whether the connector is enabled in the license. </div>
|
||||
<div class="param">id (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The unique identifier for the connector type. </div>
|
||||
<div class="param">minimum_license_required (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The license that is required to use the connector type. </div>
|
||||
<div class="param">name (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The name of the connector type. </div>
|
||||
<div class="param">supported_feature_ids (optional)</div><div class="param-desc"><span class="param-type"><a href="#features">array[features]</a></span> The Kibana features that are supported by the connector type. </div>
|
||||
</div> <!-- field-items -->
|
||||
</div>
|
||||
</div>
|
||||
++++
|
10
docs/api-generated/connectors/connector-apis.asciidoc
Normal file
10
docs/api-generated/connectors/connector-apis.asciidoc
Normal file
|
@ -0,0 +1,10 @@
|
|||
[[connector-apis]]
|
||||
== Connector APIs
|
||||
|
||||
preview::[]
|
||||
|
||||
////
|
||||
This file includes content that has been generated from https://github.com/elastic/kibana/tree/main/x-pack/plugins/actions/docs/openapi. Any modifications required must be done in that open API specification.
|
||||
////
|
||||
|
||||
include::connector-apis-passthru.asciidoc[]
|
|
@ -26,7 +26,7 @@ include::actions-and-connectors/create.asciidoc[leveloffset=+1]
|
|||
include::actions-and-connectors/delete.asciidoc[leveloffset=+1]
|
||||
include::actions-and-connectors/get.asciidoc[leveloffset=+1]
|
||||
include::actions-and-connectors/get_all.asciidoc[leveloffset=+1]
|
||||
include::actions-and-connectors/list.asciidoc[]
|
||||
include::actions-and-connectors/list.asciidoc[leveloffset=+1]
|
||||
include::actions-and-connectors/execute.asciidoc[leveloffset=+1]
|
||||
include::actions-and-connectors/update.asciidoc[leveloffset=+1]
|
||||
include::actions-and-connectors/legacy/index.asciidoc[]
|
||||
|
|
|
@ -1,13 +1,19 @@
|
|||
[[list-connector-types-api]]
|
||||
=== List connector types API
|
||||
== List connector types API
|
||||
++++
|
||||
<titleabbrev>List all connector types</titleabbrev>
|
||||
++++
|
||||
|
||||
Retrieves a list of all connector types.
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
For the most up-to-date API details, refer to the
|
||||
{kib-repo}/tree/{branch}/x-pack/plugins/actions/docs/openapi[open API specification]. For a preview, check out <<connector-apis>>.
|
||||
====
|
||||
|
||||
[[list-connector-types-api-request]]
|
||||
==== {api-request-title}
|
||||
=== {api-request-title}
|
||||
|
||||
`GET <kibana host>:<port>/api/actions/connector_types`
|
||||
|
||||
|
@ -21,7 +27,7 @@ You do not need any <<kibana-feature-privileges,{kib} feature privileges>> to
|
|||
run this API.
|
||||
|
||||
[[list-connector-types-api-path-params]]
|
||||
==== {api-path-parms-title}
|
||||
=== {api-path-parms-title}
|
||||
|
||||
`space_id`::
|
||||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
@ -33,13 +39,13 @@ run this API.
|
|||
(Optional, string) Filters list of connector types to those that support the feature id.
|
||||
|
||||
[[list-connector-types-api-codes]]
|
||||
==== {api-response-codes-title}
|
||||
=== {api-response-codes-title}
|
||||
|
||||
`200`::
|
||||
Indicates a successful call.
|
||||
|
||||
[[list-connector-types-api-example]]
|
||||
==== {api-examples-title}
|
||||
=== {api-examples-title}
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
|
|
|
@ -12,4 +12,5 @@ version of the specification is 3.0. For more information, go to https://openapi
|
|||
--
|
||||
|
||||
include::api-generated/cases/case-apis.asciidoc[]
|
||||
include::api-generated/connectors/connector-apis.asciidoc[]
|
||||
include::api-generated/machine-learning/ml-apis.asciidoc[]
|
34
x-pack/plugins/actions/docs/openapi/README.md
Normal file
34
x-pack/plugins/actions/docs/openapi/README.md
Normal file
|
@ -0,0 +1,34 @@
|
|||
# OpenAPI (Experimental)
|
||||
|
||||
The current self-contained spec file is [as JSON](https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/cases/common/openapi/bundled.json) or [as YAML](https://raw.githubusercontent.com/elastic/kibana/master/x-pack/plugins/cases/common/openapi/bundled.yaml) and can be used for online tools like those found at https://openapi.tools/.
|
||||
This spec is experimental and may be incomplete or change later.
|
||||
|
||||
A guide about the openApi specification can be found at [https://swagger.io/docs/specification/about/](https://swagger.io/docs/specification/about/).
|
||||
|
||||
## The `openapi` folder
|
||||
|
||||
* `entrypoint.yaml` is the overview file which pulls together all the paths and components.
|
||||
* [Paths](paths/README.md): this defines each endpoint. A path can have one operation per http method.
|
||||
* [Components](components/README.md): Reusable components
|
||||
|
||||
## Tools
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
You can run additional linting with the following command:
|
||||
|
||||
```
|
||||
npx @redocly/cli lint bundled.json
|
||||
```
|
216
x-pack/plugins/actions/docs/openapi/bundled.json
Normal file
216
x-pack/plugins/actions/docs/openapi/bundled.json
Normal file
|
@ -0,0 +1,216 @@
|
|||
{
|
||||
"openapi": "3.0.1",
|
||||
"info": {
|
||||
"title": "Connectors",
|
||||
"description": "OpenAPI schema for Connectors endpoints",
|
||||
"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": {
|
||||
"/s/{spaceId}/api/actions/connector_types": {
|
||||
"get": {
|
||||
"summary": "Retrieves a list of all connector types.",
|
||||
"operationId": "getConnectorTypes",
|
||||
"description": "You do not need any Kibana feature privileges to run this API.\n",
|
||||
"tags": [
|
||||
"cases"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/components/parameters/space_id"
|
||||
},
|
||||
{
|
||||
"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": {
|
||||
"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 `.yml` file.",
|
||||
"example": true
|
||||
},
|
||||
"enabled_in_license": {
|
||||
"type": "boolean",
|
||||
"description": "Indicates whether the connector is enabled in the license.",
|
||||
"example": true
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The unique identifier for the connector type.",
|
||||
"example": ".index"
|
||||
},
|
||||
"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 Kibana features that are supported by the connector type.",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/features"
|
||||
},
|
||||
"example": [
|
||||
"alerting",
|
||||
"uptime",
|
||||
"siem"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"getConnectorTypesResponse": {
|
||||
"$ref": "#/components/examples/get_connector_types_response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://localhost:5601"
|
||||
}
|
||||
]
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
"url": "https://localhost:5601"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"securitySchemes": {
|
||||
"basicAuth": {
|
||||
"type": "http",
|
||||
"scheme": "basic"
|
||||
},
|
||||
"apiKeyAuth": {
|
||||
"type": "apiKey",
|
||||
"in": "header",
|
||||
"name": "ApiKey"
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schemas": {
|
||||
"features": {
|
||||
"type": "string",
|
||||
"description": "The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`.\n",
|
||||
"enum": [
|
||||
"alerting",
|
||||
"cases",
|
||||
"uptime",
|
||||
"siem"
|
||||
]
|
||||
}
|
||||
},
|
||||
"examples": {
|
||||
"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"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"basicAuth": []
|
||||
},
|
||||
{
|
||||
"apiKeyAuth": []
|
||||
}
|
||||
]
|
||||
}
|
146
x-pack/plugins/actions/docs/openapi/bundled.yaml
Normal file
146
x-pack/plugins/actions/docs/openapi/bundled.yaml
Normal file
|
@ -0,0 +1,146 @@
|
|||
openapi: 3.0.1
|
||||
info:
|
||||
title: Connectors
|
||||
description: OpenAPI schema for Connectors endpoints
|
||||
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:
|
||||
/s/{spaceId}/api/actions/connector_types:
|
||||
get:
|
||||
summary: Retrieves a list of all connector types.
|
||||
operationId: getConnectorTypes
|
||||
description: |
|
||||
You do not need any Kibana feature privileges to run this API.
|
||||
tags:
|
||||
- cases
|
||||
parameters:
|
||||
- $ref: '#/components/parameters/space_id'
|
||||
- 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:
|
||||
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 `.yml` file.
|
||||
example: true
|
||||
enabled_in_license:
|
||||
type: boolean
|
||||
description: Indicates whether the connector is enabled in the license.
|
||||
example: true
|
||||
id:
|
||||
type: string
|
||||
description: The unique identifier for the connector type.
|
||||
example: .index
|
||||
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 Kibana features that are supported by the connector type.
|
||||
items:
|
||||
$ref: '#/components/schemas/features'
|
||||
example:
|
||||
- alerting
|
||||
- uptime
|
||||
- siem
|
||||
examples:
|
||||
getConnectorTypesResponse:
|
||||
$ref: '#/components/examples/get_connector_types_response'
|
||||
servers:
|
||||
- url: https://localhost:5601
|
||||
servers:
|
||||
- url: https://localhost:5601
|
||||
components:
|
||||
securitySchemes:
|
||||
basicAuth:
|
||||
type: http
|
||||
scheme: basic
|
||||
apiKeyAuth:
|
||||
type: apiKey
|
||||
in: header
|
||||
name: ApiKey
|
||||
parameters:
|
||||
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
|
||||
schemas:
|
||||
features:
|
||||
type: string
|
||||
description: |
|
||||
The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`.
|
||||
enum:
|
||||
- alerting
|
||||
- cases
|
||||
- uptime
|
||||
- siem
|
||||
examples:
|
||||
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
|
||||
security:
|
||||
- basicAuth: []
|
||||
- apiKeyAuth: []
|
|
@ -0,0 +1,31 @@
|
|||
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
|
|
@ -0,0 +1,5 @@
|
|||
schema:
|
||||
type: string
|
||||
in: header
|
||||
name: kbn-xsrf
|
||||
required: true
|
|
@ -0,0 +1,7 @@
|
|||
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
|
|
@ -0,0 +1,8 @@
|
|||
type: string
|
||||
description: >
|
||||
The feature that uses the connector. Valid values are `alerting`, `cases`, `uptime`, and `siem`.
|
||||
enum:
|
||||
- alerting
|
||||
- cases
|
||||
- uptime
|
||||
- siem
|
51
x-pack/plugins/actions/docs/openapi/entrypoint.yaml
Normal file
51
x-pack/plugins/actions/docs/openapi/entrypoint.yaml
Normal file
|
@ -0,0 +1,51 @@
|
|||
openapi: 3.0.1
|
||||
info:
|
||||
title: Connectors
|
||||
description: OpenAPI schema for Connectors endpoints
|
||||
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:
|
||||
# '/s/{spaceId}/api/actions/connector':
|
||||
# $ref: 'paths/s@{spaceid}@api@actions@connector.yaml'
|
||||
# '/s/{spaceId}/api/actions/connector/{connectorId}':
|
||||
# $ref: 'paths/s@{spaceid}@api@actions@connector@{connectorid}.yaml'
|
||||
# '/s/{spaceId}/api/actions/connectors':
|
||||
# $ref: paths/s@{spaceid}@api@actions@connectors.yaml
|
||||
'/s/{spaceId}/api/actions/connector_types':
|
||||
$ref: paths/s@{spaceid}@api@actions@connector_types.yaml
|
||||
# '/s/{spaceId}/api/actions/connector/{connectorId}/_execute':
|
||||
# $ref: paths/s@{spaceid}@api@actions@connector@{connectorid}@_execute.yaml
|
||||
# '/s/{spaceId}/api/actions/action/{actionId}':
|
||||
# $ref: 'paths/s@{spaceid}@api@actions@action@{actionid}.yaml'
|
||||
# '/s/{spaceId}/api/actions':
|
||||
# $ref: 'paths/s@{spaceid}@api@actions.yaml'
|
||||
# '/s/{spaceId}/api/actions/list_action_types':
|
||||
# $ref: 'paths/s@{spaceid}@api@actions@list_action_types.yaml'
|
||||
# '/s/{spaceId}/api/actions/action':
|
||||
# $ref: 'paths/s@{spaceid}@api@actions@action.yaml'
|
||||
# '/s/{spaceId}/api/actions/action/{actionId}':
|
||||
# $ref: 'paths/s@{spaceid}@api@actions@action@{actionid}.yaml'
|
||||
# '/s/{spaceId}/api/actions/action/{actionId}/_execute':
|
||||
# $ref: 'paths/s@{spaceid}@api@actions@action@{actionid}@_execute.yaml'
|
||||
components:
|
||||
securitySchemes:
|
||||
basicAuth:
|
||||
type: http
|
||||
scheme: basic
|
||||
apiKeyAuth:
|
||||
type: apiKey
|
||||
in: header
|
||||
name: ApiKey
|
||||
security:
|
||||
- basicAuth: []
|
||||
- apiKeyAuth: []
|
|
@ -0,0 +1,64 @@
|
|||
get:
|
||||
summary: Retrieves a list of all connector types.
|
||||
operationId: getConnectorTypes
|
||||
description: >
|
||||
You do not need any Kibana feature privileges to run this API.
|
||||
tags:
|
||||
- cases
|
||||
parameters:
|
||||
- $ref: '../components/parameters/space_id.yaml'
|
||||
- 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:
|
||||
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 `.yml` file.
|
||||
example: true
|
||||
enabled_in_license:
|
||||
type: boolean
|
||||
description: Indicates whether the connector is enabled in the license.
|
||||
example: true
|
||||
id:
|
||||
type: string
|
||||
description: The unique identifier for the connector type.
|
||||
example: .index
|
||||
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 Kibana features that are supported by the connector type.
|
||||
items:
|
||||
$ref: '../components/schemas/features.yaml'
|
||||
example:
|
||||
- alerting
|
||||
- uptime
|
||||
- siem
|
||||
examples:
|
||||
getConnectorTypesResponse:
|
||||
$ref: '../components/examples/get_connector_types_response.yaml'
|
||||
servers:
|
||||
- url: https://localhost:5601
|
||||
servers:
|
||||
- url: https://localhost:5601
|
Loading…
Add table
Add a link
Reference in a new issue