GetBucketWebsite
Returns the website configuration for a bucket.
Description
The GetBucketWebsite operation returns the website configuration associated with a bucket. To host a website on QStorage, you can configure a bucket as a static website.
note
- To use this operation, you must have permission to perform the 
s3:GetBucketWebsiteaction. - You must be the bucket owner to use this operation.
 - If the bucket does not have a website configuration, QStorage returns a 
NoSuchWebsiteConfigurationerror. 
Request Syntax
GET /?website HTTP/1.1
Host: BucketName.qstorage.quilibrium.com
x-amz-expected-bucket-owner: OwnerAccountId
Values in italics indicate user input and should be replaced with actual values.
This operation does not have a request body.
Request Parameters
Headers
| Name | Description | Required | Type | 
|---|---|---|---|
| x-amz-expected-bucket-owner | The account ID of the expected bucket owner | No | text | 
Examples
Example 1: Get bucket website configuration
GET /?website HTTP/1.1
Host: my-bucket.qstorage.quilibrium.com
Values in italics indicate user input and should be replaced with actual values.
HTTP/1.1 200 OK
x-amz-id-2: Example7qoYGN7uMuFuYS6m7a4l
x-amz-request-id: TX234S0F24A06C7
Date: Wed, 01 Mar 2024 12:00:00 GMT
<?xml version="1.0" encoding="UTF-8"?>
<WebsiteConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
 <IndexDocument>
    <Suffix>index.html</Suffix>
 </IndexDocument>
 <ErrorDocument>
    <Key>error.html</Key>
 </ErrorDocument>
 <RoutingRules>
    <RoutingRule>
       <Condition>
          <KeyPrefixEquals>docs/</KeyPrefixEquals>
          <HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals>
       </Condition>
       <Redirect>
          <Protocol>https</Protocol>
          <HostName>docs.example.com</HostName>
          <ReplaceKeyWith>index.html</ReplaceKeyWith>
          <HttpRedirectCode>301</HttpRedirectCode>
       </Redirect>
    </RoutingRule>
 </RoutingRules>
</WebsiteConfiguration>
Values in italics indicate variable response values.
Response Syntax
HTTP/1.1 200 OK
x-amz-id-2: RequestId
x-amz-request-id: AmazonRequestId
Date: ISO8601Date
<?xml version="1.0" encoding="UTF-8"?>
<WebsiteConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
 <IndexDocument>
    <Suffix>IndexDocumentSuffix</Suffix>
 </IndexDocument>
 <ErrorDocument>
    <Key>ErrorDocumentKey</Key>
 </ErrorDocument>
 <RedirectAllRequestsTo>
    <HostName>HostName</HostName>
    <Protocol>Protocol</Protocol>
 </RedirectAllRequestsTo>
 <RoutingRules>
    <RoutingRule>
       <Condition>
          <KeyPrefixEquals>PrefixMatch</KeyPrefixEquals>
          <HttpErrorCodeReturnedEquals>HttpErrorCode</HttpErrorCodeReturnedEquals>
       </Condition>
       <Redirect>
          <Protocol>Protocol</Protocol>
          <HostName>HostName</HostName>
          <ReplaceKeyPrefixWith>ReplaceKeyPrefix</ReplaceKeyPrefixWith>
          <ReplaceKeyWith>ReplaceKey</ReplaceKeyWith>
          <HttpRedirectCode>RedirectHttpCode</HttpRedirectCode>
       </Redirect>
    </RoutingRule>
 </RoutingRules>
</WebsiteConfiguration>
Values in italics indicate variable response values.
Response Elements
Response Headers
| Name | Description | Required | Type | 
|---|---|---|---|
| x-amz-id-2 | An identifier for the request | No | String | 
| x-amz-request-id | A unique identifier for the request | No | String | 
| Date | The date and time at which the response was sent | No | String | 
Response Body Elements
| Name | Description | Required | Type | 
|---|---|---|---|
| WebsiteConfiguration | Container for website configuration. See WebsiteConfiguration for details. | No | String | 
| IndexDocument | Container for the index document suffix configuration. See IndexDocument for details. | No | String | 
| ErrorDocument | Container for the error document configuration. See ErrorDocument for details. | No | String | 
| RedirectAllRequestsTo | Container for redirect all requests to another website. See RedirectAllRequestsTo for details. | No | String | 
| RoutingRules | Container for routing rules. See RoutingRule for details. | No | String | 
Special Errors
| Error Code | Description | 
|---|---|
| NoSuchBucket | The specified bucket does not exist | 
| NoSuchWebsiteConfiguration | The specified bucket does not have a website configuration | 
| 403 | Forbidden. Authentication failed or you do not have permission to get the bucket website configuration | 
Permissions
You must have the s3:GetBucketWebsite permission.
Try It Out
Test GetBucketWebsite
Get the website configuration of a bucket.
Coming Soon
This feature is currently under development and will be available soon.