Website

Website Configuration of a Bucket

GetBucketWebsite

get

Returns the website configuration for a bucket.

This GET operation requires the `GetBucketWebsite` permission. By default, only the bucket owner can read the bucket website configuration. However, bucket owners can allow other users to read the website configuration by writing a bucket policy granting them the `GetBucketWebsite` permission.

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

The bucket name.

Example: my-bucket
Query parameters
websiteboolean · enumRequiredPossible values:
Responses
200
Successful operation
application/xml
get
GET /{Bucket} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
200

Successful operation

<?xml version="1.0" encoding="UTF-8"?>
<WebsiteConfiguration xmlns="xmlns='http://s3.amazonaws.com/doc/2006-03-01/'">
    <IndexDocument>
        <Suffix>index.html</Suffix>
    </IndexDocument>
    <ErrorDocument>
        <Key>error.html</Key>
    </ErrorDocument>
</WebsiteConfiguration>

PutBucketWebsite

put

Sets the configuration of the website that is specified in the `website` subresource. To configure a bucket as a website, you can add this subresource on the bucket with website configuration information such as the file name of the index document and any redirect rules.

This PUT operation requires the `PutBucketWebsite` permission. By default, only the bucket owner can configure the website attached to a bucket; however, bucket owners can allow other users to set the website configuration by writing a bucket policy that grants them the `PutBucketWebsite` permission.

To redirect all website requests sent to the bucket's website endpoint, you add a website configuration with the following elements. Because all requests are sent to another website, you don't need to provide index document name for the bucket.

  • `WebsiteConfiguration`

  • `RedirectAllRequestsTo`

  • `HostName`

  • `Protocol`

If you want granular control over redirects, you can use the following elements to add routing rules that describe conditions for redirecting requests and information about the redirect destination. In this case, the website configuration must provide an index document for the bucket, because some requests might not be redirected.

  • `WebsiteConfiguration`

  • `IndexDocument`

  • `Suffix`

  • `ErrorDocument`

  • `Key`

  • `RoutingRules`

  • `RoutingRule`

  • `Condition`

  • `HttpErrorCodeReturnedEquals`

  • `KeyPrefixEquals`

  • `Redirect`

  • `Protocol`

  • `HostName`

  • `ReplaceKeyPrefixWith`

  • `ReplaceKeyWith`

  • `HttpRedirectCode`

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

The bucket name.

Example: my-bucket
Query parameters
websiteboolean · enumRequiredPossible values:
Header parameters
Content-MD5stringOptional

The base64 encoded MD5 digest of the message (without the headers) according to RFC 1864.

Body
Responses
200
Success
put
PUT /{Bucket} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Content-Type: application/xml
Accept: */*
Content-Length: 307

"<?xml version="1.0" encoding="UTF-8"?>
<WebsiteConfiguration xmlns="xmlns='http://s3.amazonaws.com/doc/2006-03-01/'">
    <IndexDocument>
        <Suffix>index.html</Suffix>
    </IndexDocument>
    <ErrorDocument>
        <Key>error.html</Key>
    </ErrorDocument>
</WebsiteConfiguration>
"
200

Success

No content

DeleteBucketWebsite

delete

This operation removes the website configuration for a bucket. IONOS Object Storage returns a `200 OK` response upon successfully deleting a website configuration on the specified bucket. You will get a `200 OK` response if the website configuration you are trying to delete does not exist on the bucket. IONOS Object Storage returns a `404` response if the bucket specified in the request does not exist.

This DELETE operation requires the `DeleteBucketWebsite` permission. By default, only the bucket owner can delete the website configuration attached to a bucket. However, bucket owners can grant other users permission to delete the website configuration by writing a bucket policy granting them the `DeleteBucketWebsite` permission.

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

The bucket name.

Example: my-bucket
Query parameters
websiteboolean · enumRequiredPossible values:
Responses
204
Success
delete
DELETE /{Bucket} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
204

Success

No content

Was this helpful?