We are working on a periodic cleanup activity in AEM as a Cloud Service (AEMaaCS) to delete assets older than 180 days. As part of this process, we also need to programmatically delete root folders if they are empty after the assets are removed. On an average, we have more than 500 assets to be cleaned up. Some questions we need clarification on:
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @narendiran_ravi ,
It's very often question what I ask myself every time when I need to manage assets in AEMaaCS.
There is a official doc with all APIs: https://developer.adobe.com/experience-cloud/experience-manager-apis/
We have 3 options right now:
Option #2 is a REST API to delete folders and assets.
Brief solution: Search you can implement with any search engine inside AEM, but for processing I'd suggest to start Sling Job for each asset. In this Sling job use org.apache.http.osgi.services.HttpClientBuilderFactory to create client and call HTTP REST API. Host you can configure via OSGi configuration with using ENV var.
This solution just came to my mind, but I will be very pleasant to hear other best practices..
Best regards,
Kostiantyn Diachenko.
Hi @narendiran_ravi ,
It's very often question what I ask myself every time when I need to manage assets in AEMaaCS.
There is a official doc with all APIs: https://developer.adobe.com/experience-cloud/experience-manager-apis/
We have 3 options right now:
Option #2 is a REST API to delete folders and assets.
Brief solution: Search you can implement with any search engine inside AEM, but for processing I'd suggest to start Sling Job for each asset. In this Sling job use org.apache.http.osgi.services.HttpClientBuilderFactory to create client and call HTTP REST API. Host you can configure via OSGi configuration with using ENV var.
This solution just came to my mind, but I will be very pleasant to hear other best practices..
Best regards,
Kostiantyn Diachenko.
In addition to all these, I would also think of assets references. Maybe you need to curate the content using paths to these assets as well.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies