# How to create index pattern through Dashboards API

**URL:** https://forum.opensearch.org/t/how-to-create-index-pattern-through-dashboards-api/13928
**Category:** OpenSearch Dashboards
**Created:** [April 13, 2023, 8:32am UTC](https://forum.opensearch.org/t/how-to-create-index-pattern-through-dashboards-api/13928 "2023-04-13T08:32:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![faph](https://avatars.discourse-cdn.com/v4/letter/f/977dab/32.png) [@faph](https://forum.opensearch.org/u/faph)
#### Post date: [April 13, 2023, 8:32am UTC](https://forum.opensearch.org/t/how-to-create-index-pattern-through-dashboards-api/13928/1 "2023-04-13T08:32:22Z")

</div>

What is the correct way to create an index pattern using the Dashboards API?

Where can I find the reference documentation for that?

---

<div class="post-metadata">

### Author: ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)
#### Post date: [April 14, 2023, 8:46am UTC](https://forum.opensearch.org/t/how-to-create-index-pattern-through-dashboards-api/13928/2 "2023-04-14T08:46:54Z")

</div>

Currently OpenSearch Dashboards does’t have this documentation, but you can refer to the [document of Kibana 7.10](https://www.elastic.co/guide/en/kibana/7.10/saved-objects-api-create.html), note that dashboards’ API is a little bit different from kibana’s. You can try creating index pattern like this:

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

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)
#### Post date: [June 13, 2023, 8:47am UTC](https://forum.opensearch.org/t/how-to-create-index-pattern-through-dashboards-api/13928/3 "2023-06-13T08:47:15Z")

</div>

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