Could not locate that index-pattern (id: 1), click here to re-create it

Hi
i am trying to create an index-pattern from query , i am able to create it with bellow query

POST /.kibana/doc/1
{
"type" : "index-pattern",
"index-pattern":
{
"title" : "test",
"timeFieldName" : "@timestamp"
}
}

output of the above query is

{
"_index": ".kibana",
"_type": "doc",
"_id": "1",
"_version": 3,
"result": "created",
"_shards": {
"total": 2,
"successful": 1,
"failed": 0
},
"_seq_no": 129,
"_primary_term": 16
}

when i go to management and click on "test" index pattern i am gettig strange error i.e
Could not locate that index-pattern (id: 1), click here to re-create it

what is wrong here , please help me

If you look at this comment: https://github.com/elastic/kibana/issues/3709#issuecomment-349335920 you will see an example of how to create an index pattern in Kibana via API call. I had to adjust the URL myself to include the context root for Kibana. My current Kibana root is: http://localhost:5601/kmz/app/kibana so I made the api call to /kmz/api... Note that the kmz portion of that URL will change every time you restart kibana.

1 Like

Yes it is worked :wink: Thanks for the reply

Great, glad things are working for you.

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