Put pipeline API
editPut pipeline API
editCreates or updates an ingest pipeline. Changes made using this API take effect immediately.
PUT _ingest/pipeline/my-pipeline-id { "description" : "describe pipeline", "processors" : [ { "set" : { "field": "foo", "value": "bar" } } ] }
Request
editPUT /_ingest/pipeline/<pipeline>
Prerequisites
edit-
If the Elasticsearch security features are enabled, you must have the
manage_pipeline
,manage_ingest_pipelines
, ormanage
cluster privilege to use this API.
Path parameters
edit-
<pipeline>
- (Required, string) ID of the ingest pipeline to create or update.
Query parameters
edit-
master_timeout
-
(Optional, time units)
Period 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
. -
timeout
-
(Optional, time units)
Period to wait for a response. If no response is received before the timeout
expires, the request fails and returns an error. Defaults to
30s
.
Request body
edit-
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
editPipeline versioning
editWhen 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
.
PUT /_ingest/pipeline/my-pipeline-id { "description" : "describe pipeline", "version" : 123, "processors" : [ { "set" : { "field": "foo", "value": "bar" } } ] }
To unset the version number,
replace the pipeline without specifying a version
parameter.
PUT /_ingest/pipeline/my-pipeline-id { "description" : "describe pipeline", "processors" : [ { "set" : { "field": "foo", "value": "bar" } } ] }