# Create index pattern automatically in kibana dashboard

**URL:** <https://discuss.elastic.co/t/create-index-pattern-automatically-in-kibana-dashboard/234332>\
**Category:** Kibana\
**Created:** [May 26, 2020, 12:34pm UTC](https://discuss.elastic.co/t/create-index-pattern-automatically-in-kibana-dashboard/234332 "2020-05-26T12:34:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![suresh123](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@suresh123](https://discuss.elastic.co/u/suresh123)\
**Post date:** [May 26, 2020, 12:34pm UTC](https://discuss.elastic.co/t/create-index-pattern-automatically-in-kibana-dashboard/234332/1 "2020-05-26T12:34:51Z")

</div>

Hi,

Can anyone help me how to create index pattern automatically using curl or any other method in kibana dashboard

---

<div class="post-metadata">

**Author:** ![Dzmitry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dzmitry/32/65026_2.png) [@Dzmitry](https://discuss.elastic.co/u/Dzmitry)\
**Post date:** [May 26, 2020, 3:21pm UTC](https://discuss.elastic.co/t/create-index-pattern-automatically-in-kibana-dashboard/234332/2 "2020-05-26T15:21:23Z")

</div>

Hi @suresh123,

If you are on Kibana 7+, you can use this sample:

```auto
curl -X POST "localhost:5601/"localhost:5601/api/saved_objects/index-pattern/my-pattern" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d '" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d'
{
  "attributes": {
    "title": "my-pattern-*"
  }
}

```

You can find more details in our [documentation](https://www.elastic.co/guide/en/kibana/master/saved-objects-api-create.html)

Regards, Dzmitry

---

<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:** [June 23, 2020, 3:21pm UTC](https://discuss.elastic.co/t/create-index-pattern-automatically-in-kibana-dashboard/234332/3 "2020-06-23T15:21:24Z")

</div>

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