-
Notifications
You must be signed in to change notification settings - Fork 1
DeleteFileVersion
Craig edited this page Mar 1, 2024
·
1 revision
<?php
use TechKat\BackBlazeB2\Client;
$keyID = '...';
$applicationKey = '...';
$client = new Client($keyID, $applicationKey);
$response = $client->deleteFileVersion([
'fileName' => 'file.ext',
'fileId' => '4_BACKBLAZE_FILE_ID',
'bypassGovernance' => false,
]);
return $response;
This method will delete a file's version, for example: 10 .zip files in the same folder sharing the same name for the purpose of compressing a file for backup. Each zip file has a unique difference in each of them. You wish to remove the oldest one in the version hierarchy. Each of the 10 .zip files will have their own unique fileId
set by BackBlaze but all share the same fileName
.
The API response is the fileId
and fileName
of the file deleted.
Below is a list of all the available native API endpoints that this library currently supports:
- cancelLargeFile
- copyFile
- copyPart
- createBucket
- createKey
- deleteBucket
- deleteFileVersion
- deleteKey
- downloadFileById
- downloadFileByName
- finishLargeFile
- getDownloadAuthorization
- getFileInfo
- getUploadPartUrl
- getUploadUrl
- hideFile
- listBuckets
- listFileNames
- listFileVersions
- listKeys
- listParts
- listUnfinishedLargeFiles
- startLargeFile
- updateBucket
- updateFileLegalHold
- updateFileRetention
- uploadFile
- uploadPart