Skip to content

DeleteBucket

Craig edited this page Jan 1, 2024 · 2 revisions

How To Use

<?php

use TechKat\BackBlazeB2\Client;

$keyID = '...';
$applicationKey = '...';

$client = new Client($keyID, $applicationKey);

$response = $client->deleteBucket([
  'bucketId' => 'BUCKET_ID',
]);

return $response;

Expected Result

During the deletion process, the listBucket method will be called with the forceRefresh parameter set to TRUE. This is to ensure the cache is updated with an accurate listing of remaining buckets.

{
  "accountId": "YOUR_ACCOUNT_ID",
  "bucketId": "BUCKET_ID",
  "bucketName": "This-Bucket-Is-So-Cool",
  "bucketType": "allPrivate",
  // ...
}

Backblaze B2 API Documentation

https://www.backblaze.com/apidocs/b2-delete-bucket