---
type: api
title: Get index information
description: Get information about one or more indices. For data streams, the API returns information about the
url: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v9/operation/operation-indices-get
resource: https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v9/operation/operation-indices-get
products:
  - Elasticsearch
---

# Get index information

## Paths

- `GET` `/{index}`

#### Path parameters

- `index` (union string | string[]) — required
  Comma-separated list of data streams, indices, and index aliases used to limit the request.
Wildcard expressions (*) are supported.

## Description

Get information about one or more indices. For data streams, the API returns information about the
stream’s backing indices.

## Required authorization

- Index privileges: `view_index_metadata`, `manage`

## Authentication

- Api key: `Authorization: <value>`
  Elasticsearch APIs support key-based authentication.
  You must create an API key and use the encoded value in the request header.
  For example:
  
  
  ```
  curl -X GET "${ES_URL}/_cat/indices?v=true" \
    -H "Authorization: ApiKey ${API_KEY}"
  ```
  
  To get API keys, use the `/_security/api_key` APIs.
- Basic: `Authorization: Basic <credentials>`
- Bearer: `Authorization: Bearer <token>`
  Elasticsearch APIs support the use of bearer tokens in the `Authorization` HTTP header to authenticate with the API.
  For examples, refer to [Token-based authentication services](https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/token-based-authentication-services)

## Query string parameters

- `allow_no_indices` (boolean · default: true) — optional
  A setting that does two separate checks on the index expression.
If `false`, the request returns an error (1) if any wildcard expression
(including `_all` and `*`) resolves to zero matching indices or (2) if the
complete set of resolved indices, aliases or data streams is empty after all
expressions are evaluated. If `true`, index expressions that resolve to no
indices are allowed and the request returns an empty result.
- `expand_wildcards` (string · default: open) — optional
  Type of index that wildcard expressions 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.

Supported values include:
  - `all`: Match any data stream or index, including hidden ones.
  - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
  - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
  - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
  - `none`: Wildcard expressions are not accepted.
  Values: `all`, `open`, `closed`, `hidden`, `none`
- `flat_settings` (boolean · default: false) — optional
  If true, returns settings in flat format.
- `ignore_unavailable` (boolean · default: false) — optional
  If `false`, the request returns an error if it targets a concrete (non-wildcarded)
index, alias, or data stream that is missing, closed, or otherwise unavailable.
If `true`, unavailable concrete targets are silently ignored.
- `include_defaults` (boolean · default: false) — optional
  If true, return all default settings in the response.
- `local` (boolean · default: false) — optional
  If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.
- `master_timeout` (string · default: 30s) — optional
  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.
- `features` (union · default: ['aliases', 'mappings', 'settings']) — optional
  Return only information on specified index features

Supported values include: `aliases`, `mappings`, `settings`
  Values: `aliases`, `mappings`, `settings`

## Response

`application/json`

- `<string>` (object)
  - `aliases` (map string to object)
    Map values (object)
    - `filter` ({} Query)
      Query used to limit documents the alias can access.
      See [Query](https://www.elastic.co/elastic/docs-builder/docs/4493/api/doc/elasticsearch/v9/types/_types-query_dsl-querycontainer)
    - `index_routing` (string)
      Value used to route indexing operations to a specific shard.
If specified, this overwrites the `routing` value for indexing operations.
    - `is_hidden` (boolean · default: false)
      If `true`, the alias is hidden.
All indices for the alias must have the same `is_hidden` value.
    - `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.
  - `mappings` (object)
    - `all_field` (object)
      - `analyzer` (string)
      - `enabled` (boolean)
      - `omit_norms` (boolean)
      - `search_analyzer` (string)
      - `similarity` (string)
      - `store` (boolean)
      - `store_term_vector_offsets` (boolean)
      - `store_term_vector_payloads` (boolean)
      - `store_term_vector_positions` (boolean)
      - `store_term_vectors` (boolean)
    - `date_detection` (boolean)
    - `dynamic` (enum)
      Values: `strict`, `runtime`, `true`, `false`
    - `dynamic_date_formats` (string[])
    - `dynamic_templates` (string to object[])
    - `_field_names` (object)
      - `enabled` (boolean)
    - `index_field` (object)
      - `enabled` (boolean)
    - `_meta` (object)
    - `numeric_detection` (boolean)
    - `properties` (map string to oneOf)
    - `_routing` (object)
      - `required` (boolean)
    - `_size` (object)
      - `enabled` (boolean)
    - `_source` (object)
      - `enabled` (boolean)
      - `excludes` (string[])
      - `includes` (string[])
      - `mode` (enum)
        

Supported values include:
  - `disabled`
  - `stored`
  - `columnar_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`, `columnar_stored`, `synthetic`
    - `runtime` (map string to object)
      Map values (object)
      - `fields` (map string to object)
        For type `composite`
        Map values (object)
        - `type` (enum)
          Values: `boolean`, `composite`, `date`, `double`, `geo_point`, `geo_shape`, `ip`, `keyword`, `long`, `lookup`
      - `fetch_fields` (object[])
        For type `lookup`
        - `field` (string)
        - `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)
        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)
  - `settings` (object)
  - `defaults` (object)
    Default settings, included when the request's `include_default` is `true`.
  - `data_stream` (string)
  - `lifecycle` (object)
    Data stream lifecycle applicable if this is a 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.
    - `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)
        The duration since rollover when this downsampling round should execute
      - `fixed_interval` (string)
        The downsample interval.
    - `downsampling_method` (enum)
      The method used to downsample the data. There are two options `aggregate` and `last_value`. It requires
`downsampling` to be defined. Defaults to `aggregate`.
      Values: `aggregate`, `last_value`
    - `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.
    - `frozen_after` (string)
      The period after which data stream backing indices are automatically converted to partially mounted searchable snapshots.
This field is valid only on main data stream lifecycles and cannot be set on failure-store lifecycles.
## Code examples

#### Console

```console
GET /my-index-000001
```

#### JavaScript

```javascript
const response = await client.indices.get({
  index: "my-index-000001",
});
```

#### Python

```python
resp = client.indices.get(
    index="my-index-000001",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/my-index-000001" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.indices().get(g -> g
    .index("my-index-000001")
);
```

#### C#

```c#
var response = await client.Indices.GetAsync(indices: new[] { "my-index-000001" });
```

#### PHP

```php
$resp = $client->indices()->get([
    "index" => "my-index-000001",
]);
```

#### Ruby

```ruby
response = client.indices.get(
  index: "my-index-000001"
)
```

