Get mapping definitions
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 Deprecated 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 attribute Show response attribute object
-
*
object Additional properties Hide * attributes Show * attributes object
-
item
object Hide item attributes Show item attributes object
-
all_field
object Hide all_field attributes Show all_field attributes 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
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 object
-
enabled
boolean Required
-
-
index_field
object Hide index_field attribute Show index_field attribute object
-
enabled
boolean Required
-
-
_meta
object Hide _meta attribute Show _meta attribute object
-
*
object Additional properties
-
-
numeric_detection
boolean -
properties
object -
_routing
object Hide _routing attribute Show _routing attribute object
-
required
boolean Required
-
-
_size
object Hide _size attribute Show _size attribute object
-
enabled
boolean Required
-
-
_source
object -
runtime
object Hide runtime attribute Show runtime attribute object
-
*
object Additional properties Hide * attributes Show * attributes object
-
fields
object For type
composite
Hide fields attribute Show fields attribute object
-
*
object Additional properties
-
-
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 -
type
string Required Values are
boolean
,composite
,date
,double
,geo_point
,geo_shape
,ip
,keyword
,long
, orlookup
.
-
-
-
enabled
boolean -
subobjects
string Values are
true
orfalse
. -
_data_stream_timestamp
object Hide _data_stream_timestamp attribute Show _data_stream_timestamp attribute object
-
enabled
boolean Required
-
-
-
mappings
object Required Hide mappings attributes Show mappings attributes object
-
all_field
object Hide all_field attributes Show all_field attributes 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
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 object
-
enabled
boolean Required
-
-
index_field
object Hide index_field attribute Show index_field attribute object
-
enabled
boolean Required
-
-
_meta
object Hide _meta attribute Show _meta attribute object
-
*
object Additional properties
-
-
numeric_detection
boolean -
properties
object -
_routing
object Hide _routing attribute Show _routing attribute object
-
required
boolean Required
-
-
_size
object Hide _size attribute Show _size attribute object
-
enabled
boolean Required
-
-
_source
object -
runtime
object Hide runtime attribute Show runtime attribute object
-
*
object Additional properties Hide * attributes Show * attributes object
-
fields
object For type
composite
Hide fields attribute Show fields attribute object
-
*
object Additional properties
-
-
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 -
type
string Required Values are
boolean
,composite
,date
,double
,geo_point
,geo_shape
,ip
,keyword
,long
, orlookup
.
-
-
-
enabled
boolean -
subobjects
string Values are
true
orfalse
. -
_data_stream_timestamp
object Hide _data_stream_timestamp attribute Show _data_stream_timestamp attribute object
-
enabled
boolean Required
-
-
-
-
curl \
--request GET http://api.example.com/_mapping \
--header "Authorization: $API_KEY"