Issue
Enabling or disabling a business rule using the Fusion Query Rewrite API does not update the Fusion UI, even though the API request completes without error and the Solr database reflects the change.
Diagnosis
This issue may occur if the API call used to update the rule does not properly include the session or application context required for the Fusion UI to reflect the rule status change. The update will appear in Solr but not in the UI or runtime behavior until it is properly published using the correct endpoint.
Environment
Fusion 5.12.0
Amazon EKS (Kubernetes 1.31)
Solr 9.4.1
Cause
When changes to rule status are made via the query-rewrite/instances API without an appropriate editSessionId or context parameter, the rule is not correctly registered for UI or runtime updates. Additionally, without a subsequent call to the publish endpoint, the changes do not take effect in the UI.
Resolution
Update rule status with session context
Use the query-rewrite/instances API with the context or editSessionId parameter to properly reflect changes in Fusion:
curl -X PUT -u USERNAME:PASSWORD \
"http://FUSION_HOST:PORT/api/query-rewrite/instances?context=APP_NAME&editSessionId=SESSION_ID" \
-H "Content-Type: application/json" \
-d '{
"create": [],
"delete": [],
"update": [{
"id": "RULE_ID",
"enabled": true
}]
}'
Replace the following placeholders:
-
APP_NAME– name of your Fusion app -
SESSION_ID– unique edit session identifier -
RULE_ID– ID of the rule you want to update
Alternatively, you may use:
curl -X PUT -u USERNAME:PASSWORD \
"http://FUSION_HOST:PORT/api/apps/APP_NAME/query-rewrite/instances?editSessionId=SESSION_ID" \
-H "Content-Type: application/json" \
-d '{
"create": [],
"delete": [],
"update": [{
"id": "RULE_ID",
"enabled": true
}]
}'
Publish the changes
After making the change, publish the rule to activate it in Fusion:
curl -X PUT -u USERNAME:PASSWORD \
"http://FUSION_HOST:PORT/api/query-rewrite/publish?context=APP_NAME"
Or, if using the apps-specific endpoint:
curl -X PUT -u USERNAME:PASSWORD \
"http://FUSION_HOST:PORT/api/apps/APP_NAME/query-rewrite/publish"