Get mapping definitions
Retrieves mapping definitions for one or more indices. For data streams, the API retrieves mappings for the stream’s backing indices.
Query parameters
-
allow_no_indices boolean
If
false
, the request returns an error if any wildcard expression, index alias, or_all
value targets only missing or closed indices. This behavior applies even if the request targets other open indices. -
expand_wildcards string | array[string]
Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as
open,hidden
. Valid values are:all
,open
,closed
,hidden
,none
. -
ignore_unavailable boolean
If
false
, the request returns an error if it targets a missing or closed index. -
local boolean
If
true
, the request retrieves information from the local node only. -
master_timeout string
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.
Responses
-
200 application/json
Hide response attributes Show response attributes object
-
item object
Hide item attributes Show item attributes
-
all_field object
Hide all_field attributes Show all_field attributes
-
date_detection boolean
-
dynamic string
Values are
strict
,runtime
,true
, orfalse
. -
dynamic_date_formats array[string]
-
dynamic_templates array[object]
-
_field_names object
Hide _field_names attribute Show _field_names attribute
-
index_field object
Hide index_field attribute Show index_field attribute
-
_meta object
Hide _meta attributes Show _meta attributes
-
key object
-
numeric_detection boolean
-
properties object
-
_routing object
Hide _routing attribute Show _routing attribute
-
_size object
Hide _size attribute Show _size attribute
-
_source object
-
runtime object
Hide runtime attributes Show runtime attributes
-
fetch_fields array[object]
For type
lookup
-
format string
A custom format for
date
type runtime fields. -
input_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
target_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
target_index string
-
script object
-
Values are
boolean
,composite
,date
,double
,geo_point
,ip
,keyword
,long
, orlookup
.
-
enabled boolean
-
subobjects boolean
-
_data_stream_timestamp object
Hide _data_stream_timestamp attribute Show _data_stream_timestamp attribute
-
-
Hide mappings attributes Show mappings attributes
-
all_field object
Hide all_field attributes Show all_field attributes
-
date_detection boolean
-
dynamic string
Values are
strict
,runtime
,true
, orfalse
. -
dynamic_date_formats array[string]
-
dynamic_templates array[object]
-
_field_names object
Hide _field_names attribute Show _field_names attribute
-
index_field object
Hide index_field attribute Show index_field attribute
-
_meta object
Hide _meta attributes Show _meta attributes
-
key object
-
numeric_detection boolean
-
properties object
-
_routing object
Hide _routing attribute Show _routing attribute
-
_size object
Hide _size attribute Show _size attribute
-
_source object
-
runtime object
Hide runtime attributes Show runtime attributes
-
fetch_fields array[object]
For type
lookup
-
format string
A custom format for
date
type runtime fields. -
input_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
target_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
target_index string
-
script object
-
Values are
boolean
,composite
,date
,double
,geo_point
,ip
,keyword
,long
, orlookup
.
-
enabled boolean
-
subobjects boolean
-
_data_stream_timestamp object
Hide _data_stream_timestamp attribute Show _data_stream_timestamp attribute
-
curl \
-X GET http://api.example.com/_mapping