Type to search.

Simulate an index

  • POST /_index_template/_simulate_index/{name}
Auth

Get the index configuration that would be applied to the specified index from an existing index template.

Required privileges

Cluster privileges manage_index_templates

Path parameters

name string required

Name of the index to simulate

Query parameters

create boolean · default: false

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 · default: false

User defined reason for dry-run creating the new template for simulation purposes

master_timeout union oneOf · default: 30s

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: -1 0
include_defaults boolean · default: false

If true, returns all relevant default configurations for the index template.

Request body

index_patterns union oneOf required

Array of wildcard (*) expressions used to match the names of data streams and indices during creation.

One of: string[] or string
composed_of string[] required

An ordered list of component template names. Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.

version number

Version number used to manage index templates externally. This number is not automatically generated by Elasticsearch.

priority number

Priority to determine index template precedence when a new data stream or index is created. The index template with the highest priority is chosen. If no priority is specified the template is treated as though it is of priority 0 (lowest priority). This number is not automatically generated by Elasticsearch.

_meta object

Optional user metadata about the index template. May have any contents. This map is not automatically generated by Elasticsearch.

allow_auto_create boolean
deprecated boolean

Marks this index template as deprecated. When creating or updating a non-deprecated index template that uses deprecated components, Elasticsearch will emit a deprecation warning.

ignore_missing_component_templates union oneOf

A list of component template names that are allowed to be absent.

One of: string[] or string
created_date union oneOf

Date and time when the index template was created. Only returned if the human query parameter is true.

One of: string or number
created_date_millis number

Date and time when the index template was created, in milliseconds since the epoch.

modified_date union oneOf

Date and time when the index template was last modified. Only returned if the human query parameter is true.

One of: string or number
modified_date_millis number

Date and time when the index template was last modified, in milliseconds since the epoch.

Response

application/json
template object required
aliases map string to object required
<string> object
filter {} Query

Query used to limit documents the alias can access.

index_routing string

Value used to route indexing operations to a specific shard. If specified, this overwrites the routing value for indexing operations.

is_hidden boolean · default: false

If true, the alias is hidden. All indices for the alias must have the same is_hidden value.

is_write_index boolean · default: false

If true, the index is the write index for the alias.

routing string

Value used to route indexing and search operations to a specific shard.

search_routing string

Value used to route search operations to a specific shard. If specified, this overwrites the routing value for search operations.

mappings object required
Same fields as mappings in template
settings object required
Same fields as settings in template