This page documents the S3 API operations for managing buckets in Garage.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/deuxfleurs-org/garage/llms.txt
Use this file to discover all available pages before exploring further.
CreateBucket
Creates a new S3 bucket.Request Body (Optional)
The region where the bucket should be created. Must match the Garage S3 region configuration.
Example
cURL
Response
Error Responses
| Error | Status | Description |
|---|---|---|
BucketAlreadyOwnedByYou | 409 | You already own this bucket |
BucketAlreadyExists | 409 | Bucket exists and is owned by another user |
InvalidBucketName | 400 | Bucket name is invalid |
The access key must have the
allow_create_bucket permission enabled. Bucket names must follow S3 naming rules.DeleteBucket
Deletes an empty bucket.Example
cURL
Response
Error Responses
| Error | Status | Description |
|---|---|---|
BucketNotEmpty | 409 | Bucket contains objects and cannot be deleted |
NoSuchBucket | 404 | Bucket does not exist |
HeadBucket
Checks if a bucket exists and you have permission to access it.Example
cURL
Response
Error Responses
| Error | Status | Description |
|---|---|---|
NotFound | 404 | Bucket does not exist or access denied |
ListBuckets
Returns a list of all buckets accessible to the authenticated user.Example
cURL
Response
GetBucketLocation
Returns the region where a bucket is located.Example
Response
ListObjects
Lists objects in a bucket (version 1).Query Parameters
Character used to group keys (commonly
/)Encoding for keys in the response. Supported value:
urlKey to start listing from (for pagination)
Maximum number of keys to return (1-1000)
Limit results to keys that begin with this prefix
Example
ListObjectsV2 is recommended over ListObjects for new applications.
ListObjectsV2
Lists objects in a bucket (version 2, recommended).Query Parameters
Token for pagination (from previous response)
Character used to group keys
Encoding for keys in the response. Supported value:
urlMaximum number of keys to return (1-1000)
Limit results to keys that begin with this prefix
Key to start listing after
Example
cURL
Response
GetBucketVersioning
Returns the versioning state of a bucket.Response
Additional Bucket Operations
Garage also implements the following bucket operations:Website Hosting
GetBucketWebsite- Get website configurationPutBucketWebsite- Configure static website hosting (partial support)DeleteBucketWebsite- Remove website configuration
CORS
GetBucketCors- Get CORS configurationPutBucketCors- Set CORS rulesDeleteBucketCors- Remove CORS configuration
Lifecycle
GetBucketLifecycleConfiguration- Get lifecycle rulesPutBucketLifecycleConfiguration- Set lifecycle rules (partial support)DeleteBucketLifecycle- Remove lifecycle configuration
Lifecycle rules in Garage support only
AbortIncompleteMultipartUpload and Expiration actions.Unsupported Operations
The following bucket operations are not implemented in Garage:- Bucket policies (
GetBucketPolicy,PutBucketPolicy,DeleteBucketPolicy) - Bucket ACLs (
GetBucketAcl,PutBucketAcl) - Bucket versioning (
PutBucketVersioning,ListObjectVersions) - Bucket encryption (
GetBucketEncryption,PutBucketEncryption) - Bucket tagging, notifications, analytics, metrics, etc.
Garage uses its own permission system. See the Access Control guide for details.