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

**URL:** <https://discuss.elastic.co/t/could-not-locate-that-index-pattern-id-1-click-here-to-re-create-it/119620>\
**Category:** Kibana\
**Created:** [February 13, 2018, 11:26am UTC](https://discuss.elastic.co/t/could-not-locate-that-index-pattern-id-1-click-here-to-re-create-it/119620 "2018-02-13T11:26:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RamyaGowda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramyagowda/32/27440_2.png) [@RamyaGowda](https://discuss.elastic.co/u/RamyaGowda)\
**Post date:** [February 13, 2018, 11:26am UTC](https://discuss.elastic.co/t/could-not-locate-that-index-pattern-id-1-click-here-to-re-create-it/119620/1 "2018-02-13T11:26:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bill\_McConaghy](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Bill\_McConaghy](https://discuss.elastic.co/u/Bill_McConaghy)\
**Post date:** [February 15, 2018, 4:31pm UTC](https://discuss.elastic.co/t/could-not-locate-that-index-pattern-id-1-click-here-to-re-create-it/119620/2 "2018-02-15T16:31:04Z")

</div>

If you look at this comment: [https://github.com/elastic/kibana/issues/3709#issuecomment-349335920](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](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.

---

<div class="post-metadata">

**Author:** ![RamyaGowda](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ramyagowda/32/27440_2.png) [@RamyaGowda](https://discuss.elastic.co/u/RamyaGowda)\
**Post date:** [February 16, 2018, 10:38am UTC](https://discuss.elastic.co/t/could-not-locate-that-index-pattern-id-1-click-here-to-re-create-it/119620/3 "2018-02-16T10:38:46Z")

</div>

Yes it is worked 😉 Thanks for the reply

---

<div class="post-metadata">

**Author:** ![Bill\_McConaghy](https://avatars.discourse-cdn.com/v4/letter/b/ed655f/32.png) [@Bill\_McConaghy](https://discuss.elastic.co/u/Bill_McConaghy)\
**Post date:** [February 16, 2018, 2:21pm UTC](https://discuss.elastic.co/t/could-not-locate-that-index-pattern-id-1-click-here-to-re-create-it/119620/4 "2018-02-16T14:21:36Z")

</div>

Great, glad things are working for you.

---

<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:** [March 16, 2018, 2:21pm UTC](https://discuss.elastic.co/t/could-not-locate-that-index-pattern-id-1-click-here-to-re-create-it/119620/5 "2018-03-16T14:21:53Z")

</div>

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