Bulk Delete Operation | Community
Skip to main content
David_Fischer92
April 15, 2024
Solved

Bulk Delete Operation

  • April 15, 2024
  • 2 replies
  • 1992 views

I need to do a bulk delete operation on a folder with a large amount of nodes as the folder we migrated had a lot more junk in it than was originally expected.  So we want to scrap the folder and re-migrate correctly.  However, I have to go folder by folder essentially using the UI delete button.  Is there a better way that I can do a delete in bulk?  I don't have access or ability to change the code but I can leverage something like Postman to hit an OOTB API if necessary.  Just seeing what options I have here.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by EstebanBustamante

Hi, 
 

The easiest way, as @diksha_mishra explained, is to simply delete the parent, which will delete everything below it. Another option is to utilize the Assets API. You can delete either the root folder or, if you have a list of assets, you could build a small JavaScript program to programmatically delete each of the assets you want. You can learn more about the Assets API here: https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/admin/mac-api-assets#delete-a-folder-asset-or-rendition 

 

Hope this helps

2 replies

diksha_mishra
Community Advisor
Community Advisor
April 16, 2024

@david_fischer92  if you don't have the option to create a custom utility, it would be best to remove the root folder from crxde. 

You can navigate to /content/dam/<yourfolder> in this path https://<yourdomainIP>/crx/de and right click> delete the root node. 

 

Hope this helps.

David_Fischer92
April 16, 2024

Apologies, I can't access crx/de as this is my prod environment on AEMaaCS.

EstebanBustamante
Community Advisor and Adobe Champion
EstebanBustamanteCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
April 16, 2024

Hi, 
 

The easiest way, as @diksha_mishra explained, is to simply delete the parent, which will delete everything below it. Another option is to utilize the Assets API. You can delete either the root folder or, if you have a list of assets, you could build a small JavaScript program to programmatically delete each of the assets you want. You can learn more about the Assets API here: https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/admin/mac-api-assets#delete-a-folder-asset-or-rendition 

 

Hope this helps

Esteban Bustamante
David_Fischer92
April 16, 2024

It looks like the assets api is the best route if the UI delete isn't working for these large folders when crx/de is not accessible.  I'm still trying to figure out how to get the delete method to pass through the API in postman but I can access the API and retrieve the folder listing so i know i'm close.

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 17, 2024

Hey David, yeah, using the API is straightforward. If you're using Postman, just remember that you need to provide authentication (username/password), and you should be good to go. Try it first in a lower environment or locally, and you'll be fine.

Esteban Bustamante