Query parameters
-
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
-
User defined reason for dry-run creating the new template for simulation purposes
-
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
. -
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
resp = client.indices.simulate_index_template( name="my-index-000001", )
const response = await client.indices.simulateIndexTemplate({ name: "my-index-000001", });
response = client.indices.simulate_index_template( name: "my-index-000001" )
$resp = $client->indices()->simulateIndexTemplate([ "name" => "my-index-000001", ]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_index_template/_simulate_index/my-index-000001"
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-*" ] } ] }