In order to formalize the process of Kibana dashboard updates, we want to keep them under version control and integrate into CI flow. Importing/exporting of a dashboard via API and keeping the JSON in git sounds like a reasonable solution.
Interesting...
When I just open the URL https://kibana.server.com/api/kibana/dashboards/export?dashboard=26388130-3206-11e8-bf0f-178e29f74917, I get the JSON object with complete dashboard content.
Execution of the command
GET api/kibana/dashboards/export?dashboard=26388130-3206-11e8-bf0f-178e29f74917
in Kibana's Dev Tools causes the request
POST https://kibana.server.com/api/console/proxy?path=api%2Fkibana%2Fdashboards%2Fexport%3Fdashboard%3D26388130-3206-11e8-bf0f-178e29f74917&method=GET
It is a little confusing as the dev tools are communicating with the elasticsearch api but this functionality uses the kibana api which you can best reach using cUrl or similar. I was able to get this working locally on 6.6 using the following cmd: curl -XGET 'http://localhost:5601/xbr/api/kibana/dashboards/export?dashboard=722b74f0-b882-11e8-a6d9-e546fe2bba5f
Thank you, @Aaron_Caldwell for confirming my suspicions! I think it would be nice to be able to use Dev Tools as a universal interface to the APIs of all components. Until then, I would suggest adding a warning in the documentation or even in the Dev Tools itself. Even though I think no self-respecting developer reads those warnings ever.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.