GetBucketMirroring
Updated at:2025-11-03
API description
This API is designed to retrieve the image back-to-origin information of the bucket.
Request
-
Request syntax
Plain Text1GET /?mirroring HTTP/1.1 2Host: <BucketName>.bj.bcebos.com 3Date: <GMT Date> 4Authorization: AuthorizationString -
Request headers
No special parameters
-
Request parameters
No special parameters
Response
| Parameters | Description |
|---|---|
| mode | The mode is pull or redirect. |
| sourceUrl | Primary origin server URL |
| backSourceUrl | Backup origin server URL |
| resource | Resources to which the rules apply |
| prefix | Prefix of back-to-origin address |
| suffix | Suffix of back-to-origin address |
| fixedKey | Fixed name of back-to-origin address |
| storageClass | Storage class of the object |
| version | Prefix replacement option of back-to-origin address |
| prefixReplace | Prefix replacement and cropping options |
| passQuerystring | Whether to pass request parameters |
| passHeaders | Headers passed through |
| ignoreHeaders | Ignored headers |
| customHeaders | Custom header |
Example
-
Request example
Plain Text1GET /?mirroring HTTP/1.1 2Host: test-bucket.bj.bcebos.com 3Date: Thu, 15 May 2017 00:17:23 GMT 4Authorization: AuthorizationString -
Response example
Plain Text1HTTP/1.1 200 OK 2Date: Thu, 15 May 2017 00:17:23 GMT 3Server: BceBos 4x-bce-request-id: xxxx-xxxxx-xxxx 5Connection: keep-alive 6Content-Length: xxx 7{ 8 "bucketMirroringConfiguration":[ 9 { 10 "mode":"fetch", 11 "sourceUrl":"http://www.baidu.com", 12 "backSourceUrl":"bos://bj.bcebos.com/bucket", 13 "resource" : "folder1/folder2*.jpeg", 14 "prefix": "testprefix", 15 "suffix": ".jpeg", 16 "fixedKey":"folder1/404.jpeg", 17 "version":"v2", 18 "prefixReplace" : "a/b/c", 19 "passQuerystring":true, 20 "storageClass":"STANDARD", 21 "allHeader":"custom", 22 "customHeaders":[ 23 { 24 "headerName":"testheader1", 25 "headerValue":"name1", 26 }, 27 { 28 "headerName":"TestHeaderName", 29 "headerValue":"TestHeaderValue", 30 } 31 ], 32 "ignoreHeaders": ["BanHeader1","BanHeader2"], 33 "passHeaders":["AllowHeader1","AllowHeader2"], 34 }, 35 ] 36}
