Skip to content

Commit

Permalink
[DOCS] Generate API documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl committed Jan 4, 2023
1 parent 0d5d4b7 commit 833d082
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 5 deletions.
75 changes: 73 additions & 2 deletions docs/api-generated/connectors/connector-apis-passthru.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,69 @@ Any modifications made to this file will be overwritten.
<h3>Table of Contents </h3>
<div class="method-summary"></div>
<h4><a href="#Cases">Cases</a></h4>
<h4><a href="#Connectors">Connectors</a></h4>
<ul>
<li><a href="#getConnector"><code><span class="http-method">get</span> /s/{spaceId}/api/actions/connector/{connectorId}</code></a></li>
<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>
<h1><a name="Connectors">Connectors</a></h1>
<div class="method"><a name="getConnector"/>
<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/{connectorId}</code></pre></div>
<div class="method-summary">Retrieves a connector by ID. (<span class="nickname">getConnector</span>)</div>
<div class="method-notes">You must have <code>read</code> privileges for the <strong>Actions and Connectors</strong> feature in the <strong>Management</strong> section of the Kibana feature privileges.</div>
<h3 class="field-label">Path parameters</h3>
<div class="field-items">
<div class="param">connectorId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the connector. default: null </div><div class="param">spaceId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; 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">Return type</h3>
<div class="return-type">
<a href="#getConnector_200_response">getConnector_200_response</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>{
"is_missing_secrets" : false,
"is_deprecated" : false,
"is_preconfigured" : false,
"name" : "my-connector",
"id" : "b0766e10-d190-11ec-b04c-776c77d14fca",
"config" : {
"key" : ""
},
"connector_type_id" : ".server-log"
}</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.
<a href="#getConnector_200_response">getConnector_200_response</a>
</div> <!-- method -->
<hr/>
<div class="method"><a name="getConnectorTypes"/>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>
Expand Down Expand Up @@ -88,6 +145,7 @@ Any modifications made to this file will be overwritten.
<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>
<li><a href="#getConnector_200_response"><code>getConnector_200_response</code> - </a></li>
</ol>
<div class="model">
Expand All @@ -109,5 +167,18 @@ Any modifications made to this file will be overwritten.
<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 class="model">
<h3><a name="getConnector_200_response"><code>getConnector_200_response</code> - </a> <a class="up" href="#__Models">Up</a></h3>
<div class='model-description'></div>
<div class="field-items">
<div class="param">config </div><div class="param-desc"><span class="param-type"><a href="#AnyType">map[String, oas_any_type_not_mapped]</a></span> The configuration for the connector. Configuration properties vary depending on the connector type. </div>
<div class="param">connector_type_id </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The connector type ID for the connector. For example, <code>.cases-webhook</code>, <code>.index</code>, <code>.jira</code>, <code>.opsgenie</code>, <code>.server-log</code>, or <code>.servicenow-itom</code>. </div>
<div class="param">id </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The identifier for the connector. </div>
<div class="param">is_deprecated </div><div class="param-desc"><span class="param-type"><a href="#boolean">Boolean</a></span> Indicates whether the connector type is deprecated. </div>
<div class="param">is_missing_secrets </div><div class="param-desc"><span class="param-type"><a href="#boolean">Boolean</a></span> Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. </div>
<div class="param">is_preconfigured </div><div class="param-desc"><span class="param-type"><a href="#boolean">Boolean</a></span> Indicates whether it is a preconfigured connector. </div>
<div class="param">name </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The display name for the connector. </div>
</div> <!-- field-items -->
</div>
</div>
++++
6 changes: 6 additions & 0 deletions docs/api/actions-and-connectors/get.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@

Retrieves a connector by ID.

[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>>.
====

[discrete]
[[get-connector-api-request]]
=== {api-request-title}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/actions/docs/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"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.\n",
"description": "You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n",
"tags": [
"connectors"
],
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/actions/docs/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ paths:
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.
You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.
tags:
- connectors
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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.
You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.
tags:
- connectors
parameters:
Expand Down

0 comments on commit 833d082

Please sign in to comment.