# How to import index-pattern in kibana 6 using API?

**URL:** <https://discuss.elastic.co/t/how-to-import-index-pattern-in-kibana-6-using-api/109299>\
**Category:** Kibana\
**Created:** [November 28, 2017, 2:33am UTC](https://discuss.elastic.co/t/how-to-import-index-pattern-in-kibana-6-using-api/109299 "2017-11-28T02:33:48Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![fragatina](https://avatars.discourse-cdn.com/v4/letter/f/ccd318/32.png) [@fragatina](https://discuss.elastic.co/u/fragatina)\
**Post date:** [November 28, 2017, 8:05pm UTC](https://discuss.elastic.co/t/how-to-import-index-pattern-in-kibana-6-using-api/109299/3 "2017-11-28T20:05:37Z")

</div>

Thanks tylersmalley for your response.  
I've tried that but it doesn't seem to be working.

Example:  
- The following query:  
curl -XPUT -H "kbn-xsrf:true" "[http://localhost:5601/api/saved\_objects/index-pattern/e38f6e90-cf2f-11e7-a5ef-9f5ab64be49e](http://localhost:5601/api/saved_objects/index-pattern/e38f6e90-cf2f-11e7-a5ef-9f5ab64be49e)" -d '{"version": 1, "attributes": {"title": "test-\*"}}'  
- it returns:  
{"statusCode":400,"error":"Bad Request","message":"child "attributes" fails because ["attributes" is required]. "{"version": 1, "attributes": {"title": "test-\*"}" is not allowed","validation":{"source":"payload","keys":["attributes","{"version": 1, "attributes": {"title": "test-\*"}"]}}

---

_[View the full topic](https://discuss.elastic.co/t/how-to-import-index-pattern-in-kibana-6-using-api/109299)._
