Batch deletion of Images (and Streams)

Hi!

What is the recommended way to perform batch deletion of images? If a user of our service decides to delete their account, we may be required to delete all images they have uploaded, which can be anything from just a couple images, to thousands of them.

This also goes for videos uploaded to Stream.

Cheers,
Daniel

Based on the API documentation, looks like you need to obtain the list of Video or Image IDs that are associated with the user, and perform Delete API calls one by one.

Thank you for answering!

This is how I read the API documentation as well, but I’d like to know what the official recommended way of doing things is.

If this is indeed the recommended way, it would be helpful to know what limitations there are considering rate limiting, and to what extend one should throttle the Delete calls.

1 Like

The limit is already mentioned in api.cloudflare.com:

Rate limiting

The Cloudflare API sets a maximum of 1,200 requests in a five minute period.

So it seems! I was using the sidebar search, which doesn’t list that in the results :man_facepalming: