Kibana API for automatic Export all

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) 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) 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.