Kibana saved object api for creating index pattern is not working

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-" -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

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

No logs in kibana also.


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"}

I've found possible fix:

Wojciech_Kuligowski](https://discuss.elastic.co/u/Wojciech_Kuligowski)

12d

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.