Algolia DevCon
Oct. 2–3 2024, virtual.
Api clients / JavaScript / V3 / Methods

Export Rules | JavaScript API Client V3 (Deprecated)

Deprecated content
This documentation is for a deprecated version of JavaScript API client. Some features and settings may be missing or their usage may have changed. Refer to the documentation for the latest version of JavaScript API client for up-to-date information.
Required API Key: any key with the settings ACL
Method signature
index.exportRules()

About this method

Retrieve an index’s full list of Rules using an iterator.

The list contains the Rule name, plus the complete details of its conditions and consequences.

The list includes all Rules, whether created on the dashboard or pushed by the API.

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

Examples

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

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

Parameters

indexName
type: string
only needed in go, scala, c#

Index name.

Response

Returns a Rule iterator.

Did you find this page helpful?