GetBucketStaticWebsite
Last Updated:2021-12-08
Interface Description
This interface is used to get the static website hosting information of bucket.
Request
-
Request header field
No special parameters.
-
Request syntax
Get /?website HTTP/1.1 Host: <BucketName>.bj.bcebos.com Date: <Date> Authorization: <AuthorizationString> Content-Length: 0
Response
- When the configuration exists,
HTTP/1.1 200 OK
Date: Thu, 15 May 2017 00:17:23 GMT
Server: BceBos
x-bce-request-id: xxxx-xxxxx-xxxx
Connection: keep-alive
Content-Length: xxx
{
"index": "index.html",
"notFound": "404.html"
}
-
When the static website hosting feature is not enabled,
It returns ”HTTP status 404: NoSuchBucketStaticWebSiteConfig”
-
Return code
Results Http Status Error Code Description Success 200 - - Static website hosting feature not enabled 404 NoSuchBucketStaticWebSiteConfig - The static website hosting feature is disabled 501 StaticWebSiteIsDisable That is, BOS does not allow the bucket of this region to enable the static website hosting feature. For other errors, follow the previous error code of BOS - See Error Code -