[DOCS] Add server log connector details to connector APIs (#134409)

This commit is contained in:
Lisa Cawley 2022-06-16 19:07:21 -07:00 committed by GitHub
parent 75f786bf73
commit 03fe5d11b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 6 deletions

View file

@ -31,7 +31,7 @@ You must have `all` privileges for the *Actions and Connectors* feature in the
=== {api-request-body-title}
`config`::
(Required, object) The configuration for the connector. Configuration properties
(Required^*^, object) The configuration for the connector. Configuration properties
vary depending on the connector type. For example:
+
--
@ -68,12 +68,15 @@ For more information, refer to
{kibana-ref}/jira-action-type.html[{jira} connector and action].
====
This object is not required for server log connectors.
For more configuration properties, refer to <<action-types>>.
// end::connector-config[]
--
`connector_type_id`::
(Required, string) The connector type ID for the connector.
(Required, string) The connector type ID for the connector. For example,
`.index`, `.jira`, or `.server-log`.
`name`::
(Required, string) The display name for the connector.
@ -99,6 +102,8 @@ authentication.
`email`::
(Required, string) The account email for HTTP Basic authentication.
====
This object is not required for index or server log connectors.
// end::connector-secrets[]
--

View file

@ -34,17 +34,33 @@ If you use an index connector, you must also have `all`, `create`, `index`, or
=== {api-path-parms-title}
`id`::
(Required, string) The ID of the connector.
(Required, string) The ID of the connector.
`space_id`::
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
(Optional, string) An identifier for the space. If `space_id` is not provided in
the URL, the default space is used.
[role="child_attributes"]
[[execute-connector-api-request-body]]
=== {api-request-body-title}
`params`::
(Required, object) The parameters of the connector. Parameter properties vary depending on
the connector type. For information about the parameter properties, refer to <<action-types,Action and connector types>>.
(Required, object) The parameters of the connector. Parameter properties vary
depending on the connector type. For information about the parameter properties,
refer to <<action-types>>.
+
--
.Server log connectors
[%collapsible%open]
====
`level`::
(Optional, string) The log level of the message: `trace`, `debug`, `info`,
`warn`, `error`, or `fatal`. Defaults to `info`.
`message`::
(Required, string) The message to log.
====
--
[[execute-connector-api-codes]]
=== {api-response-codes-title}
@ -105,3 +121,24 @@ The API returns the following:
"connector_id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad"
}
--------------------------------------------------
Run a server log connector:
[source,sh]
--------------------------------------------------
POST api/actions/connector/7fc7b9a0-ecc9-11ec-8736-e7d63118c907/_execute
{
"params": {
"level": "warn",
"message": "Test warning message"
}
}
--------------------------------------------------
// KIBANA
The API returns the following:
[source,sh]
--------------------------------------------------
{"status":"ok","connector_id":"7fc7b9a0-ecc9-11ec-8736-e7d63118c907"}
--------------------------------------------------