younifyd
Menu

Get a query ruleset

Get a query ruleset

GET/_query_rules/{ruleset_id}

Use it in a workflow

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

Request

Path parameters

ruleset_idstringrequired

The unique identifier of the query ruleset

Response

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

ruleset_idany

A unique identifier for the ruleset.

rulesarray<object>

Rules associated with the query ruleset.

rule_idanyrequired

A unique identifier for the rule.

typeanyrequired

The type of rule. `pinned` will identify and pin specific documents to the top of search results. `exclude` will exclude specific documents from search results.

criteriaoneOfrequired

The criteria that must be met for the rule to be applied. If multiple criteria are specified for a rule, all criteria must be met for the rule to be applied.

actionsanyrequired

The actions to take when the rule is matched. The format of this action depends on the rule type.

prioritynumber
json
{
  "ruleset_id": null,
  "rules": [
    {
      "rule_id": null,
      "type": null,
      "criteria": null,
      "actions": null,
      "priority": 0
    }
  ]
}

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

Get a query ruleset — Elasticsearch — Documentation