# Importing Kibana JSON file Using Kibana SaveObject API call

**URL:** <https://discuss.elastic.co/t/importing-kibana-json-file-using-kibana-saveobject-api-call/156394>\
**Category:** Kibana\
**Created:** [November 13, 2018, 6:54am UTC](https://discuss.elastic.co/t/importing-kibana-json-file-using-kibana-saveobject-api-call/156394 "2018-11-13T06:54:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shriharsha](https://avatars.discourse-cdn.com/v4/letter/s/7cd45c/32.png) [@shriharsha](https://discuss.elastic.co/u/shriharsha)\
**Post date:** [November 13, 2018, 6:54am UTC](https://discuss.elastic.co/t/importing-kibana-json-file-using-kibana-saveobject-api-call/156394/1 "2018-11-13T06:54:42Z")

</div>

I created the JSON file with Saved Objects bulk get api call. My API Call is as follows:  
curl -X POST "[http://localhost:5601/api/saved\_objects/\_bulk\_get](http://localhost:5601/api/saved_objects/_bulk_get)" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'  
[  
{  
"type": "index-pattern",  
"id": "4afc1210-cb86-11e8-a511-856ad0f7e2c7"  
}  
]  
' \> Cloudtrail.json

Then I used bulk created api call to import this JSON file as follows:  
`curl -X POST "http://localhost:5601/api/saved_objects/_bulk_create" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d @Cloudtrail.json`

It is showing the following error:  
`{"statusCode":400,"error":"Bad Request","message":"\"value\" must be an array","validation":{"source":"payload","keys":["value"]}}`

So what to do now?

---

<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:** [December 11, 2018, 6:55am UTC](https://discuss.elastic.co/t/importing-kibana-json-file-using-kibana-saveobject-api-call/156394/2 "2018-12-11T06:55:02Z")

</div>

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