Skip to main content
Usage
algolia compositions rules upsert <composition-id> <rule-id> [flags]

Examples

Upsert a rule from a JSON file:
algolia compositions rules upsert my-comp rule-1 --file rule.json
Upsert from stdin:
cat rule.json | algolia compositions rules upsert my-comp rule-1 --file -

Flags

-f, --file
JSON file path (use - for stdin)

Output formatting flags

--allow-missing-template-keys
If true, ignore errors in templates due to missing fields or map keys. This only applies to golang and jsonpath output formats.
-o, --output
Output format. One of: (json, jsonl, ndjson, jsonpath, jsonpath-as-json, jsonpath-file).
--template
Template string or path to a template file to use when —output=jsonpath, —output=jsonpath-file.
Last modified on May 20, 2026