Simulate an index
Added in 7.9.0
Get the index configuration that would be applied to the specified index from an existing index template.
Path parameters
-
name
string Required Name of the index to simulate
Query parameters
-
create
boolean Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
-
cause
string User defined reason for dry-run creating the new template for simulation purposes
-
master_timeout
string Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
Values are
-1
or0
. -
include_defaults
boolean If true, returns all relevant default configurations for the index template.
POST
/_index_template/_simulate_index/{name}
Console
POST /_index_template/_simulate_index/my-index-000001
curl \
--request POST 'http://api.example.com/_index_template/_simulate_index/{name}' \
--header "Authorization: $API_KEY"
Response examples (200)
A successful response from `POST /_index_template/_simulate_index/my-index-000001`.
{
"template" : {
"settings" : {
"index" : {
"number_of_shards" : "2",
"number_of_replicas" : "0",
"routing" : {
"allocation" : {
"include" : {
"_tier_preference" : "data_content"
}
}
}
}
},
"mappings" : {
"properties" : {
"@timestamp" : {
"type" : "date"
}
}
},
"aliases" : { }
},
"overlapping" : [
{
"name" : "template_1",
"index_patterns" : [
"my-index-*"
]
}
]
}