# Kibana saved object api for creating index pattern is not working

**URL:** <https://discuss.elastic.co/t/kibana-saved-object-api-for-creating-index-pattern-is-not-working/183914>\
**Category:** Kibana\
**Created:** [June 3, 2019, 8:43am UTC](https://discuss.elastic.co/t/kibana-saved-object-api-for-creating-index-pattern-is-not-working/183914 "2019-06-03T08:43:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shwetha\_Naranapura](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shwetha_naranapura/32/47324_2.png) [@Shwetha\_Naranapura](https://discuss.elastic.co/u/Shwetha_Naranapura)\
**Post date:** [June 3, 2019, 8:43am UTC](https://discuss.elastic.co/t/kibana-saved-object-api-for-creating-index-pattern-is-not-working/183914/1 "2019-06-03T08:43:54Z")

</div>

Hi,

I am using following code to create indexpattern but am facing errors:

curl -X POST "[http://localhost:5601/api/saved\_objects/index-pattern/my-pattern-](http://localhost:5601/api/saved_objects/index-pattern/my-pattern-)_" -H "kbn-xsrf:true" -H 'kbn-version:6.8.0' -H 'Content-Type:application/json' -d '{"attributes":{"title":"my-pattern-_"}}'

Errors:

{"statusCode":400,"error":"Bad Request","message":"child "attributes" fails because ["attributes" is required]. "[{"attributes":{"title":"my-pattern-\*"}}]" is not allowed","validation":{"source":"payload","keys":["attributes","[{"attributes":{"title":"my-pattern-\*"}}]"]}}

Thanks  
Shwetha

---

<div class="post-metadata">

**Author:** ![nickpeihl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickpeihl/32/112622_2.png) [@nickpeihl](https://discuss.elastic.co/u/nickpeihl)\
**Post date:** [June 3, 2019, 6:49pm UTC](https://discuss.elastic.co/t/kibana-saved-object-api-for-creating-index-pattern-is-not-working/183914/2 "2019-06-03T18:49:56Z")

</div>

That is strange. Do you see any relevant errors in your Kibana logs?

---

<div class="post-metadata">

**Author:** ![Shwetha\_Naranapura](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shwetha_naranapura/32/47324_2.png) [@Shwetha\_Naranapura](https://discuss.elastic.co/u/Shwetha_Naranapura)\
**Post date:** [June 11, 2019, 7:08am UTC](https://discuss.elastic.co/t/kibana-saved-object-api-for-creating-index-pattern-is-not-working/183914/3 "2019-06-11T07:08:13Z")

</div>

No logs in kibana also.

---

<div class="post-metadata">

**Author:** ![alchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alchy/32/47743_2.png) [@alchy](https://discuss.elastic.co/u/alchy)\
**Post date:** [June 11, 2019, 9:41am UTC](https://discuss.elastic.co/t/kibana-saved-object-api-for-creating-index-pattern-is-not-working/183914/4 "2019-06-11T09:41:18Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/1/f/1f4e4198829b9b45514e113b65cca59a6426b740.png)  
the same behavior  
version kibana-7.1.1-1.x86\_64

this seem to be related, but I do not understand the error... {"message":"all shards failed: [illegal\_argument\_exception] Fielddata is disabled on text fields by default. Set fielddata=true on [type] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.","statusCode":400,"error":"Bad Request"}

---

<div class="post-metadata">

**Author:** ![alchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alchy/32/47743_2.png) [@alchy](https://discuss.elastic.co/u/alchy)\
**Post date:** [June 11, 2019, 10:39am UTC](https://discuss.elastic.co/t/kibana-saved-object-api-for-creating-index-pattern-is-not-working/183914/5 "2019-06-11T10:39:57Z")

</div>

I've found possible fix:

Wojciech\_Kuligowski]([https://discuss.elastic.co/u/Wojciech\_Kuligowski](https://discuss.elastic.co/u/Wojciech_Kuligowski))

[12d](https://discuss.elastic.co/t/kibana-7-cant-load-index-pattern/180167/15)

I have finally found solution in another discussion - set kibana.index in kibana.yml to some new name, which causes creating new index for kibana. After restart index patterns work fine.

---

<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:** [July 9, 2019, 10:40am UTC](https://discuss.elastic.co/t/kibana-saved-object-api-for-creating-index-pattern-is-not-working/183914/6 "2019-07-09T10:40:03Z")

</div>

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