Skip to main content
Required ACL: editSettings

Examples

Save a rule

Save a rule with alternatives enabled

Save a rule with a context-based condition

Parameters

object
required
The rule object with conditions and consequences. For a complete JSON rule object, see the saveRule HTTP API reference.
boolean
default:false
Whether to add or update the rule for all replicas of the index.

Response

integer
The task ID used with the waitTask method.
string
Date at which the indexing job has been created.

Response as JSON

This section shows the JSON response returned by the API. Each API client wraps this response in language-specific objects, so the structure may vary. To view the response, use the getLogs method. Don’t rely on the order of properties—JSON objects don’t preserve key order.
JSON
Last modified on July 21, 2026