# Kibana API for automatic Export all

**URL:** https://discuss.elastic.co/t/kibana-api-for-automatic-export-all/201243
**Category:** Kibana
**Created:** [September 26, 2019, 1:32pm UTC](https://discuss.elastic.co/t/kibana-api-for-automatic-export-all/201243 "2019-09-26T13:32:31Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![mikecote](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikecote/32/58549_2.png) [@mikecote](https://discuss.elastic.co/u/mikecote)
#### Post date: [September 30, 2019, 1:41pm UTC](https://discuss.elastic.co/t/kibana-api-for-automatic-export-all/201243/6 "2019-09-30T13:41:39Z")

</div>

Hi @GitsBdr,

I think you're hitting the proper API now. The error message you're receiving I believe is because the system can't find the index pattern with id `AWM_MwmMTOMwvg7W1USl`. Something down the chain must have a broken reference to an index pattern and is failing to export (saved search or visualization possibly).

We have an issue open ([https://github.com/elastic/kibana/issues/43876](https://github.com/elastic/kibana/issues/43876)) to allow the export to go through with missing references but at this time the bad reference would have to be fixed before the export is successful.

To find which object is using the missing index pattern, you can use the `find` API ([https://www.elastic.co/guide/en/kibana/current/saved-objects-api-find.html](https://www.elastic.co/guide/en/kibana/current/saved-objects-api-find.html)) with `hasReference` parameter. `hasReference: { type: 'index-pattern', id: 'AWM_MwmMTOMwvg7W1USl' }`. Depending on the results, you may be able to fix it in the Saved Objects Management section.

Hope this helps,  
Mike.

---

_[View the full topic](https://discuss.elastic.co/t/kibana-api-for-automatic-export-all/201243)._
