11[[put-pipeline-api]]
2- === Put Pipeline API
2+ === Put pipeline API
3+ ++++
4+ <titleabbrev>Put pipeline</titleabbrev>
5+ ++++
36
4- The put pipeline API adds pipelines and updates existing pipelines in the cluster.
7+ Creates or updates an ingest pipeline.
8+ Changes made using this API take effect immediately.
59
610[source,console]
7- --------------------------------------------------
11+ ----
812PUT _ingest/pipeline/my-pipeline-id
913{
1014 "description" : "describe pipeline",
@@ -17,16 +21,73 @@ PUT _ingest/pipeline/my-pipeline-id
1721 }
1822 ]
1923}
20- --------------------------------------------------
24+ ----
25+
26+
27+ [[put-pipeline-api-request]]
28+ ==== {api-request-title}
29+
30+ `PUT /_ingest/pipeline/<pipeline>`
31+
32+
33+ [[put-pipeline-api-path-params]]
34+ ==== {api-path-parms-title}
35+
36+ `<pipeline>`::
37+ (Required, string) ID of the ingest pipeline to create or update.
38+
39+
40+ [[put-pipeline-api-query-params]]
41+ ==== {api-query-parms-title}
42+
43+ include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout]
44+
45+
46+ [[put-pipeline-api-response-body]]
47+ ==== {api-response-body-title}
48+
49+ `description`::
50+ (Required, string)
51+ Description of the ingest pipeline.
52+
53+ `processors`::
54+ +
55+ --
56+ (Required, array of <<ingest-processors,processor objects>>)
57+ Array of processors used to pre-process documents
58+ before indexing.
59+
60+ Processors are executed in the order provided.
61+
62+ See <<ingest-processors>> for processor object definitions
63+ and a list of built-in processors.
64+ --
65+
66+ `version`::
67+ +
68+ --
69+ (Optional, integer)
70+ Optional version number used by external systems to manage ingest pipelines.
71+
72+ Versions are not used or validated by {es};
73+ they are intended for external management only.
74+ --
75+
76+
77+ [[put-pipeline-api-example]]
78+ ==== {api-examples-title}
79+
2180
22- [float]
2381[[versioning-pipelines]]
24- ==== Pipeline versioning
82+ ===== Pipeline versioning
83+
84+ When creating or updating an ingest pipeline,
85+ you can specify an optional `version` parameter.
86+ The version is useful for managing changes to pipeline
87+ and viewing the current pipeline for an ingest node.
2588
26- Pipelines can optionally add a `version` number, which can be any integer value,
27- in order to simplify pipeline management by external systems. The `version`
28- field is completely optional and it is meant solely for external management of
29- pipelines.
89+ The following request sets a version number of `123`
90+ for `my-pipeline-id`.
3091
3192[source,console]
3293--------------------------------------------------
@@ -45,8 +106,8 @@ PUT /_ingest/pipeline/my-pipeline-id
45106}
46107--------------------------------------------------
47108
48- To unset a ` version`, simply replace the pipeline without specifying
49- one .
109+ To unset the version number,
110+ replace the pipeline without specifying a `version` parameter .
50111
51112[source,console]
52113--------------------------------------------------
@@ -64,8 +125,7 @@ PUT /_ingest/pipeline/my-pipeline-id
64125}
65126--------------------------------------------------
66127
67- //////////////////////////
68-
128+ ////
69129[source,console]
70130--------------------------------------------------
71131DELETE /_ingest/pipeline/my-pipeline-id
@@ -78,8 +138,4 @@ DELETE /_ingest/pipeline/my-pipeline-id
78138"acknowledged": true
79139}
80140--------------------------------------------------
81-
82- //////////////////////////
83-
84- NOTE: The put pipeline API also instructs all ingest nodes to reload their in-memory representation of pipelines, so that
85- pipeline changes take effect immediately.
141+ ////
0 commit comments