-
Notifications
You must be signed in to change notification settings - Fork 105
Adds ingest API request and response examples #2996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
44ce2a0
Adds ingest API request and response examples.
szabosteve 59996e0
Fixes formatting.
szabosteve 6dfb8b2
Merge branch 'main' into api-examples-pt8
lcawl fe969da
Add example overlays
lcawl 892609c
Fix filename
lcawl 0226877
Update specification/ingest/put_pipeline/PutPipelineRequestExample2.yaml
szabosteve File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
specification/ingest/get_pipeline/GetPipelineResponseExample1.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
summary: A successful response for retrieving information about an ingest pipeline. | ||
# description: '' | ||
# type: response | ||
# response_code: 200 | ||
value: | ||
"{\n \"my-pipeline-id\" : {\n \"description\" : \"describe pipeline\",\n\ | ||
\ \"version\" : 123,\n \"processors\" : [\n {\n \"set\" : {\n\ | ||
\ \"field\" : \"foo\",\n \"value\" : \"bar\"\n }\n \ | ||
\ }\n ]\n }\n}" |
9 changes: 9 additions & 0 deletions
9
specification/ingest/put_pipeline/PutPipelineRequestExample1.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
summary: Create an ingest pipeline. | ||
# method_request: PUT _ingest/pipeline/my-pipeline-id | ||
# description: '' | ||
# type: request | ||
value: | ||
"{\n \"description\" : \"My optional pipeline description\",\n \"processors\"\ | ||
\ : [\n {\n \"set\" : {\n \"description\" : \"My optional processor\ | ||
\ description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"\ | ||
foo\"\n }\n }\n ]\n}" |
11 changes: 11 additions & 0 deletions
11
specification/ingest/put_pipeline/PutPipelineRequestExample2.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
summary: Creates an ingest pipeline. | ||
# method_request: PUT /_ingest/pipeline/my-pipeline-id | ||
description: You can use the `_meta` parameter to add arbitrary metadata to a pipeline. | ||
type: request | ||
value: | ||
"{\n \"description\" : \"My optional pipeline description\",\n \"processors\"\ | ||
\ : [\n {\n \"set\" : {\n \"description\" : \"My optional processor\ | ||
\ description\",\n \"field\": \"my-keyword-field\",\n \"value\": \"\ | ||
foo\"\n }\n }\n ],\n \"_meta\": {\n \"reason\": \"set my-keyword-field\ | ||
\ to foo\",\n \"serialization\": {\n \"class\": \"MyPipeline\",\n \"\ | ||
id\": 10\n }\n }\n}" |
12 changes: 12 additions & 0 deletions
12
specification/ingest/simulate/SimulatePipelineRequestExample1.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
summary: Run an ingest pipeline against a set of provided documents. | ||
# method_request: POST /_ingest/pipeline/_simulate | ||
description: You can specify the used pipeline either in the request body or as a path parameter. | ||
# type: request | ||
value: | ||
"{\n \"pipeline\" :\n {\n \"description\": \"_description\",\n \"processors\"\ | ||
: [\n {\n \"set\" : {\n \"field\" : \"field2\",\n \ | ||
\ \"value\" : \"_value\"\n }\n }\n ]\n },\n \"docs\": [\n {\n\ | ||
\ \"_index\": \"index\",\n \"_id\": \"id\",\n \"_source\": {\n \ | ||
\ \"foo\": \"bar\"\n }\n },\n {\n \"_index\": \"index\",\n\ | ||
\ \"_id\": \"id\",\n \"_source\": {\n \"foo\": \"rab\"\n }\n\ | ||
\ }\n ]\n}" |
15 changes: 15 additions & 0 deletions
15
specification/ingest/simulate/SimulatePipelineResponseExample1.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
summary: A successful response for running an ingest pipeline against a set of provided documents. | ||
# description: '' | ||
# type: response | ||
# response_code: 200 | ||
value: | ||
"{\n \"docs\": [\n {\n \"doc\": {\n \"_id\": \"id\"\ | ||
,\n \"_index\": \"index\",\n \"_version\": \"-3\",\n \ | ||
\ \"_source\": {\n \"field2\": \"_value\",\n \"\ | ||
foo\": \"bar\"\n },\n \"_ingest\": {\n \"timestamp\"\ | ||
: \"2017-05-04T22:30:03.187Z\"\n }\n }\n },\n {\n \ | ||
\ \"doc\": {\n \"_id\": \"id\",\n \"_index\": \"index\"\ | ||
,\n \"_version\": \"-3\",\n \"_source\": {\n \ | ||
\ \"field2\": \"_value\",\n \"foo\": \"rab\"\n },\n \ | ||
\ \"_ingest\": {\n \"timestamp\": \"2017-05-04T22:30:03.188Z\"\ | ||
\n }\n }\n }\n ]\n}" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.