Path parameters
-
Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported.
Query parameters
-
If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.
-
If true, returns settings in flat format.
-
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.
External documentation -
If true, returns all relevant default configurations for the index template.
GET /_index_template/{name}
Console
GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream
resp = client.indices.get_index_template( name="*", filter_path="index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream", )
const response = await client.indices.getIndexTemplate({ name: "*", filter_path: "index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream", });
response = client.indices.get_index_template( name: "*", filter_path: "index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream" )
$resp = $client->indices()->getIndexTemplate([ "name" => "*", "filter_path" => "index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream", ]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream"
Response examples (200)
A successful response for retrieving information about an index template.
{ "index_templates" : [ { "name" : "my-index-template", "index_template" : { "index_patterns" : [ "logs-*" ], "template" : { "settings" : { "index" : { "number_of_shards" : "1", "number_of_replicas" : "1" } }, "mappings" : { "properties" : { "@timestamp" : { "type" : "date" }, "message" : { "type" : "text" } } } }, "composed_of" : [ "my-component-template" ], "priority" : 200, "version" : 1, "_meta" : { "description" : "my custom index template" }, "created_date" : "2024-01-01T12:00:00.000Z", "created_date_millis" : 1704110400000, "modified_date" : "2025-01-01T12:00:00.000Z", "modified_date_millis" : 1735732800000 } } ] }