# Import everything with previously exported JSON file via API

**URL:** <https://discuss.elastic.co/t/import-everything-with-previously-exported-json-file-via-api/125228>\
**Category:** Kibana\
**Created:** [March 22, 2018, 4:01pm UTC](https://discuss.elastic.co/t/import-everything-with-previously-exported-json-file-via-api/125228 "2018-03-22T16:01:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fakenine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fakenine/32/29030_2.png) [@fakenine](https://discuss.elastic.co/u/fakenine)\
**Post date:** [March 22, 2018, 4:01pm UTC](https://discuss.elastic.co/t/import-everything-with-previously-exported-json-file-via-api/125228/1 "2018-03-22T16:01:31Z")

</div>

Hello,

In Kibana 6.2.2, I exported all my searches, visualizations and dashboards via the "Export Everything" button in the "Management" section.

How can I use the API to later import everything via the JSON file (via curl for instance) ?

Regards,

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [March 22, 2018, 5:11pm UTC](https://discuss.elastic.co/t/import-everything-with-previously-exported-json-file-via-api/125228/2 "2018-03-22T17:11:44Z")

</div>

You could use the [import dashboards](https://github.com/elastic/kibana/blob/master/src/core_plugins/kibana/server/routes/api/import/index.js) API

---

<div class="post-metadata">

**Author:** ![fakenine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fakenine/32/29030_2.png) [@fakenine](https://discuss.elastic.co/u/fakenine)\
**Post date:** [March 23, 2018, 10:50am UTC](https://discuss.elastic.co/t/import-everything-with-previously-exported-json-file-via-api/125228/3 "2018-03-23T10:50:52Z")

</div>

This does not seem to be working...

`curl -XPOST http://localhost:5601/api/kibana/dashboards/import -H 'kbn-xsrf:true' -H 'Content-type:application/json' -d @export.json`

**Result:**

`{"statusCode":400,"error":"Bad Request","message":"\"value\" must be an object","validation":{"source":"payload","keys":["value"]}}`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 20, 2018, 11:03am UTC](https://discuss.elastic.co/t/import-everything-with-previously-exported-json-file-via-api/125228/4 "2018-04-20T11:03:23Z")

</div>

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