# Webhook with dynamic endpoints parameters

**URL:** <https://forum.opensearch.org/t/webhook-with-dynamic-endpoints-parameters/6699>\
**Category:** Alerting\
**Created:** [August 4, 2021, 8:29pm UTC](https://forum.opensearch.org/t/webhook-with-dynamic-endpoints-parameters/6699 "2021-08-04T20:29:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ylasri](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/ylasri/32/1057_2.png) [@ylasri](https://forum.opensearch.org/u/ylasri)\
**Post date:** [August 4, 2021, 8:29pm UTC](https://forum.opensearch.org/t/webhook-with-dynamic-endpoints-parameters/6699/1 "2021-08-04T20:29:24Z")

</div>

Is there any way to define a dynamic webhook endpoint with some parameters from the context of the hits/aggs that trigged the alert ?

Example : my alert is looking for a specific device with some condition, when it’s found, i need to POST to a dynamic webhook URL like [https://api/v1/{{ctx.results.0.aggregations.deviceID.value}](https://api/v1/%7B%7Bctx.results.0.aggregations.deviceID.value%7D)} /restart?status={{ctx.results.0.hits.hits.0.\_source.actual\_status}}

Thanks

---

<div class="post-metadata">

**Author:** ![kris](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/kris/32/2208_2.png) [@kris](https://forum.opensearch.org/u/kris)\
**Post date:** [February 7, 2023, 5:17pm UTC](https://forum.opensearch.org/t/webhook-with-dynamic-endpoints-parameters/6699/2 "2023-02-07T17:17:44Z")

</div>


