Expand my Community achievements bar.

SOLVED

Bulk Delete Operation

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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... 

 

Hope this helps



Esteban Bustamante

View solution in original post

6 Replies

Avatar

Community Advisor

@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.

Avatar

Level 2

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

Avatar

Correct answer by
Community Advisor

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... 

 

Hope this helps



Esteban Bustamante

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.

Avatar

Community Advisor

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

Good to know, I was just trying to get it to work with a local token from the developer console and it wasn't working so I'll try with the username and password.  Thank you!