最近更新时间:2026-08-17 19:44:29
该接口是获取在线解压策略。获取策略必须是桶所有者(BucketOwner)或者拥有GetBucketDecompressPolicy权限。
GET /?decompresspolicy HTTP/1.1
Host: {Bucketname}.{Endpoint}
Authorization: {SignatureValue}
Content-Type: application/json
Content-Length: {length}
Date: {date}该接口不使用请求参数
该接口仅使用常用请求头部。
该接口不使用请求体。
该接口只返回常用响应头部。
描述在线解压规则的JSON:
{
"rules": [{
"id": "ruleid",
"events": "ObjectCreated:*",
"prefix": "decompress",
"suffix": [".zip"],
"overwrite": "0",
"callback":"http://callback.demo.com",
"callback_format":"JSON",
"path_prefix": "test/",
"path_prefix_replaced":"0",
"policy_type": "decompress"
}]
}GET /?decompresspolicy HTTP/1.1
Host: bucketname.ks3-cn-beijing.ksyuncs.com
Authorization: authorization string
Content-Type: application/json
Content-Length: 497
Date: Tue, 21 Jul 2023 15:38:30 GMTHTTP/1.1 200 ok
Server: ks3
Date: Tue, 07 Jul 2020 07:29:13 GMT
Content-Length: 11
{
"rules": [{
"id": "ruleid",
"events": "ObjectCreated:*",
"prefix": "decompress",
"suffix": [".zip"],
"overwrite": "0",
"callback":"http://callback.demo.com",
"callback_format":"JSON",
"path_prefix": "test/",
"path_prefix_replaced":"0",
"policy_type": "decompress"
}]
}状态码 | 报错信息 | 错误原因 |
404 NotFound | rules not found | 桶里面没有设置在线解压策略规则。 |
纯净模式
