-
Notifications
You must be signed in to change notification settings - Fork 101
Adds index API requests and responses - part 2 #2993
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
11 commits
Select commit
Hold shift + click to select a range
4476fb4
Adds index API requests and responses - part 2.
szabosteve 210b99d
Merge branch 'main' into api-examples-pt7
szabosteve 0643ef6
Merge branch 'main' into api-examples-pt7
lcawl bb2736e
Add put index template and put mapping examples to overlay
lcawl d15f0f5
Merge branch 'main' into api-examples-pt7
lcawl 50f6e64
Add more example overlays
lcawl e4b70bf
Comment out legacy template overlay
lcawl 6323f04
Update specification/indices/resolve_cluster/ResolveClusterResponseEx…
szabosteve ddd838f
Merge branch 'main' into api-examples-pt7
szabosteve e1c1ed4
Edit create template example
lcawl 226eb27
Lint example file
lcawl 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
7 changes: 7 additions & 0 deletions
7
specification/indices/put_index_template/IndicesPutIndexTemplateRequestExample1.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,7 @@ | ||
summary: Create an index template. | ||
# method_request: PUT /_index_template/template_1 | ||
# description: '' | ||
# type: request | ||
value: | ||
"{\n \"index_patterns\" : [\"template*\"],\n \"priority\" : 1,\n \"template\"\ | ||
: {\n \"settings\" : {\n \"number_of_shards\" : 2\n }\n }\n}" |
7 changes: 7 additions & 0 deletions
7
specification/indices/put_mapping/indicesPutMappingRequestExample1.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,7 @@ | ||
summary: Create or update the mapping of an index. | ||
# method_request: PUT /my-index-000001/_mapping | ||
# description: '' | ||
# type: request | ||
value: | ||
"{\n \"properties\": {\n \"email\": {\n \"type\": \"keyword\"\n \ | ||
\ }\n }\n}" |
5 changes: 5 additions & 0 deletions
5
specification/indices/put_settings/IndicesPutSettingsRequestExample1.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,5 @@ | ||
summary: Change a dynamic index setting in real time. | ||
# method_request: PUT /my-index-000001/_settings | ||
# description: '' | ||
# type: request | ||
value: "{\n \"index\" : {\n \"number_of_replicas\" : 2\n }\n}" |
7 changes: 7 additions & 0 deletions
7
specification/indices/put_template/indicesPutIndexTemplateRequestExample1.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,7 @@ | ||
summary: Create or update an index setting. | ||
# method_request: PUT /_index_template/template_1 | ||
# description: '' | ||
# type: request | ||
value: | ||
"{\n \"index_patterns\" : [\"template*\"],\n \"priority\" : 1,\n \"template\"\ | ||
: {\n \"settings\" : {\n \"number_of_shards\" : 2\n }\n }\n}" |
32 changes: 32 additions & 0 deletions
32
specification/indices/recovery/indicesRecoveryResponseExample1.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,32 @@ | ||
summary: A successful response for retrieving information about ongoing and completed shard recoveries for an index. | ||
# description: '' | ||
# type: response | ||
response_code: 200 | ||
value: | ||
"{\n \"index1\" : {\n \"shards\" : [ {\n \"id\" : 0,\n \"type\"\ | ||
\ : \"SNAPSHOT\",\n \"stage\" : \"INDEX\",\n \"primary\" : true,\n \ | ||
\ \"start_time\" : \"2014-02-24T12:15:59.716\",\n \"start_time_in_millis\"\ | ||
: 1393244159716,\n \"stop_time\" : \"0s\",\n \"stop_time_in_millis\" :\ | ||
\ 0,\n \"total_time\" : \"2.9m\",\n \"total_time_in_millis\" : 175576,\n\ | ||
\ \"source\" : {\n \"repository\" : \"my_repository\",\n \"snapshot\"\ | ||
\ : \"my_snapshot\",\n \"index\" : \"index1\",\n \"version\" : \"\ | ||
{version}\",\n \"restoreUUID\": \"PDh1ZAOaRbiGIVtCvZOMww\"\n },\n \ | ||
\ \"target\" : {\n \"id\" : \"ryqJ5lO5S4-lSFbGntkEkg\",\n \"host\"\ | ||
\ : \"my.fqdn\",\n \"transport_address\" : \"my.fqdn\",\n \"ip\" :\ | ||
\ \"10.0.1.7\",\n \"name\" : \"my_es_node\"\n },\n \"index\" :\ | ||
\ {\n \"size\" : {\n \"total\" : \"75.4mb\",\n \"total_in_bytes\"\ | ||
\ : 79063092,\n \"reused\" : \"0b\",\n \"reused_in_bytes\" : 0,\n\ | ||
\ \"recovered\" : \"65.7mb\",\n \"recovered_in_bytes\" : 68891939,\n\ | ||
\ \"recovered_from_snapshot\" : \"0b\",\n \"recovered_from_snapshot_in_bytes\"\ | ||
\ : 0,\n \"percent\" : \"87.1%\"\n },\n \"files\" : {\n \ | ||
\ \"total\" : 73,\n \"reused\" : 0,\n \"recovered\" :\ | ||
\ 69,\n \"percent\" : \"94.5%\"\n },\n \"total_time\" : \"\ | ||
0s\",\n \"total_time_in_millis\" : 0,\n \"source_throttle_time\" :\ | ||
\ \"0s\",\n \"source_throttle_time_in_millis\" : 0,\n \"target_throttle_time\"\ | ||
\ : \"0s\",\n \"target_throttle_time_in_millis\" : 0\n },\n \"\ | ||
translog\" : {\n \"recovered\" : 0,\n \"total\" : 0,\n \"percent\"\ | ||
\ : \"100.0%\",\n \"total_on_start\" : 0,\n \"total_time\" : \"0s\"\ | ||
,\n \"total_time_in_millis\" : 0\n },\n \"verify_index\" : {\n\ | ||
\ \"check_index_time\" : \"0s\",\n \"check_index_time_in_millis\"\ | ||
\ : 0,\n \"total_time\" : \"0s\",\n \"total_time_in_millis\" : 0\n\ | ||
\ }\n } ]\n }\n}" |
18 changes: 18 additions & 0 deletions
18
specification/indices/resolve_cluster/ResolveClusterResponseExample1.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,18 @@ | ||
summary: A successful response for resolving a specified index expressions to return information about each cluster. | ||
szabosteve marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# description: '' | ||
# type: response | ||
response_code: 200 | ||
value: | ||
"{\n \"(local)\": {\n \"connected\": true,\n \"skip_unavailable\": false,\n\ | ||
\ \"matching_indices\": true,\n \"version\": {\n \"number\": \"8.13.0\"\ | ||
,\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\"\ | ||
: \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n\ | ||
\ },\n \"cluster_one\": {\n \"connected\": true,\n \"skip_unavailable\"\ | ||
: true,\n \"matching_indices\": true,\n \"version\": {\n \"number\":\ | ||
\ \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\"\ | ||
: \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n\ | ||
\ },\n \"cluster_two\": {\n \"connected\": true,\n \"skip_unavailable\"\ | ||
: false,\n \"matching_indices\": true,\n \"version\": {\n \"number\"\ | ||
: \"8.13.0\",\n \"build_flavor\": \"default\",\n \"minimum_wire_compatibility_version\"\ | ||
: \"7.17.0\",\n \"minimum_index_compatibility_version\": \"7.0.0\"\n }\n\ | ||
\ }\n}" |
14 changes: 14 additions & 0 deletions
14
specification/indices/resolve_index/indicesResolveResponseExample1.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,14 @@ | ||
summary: A successful response for resolving the specified name for an index. | ||
# description: '' | ||
# type: response | ||
response_code: 200 | ||
value: | ||
"{\n \"indices\": [\n {\n \"name\": \"foo_closed\",\n \"attributes\"\ | ||
: [\n \"closed\"\n ]\n },\n {\n \"name\": \"freeze-index\"\ | ||
,\n \"aliases\": [\n \"f-alias\"\n ],\n \"attributes\": [\n\ | ||
\ \"open\"\n ]\n },\n {\n \"name\": \"remoteCluster1:bar-01\"\ | ||
,\n \"attributes\": [\n \"open\"\n ]\n }\n ],\n \"aliases\"\ | ||
: [\n {\n \"name\": \"f-alias\",\n \"indices\": [\n \"freeze-index\"\ | ||
,\n \"my-index-000001\"\n ]\n }\n ],\n \"data_streams\": [\n \ | ||
\ {\n \"name\": \"foo\",\n \"backing_indices\": [\n \".ds-foo-2099.03.07-000001\"\ | ||
\n ],\n \"timestamp_field\": \"@timestamp\"\n }\n ]\n}" |
8 changes: 8 additions & 0 deletions
8
specification/indices/rollover/indicesRolloverRequestExample1.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,8 @@ | ||
summary: Create a new index for a data stream. | ||
# method_request: POST my-data-stream/_rollover | ||
# description: '' | ||
# type: request | ||
value: | ||
"{\n \"conditions\": {\n \"max_age\": \"7d\",\n \"max_docs\": 1000,\n\ | ||
\ \"max_primary_shard_size\": \"50gb\",\n \"max_primary_shard_docs\": \"2000\"\ | ||
\n }\n}" |
10 changes: 10 additions & 0 deletions
10
specification/indices/rollover/indicesRolloverResponseExample1.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,10 @@ | ||
summary: A successful response for creating a new index for a data stream. | ||
# description: '' | ||
# type: response | ||
response_code: 200 | ||
value: | ||
"{\n \"acknowledged\": true,\n \"shards_acknowledged\": true,\n \"old_index\"\ | ||
: \".ds-my-data-stream-2099.05.06-000001\",\n \"new_index\": \".ds-my-data-stream-2099.05.07-000002\"\ | ||
,\n \"rolled_over\": true,\n \"dry_run\": false,\n \"lazy\": false,\n \"conditions\"\ | ||
: {\n \"[max_age: 7d]\": false,\n \"[max_docs: 1000]\": true,\n \"[max_primary_shard_size:\ | ||
\ 50gb]\": false,\n \"[max_primary_shard_docs: 2000]\": false\n }\n}" |
7 changes: 7 additions & 0 deletions
7
specification/indices/shrink/indicesShrinkRequestExample1.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,7 @@ | ||
summary: Shrink an existing index into a new index with fewer primary shards. | ||
# method_request: POST /my_source_index/_shrink/my_target_index | ||
# description: '' | ||
# type: request | ||
value: | ||
"{\n \"settings\": {\n \"index.routing.allocation.require._name\": null,\n\ | ||
\ \"index.blocks.write\": null\n }\n}" |
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,5 @@ | ||
summary: Split an existing index into a new index with more primary shards. | ||
# method_request: POST /my-index-000001/_split/split-my-index-000001 | ||
# description: '' | ||
# type: request | ||
value: "{\n \"settings\": {\n \"index.number_of_shards\": 2\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.