Put pipeline API

Creates or updates an ingest pipeline. Changes made using this API take effect immediately.

  1. PUT _ingest/pipeline/my-pipeline-id
  2. {
  3. "description" : "describe pipeline",
  4. "processors" : [
  5. {
  6. "set" : {
  7. "field": "foo",
  8. "value": "bar"
  9. }
  10. }
  11. ]
  12. }

Request

PUT /_ingest/pipeline/<pipeline>

Path parameters

<pipeline>

(Required, string) ID of the ingest pipeline to create or update.

Query parameters

master_timeout

(Optional, time units) Specifies the period of time to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Defaults to 30s.

Response body

description

(Required, string) Description of the ingest pipeline.

processors

(Required, array of processor objects) Array of processors used to pre-process documents before indexing.

Processors are executed in the order provided.

See Processors for processor object definitions and a list of built-in processors.

version

(Optional, integer) Optional version number used by external systems to manage ingest pipelines.

Versions are not used or validated by Elasticsearch; they are intended for external management only.

Examples

Pipeline versioning

When creating or updating an ingest pipeline, you can specify an optional version parameter. The version is useful for managing changes to pipeline and viewing the current pipeline for an ingest node.

The following request sets a version number of 123 for my-pipeline-id.

  1. PUT /_ingest/pipeline/my-pipeline-id
  2. {
  3. "description" : "describe pipeline",
  4. "version" : 123,
  5. "processors" : [
  6. {
  7. "set" : {
  8. "field": "foo",
  9. "value": "bar"
  10. }
  11. }
  12. ]
  13. }

To unset the version number, replace the pipeline without specifying a version parameter.

  1. PUT /_ingest/pipeline/my-pipeline-id
  2. {
  3. "description" : "describe pipeline",
  4. "processors" : [
  5. {
  6. "set" : {
  7. "field": "foo",
  8. "value": "bar"
  9. }
  10. }
  11. ]
  12. }