Reputation: 103
How can I delete all images in a cloudinary account via the ruby API?
Is there a special flag for deleting all resources via the delete_resource_by_tag
method?
eg
Cloudinary::Api::delete_resources_by_tag "all"
Upvotes: 3
Views: 2963
Reputation: 15069
They seem to have added the ability to delete all to the gem since this question was posted:
Cloudinary::Api.delete_all_resources
I found it to not delete all but to delete perhaps 1k images, since it took 5 calls for me to delete 4500 or so images.
Upvotes: 9
Reputation: 1931
You can use the admin API for browsing through images and performing bulk deletions. For more details see the following blog post and the documentation: http://cloudinary.com/blog/restful_api_for_managing_your_website_s_images_and_other_online_assets
http://cloudinary.com/documentation/admin_api#delete_resources
If you need some help in deleting a large number of images, you can go to the 'Settings' page from the management console, and click on the "Bulk delete images" link on the right to send Cloudinary some details about the images you wish to delete: the account's cloud name and the estimated number of images. And you'll be updated when the deletion is done.
Upvotes: 1