capabilities.work

Tear Down a Bucket

A 4-step recipe with Backblaze. We can help you get access.

Recipe · 4 steps

Tear Down a Bucket

Empty a file from a bucket and then delete the bucket.

  1. Log in to the B2 API to obtain the accountId and authorization token.
  2. List the file names in the bucket to find a version to remove.
  3. Delete the first file version found so the bucket moves toward an empty state.
  4. Delete the bucket. This succeeds only when the bucket no longer contains any file versions.
What you'll need to have ready
  • bucketId: The bucket to empty and delete.
For your developer

Arazzo workflow backblaze:teardown-bucket, 4 operations: authorizeAccount → listFileNames → deleteFileVersion → deleteBucket. Specs on APIs.io.