mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 07:37:19 -04:00
92 lines
2.3 KiB
Text
92 lines
2.3 KiB
Text
[[update-connector-name-description-api]]
|
|
=== Update connector name and description API
|
|
++++
|
|
<titleabbrev>Update connector name and description</titleabbrev>
|
|
++++
|
|
|
|
beta::[]
|
|
|
|
|
|
Updates the `name` and `description` fields of a connector.
|
|
|
|
To get started with Connector APIs, check out the {enterprise-search-ref}/connectors-tutorial-api.html[tutorial^].
|
|
|
|
[[update-connector-name-description-api-request]]
|
|
==== {api-request-title}
|
|
|
|
`PUT _connector/<connector_id>/_name`
|
|
|
|
[[update-connector-name-description-api-prereq]]
|
|
==== {api-prereq-title}
|
|
|
|
* To sync data using self-managed connectors, you need to deploy the {enterprise-search-ref}/build-connector.html[Elastic connector service] on your own infrastructure. This service runs automatically on Elastic Cloud for native connectors.
|
|
* The `connector_id` parameter should reference an existing connector.
|
|
|
|
[[update-connector-name-description-api-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`<connector_id>`::
|
|
(Required, string)
|
|
|
|
[role="child_attributes"]
|
|
[[update-connector-name-description-api-request-body]]
|
|
==== {api-request-body-title}
|
|
|
|
`name`::
|
|
(Required, string) Name of the connector.
|
|
|
|
`description`::
|
|
(Optional, string) Description of the connector.
|
|
|
|
|
|
[[update-connector-name-description-api-response-codes]]
|
|
==== {api-response-codes-title}
|
|
|
|
`200`::
|
|
Connector `name` and `description` fields were successfully updated.
|
|
|
|
`400`::
|
|
The `connector_id` was not provided or the request payload was malformed.
|
|
|
|
`404` (Missing resources)::
|
|
No connector matching `connector_id` could be found.
|
|
|
|
[[update-connector-name-description-api-example]]
|
|
==== {api-examples-title}
|
|
|
|
The following example updates the `name` and `description` fields for the connector with ID `my-connector`:
|
|
|
|
////
|
|
[source, console]
|
|
--------------------------------------------------
|
|
PUT _connector/my-connector
|
|
{
|
|
"index_name": "search-google-drive",
|
|
"name": "My Connector",
|
|
"service_type": "google_drive"
|
|
}
|
|
--------------------------------------------------
|
|
// TESTSETUP
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
DELETE _connector/my-connector
|
|
--------------------------------------------------
|
|
// TEARDOWN
|
|
////
|
|
|
|
[source,console]
|
|
----
|
|
PUT _connector/my-connector/_name
|
|
{
|
|
"name": "Custom connector",
|
|
"description": "This is my customized connector"
|
|
}
|
|
----
|
|
|
|
[source,console-result]
|
|
----
|
|
{
|
|
"result": "updated"
|
|
}
|
|
----
|