# Create Indices pattern through commnadline

**URL:** <https://discuss.elastic.co/t/create-indices-pattern-through-commnadline/54180>\
**Category:** Kibana\
**Created:** [June 28, 2016, 4:57pm UTC](https://discuss.elastic.co/t/create-indices-pattern-through-commnadline/54180 "2016-06-28T16:57:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bharat](https://avatars.discourse-cdn.com/v4/letter/b/5fc32e/32.png) [@bharat](https://discuss.elastic.co/u/bharat)\
**Post date:** [June 28, 2016, 4:57pm UTC](https://discuss.elastic.co/t/create-indices-pattern-through-commnadline/54180/1 "2016-06-28T16:57:03Z")

</div>

Hi.  
Iam using Kibana-4.5 and Elasticseach 2.3. I know to register the indices pattern in Kibana via UI, @settings tab. But I want it to do through curl commands any Help

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [June 28, 2016, 5:08pm UTC](https://discuss.elastic.co/t/create-indices-pattern-through-commnadline/54180/2 "2016-06-28T17:08:38Z")

</div>

**Warning:** what you are asking for is possible but relies on knowing how Kibana persists index patterns internally. This means if Kibana changes the internal structure that is persisted, your index pattern creation/manipulation code may break.

Basically, Kibana stores index patterns (amongst other things) in a special index in Elasticsearch. This index is named `.kibana` by default but can be customized via the `kibana.index` setting in the config file. You can read more about how this persistence works in this blog post: [https://www.elastic.co/blog/kibana-under-the-hood-object-persistence](https://www.elastic.co/blog/kibana-under-the-hood-object-persistence)

So your best bet would be to start by defining and changing index patterns through the UI, while observing the effects to the corresponding documents in the `.kibana` index. That will give you an idea of what the bodies of your curl requests should be. The curl requests would be made against the Elasticsearch cluster Kibana is pointed to, the `.kibana` (by default) index, and the documents within that index corresponding to the index patterns.

---

<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 6, 2017, 1:48pm UTC](https://discuss.elastic.co/t/create-indices-pattern-through-commnadline/54180/3 "2017-07-06T13:48:54Z")

</div>


