Skip to main content
anne_sample_f5
Level 3
Jun 20, 2023 5:52 PM UTC
Solved

Bulk Delete Files with REST API

I am wondering if anyone knows of a way to bulk delete files via the REST API. We have a large number of unused image files from 10+ years ago that I need to purge. Deleting them 30 at a time in the UI is slowly draining my life force.

 

Is there a way I can use the API to do this? I've successfully been able to GET lists of files, but don't see any documentation on actually removing them.

Darshil_Shah1
Darshil_Shah1Accepted solution
Adobe Champion, Community Advisor, UG Leader
Jun 20, 2023 6:31 PM UTC

There isn't an API endpoint to delete files in Asset > Files API endpoints. You can switch to the old UX for deleting files as you would be able to view 50 files as opposed to 30 files in the Modern Next-Gen UX.

 

4 replies

Darshil_Shah1
Adobe Champion, Community Advisor, UG Leader
Darshil_Shah1Adobe Champion, Community Advisor, UG LeaderAccepted solution
Adobe Champion, Community Advisor, UG Leader
Jun 20, 2023 6:31 PM UTC

There isn't an API endpoint to delete files in Asset > Files API endpoints. You can switch to the old UX for deleting files as you would be able to view 50 files as opposed to 30 files in the Modern Next-Gen UX.

 

Translate
anne_sample_f5
Level 3
Jun 20, 2023 10:33 PM UTC

Thanks, I realized after posting that the old UI was slightly more efficient, but was realllllly hoping there was a method that could deal with more than 50 at a time. I'm dealing with literal thousands of assets here so even 50 at a time is pretty brutal.

 

I didn't see it in the endpoint list either, but I wasn't sure if the list was comprehensive or if there was another trick to it somehow. Thanks for confirming.

Translate
SanfordWhiteman
User Group Leader
User Group Leader
Jun 20, 2023 11:02 PM UTC

You could definitely — if you’re delicate and test robustly in sandbox — automate this on the front end. It’s in the same vein as my blog post on exporting all the Roles + Permissions from a Marketo instance.

 

But no supported method, like Darshil says.

Translate