Method: Algolia::SearchClient#get_rule

Defined in:
lib/algolia/api/search_client.rb

#get_rule(index_name, object_id, request_options = {}) ⇒ Rule

Retrieves a rule by its ID. To find the object ID of rules, use the [search operation](#tag/Rules/operation/searchRules).

Required API Key ACLs:

- settings

Parameters:

  • index_name (String)

    Name of the index on which to perform the operation. (required)

  • object_id (String)

    Unique identifier of a rule object. (required)

  • request_options:

    The request options to send along with the query, they will be merged with the transporter base parameters (headers, query params, timeouts, etc.). (optional)

Returns:

  • (Rule)


1480
1481
1482
1483
# File 'lib/algolia/api/search_client.rb', line 1480

def get_rule(index_name, object_id, request_options = {})
  response = get_rule_with_http_info(index_name, object_id, request_options)
  @api_client.deserialize(response.body, request_options[:debug_return_type] || "Search::Rule")
end