# How can I get the (randomly generated) watcher ID?

**URL:** <https://discuss.elastic.co/t/how-can-i-get-the-randomly-generated-watcher-id/356708>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [April 3, 2024, 5:20pm UTC](https://discuss.elastic.co/t/how-can-i-get-the-randomly-generated-watcher-id/356708 "2024-04-03T17:20:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fun-with-ES](https://avatars.discourse-cdn.com/v4/letter/f/a698b9/32.png) [@fun-with-ES](https://discuss.elastic.co/u/fun-with-ES)\
**Post date:** [April 3, 2024, 5:20pm UTC](https://discuss.elastic.co/t/how-can-i-get-the-randomly-generated-watcher-id/356708/1 "2024-04-03T17:20:09Z")

</div>

I'm creating a watch in Kibana, and Elastic creates its ID as a random hash. That's fine as I don't necessarily want to override it.  
Now in the watcher JSON definition, I'm trying to get the randomly generated watcher ID to no avail.  
I'm trying `ctx.watch_id`, but what I get is `"_inlined_"`.  
Is there a way that I can get the actual randomly generated watcher ID (e.g `"jei334j-kjlw883-lkjeilww-kkeee"`)?

---

<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:** [May 1, 2024, 5:20pm UTC](https://discuss.elastic.co/t/how-can-i-get-the-randomly-generated-watcher-id/356708/2 "2024-05-01T17:20:55Z")

</div>

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