How to find kibana's full id?

When I do _cat/indices I see index id like this: QWsT5b6YR92v-1UIxJHJrw.
When I open a saved object in the same kibana index, I see different id:
e5234d00-123b-11e8-ac70-55d54df89f62

Why the id's aren't the same?

If I want to manualy change index id in exported visualization (in order to use in a different index) I need the longer id.
Is there an easy way to find this ID that dosen't involve opening a new visualization and checking the id that stored inside?

Hey,

the id within the saved object of a visualization (or other element) does not refer to that ID you are seeing when querying _cat/indices. It instead refers to the id of the index pattern saved object for that index pattern that you created.

You can query them via GET /.kibana/_search?q=type:index-pattern This will give you a result of all index patterns you created and the id of the actual ES document (without the index-pattern: prefix) is the id you are looking for:

{
  "hits": {
    "hits": [
      {
        "_index": ".kibana",
        "_type": "doc",
        "_id": "index-pattern:abeee130-44a2-11e8-832f-4300ee7472e2",
        "_score": 1.5141277,
        "_source": {
          "type": "index-pattern",
          "updated_at": "2018-04-20T13:56:50.007Z",
          "index-pattern": {
            "title": "movie_lens_users*",
          ...

In this example abeee130-44a2-11e8-832f-4300ee7472e2 is the id for the movie_lens_users* index pattern.

Cheers,
Tim

1 Like

Thanks!

Is there a way to single out the id in the curl, with a given "title"?

You cannot make Elasticsearch to ONLY return the id. But you can use command line tools like jq to post process the JSON response.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.