Export Rules
settings
ACL
$index->browseRules()
We released a new version of the PHP API client in public beta. Read the beta documentation for more information.
We released a new version of the JavaScript API client in public beta. Read the beta documentation for more information.
We released a new version of the Java API client in public beta. Read the beta documentation for more information.
You’re currently reading the JavaScript API client v4 documentation. Check the migration guide to learn how to upgrade from v3 to v4. You can still access the v3 documentation.
You’re currently reading the Ruby API client v2 documentation. Check the migration guide to learn how to upgrade from v1 to v2. You can still access the v1 documentation.
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
Read the Algolia CLI documentation for more information.
1
2
3
4
5
$iterator = $index->browseRules();
foreach ($iterator as $rule) {
var_dump($rule);
}
Parameters
Parameter | Description |
---|---|
indexName
|
type: string
only needed in Scala
Index name. |
requestOptions
|
type: key/value mapping
default: No request options
Optional
A mapping of |
Response
Returns a Rule iterator.