# Retrieve an index pattern's UUID

**URL:** <https://discuss.elastic.co/t/retrieve-an-index-patterns-uuid/162724>\
**Category:** Kibana\
**Created:** [January 2, 2019, 10:59pm UTC](https://discuss.elastic.co/t/retrieve-an-index-patterns-uuid/162724 "2019-01-02T22:59:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbril](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbril/32/67905_2.png) [@cbril](https://discuss.elastic.co/u/cbril)\
**Post date:** [January 2, 2019, 10:59pm UTC](https://discuss.elastic.co/t/retrieve-an-index-patterns-uuid/162724/1 "2019-01-02T22:59:23Z")

</div>

**How can I create a new index pattern with a curl request?**

**How can I retrieve the ID of an index pattern with a curl request?**

I have tried creating an index pattern with this request, but Kibana freezes when I try to view the index pattern in the Discover panel:

```auto
curl -XPOST "http://localhost:9200/.kibana/doc/index-pattern-id" -H 'Content-Type: application/json' -d'
{
  "type" : "index-pattern",
  "index-pattern" : {
    "title": "the-index-pattern*",
    "timeFieldName": "@timestamp"
  }
}'

```

The new index pattern appears on the right in the discover page, but when I attempt to view it, Kibana sort of freezes. (I do have indices that match the pattern)

When I do this search:

```auto
GET .kibana/_search

```

The index I created appears. However, it looks different from the other index patterns in that it is missing a "fields" field.

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [January 3, 2019, 10:17pm UTC](https://discuss.elastic.co/t/retrieve-an-index-patterns-uuid/162724/2 "2019-01-03T22:17:42Z")

</div>

The recommended approach is to use Kibana's REST API [https://www.elastic.co/guide/en/kibana/6.5/saved-objects-api.html](https://www.elastic.co/guide/en/kibana/6.5/saved-objects-api.html)

---

<div class="post-metadata">

**Author:** ![cbril](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbril/32/67905_2.png) [@cbril](https://discuss.elastic.co/u/cbril)\
**Post date:** [January 15, 2019, 6:20pm UTC](https://discuss.elastic.co/t/retrieve-an-index-patterns-uuid/162724/3 "2019-01-15T18:20:04Z")

</div>

This is exactly what I needed. Thank 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:** [February 12, 2019, 6:20pm UTC](https://discuss.elastic.co/t/retrieve-an-index-patterns-uuid/162724/4 "2019-02-12T18:20:09Z")

</div>

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