# What is the ID in documents or surrounding documents links?

**URL:** <https://discuss.elastic.co/t/what-is-the-id-in-documents-or-surrounding-documents-links/147115>\
**Category:** Kibana\
**Created:** [September 3, 2018, 8:33pm UTC](https://discuss.elastic.co/t/what-is-the-id-in-documents-or-surrounding-documents-links/147115 "2018-09-03T20:33:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![caub](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/caub/32/33783_2.png) [@caub](https://discuss.elastic.co/u/caub)\
**Post date:** [September 3, 2018, 8:33pm UTC](https://discuss.elastic.co/t/what-is-the-id-in-documents-or-surrounding-documents-links/147115/1 "2018-09-03T20:33:19Z")

</div>

a document link:  
`#/doc/982353c0-ac85-11e8-a1c9-1f53c4cb4ccc/filebeat-6.4.0-2018.09.03/doc?id=IKnFoGUBdgZSH_Gx6ZcK`

surrounding documents link:  
`#/context/982353c0-ac85-11e8-a1c9-1f53c4cb4ccc/doc/IKnFoGUBdgZSH_Gx6ZcK`

The last ID `IKnFoGUBdgZSH_Gx6ZcK` is the document ID (`doc['_id']` in a scripted field), document link also has the index name `filebeat-6.4.0-2018.09.03` (`doc['_index']` in a scripted field).

What is the starting uuid `982353c0-ac85-11e8-a1c9-1f53c4cb4ccc`? And how to access it from a scripted field?

Those links are accessible from the Discover tab:

 ![2018-09-02-002129_1110x220_scrot](https://us1.discourse-cdn.com/elastic/original/3X/8/9/89f56d8c58e3995f57c1ce35c6fe3e22cc1eb279.png)

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [September 3, 2018, 9:21pm UTC](https://discuss.elastic.co/t/what-is-the-id-in-documents-or-surrounding-documents-links/147115/2 "2018-09-03T21:21:44Z")

</div>

Hi @caub,

the uuid is the id that Kibana assigned the underlying index pattern. It is not part of the document and as such not accessible in a scripted field.

---

<div class="post-metadata">

**Author:** ![caub](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/caub/32/33783_2.png) [@caub](https://discuss.elastic.co/u/caub)\
**Post date:** [September 4, 2018, 6:26am UTC](https://discuss.elastic.co/t/what-is-the-id-in-documents-or-surrounding-documents-links/147115/3 "2018-09-04T06:26:03Z")

</div>

@weltenwort Thanks for the explanations

I've hardcoded it in my scripted field for now, can this ID change?

 ![2018-09-04-082442_844x972_scrot](https://us1.discourse-cdn.com/elastic/original/3X/7/3/7380ee40a1e0d62b8294bc59cfb9033aeec5fda2.png)

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [September 4, 2018, 9:08am UTC](https://discuss.elastic.co/t/what-is-the-id-in-documents-or-surrounding-documents-links/147115/4 "2018-09-04T09:08:44Z")

</div>

The id does not change once the index pattern has been created. By default, Kibana assigns a random uuid during creation. The id can also be manually specified via the `Advanced Options` in the index pattern creation wizard:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/b/0b4db14cdb751f3733550cdf9b30cb2df872df46.png)

So you have to take care that the correct id is specified when creating the index pattern or when restoring from a backup.

---

<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:** [October 2, 2018, 9:08am UTC](https://discuss.elastic.co/t/what-is-the-id-in-documents-or-surrounding-documents-links/147115/5 "2018-10-02T09:08:58Z")

</div>

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