mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[DOCS] Add prerequisites for update and execute connector APIs (#133684)
This commit is contained in:
parent
d732ebec91
commit
fab37c2f8f
3 changed files with 52 additions and 28 deletions
|
@ -7,14 +7,24 @@
|
|||
Executes a connector by ID.
|
||||
|
||||
[[execute-connector-api-request]]
|
||||
==== Request
|
||||
==== {api-request-title}
|
||||
|
||||
`POST <kibana host>:<port>/api/actions/connector/<id>/_execute`
|
||||
|
||||
`POST <kibana host>:<port>/s/<space_id>/api/actions/connector/<id>/_execute`
|
||||
|
||||
[discrete]
|
||||
=== {api-prereq-title}
|
||||
|
||||
You must have `read` privileges for the *Actions and Connectors* feature in the
|
||||
*Management* section of the
|
||||
<<kibana-feature-privileges,{kib} feature privileges>>.
|
||||
|
||||
If you use an index connector, you must also have `all`, `create`, `index`, or
|
||||
`write` {ref}/security-privileges.html[indices privileges].
|
||||
|
||||
[[execute-connector-api-params]]
|
||||
==== Path parameters
|
||||
==== {api-path-parms-title}
|
||||
|
||||
`id`::
|
||||
(Required, string) The ID of the connector.
|
||||
|
@ -23,24 +33,26 @@ Executes a connector by ID.
|
|||
(Optional, string) An identifier for the space. If `space_id` is not provided in the URL, the default space is used.
|
||||
|
||||
[[execute-connector-api-request-body]]
|
||||
==== 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>>.
|
||||
|
||||
[[execute-connector-api-codes]]
|
||||
==== Response code
|
||||
==== {api-response-codes-title}
|
||||
|
||||
`200`::
|
||||
Indicates a successful call.
|
||||
|
||||
[[execute-connector-api-example]]
|
||||
==== Example
|
||||
==== {api-examples-title}
|
||||
|
||||
Run an index connector:
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
$ curl -X POST api/actions/connector/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad/_execute -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
|
||||
POST api/actions/connector/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad/_execute
|
||||
{
|
||||
"params": {
|
||||
"documents": [
|
||||
|
@ -51,7 +63,7 @@ $ curl -X POST api/actions/connector/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad/_execu
|
|||
}
|
||||
]
|
||||
}
|
||||
}'
|
||||
}
|
||||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
|
@ -62,7 +74,7 @@ The API returns the following:
|
|||
{
|
||||
"status": "ok",
|
||||
"data": {
|
||||
"took": 197,
|
||||
"took": 10,
|
||||
"errors": false,
|
||||
"items": [
|
||||
{
|
||||
|
@ -76,7 +88,7 @@ The API returns the following:
|
|||
"successful": 1,
|
||||
"failed": 0
|
||||
},
|
||||
"_seq_no": 0,
|
||||
"_seq_no": 7,
|
||||
"_primary_term": 1,
|
||||
"status": 201
|
||||
}
|
||||
|
|
|
@ -7,30 +7,37 @@
|
|||
Retrieves a list of all connector types.
|
||||
|
||||
[[list-connector-types-api-request]]
|
||||
==== Request
|
||||
==== {api-request-title}
|
||||
|
||||
`GET <kibana host>:<port>/api/actions/connector_types`
|
||||
|
||||
`GET <kibana host>:<port>/s/<space_id>/api/actions/connector_types`
|
||||
|
||||
|
||||
[discrete]
|
||||
=== {api-prereq-title}
|
||||
|
||||
You do not need any <<kibana-feature-privileges,{kib} feature privileges>> to
|
||||
run this API.
|
||||
|
||||
[[list-connector-types-api-path-params]]
|
||||
==== Path parameters
|
||||
==== {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.
|
||||
|
||||
[[list-connector-types-api-codes]]
|
||||
==== Response code
|
||||
==== {api-response-codes-title}
|
||||
|
||||
`200`::
|
||||
Indicates a successful call.
|
||||
|
||||
[[list-connector-types-api-example]]
|
||||
==== Example
|
||||
==== {api-examples-title}
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
$ curl -X GET api/actions/connector_types
|
||||
GET api/actions/connector_types
|
||||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
|
@ -45,7 +52,7 @@ The API returns the following:
|
|||
"minimum_license_required": "gold", <3>
|
||||
"enabled": false, <4>
|
||||
"enabled_in_config": true, <5>
|
||||
"enabled_in_license": false <6>
|
||||
"enabled_in_license": true <6>
|
||||
},
|
||||
{
|
||||
"id": ".index",
|
||||
|
@ -54,14 +61,13 @@ The API returns the following:
|
|||
"enabled": true,
|
||||
"enabled_in_config": true,
|
||||
"enabled_in_license": true
|
||||
}
|
||||
},
|
||||
...
|
||||
]
|
||||
--------------------------------------------------
|
||||
|
||||
|
||||
<1> `id` - The unique ID of the connector type.
|
||||
<2> `name` - The name of the connector type.
|
||||
<3> `minimum_license_required` - The license required to use the connector type.
|
||||
<4> `enabled` - Specifies if the connector type is enabled or disabled in {kib}.
|
||||
<5> `enabled_in_config` - Specifies if the connector type is enabled or enabled in the {kib} .yml file.
|
||||
<5> `enabled_in_config` - Specifies if the connector type is enabled or enabled in the {kib} `.yml` file.
|
||||
<6> `enabled_in_license` - Specifies if the connector type is enabled or disabled in the license.
|
||||
|
|
|
@ -4,17 +4,24 @@
|
|||
<titleabbrev>Update connector</titleabbrev>
|
||||
++++
|
||||
|
||||
Updates the attributes for an existing connector.
|
||||
Updates the attributes for a connector.
|
||||
|
||||
[[update-connector-api-request]]
|
||||
=== Request
|
||||
=== {api-request-title}
|
||||
|
||||
`PUT <kibana host>:<port>/api/actions/connector/<id>`
|
||||
|
||||
`PUT <kibana host>:<port>/s/<space_id>/api/actions/connector/<id>`
|
||||
|
||||
[discrete]
|
||||
=== {api-prereq-title}
|
||||
|
||||
You must have `all` privileges for the *Actions and Connectors* feature in the
|
||||
*Management* section of the
|
||||
<<kibana-feature-privileges,{kib} feature privileges>>.
|
||||
|
||||
[[update-connector-api-params]]
|
||||
=== Path parameters
|
||||
=== {api-path-parms-title}
|
||||
|
||||
`id`::
|
||||
(Required, string) The ID of the connector.
|
||||
|
@ -24,7 +31,7 @@ Updates the attributes for an existing connector.
|
|||
|
||||
[role="child_attributes"]
|
||||
[[update-connector-api-request-body]]
|
||||
=== Request body
|
||||
=== {api-request-body-title}
|
||||
|
||||
`config`::
|
||||
(Required, object) The new connector configuration. Configuration properties
|
||||
|
@ -47,25 +54,24 @@ secrets configuration properties, refer to
|
|||
include::create.asciidoc[tag=connector-secrets]
|
||||
--
|
||||
|
||||
|
||||
[[update-connector-api-codes]]
|
||||
=== Response code
|
||||
=== {api-response-codes-title}
|
||||
|
||||
`200`::
|
||||
Indicates a successful call.
|
||||
|
||||
[[update-connector-api-example]]
|
||||
=== Example
|
||||
=== {api-examples-title}
|
||||
|
||||
[source,sh]
|
||||
--------------------------------------------------
|
||||
$ curl -X PUT api/actions/connector/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
|
||||
PUT api/actions/connector/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad
|
||||
{
|
||||
"name": "updated-connector",
|
||||
"config": {
|
||||
"index": "updated-index"
|
||||
}
|
||||
}'
|
||||
}
|
||||
--------------------------------------------------
|
||||
// KIBANA
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue