As a developer; I have a batch delete endpoint available on the Marketplace API that takes a package name and range of version to delete. For security purpose, at least the power_user lvl is able to delete package this way.
- an endpoint is available with a package name, a range and a batch_size (optional, default 10) as parameter, and delete all matching package
- all matching documents are removed per batch async (use WorkManager), possible impl: com.nuxeo.connect.cleaner.DocumentRefBatchRemoverWork
- protect the endpoint to only power_user and administrator roles - otherwise a 401 is returned.
See com.nuxeo.connect.cleaner.OrphanCLIDCleanerTest for test.