Kibana Index Pattern via API

I have used API to create ES indexes. Unfortunately Kibana Index Patterns doesn't get auto-generated when we do that. I have tried using the following API call

curl -X POST "http://localhost:5601/api/saved_objects/index-pattern/iwantotestmyindexpattern" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '
{
"attributes": {
"title":"iwanttotestmyindex*",
"timeFieldName":"execution_time"
}
}'

It creates the index pattern but doesn't associate any fields with that which is already available part of the ES indicies.

Add a single field object to the saved object missing searchable, aggregatable, or readFromDocValues and the field list will be generated next time a user with index pattern edit privileges loads the index pattern. - src/plugins/data/common/index_patterns/index_patterns/index_pattern.ts:171

It should be noted that we aim to directly address this use case in future releases.

If I am using the elastic cloud version there is no way to achieve this correct. What you are suggesting is if we have a installed it ourselves.

My use case is to continuosly updates bulk csv data on a daily basis. What is the best way to solve this without having to use the Kibana UI.

Sorry, I communicated my intention poorly - thats the code my suggested change will trigger. You do not need to modify it.

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