Issue
Attempts to delete a Fusion app may fail with 400 or 404 errors, and the app may reappear in the UI after deletion. In some cases, attempting to re-import the app afterward also fails at the query rewrite or collection import stage.
Diagnosis
Fusion logs or the API response may show the following indicators:
404 Not Founderror when calling the subscriptions deletion endpoint with a resource and contextError message indicating that a subscription exists but does not belong to the specified app context
The app remains visible in the UI after deletion
Re-importing the app shows success at the query rewrite stage but fails during collection import with system errors
You can verify lingering index pipeline subscriptions using the following command:
curl -u USERNAME:PASSWORD "https://FUSION_HOST/api/subscriptions?resource=index-pipeline:APP_PIPELINE_NAME&context=app:APP_NAME"If the API returns results, these subscriptions must be removed before successful deletion.
Environment
Fusion 5.9.12
Kubernetes 1.32
Self-hosted deployment on Azure Kubernetes Service (AKS)
Cause
Lingering or improperly scoped index pipeline subscriptions prevent the app from being deleted. When the context of the subscription does not match the app being deleted, Fusion may block the operation, resulting in 404 errors. After failed deletions, residual objects such as collections or Zookeeper znodes may interfere with app re-import.
Resolution
1. Attempt deletion of subscriptions with app context
Use this API call to remove all index pipeline subscriptions for the app using the context parameter:
curl -u USERNAME:PASSWORD -X DELETE \
"https://FUSION_HOST/api/subscriptions?resource=index-pipeline:APP_PIPELINE_NAME&context=app:APP_NAME"Replace the APP_PIPELINE_NAME and APP_NAME values with the actual pipeline and app identifiers.
If this command fails with a 404 or if the app still cannot be deleted, proceed to the next step.
2. Delete subscriptions without context
Retry the deletion without specifying the app context:
curl -u USERNAME:PASSWORD -X DELETE \
"https://FUSION_HOST/api/subscriptions?resource=index-pipeline:APP_PIPELINE_NAME"This will force-remove any subscriptions tied to the pipeline regardless of context.
3. Confirm all subscriptions have been removed
To validate that no subscriptions remain for the app, run:
curl -u USERNAME:PASSWORD "https://FUSION_HOST/api/subscriptions"Review the output and ensure that no entries remain with the APP_PIPELINE_NAME as the resource.
4. Retry app deletion
Once all subscriptions are cleared, attempt to delete the app from the Fusion UI or via the API.
5. If re-importing the app fails
If a subsequent import of the app fails at the collection or query rewrite stage, perform the following checks:
Confirm that you are using the
overwriteflag in the import API:
curl -u USERNAME:PASSWORD -H "Content-Type:multipart/form-data" -X POST \
-F 'importData=@/path/to/app-export.zip' \
"https://FUSION_HOST/api/objects/import?importPolicy=overwrite"If errors persist, perform a manual cleanup of leftover collections or pipelines.
In rare cases, residual znodes in Zookeeper may require cleanup by the platform operations team.