mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
105 lines
3 KiB
Text
105 lines
3 KiB
Text
[[update-connector-pipeline-api]]
|
|
=== Update connector pipeline API
|
|
++++
|
|
<titleabbrev>Update connector pipeline</titleabbrev>
|
|
++++
|
|
|
|
beta::[]
|
|
|
|
Updates the `pipeline` configuration of a connector.
|
|
|
|
When you create a new connector, the configuration of an <<ingest-pipeline-search-details-generic-reference, ingest pipeline>> is populated with default settings.
|
|
|
|
To get started with Connector APIs, check out <<es-connectors-tutorial-api, our tutorial>>.
|
|
|
|
|
|
[[update-connector-pipeline-api-request]]
|
|
==== {api-request-title}
|
|
|
|
`PUT _connector/<connector_id>/_pipeline`
|
|
|
|
[[update-connector-pipeline-api-prereq]]
|
|
==== {api-prereq-title}
|
|
|
|
* To sync data using self-managed connectors, you need to deploy the <<es-connectors-deploy-connector-service,Elastic connector service>>. on your own infrastructure. This service runs automatically on Elastic Cloud for Elastic managed connectors.
|
|
* The `connector_id` parameter should reference an existing connector.
|
|
|
|
[[update-connector-pipeline-api-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`<connector_id>`::
|
|
(Required, string)
|
|
|
|
[role="child_attributes"]
|
|
[[update-connector-pipeline-api-request-body]]
|
|
==== {api-request-body-title}
|
|
|
|
`pipeline`::
|
|
(Required, object) The pipeline configuration of the connector. The pipeline determines how data is processed during ingestion into Elasticsearch.
|
|
|
|
Pipeline configuration must include the following attributes:
|
|
|
|
- `extract_binary_content` (Required, boolean) A flag indicating whether to extract binary content during ingestion.
|
|
|
|
- `name` (Required, string) The name of the ingest pipeline.
|
|
|
|
- `reduce_whitespace` (Required, boolean) A flag indicating whether to reduce extra whitespace in the ingested content.
|
|
|
|
- `run_ml_inference` (Required, boolean) A flag indicating whether to run machine learning inference on the ingested content.
|
|
|
|
|
|
[[update-connector-pipeline-api-response-codes]]
|
|
==== {api-response-codes-title}
|
|
|
|
`200`::
|
|
Connector `pipeline` field was 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-pipeline-api-example]]
|
|
==== {api-examples-title}
|
|
|
|
The following example updates the `pipeline` property 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/_pipeline
|
|
{
|
|
"pipeline": {
|
|
"extract_binary_content": true,
|
|
"name": "my-connector-pipeline",
|
|
"reduce_whitespace": true,
|
|
"run_ml_inference": true
|
|
}
|
|
}
|
|
----
|
|
|
|
[source,console-result]
|
|
----
|
|
{
|
|
"result": "updated"
|
|
}
|
|
----
|