younifyd
Menu

Get all query rulesets

Get all query rulesets

GET/_query_rules

Use it in a workflow

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

Request

Query parameters

fromnumber

The offset from the first result to fetch.

sizenumber

The maximum number of results to retrieve.

Response

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

countnumber
resultsarray<object>
ruleset_idanyrequired

A unique identifier for the ruleset.

rule_total_countnumberrequired

The number of rules associated with the ruleset.

rule_criteria_types_countsobjectrequired

A map of criteria type (for example, `exact`) to the number of rules of that type. NOTE: The counts in `rule_criteria_types_counts` may be larger than the value of `rule_total_count` because a rule may have multiple criteria.

rule_type_countsobjectrequired

A map of rule type (for example, `pinned`) to the number of rules of that type.

json
{
  "count": 0,
  "results": [
    {
      "ruleset_id": null,
      "rule_total_count": 0,
      "rule_criteria_types_counts": {},
      "rule_type_counts": {}
    }
  ]
}

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

Get all query rulesets — Elasticsearch — Documentation