-
Notifications
You must be signed in to change notification settings - Fork 1
CreateKey
Craig edited this page Jan 1, 2024
·
2 revisions
<?php
use TechKat\BackBlazeB2\Client;
$keyID = '...';
$applicationKey = '...';
$client = new Client($keyID, $applicationKey);
$response = $client->createKey([
'keyName' => 'A-Leash-A-Keys',
'capabilities' => [
'listKeys',
'listAllBucketNames',
'listBuckets',
'readBuckets',
'writeBuckets',
// ...
],
'validDurationInSeconds' => 86400,
'bucketId' => 'BUCKET_ID',
// ...
]);
return $response;
{
"keyName": "A-Leash-A-Keys",
"applicationKeyId": "NEW_KEY_ID",
"capabilities": [
"listKeys",
"listAllBucketNames",
"listBuckets",
"readBuckets",
"writeBuckets",
// ...
],
// ...
}
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