younifyd
Menu

Test a query ruleset

Test a query ruleset

POST/_query_rules/{ruleset_id}/_test

Use it in a workflow

  1. Add a step and choose the Elasticsearch connector.
  2. Pick the Test a query ruleset action (under query_rules).
  3. Fill in the fields below, then reference the result from later steps as {{testAQueryRuleset.response.data}}.

Request

Path parameters

ruleset_idstringrequired

The unique identifier of the query ruleset to be created or updated

Request body

Enter the body as JSON in the step's Body field.

match_criteriaobjectrequired

The match criteria to apply to rules in the given query ruleset. Match criteria should match the keys defined in the `criteria.metadata` field of the rule.

json
{
  "match_criteria": {}
}

Response

Returns 200 with an object. Read it in later steps with {{testAQueryRuleset.response.data.<field>}}.

total_matched_rulesnumber
matched_rulesarray<object>
ruleset_idanyrequired

Ruleset unique identifier

rule_idanyrequired

Rule unique identifier within that ruleset

json
{
  "total_matched_rules": 0,
  "matched_rules": [
    {
      "ruleset_id": null,
      "rule_id": null
    }
  ]
}

Need more? See the Elasticsearch guide for connection setup and behaviour shared by every action.

Test a query ruleset — Elasticsearch — Documentation