* [Connectors][API] Updated connectors with enabledAfterImport flag * fixed functional tests * added new field to connectors API docs * added update unit test * fixed test * renamed enableAfterImport to isMissingSecrets * removed onExport * revert the logic of true/false for isMissingSecrets * fixed test * fixed tests * added unit test * fixed docs * fixed import text and button labels * fixed import text * fixed text
74 lines
2 KiB
Text
74 lines
2 KiB
Text
[[update-connector-api]]
|
|
=== Update connector API
|
|
++++
|
|
<titleabbrev>Update connector</titleabbrev>
|
|
++++
|
|
|
|
Updates the attributes for an existing connector.
|
|
|
|
[[update-connector-api-request]]
|
|
==== Request
|
|
|
|
`PUT <kibana host>:<port>/api/actions/connector/<id>`
|
|
|
|
`PUT <kibana host>:<port>/s/<space_id>/api/actions/connector/<id>`
|
|
|
|
[[update-connector-api-params]]
|
|
==== Path parameters
|
|
|
|
`id`::
|
|
(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.
|
|
|
|
[[update-connector-api-request-body]]
|
|
==== Request body
|
|
|
|
`name`::
|
|
(Required, string) The new name of the connector.
|
|
|
|
`config`::
|
|
(Required, object) The new connector configuration. Configuration properties vary depending on the connector type. For information about the configuration properties, refer to <<action-types,Action and connector types>>.
|
|
|
|
`secrets`::
|
|
(Required, object) The updated secrets configuration for the connector. Secrets properties vary depending on the connector type. For information about the secrets configuration properties, refer to <<action-types,Action and connector types>>.
|
|
|
|
[[update-connector-api-codes]]
|
|
==== Response code
|
|
|
|
`200`::
|
|
Indicates a successful call.
|
|
|
|
[[update-connector-api-example]]
|
|
==== Example
|
|
|
|
[source,sh]
|
|
--------------------------------------------------
|
|
$ curl -X PUT api/actions/connector/c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
|
|
{
|
|
"name": "updated-connector",
|
|
"config": {
|
|
"index": "updated-index"
|
|
}
|
|
}'
|
|
--------------------------------------------------
|
|
// KIBANA
|
|
|
|
The API returns the following:
|
|
|
|
[source,sh]
|
|
--------------------------------------------------
|
|
{
|
|
"id": "c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad",
|
|
"connector_type_id": ".index",
|
|
"name": "updated-connector",
|
|
"config": {
|
|
"index": "updated-index",
|
|
"refresh": false,
|
|
"executionTimeField": null
|
|
},
|
|
"is_preconfigured": false,
|
|
"is_missing_secrets": false
|
|
}
|
|
--------------------------------------------------
|