Jinjaο
Jinja expressions are wrapped inbetween {{}} like
{{ Jinja expression }}. Code block using {% %} is also supported for Jinja. The symbols
{ and } conflict with JSON and the entire Jinja expression with the encapsulation
should be single or double quoted.
Built-in Filtersο
Jinja has a list of built-in filters to work with strings, dictionaries, lists, etc. Please refer to the Jinja documentation for the list of available filters.
StackStorm Filtersο
st2kv('st2_key_id')queries the StackStorm datastore and returns the value for the given key. For example, the expression{{ st2kv('system.shared_key_x') }}returns the value for a system scoped key namedshared_key_xwhile the expression{{ st2kv('my_key_y') }}returns the value for the user scoped key namedmy_key_y. Please note that the key name should be in quotes otherwise YAQL treats a key name with a dot likesystem.shared_key_xas a dict access. The value can be encrypted in the StackStorm datastore. To decrypt the retrieved value, the input argumentdecryptmust be set to true such asst2kv('st2_key_id', decrypt=true).