Programaticaly import / export dashboard with visualisations


(Wojciech Pietrzak) #1

Is there a way to programmatically (API call) import / export the dashboards with visualisations?

I've seen https://github.com/elastic/kibana/pull/10858/files

When I export my dashboard, I get a JSON representation, but it references other documents (visualisations) which are not presented in the exported JSON.

I know I can parse it, and make more API calls to fetch the visualisation documents, but this is cumbersome.

Fiddling around and modifying the JSON is not an option.

What is the proper way to do it?


(Bhavya R M) #2

Hi,

When you do curl -XGET localhost:5601/api/kibana/dashboards/export?dashboard=79ffd6e0-faa0-11e6-947f-177f697178b8 , you are exporting the dashboard with all its associated visualizations/saved searches.

So when you import that file again - you should be able to access and see your visualizations on the dashboard.

I am not sure why you don't have vizs in your json. can you open the imported json in Kibana and see if you can see visualizations?

Thanks,
Bhavya


(system) #3

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