Skip to content

Commit 14ee1a8

Browse files
authored
DOCS: Clarification for using filters array (#426) (#444)
1 parent afd5707 commit 14ee1a8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/detections/rules-ui-create.asciidoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,3 +468,12 @@ used as an identifier across systems
468468
NOTE: The `{{context.rule.severity}}` and `{{context.rule.risk_score}}`
469469
placeholders contain the rule's default values even when the *Severity override*
470470
and *Risk score override* options are used.
471+
472+
To understand which fields to parse, see the <<rule-api-overview>> to view the JSON representation of rules. The following is an example of http://mustache.github.io/[mustache syntax] to display the list of enabled filters:
473+
474+
[source,json]
475+
--------------------------------------------------
476+
{{#context.rule.filters}}
477+
{{^meta.disabled}}{{meta.key}} {{#meta.negate}}NOT {{/meta.negate}}{{meta.type}} {{^exists}}{{meta.value}}{{meta.params.query}}{{/exists}}{{/meta.disabled}}
478+
{{/context.rule.filters}}
479+
--------------------------------------------------

0 commit comments

Comments
 (0)