palbaseDocs

Palbase Storage · API

DELETE/storage/buckets/{bucket}

Delete a bucket

Deletes an empty bucket; one that still holds objects is refused (409 bucket_not_empty), so no file goes by surprise.

Called by your server, with the project's secret key.

Path

bucketstring · requiredThe bucket's name: a lowercase letter, then lowercase letters, digits and -, 2 to 63 characters.
curl
curl -X DELETE "https://<your-ref>.palbase.studio/storage/buckets/<bucket>" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

204Deleted

401No key, or not a key of this project (the edge's answer)

403Not the project's secret key; or, on a credential-less route, a private object or a link that is not valid for it

404No such bucket, object or variant

409The bucket still holds objects, an object is already at the destination, or a request with this Idempotency-Key is still running

429The project's request rate, or its storage quota for the period, is used up — or, slowed for its month's traffic, it has as many downloads under way as are paced at once; Retry-After says when to try again

503The platform could not answer now; retrying is safe (Retry-After)

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation DeleteBucket of storage's contract.