Event Gateway expressions language

Related Documentation
Incompatible with
on-prem

In Kong Event Gateway, you can use a policy’s condition field to determine whether a certain policy should be executed.

For example, you can create a condition that selects all topics that end with the suffix my_suffix:

"condition": "context.topic.name.endsWith('my_suffix')"

Conditions must be between 1 and 1000 characters long.

Supported operators and expressions

For policy conditions and template strings, Kong Event Gateway supports a subset of JavaScript operators and expressions:

Operator or expression type

Operator or function

Logical operators &&, ||, !
Comparison operators ==, !=, <, <=, >, >=
Concatenation operator +
Relational operator in
String functions includes, startsWith, endsWith, substring, match

String functions

Kong Event Gateway supports the following string functions in conditional fields:

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!