Unable to use the Kibana Export Dashboards API

Hi all,

I'm using ELK stak 6.7.1, and would like to use the /api/kibana/dashboards/export API.

Here is what I get when, using the Kibana UI, I export my dashboard:

[
  {
    "_id": "9d77ff30-6b55-11e9-9658-6d980bb4f1af",
    "_type": "dashboard",
    "_source": {
      "title": "cms pdt versions",
      "hits": 0,
      "description": "",
      "panelsJSON": "[{\"embeddableConfig\":{},\"gridData\":{\"x\":0,\"y\":0,\"w\":20,\"h\":11,\"i\":\"1\"},\"id\":\"49682390-6b53-11e9-9658-6d980bb4f1af\",\"panelIndex\":\"1\",\"type\":\"visualization\",\"version\":\"6.7.1\"},{\"embeddableConfig\":{},\"gridData\":{\"x\":20,\"y\":0,\"w\":28,\"h\":11,\"i\":\"2\"},\"id\":\"cc0fe750-6b54-11e9-9658-6d980bb4f1af\",\"panelIndex\":\"2\",\"type\":\"visualization\",\"version\":\"6.7.1\"},{\"gridData\":{\"x\":0,\"y\":11,\"w\":48,\"h\":11,\"i\":\"3\"},\"version\":\"6.7.1\",\"panelIndex\":\"3\",\"type\":\"search\",\"id\":\"93fc64c0-6b53-11e9-9658-6d980bb4f1af\",\"embeddableConfig\":{}}]",
      "optionsJSON": "{\"darkTheme\":false,\"hidePanelTitles\":false,\"useMargins\":true}",
      "version": 1,
      "timeRestore": false,
      "kibanaSavedObjectMeta": {
        "searchSourceJSON": "{\"query\":{\"language\":\"lucene\",\"query\":\"\"},\"filter\":[{\"meta\":{\"index\":\"9b901eb0-65aa-11e9-9658-6d980bb4f1af\",\"type\":\"phrase\",\"key\":\"version.keyword\",\"value\":\"3.7.14\",\"params\":{\"query\":\"3.7.14\",\"type\":\"phrase\"},\"disabled\":false,\"negate\":false,\"alias\":null},\"query\":{\"match\":{\"version.keyword\":{\"query\":\"3.7.14\",\"type\":\"phrase\"}}},\"$state\":{\"store\":\"appState\"}}]}"
      }
    }
  }
]

Then I guess that '9d77ff30-6b55-11e9-9658-6d980bb4f1af' is the ID of my dashboard that I should use in the Kibana API.

So I try:

$ curl -XGET http://vspar-elk-web-01.afp.com:5601/api/kibana/dashboards/export?dashboard=9d77ff30-6b55-11e9-9658-6d980bb4f1af
{
  "version": "6.7.1",
  "objects": [
    {
      "id": "9d77ff30-6b55-11e9-9658-6d980bb4f1af",
      "type": "dashboard",
      "error": {
        "statusCode": 404,
        "message": "Not found"
      }
    }
  ]
}
$

Always get "404 - Not found".
What am I doing wrong ?

Thanks for your help.

I tried the same export request on another host, after upgrade to stack 7.0.1.
Worked fine here.

I will upgrade and 6.7.1 cluster to 7.0.1, and see if it's better.

Will let you know ...

Thanks for the update Erick. The initial problem on 6.7.1 may be related to security if you have security enabled, the requesting user may be unauthenticated or privileged.

Security is not enabled, no authentication required to access data via Kibana.

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