[RESOLVED] "No handler found" while trying to export/import a dashboard in Kibana's Dev Tools

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.

We have an Elasticsearch/Kibana deployment in Elastic cloud and until recently it was running version 6.3.2 which does not have the support for import/export API. That is why it was upgraded to 6.6.0 and, according to https://www.elastic.co/guide/en/kibana/6.6/dashboard-import-api-export.html that functionality should be available there. I have copied the UUID 26388130-3206-11e8-bf0f-178e29f74917 of the dashboard from its URL https://kibana.server.com/app/kibana#/dashboard/26388130-3206-11e8-bf0f-178e29f74917 and tried exporting it in Kibana's DevTools:

GET api/kibana/dashboards/export?dashboard=26388130-3206-11e8-bf0f-178e29f74917

But I got the response

{
  "error": "no handler found for uri [/api/kibana/dashboards/export?dashboard=26388130-3206-11e8-bf0f-178e29f74917&pretty] and method [GET]"
} 

Is that documentation outdated? Or am I doing something terribly stupid? :thinking:

Interesting... :thinking:
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

and that seems to be broken.

Hello Victor,

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

Regards,
Aaron

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. :wink:

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