Goal
Export business rules such as Boost List, Pinned, Block List, or Bury List from Fusion 4 when the Export option is not available in the user interface.
Environment
Fusion 4.2.6 (Self-Hosted)
Note: The Export button is available in Fusion 5.x UI but is not present in Fusion 4.x. This guide provides a workaround using the query-rewrite API.
Guide
To export business rules from Fusion 4, use the Fusion query-rewrite API and curl. Follow these steps:
1. Identify the Fusion app name
Run the following API call to retrieve the list of available apps and confirm the correct app name (e.g., Aetna, MSearch, etc.):
curl -X GET -u <USERNAME>:<PASSWORD> 'http://<FUSION_HOST>:8764/api/apps'Look for the app under which your business rules were created.
2. Identify the rule types available
To list all query rewriting instances and their types (e.g., boost_list, pinned_list, block_list, bury_list), use:
curl -X GET -u <USERNAME>:<PASSWORD> 'http://<FUSION_HOST>:8764/api/apps/<APP_NAME>/query-rewrite/instances'Replace <APP_NAME> with your app (e.g., MSearch).
3. Export a specific rule type
Once you've identified the rule type you'd like to export (e.g., boost_list), run the following curl command to download the rule definitions to a local JSON file:
curl -X GET -u <USERNAME>:<PASSWORD> 'http://<FUSION_HOST>:8764/api/apps/<APP_NAME>/query-rewrite/instances?type=boost_list' > export-rules.jsonReplace
<USERNAME>and<PASSWORD>with your Fusion credentials.Replace
<FUSION_HOST>with your Fusion server hostname or IP.Replace
<APP_NAME>with the correct app name.
This will create a file named export-rules.json containing all rules of the specified type.
4. Repeat as needed for other rule types
You can rerun the command with different type values (pinned_list, block_list, bury_list) to download other rule sets.
Note: This API approach works for all rule types supported in Fusion 4's query rewriting service.
Additional considerations
Ensure your user account has appropriate permissions to call the Fusion API.
If Fusion is secured with TLS/SSL, prepend
https://to the host and add-ktocurlif using self-signed certificates.