Required API Key: any key with the settings ACL

Method signature
$index->browseRules()

About this method #

Get a list of all Rules defined on an index.

The list contains the name and details of conditions and consequences for all Rules for the selected index, whether the Rule was created in the Algolia dashboard or with the API.

To export Rules, you will need to use an iterator.

You can import and export Rules from the Algolia dashboard.

Examples #

1
2
3
4
5
$iterator = $index->browseRules();

foreach ($iterator as $rule) {
  var_dump($rule);
}

Parameters #

indexName #
type: string
only needed in Scala

Index name.

requestOptions #
type: key/value mapping
default: No request options
Optional

A mapping of request options to send along with the query.

Response #

Returns a Rule iterator.

Did you find this page helpful?