# Variable for Query DSL in Kibana Rules

**URL:** <https://discuss.elastic.co/t/variable-for-query-dsl-in-kibana-rules/361812>\
**Category:** Kibana\
**Created:** [June 21, 2024, 2:19am UTC](https://discuss.elastic.co/t/variable-for-query-dsl-in-kibana-rules/361812 "2024-06-21T02:19:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kentshenlim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kentshenlim/32/140490_2.png) [@kentshenlim](https://discuss.elastic.co/u/kentshenlim)\
**Post date:** [June 21, 2024, 2:19am UTC](https://discuss.elastic.co/t/variable-for-query-dsl-in-kibana-rules/361812/1 "2024-06-21T02:19:01Z")

</div>

Hi Elastic community.

Currently, my space has many rules running exactly the same Query DSL. Every time I want to change the Query DSL, I have to modify all of the rules. Is there a way, to define space variables (e.g. a JSON, or at least a primitive), and refer to the space variables in the Query DSL?
