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 attribute Show response attribute object
-
Additional properties are allowed.
Hide * attributes Show * attributes object
-
item object
Additional properties are allowed.
Hide item attributes Show item attributes object
-
all_field object
Additional properties are allowed.
Hide all_field attributes Show all_field attributes object
-
date_detection boolean
-
dynamic string
Values are
strict
,runtime
,true
, orfalse
. -
dynamic_date_formats array[string]
-
dynamic_templates array[object]
-
_field_names object
Additional properties are allowed.
Hide _field_names attribute Show _field_names attribute object
-
index_field object
Additional properties are allowed.
Hide index_field attribute Show index_field attribute object
-
_meta object
Hide _meta attribute Show _meta attribute object
-
Additional properties are allowed.
-
-
numeric_detection boolean
-
properties object
-
_routing object
Additional properties are allowed.
Hide _routing attribute Show _routing attribute object
-
_size object
Additional properties are allowed.
Hide _size attribute Show _size attribute object
-
_source object
Additional properties are allowed.
-
runtime object
Hide runtime attribute Show runtime attribute object
-
Additional properties are allowed.
Hide * attributes Show * attributes object
-
fields object
For type
composite
Hide fields attribute Show fields attribute object
-
Additional properties are allowed.
-
-
fetch_fields array[object]
For type
lookup
Additional properties are allowed.
-
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
Additional properties are allowed.
-
Values are
boolean
,composite
,date
,double
,geo_point
,ip
,keyword
,long
, orlookup
.
-
-
-
enabled boolean
-
subobjects boolean
-
_data_stream_timestamp object
Additional properties are allowed.
Hide _data_stream_timestamp attribute Show _data_stream_timestamp attribute object
-
-
Additional properties are allowed.
Hide mappings attributes Show mappings attributes object
-
all_field object
Additional properties are allowed.
Hide all_field attributes Show all_field attributes object
-
date_detection boolean
-
dynamic string
Values are
strict
,runtime
,true
, orfalse
. -
dynamic_date_formats array[string]
-
dynamic_templates array[object]
-
_field_names object
Additional properties are allowed.
Hide _field_names attribute Show _field_names attribute object
-
index_field object
Additional properties are allowed.
Hide index_field attribute Show index_field attribute object
-
_meta object
Hide _meta attribute Show _meta attribute object
-
Additional properties are allowed.
-
-
numeric_detection boolean
-
properties object
-
_routing object
Additional properties are allowed.
Hide _routing attribute Show _routing attribute object
-
_size object
Additional properties are allowed.
Hide _size attribute Show _size attribute object
-
_source object
Additional properties are allowed.
-
runtime object
Hide runtime attribute Show runtime attribute object
-
Additional properties are allowed.
Hide * attributes Show * attributes object
-
fields object
For type
composite
Hide fields attribute Show fields attribute object
-
Additional properties are allowed.
-
-
fetch_fields array[object]
For type
lookup
Additional properties are allowed.
-
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
Additional properties are allowed.
-
Values are
boolean
,composite
,date
,double
,geo_point
,ip
,keyword
,long
, orlookup
.
-
-
-
enabled boolean
-
subobjects boolean
-
_data_stream_timestamp object
Additional properties are allowed.
Hide _data_stream_timestamp attribute Show _data_stream_timestamp attribute object
-
-
-
curl \
-X GET http://api.example.com/_mapping