Update connector pipeline API

Update connector pipeline API

This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.

New API reference

For the most up-to-date API details, refer to Connector APIs.

Updates the pipeline configuration of a connector.

When you create a new connector, the configuration of an ingest pipeline is populated with default settings.

To get started with Connector APIs, check out our tutorial.

Request

PUT _connector/<connector_id>/_pipeline

Prerequisites

  • To sync data using self-managed connectors, you need to deploy the 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.

Path parameters

<connector_id>

(Required, string)

Request body

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.

Response codes

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.

Examples

The following example updates the pipeline property for the connector with ID my-connector:

  1. resp = client.connector.update_pipeline(
  2. connector_id="my-connector",
  3. pipeline={
  4. "extract_binary_content": True,
  5. "name": "my-connector-pipeline",
  6. "reduce_whitespace": True,
  7. "run_ml_inference": True
  8. },
  9. )
  10. print(resp)
  1. response = client.connector.update_pipeline(
  2. connector_id: 'my-connector',
  3. body: {
  4. pipeline: {
  5. extract_binary_content: true,
  6. name: 'my-connector-pipeline',
  7. reduce_whitespace: true,
  8. run_ml_inference: true
  9. }
  10. }
  11. )
  12. puts response
  1. const response = await client.connector.updatePipeline({
  2. connector_id: "my-connector",
  3. pipeline: {
  4. extract_binary_content: true,
  5. name: "my-connector-pipeline",
  6. reduce_whitespace: true,
  7. run_ml_inference: true,
  8. },
  9. });
  10. console.log(response);
  1. PUT _connector/my-connector/_pipeline
  2. {
  3. "pipeline": {
  4. "extract_binary_content": true,
  5. "name": "my-connector-pipeline",
  6. "reduce_whitespace": true,
  7. "run_ml_inference": true
  8. }
  9. }
  1. {
  2. "result": "updated"
  3. }