I'm trying to figure out the best way to programatically export all of the saved objects - Saved Searches, Visualizations, and Dashboard - as individual documents.
I want to be able to create an SDLC around the Dashboard development process and I need to be able to capture anything/everything that a final Dashboard is dependent on, and then store that into a repository for versioning.
So far, the only way I've been able to find (at least per the documentation) to export these items is through the Kibana gui. And even then, Doing an 'Export All' creates a single document that contains everything.
I would like to be able to call the REST API to get a listing of the Saved Objects. And then I would like to use that listing to export each one individually into its own file. Is this possible?
As a secondary question to this - how can I make it so that a newly created index, with no data, can successfully use any saved objects regardless of the fields they contain? This would be for when I know what fields my data will contain (Because we've built dashboards against the data), but I'm building out a new environment, and I don't want to wait for the data to come in and create those fields before I can import the Saved Objects that rely those fields?
Edit: Moved to Kibana category