# Use same dashboard on another index

**URL:** <https://discuss.elastic.co/t/use-same-dashboard-on-another-index/228461>\
**Category:** Kibana\
**Created:** [April 17, 2020, 7:32am UTC](https://discuss.elastic.co/t/use-same-dashboard-on-another-index/228461 "2020-04-17T07:32:40Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![manojkrishna561994](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@manojkrishna561994](https://discuss.elastic.co/u/manojkrishna561994)\
**Post date:** [April 17, 2020, 7:32am UTC](https://discuss.elastic.co/t/use-same-dashboard-on-another-index/228461/1 "2020-04-17T07:32:40Z")

</div>

I have created dashboard with multiple visualisations in it on index name: test\_1.

Now i want to use this dashboard on another index name: test\_2 which has same fields and same data in fact.

I have downloaded the dashboard ndjson file and uploaded it.. and did inspect on it and changed the index name and in the ndjson file also i have renamed the index name to test\_2 but the dashboard is not showing data.

Is this is how i need to apply the same dashboard on another index which is of same format? Kindly suggest.

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [April 22, 2020, 4:17pm UTC](https://discuss.elastic.co/t/use-same-dashboard-on-another-index/228461/2 "2020-04-22T16:17:14Z")

</div>

Your approach is close to what I would recommend. You can use the export and import APIs, as long as you are including all the references to the saved visualizations in the dashboard. You will need to find the indexpattern name and ID for the new index pattern, since we refer to index patterns by both name and ID in a few places.

---

<div class="post-metadata">

**Author:** ![manojkrishna561994](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@manojkrishna561994](https://discuss.elastic.co/u/manojkrishna561994)\
**Post date:** [April 23, 2020, 7:03am UTC](https://discuss.elastic.co/t/use-same-dashboard-on-another-index/228461/3 "2020-04-23T07:03:24Z")

</div>

Thanks for your reply Wylie.

There are few questions:

1. So there is no console or anthing like that instead of manually editing the dashboard.ndjson file in reference[id] field with the new index id?

2. Is there any API to get Index ID; I know that we can get the index ID from Index management\>index name , and in the url I can get the index ID but this might not be suggestable. Is there any way to get ID?

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [April 23, 2020, 2:49pm UTC](https://discuss.elastic.co/t/use-same-dashboard-on-another-index/228461/4 "2020-04-23T14:49:09Z")

</div>

1. Right, this is a workaround you can only do via scripting.
2. The Index Pattern ID is the ID of the saved object: you can find this by running a search request against the `.kibana` index, something like:

```auto
POST .kibana/_search
{
  query: { match_phrase: { type: 'index-pattern' } }
}

```

---

<div class="post-metadata">

**Author:** ![manojkrishna561994](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@manojkrishna561994](https://discuss.elastic.co/u/manojkrishna561994)\
**Post date:** [April 23, 2020, 3:25pm UTC](https://discuss.elastic.co/t/use-same-dashboard-on-another-index/228461/5 "2020-04-23T15:25:27Z")

</div>

> [@wylie](#):
>
> only do via scripting.

Did you mean a piece of code to edit in all the places in ndjson or anything like painless scripting? If painless scripting, can you pls give me some idea.

Thank you

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [April 23, 2020, 4:14pm UTC](https://discuss.elastic.co/t/use-same-dashboard-on-another-index/228461/6 "2020-04-23T16:14:00Z")

</div>

I do not mean painless scripting, I mean the general concept of using the Kibana export/import API to modify dashboards.

---

<div class="post-metadata">

**Author:** ![manojkrishna561994](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@manojkrishna561994](https://discuss.elastic.co/u/manojkrishna561994)\
**Post date:** [April 23, 2020, 8:15pm UTC](https://discuss.elastic.co/t/use-same-dashboard-on-another-index/228461/7 "2020-04-23T20:15:13Z")

</div>

I am trying with export dashbaord api in dev\_console in this format `GET <ip-address>/api/kibana/dashboards/export?dashboard=942dcef0-b2cd-11e8-ad8e-85441f0c2e5c` and i am getting `{ "error" : "no handler found for uri [/<ip-address>/api/kibana/dashboards/export?dashboard=942dcef0-b2cd-11e8-ad8e-85441f0c2e5c&pretty=true] and method [GET]" } `

Is the format correct? I'm using v7.6

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [April 23, 2020, 8:38pm UTC](https://discuss.elastic.co/t/use-same-dashboard-on-another-index/228461/8 "2020-04-23T20:38:31Z")

</div>

No, that is not correct. Here is the documentation [https://www.elastic.co/guide/en/kibana/current/saved-objects-api-export.html](https://www.elastic.co/guide/en/kibana/current/saved-objects-api-export.html)

---

<div class="post-metadata">

**Author:** ![manojkrishna561994](https://avatars.discourse-cdn.com/v4/letter/m/439d5e/32.png) [@manojkrishna561994](https://discuss.elastic.co/u/manojkrishna561994)\
**Post date:** [April 24, 2020, 12:30pm UTC](https://discuss.elastic.co/t/use-same-dashboard-on-another-index/228461/9 "2020-04-24T12:30:36Z")

</div>

I'm trying to export my dashbaord using saved objects api, however it is giving me `no handler found for uri` error.

Here is what i have tried:

```auto
GET <vm-ip-address>/api/kibana/dashboards/export?dashboard=b986a390-7a5c-11ea-b521-59fdf02d9ef  

```

Even I have used this but it did not work `POST <kibana host>:<port>/s/<space_id>/api/saved_objects/_export`

Error message:  
{  
"error" : "no handler found for uri [/api/kibana/dashboards/export?dashboard=b986a390-7a5c-11ea-b521-59fdf02d9ef&pretty=true] and method [GET]"  
}

I access kibana generally in this format : `<vm-ip-address>/app/kibana` and `http://localhost:5601/app/kibana` doesnt work because of the way i have installed.

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [April 24, 2020, 12:39pm UTC](https://discuss.elastic.co/t/use-same-dashboard-on-another-index/228461/10 "2020-04-24T12:39:49Z")

</div>

Are you trying to do this from dev tools? The saved object apis are not available there, you have to use curl or another tool outside of Kibana to access them.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 22, 2020, 12:39pm UTC](https://discuss.elastic.co/t/use-same-dashboard-on-another-index/228461/11 "2020-05-22T12:39:55Z")

</div>

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