Skip to content

Conversation

@danhermann
Copy link
Contributor

Provides a /_resolve/index/{name(s)} endpoint that resolves the specified name(s) and/or wildcard expressions to indices, aliases, and data streams.

Multiple expressions and remote clusters are supported. E.g.:

GET /_resolve/index/f*,remoteCluster1:bar*

The response is in the format:

{
  "indices" : [
    {
      "name" : "foo-000001",
      "attributes" : [
        "open",
        "hidden"
      ],
      "data_stream" : "foo"
    },
    {
      "name" : "foo_closed",
      "attributes" : [
        "closed"
      ]
    },
    {
      "name" : "remoteCluster1:bar-01",
      "attributes" : [
        "open"
      ]
    },
    {
      "name" : "freeze-index",
      "aliases" : [
        "f-alias"
      ],
      "attributes" : [
        "open",
        "frozen"
      ]
    }
  ],
  "aliases" : [
    {
      "name" : "f-alias",
      "indices" : [
        "freeze-index",
        "my-index"
      ]
    }
  ],
  "data_streams" : [
    {
      "name" : "foo",
      "backing_indices" : [
        "foo-000001"
      ],
      "timestamp_field" : "@timestamp"
    }
  ]
}

The attributes array for an index will always contain either open or closed as well as hidden or frozen if either of the latter two states applies to the index.

The API supports the standard expand_wildcards parameter as used on other index APIs.

Relates to #53100

Relates to elastic/kibana#64858

Backport of #57626

@danhermann danhermann added >non-issue :Data Management/Indices APIs APIs to create and manage indices and templates backport :Data Management/Data streams Data streams and their lifecycles v7.9.0 labels Jun 12, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (:Core/Features/Indices APIs)

@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Jun 12, 2020
@danhermann
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/packaging-sample-matrix-windows

@danhermann danhermann merged commit 17f3318 into elastic:7.x Jun 12, 2020
@danhermann danhermann deleted the backport_7x_57626_resolve_index_api branch June 12, 2020 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport :Data Management/Data streams Data streams and their lifecycles :Data Management/Indices APIs APIs to create and manage indices and templates >non-issue Team:Data Management Meta label for data/management team v7.9.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants