Buckets

Basic Operations with Buckets

ListBuckets

get

Lists all the buckets of the contract.

Permissions

This operation is available for all users of the contract.

Authorizations
Responses
200
Successful operation
application/xml
get
GET / HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Owner>
        <ID>fb202d54c82981a9ed3208e1fe6eea2f</ID>
        <DisplayName></DisplayName>
    </Owner>
    <Buckets>
        <Bucket>
            <Name>my-bucket</Name>
            <CreationDate>2023-02-09T15:27:55.452Z</CreationDate>
        </Bucket>
        <Bucket>
            <Name>my-bucket-2</Name>
            <CreationDate>2023-03-20T16:41:04.326Z</CreationDate>
        </Bucket>
        <Bucket>
            <Name>my-bucket-3</Name>
            <CreationDate>2022-12-30T20:01:25.203Z</CreationDate>
        </Bucket>
    </Buckets>
</ListAllMyBucketsResult>

CreateBucket

put

Creates a new object storage bucket.

To create a bucket, you must register with IONOS Object Storage and have a valid Access Key ID to authenticate requests.

Not every string is an acceptable bucket name. For information about bucket naming restrictions, see Bucket naming rules.

Buckets are created in the location specified in the endpoint used to make the request. Once a bucket is created, it can be accessed at that location. Any requests targeting an existing bucket using an endpoint with an incorrect location will result in a 404 NoSuchkey.

Permissions

Any user of the contract is allowed to create a bucket. But further operations with the bucket must be allowed by Bucket Policy which must be set by the contract owner or an administrator.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Header parameters
x-amz-bucket-object-lock-enabledbooleanOptional

Specifies whether you want Object Lock enabled for the new bucket. After bucket creation, you must apply the Object Lock configuration.

Default: false
Body
Responses
200
Successful operation
application/xml
put
PUT /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Content-Type: application/xml
Accept: */*
Content-Length: 202

"<?xml version="1.0" encoding="UTF-8"?>
<CreateBucketConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <LocationConstraint>de</LocationConstraint>
</CreateBucketConfiguration>
"

No content

DeleteBucket

delete

Deletes the bucket. All objects (including all object versions and delete markers) in the bucket must be deleted before the bucket itself can be deleted.

Permissions

You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission to perform the s3:DeleteBucket operation using Bucket Policy.

S3 API Compatibility

  • The x-amz-expected-bucket-owner header isn't supported.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Responses
204
Successful operation
application/xml
delete
DELETE /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*

No content

HeadBucket

head

Retrieves metadata and verifies the existence of a specific bucket. This operation checks for the presence of the specified bucket without returning the actual content of the bucket.

Bucket names are globally unique across all users of the service. If the bucket exists and the requester has permission to access it, the server returns a 200 OK HTTP status code with no accompanying response body. If the bucket does not exist or if the requester does not have permission to access it, the server returns a relevant error code:

  • 403 Forbidden: The requester does not have permission to access the bucket.

  • 404 Not Found: The bucket does not exist.

Permissions

You must be the contract owner or an administrator to perform this operation. If not, they can grant you permission to perform the s3:ListBucket operation using Bucket Policy.

S3 API Compatibility

  • The x-amz-expected-bucket-owner header isn't supported.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Responses
200
Successful operation
application/xml
head
HEAD /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*

No content

GetBucketLocation

get

Returns the region the bucket resides in.

Permissions

This operation is available for all users of the contract.

S3 API Compatibility

  • The x-amz-expected-bucket-owner header isn't supported.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Query parameters
locationboolean · enumRequiredPossible values:
Responses
200
Successful operation
application/xml
get
GET /{Bucket} HTTP/1.1
Host: s3.eu-central-1.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
<?xml version="1.0" encoding="UTF-8"?><LocationConstraint xmlns="http://s3.amazonaws.com/doc/2006-03-01/">eu-central-3</LocationConstraint>

Was this helpful?