put__bucket_{bucketId}
PUT /bucket/{bucketId}
Update Bucket
Update the configuration of an existing storage bucket. This endpoint allows you to modify bucket properties such as name, credentials, region, and endpoint settings.
Note: This endpoint respects workspace access controls. Users can only update buckets within their accessible workspaces. When updating credentials or storage configuration, the system will automatically trigger repository update events for affected storage repositories.
TypeScript Client Library
public updateStorageBucket = async (bucketId: string, data: UpdateBucketRequest): Promise<UpdateBucketResponse> => {
return this.makeRequest<UpdateBucketResponse>(`bucket/${bucketId}`, 'PUT', data);
};Code Samples
# You can also use wget
curl -X PUT https://backend.flashback.tech/bucket/{bucketId} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'PUT https://backend.flashback.tech/bucket/{bucketId} HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Accept: application/jsonconst inputBody = '{
"name": "Updated Backup Bucket",
"region": "us-west-2",
"endpoint": "https://s3.us-west-2.amazonaws.com"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://backend.flashback.tech/bucket/{bucketId}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}'
}
result = RestClient.put 'https://backend.flashback.tech/bucket/{bucketId}',
params: {
}, headers: headers
p JSON.parse(result)import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.put('https://backend.flashback.tech/bucket/{bucketId}', headers = headers)
print(r.json())<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);URL obj = new URL("https://backend.flashback.tech/bucket/{bucketId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"Authorization": []string{"Bearer {access-token}"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "https://backend.flashback.tech/bucket/{bucketId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}Parameters
bucketId
path
string
true
Unique identifier of the bucket
body
body
object
true
Updated bucket configuration
Body parameter
{
"name": "Updated Backup Bucket",
"storageType": "S3",
"bucket": "my-updated-bucket",
"key": "AKIAIOSFODNN7EXAMPLE",
"secret": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"region": "us-west-2",
"endpoint": "https://s3.us-west-2.amazonaws.com",
"workspaceId": "workspace-123"
}Parameters
body
body
object
true
none
» name
body
string
false
Human-readable name for the bucket
» storageType
body
string
false
Cloud storage provider type
» bucket
body
string
false
Actual bucket name in cloud storage
» key
body
string
false
Access key for the storage provider
» secret
body
string
false
Secret key for the storage provider
» region
body
string
false
Storage region (e.g., us-west-2, eu-west-1)
» endpoint
body
string
false
Custom endpoint URL for S3-compatible services
» workspaceId
body
string
false
Workspace ID the bucket belongs to
Enumerated Values
» storageType
S3
» storageType
GCS
» storageType
BLOB
Example responses
200 Response
{
"success": true,
"bucketId": "550e8400-e29b-41d4-a716-446655440000"
}Responses
Response Schema
Status Code 200
» success
boolean
false
none
Operation success status
» bucketId
string
false
none
Unique identifier for the updated bucket
Status Code 400
» success
boolean
false
none
none
» message
string
false
none
none
Status Code 403
» success
boolean
false
none
none
» message
string
false
none
none
Status Code 404
» success
boolean
false
none
none
» message
string
false
none
none
Status Code 500
» success
boolean
false
none
none
» message
string
false
none
none
To perform this operation, you must be authenticated by means of one of the following methods: BearerAuth
Last updated
Was this helpful?