Update connector pipeline API

edit

Update connector pipeline API

edit

This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.

Updates the pipeline configuration of a connector.

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

Request

edit

PUT _connector/<connector_id>/_pipeline

Prerequisites

edit
  • To sync data using connectors, it’s essential to have the Elastic connectors service running.
  • The connector_id parameter should reference an existing connector.

Path parameters

edit
<connector_id>
(Required, string)

Request body

edit
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

edit
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

edit

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

response = client.connector.update_pipeline(
  connector_id: 'my-connector',
  body: {
    pipeline: {
      extract_binary_content: true,
      name: 'my-connector-pipeline',
      reduce_whitespace: true,
      run_ml_inference: true
    }
  }
)
puts response
PUT _connector/my-connector/_pipeline
{
    "pipeline": {
        "extract_binary_content": true,
        "name": "my-connector-pipeline",
        "reduce_whitespace": true,
        "run_ml_inference": true
    }
}
{
    "result": "updated"
}