GetBucketStaticWebsite
Updated at:2025-11-03
API description
This API retrieves static website hosting information for a bucket.
Request
-
Request headers
No special parameters
-
Request syntax
Plain Text1 Get /?website HTTP/1.1 2 Host: <BucketName>.bj.bcebos.com 3 Date: <Date> 4 Authorization: <AuthorizationString> 5 Content-Length: 0
Response
| Name | Description |
|---|---|
| index | Index file name |
| notFound | 404 file name |
| notFoundHttpStatus | HTTP status code appearing during the return to error pages |
- When the configuration exists:
Plain Text
1 HTTP/1.1 200 OK
2 Date: Thu, 15 May 2017 00:17:23 GMT
3 Server: BceBos
4 x-bce-request-id: xxxx-xxxxx-xxxx
5 Connection: keep-alive
6 Content-Length: xxx
7 {
8 "index": "index.html",
9 "notFound": "404.html",
10 "notFoundHttpStatus":"404"
11 }
- When the static website hosting is disabled
Plain Text
1HTTP status 404 will be returned with the error code NoSuchBucketStaticWebSiteConfig.
| Result | http status | error code | Description |
|---|---|---|---|
| Succeeded | 200 | - | - |
| The static website hosting is disabled | 404 | NoSuchBucketStaticWebSiteConfig | - |
| The static website hosting function is disabled. | 501 | StaticWebSiteIsDisable | In other words, it is not allowed to enable the static website hosting function for the bucket of this region. |
| Other errors, following previous error codes of BOS. | - | Refer to Error Codes | - |
