-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds index API requests and responses - part 2 (#2993)
Co-authored-by: Lisa Cawley <[email protected]>
- Loading branch information
1 parent
2045505
commit f65ad48
Showing
14 changed files
with
242 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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 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 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 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}" |
19 changes: 19 additions & 0 deletions
19
specification/indices/put_template/indicesPutTemplateRequestExample1.yaml
This file contains 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,19 @@ | ||
summary: Create or update an index template. | ||
# method_request: PUT _template/template_1 | ||
# description: '' | ||
# type: request | ||
value: | ||
index_patterns: | ||
- 'te*' | ||
- 'bar*' | ||
settings: | ||
number_of_shards: 1 | ||
mappings: | ||
_source: | ||
enabled: false | ||
properties: | ||
host_name: | ||
type: keyword | ||
created_at: | ||
type: date | ||
format: 'EEE MMM dd HH:mm:ss Z yyyy' |
32 changes: 32 additions & 0 deletions
32
specification/indices/recovery/indicesRecoveryResponseExample1.yaml
This file contains 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 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 expression to return information about each cluster. | ||
# 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 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 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 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 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 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}" |