Import dashboard API

[experimental] This functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. Import dashboards and corresponding saved objects.

Request

POST <kibana host>:<port>/api/kibana/dashboards/import

Query parameters

force

(Optional, boolean) Overwrite any existing objects on ID conflict.

exclude

(Optional, array) Saved object types that you want to exclude from the import.

Request body

Use the complete response body from the Export dashboard API as the request body. Do not manually construct a payload to the endpoint.

Response body

objects

(array) A top level property that includes the saved objects.

Response code

200

Indicates a successful call, even if there are errors importing individual saved objects. If there are errors, the error information is returned in the response body on an object-by-object basis.

Example

  1. $ curl -X POST api/kibana/dashboards/import?exclude=index-pattern
  2. {
  3. "objects": [
  4. {
  5. "id": "80b956f0-b2cd-11e8-ad8e-85441f0c2e5c",
  6. "type": "visualization",
  7. "updated_at": "2018-09-07T18:40:33.247Z",
  8. "version": 1,
  9. "attributes": {
  10. "title": "Count Example",
  11. "visState": "{\"title\":\"Count Example\",\"type\":\"metric\",\"params\":{\"addTooltip\":true,\"addLegend\":false,\"type\":\"metric\",\"metric\":{\"percentageMode\":false,\"useRanges\":false,\"colorSchema\":\"Green to Red\",\"metricColorMode\":\"None\",\"colorsRange\":[{\"from\":0,\"to\":10000}],\"labels\":{\"show\":true},\"invertColors\":false,\"style\":{\"bgFill\":\"#000\",\"bgColor\":false,\"labelColor\":false,\"subText\":\"\",\"fontSize\":60}}},\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"schema\":\"metric\",\"params\":{}}]}",
  12. "uiStateJSON": "{}",
  13. "description": "",
  14. "version": 1,
  15. "kibanaSavedObjectMeta": {
  16. "searchSourceJSON": "{\"index\":\"90943e30-9a47-11e8-b64d-95841ca0b247\",\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}"
  17. }
  18. }
  19. },
  20. {
  21. "id": "90943e30-9a47-11e8-b64d-95841ca0b247",
  22. "type": "index-pattern",
  23. "updated_at": "2018-09-07T18:39:47.683Z",
  24. "version": 1,
  25. "attributes": {
  26. "title": "kibana_sample_data_logs",
  27. "timeFieldName": "timestamp",
  28. "fields": "<truncated for example>",
  29. "fieldFormatMap": "{\"hour_of_day\":{}}"
  30. }
  31. },
  32. {
  33. "id": "942dcef0-b2cd-11e8-ad8e-85441f0c2e5c",
  34. "type": "dashboard",
  35. "updated_at": "2018-09-07T18:41:05.887Z",
  36. "version": 1,
  37. "attributes": {
  38. "title": "Example Dashboard",
  39. "hits": 0,
  40. "description": "",
  41. "panelsJSON": "[{\"gridData\":{\"w\":24,\"h\":15,\"x\":0,\"y\":0,\"i\":\"1\"},\"version\":\"7.0.0-alpha1\",\"panelIndex\":\"1\",\"type\":\"visualization\",\"id\":\"80b956f0-b2cd-11e8-ad8e-85441f0c2e5c\",\"embeddableConfig\":{}}]",
  42. "optionsJSON": "{\"useMargins\":true,\"hidePanelTitles\":false}",
  43. "version": 1,
  44. "timeRestore": false,
  45. "kibanaSavedObjectMeta": {
  46. "searchSourceJSON": "{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}"
  47. }
  48. }
  49. }
  50. ]
  51. }

Most Popular