# Unsuccessful at importing Kibana dashboard JSON via curl

**URL:** <https://discuss.elastic.co/t/unsuccessful-at-importing-kibana-dashboard-json-via-curl/177681>\
**Category:** Kibana\
**Created:** [April 20, 2019, 1:08am UTC](https://discuss.elastic.co/t/unsuccessful-at-importing-kibana-dashboard-json-via-curl/177681 "2019-04-20T01:08:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Michael\_Burke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_michael_burke/32/43814_2.png) [@John\_Michael\_Burke](https://discuss.elastic.co/u/John_Michael_Burke)\
**Post date:** [April 20, 2019, 1:08am UTC](https://discuss.elastic.co/t/unsuccessful-at-importing-kibana-dashboard-json-via-curl/177681/1 "2019-04-20T01:08:16Z")

</div>

Hello all,  
I have been trying to import a saved object json into kibana... I saved ~ 4 index-patterns/100 searches etc.. and I have found recommendations that you can import using curl something like this...

> bash-4.2$  
> bash-4.2$ ls  
> export.json kibana.yml  
> bash-4.2$ curl -X POST -H "Content-Type: application/json" -H "kbn-xsrf: true" -d @export.json [http://localhost:5601/api/kibana/dashboards/import](http://localhost:5601/api/kibana/dashboards/import)  
> {"statusCode":400,"error":"Bad Request","message":""value" must be an object","validation":{"source":"payload","keys":["value"]}}bash-4.2$

Unfortunately as you can see this results in a curl failure...  
I have inspected the JSON myself and see that it is actually a list of JSONs... I assume for the respective objects.

Is it possible to bulk import this JSON with multiple objects using a curl like this?  
I have tried running this inside my kibana container, outside my docker-compose instance locally, and in another container.

I feel like something obvious is just not sticking out to me any help is appreciated... and unfortunately I can't really share the export.json... however if someone gives me one to test I can give it a go.

Cheers!

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [April 29, 2019, 9:16am UTC](https://discuss.elastic.co/t/unsuccessful-at-importing-kibana-dashboard-json-via-curl/177681/2 "2019-04-29T09:16:30Z")

</div>

Hey @John_Michael_Burke,

Thanks for your question, may I ask you the Kibana version from which you exported the dashboard and the one you want to import the dashboard?

There is a similar issue on Kibana GH repo: [https://github.com/elastic/kibana/issues/25790](https://github.com/elastic/kibana/issues/25790)  
can you please check if that the same case? TLDR: is the dashboard exported via Kibana UI `Management > Saved Objects`

---

<div class="post-metadata">

**Author:** ![John\_Michael\_Burke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_michael_burke/32/43814_2.png) [@John\_Michael\_Burke](https://discuss.elastic.co/u/John_Michael_Burke)\
**Post date:** [April 29, 2019, 5:05pm UTC](https://discuss.elastic.co/t/unsuccessful-at-importing-kibana-dashboard-json-via-curl/177681/3 "2019-04-29T17:05:21Z")

</div>

I was experiencing this in 6.6.0. I tried importing a dashboard I downloaded via curl and the GUI and neither worked... the only way this works is manually exporting/importing through the GUI. I will be switching to 7.0.0 and see if this resolves the issue.

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [May 3, 2019, 10:27am UTC](https://discuss.elastic.co/t/unsuccessful-at-importing-kibana-dashboard-json-via-curl/177681/4 "2019-05-03T10:27:39Z")

</div>

The export/import functionality from UI or API are not interchangeable. If you export from UI you can import back only from UI. The same is trough AP, you can import it only via API.

---

<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:** [May 31, 2019, 10:28am UTC](https://discuss.elastic.co/t/unsuccessful-at-importing-kibana-dashboard-json-via-curl/177681/5 "2019-05-31T10:28:05Z")

</div>

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