Clatter LabsHelp Center

How do I delete many files at once?

How-toUpdated

There's no bulk-delete request, but a short script does it:

objs = requests.get(f"{CB}/v1/buckets/{bucket_id}/objects?limit=100", headers=H).json()["data"]
for o in objs:
    if o["name"].endswith(".log"):          # your own rule
        requests.delete(f"{CB}/v1/buckets/{bucket_id}/objects/{o['id']}", headers=H)

Each delete costs 1 token. Page with before while has_more is true. Unfinished uploads should be aborted instead.

Learn more#

Related articles

Still need help?

Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyz
For deleting your whole account or the data of one service.