Skip to content

Commit e720982

Browse files
authored
[DOCS] Reformat put pipeline API (#47171) (#47397)
1 parent 1cb11b4 commit e720982

File tree

1 file changed

+75
-19
lines changed

1 file changed

+75
-19
lines changed

docs/reference/ingest/apis/put-pipeline.asciidoc

Lines changed: 75 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
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,js]
7-
--------------------------------------------------
11+
----
812
PUT _ingest/pipeline/my-pipeline-id
913
{
1014
"description" : "describe pipeline",
@@ -17,17 +21,74 @@ PUT _ingest/pipeline/my-pipeline-id
1721
}
1822
]
1923
}
20-
--------------------------------------------------
24+
----
2125
// CONSOLE
2226

23-
[float]
27+
28+
[[put-pipeline-api-request]]
29+
==== {api-request-title}
30+
31+
`PUT /_ingest/pipeline/<pipeline>`
32+
33+
34+
[[put-pipeline-api-path-params]]
35+
==== {api-path-parms-title}
36+
37+
`<pipeline>`::
38+
(Required, string) ID of the ingest pipeline to create or update.
39+
40+
41+
[[put-pipeline-api-query-params]]
42+
==== {api-query-parms-title}
43+
44+
include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout]
45+
46+
47+
[[put-pipeline-api-response-body]]
48+
==== {api-response-body-title}
49+
50+
`description`::
51+
(Required, string)
52+
Description of the ingest pipeline.
53+
54+
`processors`::
55+
+
56+
--
57+
(Required, array of <<ingest-processors,processor objects>>)
58+
Array of processors used to pre-process documents
59+
before indexing.
60+
61+
Processors are executed in the order provided.
62+
63+
See <<ingest-processors>> for processor object definitions
64+
and a list of built-in processors.
65+
--
66+
67+
`version`::
68+
+
69+
--
70+
(Optional, integer)
71+
Optional version number used by external systems to manage ingest pipelines.
72+
73+
Versions are not used or validated by {es};
74+
they are intended for external management only.
75+
--
76+
77+
78+
[[put-pipeline-api-example]]
79+
==== {api-examples-title}
80+
81+
2482
[[versioning-pipelines]]
25-
==== Pipeline versioning
83+
===== Pipeline versioning
84+
85+
When creating or updating an ingest pipeline,
86+
you can specify an optional `version` parameter.
87+
The version is useful for managing changes to pipeline
88+
and viewing the current pipeline for an ingest node.
2689

27-
Pipelines can optionally add a `version` number, which can be any integer value,
28-
in order to simplify pipeline management by external systems. The `version`
29-
field is completely optional and it is meant solely for external management of
30-
pipelines.
90+
The following request sets a version number of `123`
91+
for `my-pipeline-id`.
3192

3293
[source,js]
3394
--------------------------------------------------
@@ -47,8 +108,8 @@ PUT /_ingest/pipeline/my-pipeline-id
47108
--------------------------------------------------
48109
// CONSOLE
49110

50-
To unset a `version`, simply replace the pipeline without specifying
51-
one.
111+
To unset the version number,
112+
replace the pipeline without specifying a `version` parameter.
52113

53114
[source,js]
54115
--------------------------------------------------
@@ -67,8 +128,7 @@ PUT /_ingest/pipeline/my-pipeline-id
67128
--------------------------------------------------
68129
// CONSOLE
69130

70-
//////////////////////////
71-
131+
////
72132
[source,js]
73133
--------------------------------------------------
74134
DELETE /_ingest/pipeline/my-pipeline-id
@@ -83,8 +143,4 @@ DELETE /_ingest/pipeline/my-pipeline-id
83143
}
84144
--------------------------------------------------
85145
// TESTRESPONSE
86-
87-
//////////////////////////
88-
89-
NOTE: The put pipeline API also instructs all ingest nodes to reload their in-memory representation of pipelines, so that
90-
pipeline changes take effect immediately.
146+
////

0 commit comments

Comments
 (0)