Skip to content

Commit 44ce2a0

Browse files
committed
Adds ingest API request and response examples.
1 parent dbde402 commit 44ce2a0

File tree

5 files changed

+51
-0
lines changed

5 files changed

+51
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
summary: A successful response for retrieving information about an ingest pipeline.
2+
# description: ''
3+
# type: response
4+
# response_code: 200
5+
value: "{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n\
6+
\ \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n\
7+
\ \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n \
8+
\ }\n ]\n }\n}"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
summary: Create an ingest pipeline.
2+
# method_request: PUT _ingest/pipeline/my-pipeline-id
3+
# description: ''
4+
# type: request
5+
value: "{\n \"description\" : \"My optional pipeline description\",\n \"processors\"\
6+
\ : [\n {\n \"set\" : {\n \"description\" : \"My optional processor\
7+
\ description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"\
8+
foo\"\n }\n }\n ]\n}"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
summary: Creates an ingest pipeline.
2+
# method_request: PUT /_ingest/pipeline/my-pipeline-id
3+
description: You can use the `_meta` parameter to add arbitrary metadata to a pipeline.
4+
type: request
5+
value: "{\n \"description\" : \"My optional pipeline description\",\n \"processors\"\
6+
\ : [\n {\n \"set\" : {\n \"description\" : \"My optional processor\
7+
\ description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"\
8+
foo\"\n }\n }\n ],\n \"_meta\": {\n \"reason\": \"set my-keyword-field\
9+
\ to foo\",\n \"serialization\": {\n \"class\": \"MyPipeline\",\n \"\
10+
id\": 10\n }\n }\n}"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
summary: Run an ingest pipeline against a set of provided documents.
2+
# method_request: POST /_ingest/pipeline/_simulate
3+
description: You can specify the used pipeline either in the request body or as a path parameter.
4+
# type: request
5+
value: "{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\"\
6+
: [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \
7+
\ \"value\" : \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n\
8+
\ \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \
9+
\ \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n\
10+
\ \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n\
11+
\ }\n ]\n}"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
summary: A successful response for running an ingest pipeline against a set of provided documents.
2+
# description: ''
3+
# type: response
4+
# response_code: 200
5+
value: "{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"id\"\
6+
,\n \"_index\": \"index\",\n \"_version\": \"-3\",\n \
7+
\ \"_source\": {\n \"field2\": \"_value\",\n \"\
8+
foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\"\
9+
: \"2017-05-04T22:30:03.187Z\"\n }\n }\n },\n {\n \
10+
\ \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\"\
11+
,\n \"_version\": \"-3\",\n \"_source\": {\n \
12+
\ \"field2\": \"_value\",\n \"foo\": \"rab\"\n },\n \
13+
\ \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.188Z\"\
14+
\n }\n }\n }\n ]\n}"

0 commit comments

Comments
 (0)