Path parameters
-
Comma-separated list of component template names used to limit the request. Wildcard (
*
) expressions are supported.
Query parameters
-
If
true
, returns settings in flat format. -
Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys
-
Return all default configurations for the component template (default: false)
-
If
true
, the request retrieves information from the local node only. Iffalse
, information is retrieved from the master node. -
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
GET /_component_template/{name}
Console
GET /_component_template/template_1
resp = client.cluster.get_component_template( name="template_1", )
const response = await client.cluster.getComponentTemplate({ name: "template_1", });
response = client.cluster.get_component_template( name: "template_1" )
$resp = $client->cluster()->getComponentTemplate([ "name" => "template_1", ]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_component_template/template_1"
Response examples (200)
A successful response for retrieving information about a component template.
{ "component_templates" : [ { "name" : "my-component-template", "component_template" : { "version" : 1, "_meta" : { "description" : "my custom component template" }, "template" : { "settings" : { "index" : { "number_of_shards" : "1" } }, "mappings" : { "properties" : { "@timestamp" : { "type" : "date" }, "message" : { "type" : "text" } } } }, "created_date" : "2024-01-01T12:00:00.000Z", "created_date_millis" : 1704110400000, "modified_date" : "2025-01-01T12:00:00.000Z", "modified_date_millis" : 1735732800000 } } ] }