Elasticsearch
Inspect Elasticsearch index mappings
Elasticsearch mappings are available through the Get mapping API or Kibana Index Management. The API is scriptable and supports wildcards, while Kibana provides a visual mapping view for one index.
Documentation reviewed · 2 methods with sources
Ways to do it
API
GET /{index}/_mapping
Fetch mapping definitions for an index, alias, data stream, or wildcard expression.
Read source: Elasticsearch Get mapping API- Requirements
- An Elasticsearch endpoint and API key, Basic, or Bearer authentication with the view_index_metadata index privilege.
- Limitations
- A large index mapping can be verbose. For a narrower response use the get field mapping variant, and remember data-stream requests resolve to backing indices.
Example shell
curl --fail --header "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/books/_mapping"Interface
Kibana Index Management → Mappings
Open Index Management, select one index, and use its mapping view to inspect field types and mapping definitions.
Read source: Kibana index operations reference- Requirements
- Kibana access plus monitor cluster privilege and view_index_metadata and manage index privileges for Index Management.
- Limitations
- Index Management features and privileges differ between Elastic Stack and Elastic Cloud Serverless, and some operations are unavailable in Serverless.