Get component templates

  • GET /_component_template/{name}
  • GET /_component_template
Auth

Get information about component templates.

Required authorization

Cluster privileges manage_index_templates

Path parameters

name string optional

Name of component template to retrieve. Wildcard (*) expressions are supported.

Leave it out to use /_component_template.

Query parameters

flat_settings boolean · default: false

If true, returns settings in flat format.

settings_filter union string | string[]

Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys

include_defaults boolean · default: false

Return all default configurations for the component template

local boolean · default: false deprecated

If true, the request retrieves information from the local node only. If false, information is retrieved from the master node.

master_timeout string · 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.

Response

application/json
component_templates object[] required
name string required
component_template object required
template object required
_meta object
version number
settings map string to object
mappings object
all_field object
analyzer string required
enabled boolean required
omit_norms boolean required
search_analyzer string required
similarity string required
store boolean required
store_term_vector_offsets boolean required
store_term_vector_payloads boolean required
store_term_vector_positions boolean required
store_term_vectors boolean required
date_detection boolean
dynamic enum
Values: strict runtime true false
dynamic_date_formats string[]
dynamic_templates string to object[]
_field_names object
enabled boolean required
index_field object
enabled boolean required
_meta object
numeric_detection boolean
properties map string to oneOf
_routing object
required boolean required
_size object
enabled boolean required
_source object
compress boolean
compress_threshold string
enabled boolean
excludes string[]
includes string[]
mode enum

Supported values include:

  • disabled
  • stored
  • synthetic: Instead of storing source documents on disk exactly as you send them, Elasticsearch can reconstruct source content on the fly upon retrieval.
Values: disabled stored synthetic
runtime map string to object
<string> object
fields map string to object

For type composite

<string> object
type enum required
Values: boolean composite date double geo_point geo_shape ip keyword long lookup
fetch_fields object[]

For type lookup

field string required
format string
format string

A custom format for date type runtime fields.

input_field string

For type lookup

target_field string

For type lookup

target_index string

For type lookup

script string

Painless script executed at query time.

on_script_error enum
Values: fail continue
type enum required

Field type, which can be: boolean, composite, date, double, geo_point, ip,keyword, long, or lookup.

Values: boolean composite date double geo_point geo_shape ip keyword long lookup
enabled boolean
subobjects enum
Values: true false
_data_stream_timestamp object
enabled boolean required
aliases map string to object
<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_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.

is_hidden boolean · default: false

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

lifecycle object
data_retention string

If defined, every document added to this data stream will be stored at least for this time frame. Any time after this duration the document could be deleted. When empty, every document in this data stream will be stored indefinitely.

effective_retention string

The least amount of time data should be kept by elasticsearch.

retention_determined_by enum

Configuration source that can influence the retention of a data stream.

Values: data_stream_configuration default_global_retention max_global_retention default_failures_retention
downsampling object[]

The list of downsampling rounds to execute as part of this downsampling configuration

after string required

The duration since rollover when this downsampling round should execute

config object required

The downsample configuration to execute.

fixed_interval string required

The interval at which to aggregate the original time series index.

enabled boolean · default: true

If defined, it turns data stream lifecycle on/off (true/false) for this data stream. A data stream lifecycle that's disabled (enabled: false) will have no effect on the data stream.

rollover object

The conditions which will trigger the rollover of a backing index as configured by the cluster setting cluster.lifecycle.default.rollover. This property is an implementation detail and it will only be retrieved when the query param include_defaults is set to true. The contents of this field are subject to change.

min_age string
max_age string
min_docs number
max_docs number
min_size number | string
max_size number | string
min_primary_shard_size number | string
max_primary_shard_size number | string
min_primary_shard_docs number
max_primary_shard_docs number
data_stream_options object
failure_store object

If defined, it specifies configuration for the failure store of this data stream.

enabled boolean · default: true

If defined, it turns the failure store on/off (true/false) for this data stream. A data stream failure store that's disabled (enabled: false) will redirect no new failed indices to the failure store; however, it will not remove any existing data from the failure store.

lifecycle object

If defined, it specifies the lifecycle configuration for the failure store of this data stream.

data_retention string

If defined, every document added to this data stream will be stored at least for this time frame. Any time after this duration the document could be deleted. When empty, every document in this data stream will be stored indefinitely.

enabled boolean · default: true

If defined, it turns data stream lifecycle on/off (true/false) for this data stream. A data stream lifecycle that's disabled (enabled: false) will have no effect on the data stream.

version number
_meta object
deprecated boolean