POST /?delete HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateContent-Type: application/xmlContent-Length: Content LengthContent-MD5: MD5Authorization: Auth String[Request Body]
<Delete><Quiet>boolean</Quiet><Object><Key>string</Key></Object><Object><Key>string</Key><VersionId>string</VersionId></Object></Delete>
节点名称(关键字) | 父节点 | 描述 | 类型 | 是否必选 |
Delete | 无 | 包含 DELETE Multiple Objects 操作的所有请求信息 | Container | 是 |
节点名称(关键字) | 父节点 | 描述 | 类型 | 是否必选 |
Quiet | Delete | 布尔值,默认为 false true 为使用 Quiet 模式,在响应中仅包含删除失败的对象信息和错误信息 false 为使用 Verbose 模式,在响应中包含每个对象的删除结果 | boolean | 是 |
Object | Delete | 单个要删除的目标对象的信息 | Container | 是 |
节点名称(关键字) | 父节点 | 描述 | 类型 | 是否必选 |
Key | Delete.Object | 要删除的目标对象的对象键 | string | 是 |
VersionId | Delete.Object | 当启用版本控制并且要删除对象的指定版本时需指定该元素,值为要删除的版本 ID。若未开启版本控制或开启版本控制但需要插入删除标记,则无需指定该元素 | string | 是 |
<DeleteResult><Deleted><Key>string</Key><DeleteMarker>boolean</DeleteMarker><DeleteMarkerVersionId>string</DeleteMarkerVersionId></Deleted><Deleted><Key>string</Key><VersionId>string</VersionId></Deleted><Deleted><Key>string</Key><DeleteMarker>boolean</DeleteMarker><DeleteMarkerVersionId>string</DeleteMarkerVersionId><VersionId>string</VersionId></Deleted><Error><Key>string</Key><VersionId>string</VersionId><Code>string</Code><Message>string</Message></Error></DeleteResult>
节点名称(关键字) | 父节点 | 描述 | 类型 |
DeleteResult | 无 | 保存 DELETE Multiple Objects 结果的所有信息 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Deleted | DeleteResult | 单个删除成功的对象条目,仅当使用 Verbose 模式才会返回该元素 | Container |
Error | DeleteResult | 单个删除失败的对象条目 | Container |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Key | DeleteResult.Deleted | 删除成功的对象的对象键 | string |
DeleteMarker | DeleteResult.Deleted | 仅当对该对象的删除创建了一个删除标记,或删除的是该对象的一个删除标记时才返回该元素,布尔值,固定为 true | boolean |
DeleteMarkerVersionId | DeleteResult.Deleted | 仅当对该对象的删除创建了一个删除标记,或删除的是该对象的一个删除标记时才返回该元素,值为创建或删除的删除标记的版本 ID | string |
VersionId | DeleteResult.Deleted | 删除成功的版本 ID,仅当请求中指定了要删除对象的版本 ID 时才返回该元素 | string |
节点名称(关键字) | 父节点 | 描述 | 类型 |
Key | DeleteResult.Error | 删除失败的对象的对象键 | string |
VersionId | DeleteResult.Error | 删除失败的版本 ID,仅当请求中指定了要删除对象的版本 ID 时才返回该元素 | string |
Code | DeleteResult.Error | 删除失败的错误码,用来定位唯一的错误条件和确定错误场景 | string |
Message | DeleteResult.Error | 删除失败的具体错误信息 | string |
POST /?delete HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Tue, 20 Aug 2019 11:59:35 GMTContent-Type: application/xmlContent-Length: 158Content-MD5: zUd/xgzNGDrqJMJUOWV2AQ==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1566302375;1566309575&q-key-time=1566302375;1566309575&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=delete&q-signature=82f77c745ca66fe8c5d93274b3fc44fb895c****Connection: close<Delete><Quiet>false</Quiet><Object><Key>example-object-1.jpg</Key></Object><Object><Key>example-object-2.jpg</Key></Object></Delete>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 144Connection: closeDate: Tue, 20 Aug 2019 11:59:35 GMTServer: tencent-cosx-cos-request-id: NWQ1YmUwYTdfM2FiMDJhMDlfYzczN18zMGM1****<DeleteResult><Deleted><Key>example-object-1.jpg</Key></Deleted><Deleted><Key>example-object-2.jpg</Key></Deleted></DeleteResult>
POST /?delete HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Tue, 20 Aug 2019 12:12:26 GMTContent-Type: application/xmlContent-Length: 157Content-MD5: +iI9kJvM2k/y5y3nHcn8BQ==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1566303146;1566310346&q-key-time=1566303146;1566310346&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=delete&q-signature=16581dcc0ae999ce343488de2449436ee182****Connection: close<Delete><Quiet>true</Quiet><Object><Key>example-object-1.jpg</Key></Object><Object><Key>example-object-2.jpg</Key></Object></Delete>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 15Connection: closeDate: Tue, 20 Aug 2019 12:12:27 GMTServer: tencent-cosx-cos-request-id: NWQ1YmUzYWFfMTljMDJhMDlfNTg3ZV8zNDI0****<DeleteResult/>
POST /?delete HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 21 Aug 2019 12:04:03 GMTContent-Type: application/xmlContent-Length: 100Content-MD5: MowFtlG7iwK7Wmk79IVXFA==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1566389043;1566396243&q-key-time=1566389043;1566396243&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=delete&q-signature=b1aee84c567b16e5e6c8634c2760a0e5d348****Connection: close<Delete><Quiet>false</Quiet><Object><Key>example-object-1.jpg</Key></Object></Delete>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 200Connection: closeDate: Wed, 21 Aug 2019 12:04:03 GMTServer: tencent-cosx-cos-request-id: NWQ1ZDMzMzNfNDhiNDBiMDlfMmIzNzZfMTBh****<DeleteResult><Deleted><Key>example-object-1.jpg</Key><DeleteMarker>true</DeleteMarker><DeleteMarkerVersionId>MTg0NDUxNzc2ODQ2NjU3ODM4NTc</DeleteMarkerVersionId></Deleted></DeleteResult>
POST /?delete HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 21 Aug 2019 11:24:43 GMTContent-Type: application/xmlContent-Length: 154Content-MD5: EwFydeQSMzaHWi0qMTOGWw==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1566386683;1566393883&q-key-time=1566386683;1566393883&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=delete&q-signature=2b6261e526960a433124b752fd21a7a9a363****Connection: close<Delete><Quiet>false</Quiet><Object><Key>example-object-2.jpg</Key><VersionId>MTg0NDUxNzc2ODcwMjYyNjIwMTM</VersionId></Object></Delete>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 140Connection: closeDate: Wed, 21 Aug 2019 11:24:44 GMTServer: tencent-cosx-cos-request-id: NWQ1ZDI5ZmJfNDhiNDBiMDlfMmIzODNfMTA0****<DeleteResult><Deleted><Key>example-object-2.jpg</Key><VersionId>MTg0NDUxNzc2ODcwMjYyNjIwMTM</VersionId></Deleted></DeleteResult>
POST /?delete HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 21 Aug 2019 12:04:04 GMTContent-Type: application/xmlContent-Length: 154Content-MD5: EKphCPpHcKiVqJtMqE+DmA==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1566389044;1566396244&q-key-time=1566389044;1566396244&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=delete&q-signature=f6b49a9b98386632b9545a4cc087449f789f****Connection: close<Delete><Quiet>false</Quiet><Object><Key>example-object-1.jpg</Key><VersionId>MTg0NDUxNzc2ODQ2NjU3ODM4NTc</VersionId></Object></Delete>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 253Connection: closeDate: Wed, 21 Aug 2019 12:04:04 GMTServer: tencent-cosx-cos-request-id: NWQ1ZDMzMzRfYmIwMmEwOV83YTQzXzEyM2Ri****<DeleteResult><Deleted><Key>example-object-1.jpg</Key><DeleteMarker>true</DeleteMarker><DeleteMarkerVersionId>MTg0NDUxNzc2ODQ2NjU3ODM4NTc</DeleteMarkerVersionId><VersionId>MTg0NDUxNzc2ODQ2NjU3ODM4NTc</VersionId></Deleted></DeleteResult>
POST /?delete HTTP/1.1Host: examplebucket-1250000000.cos.ap-beijing.myqcloud.comDate: Wed, 21 Aug 2019 12:04:05 GMTContent-Type: application/xmlContent-Length: 436Content-MD5: ZAbgvje31aO+0j7pkEkYvQ==Authorization: q-sign-algorithm=sha1&q-ak=AKID8A0fBVtYFrNm02oY1g1JQQF0c3JO****&q-sign-time=1566389045;1566396245&q-key-time=1566389045;1566396245&q-header-list=content-length;content-md5;content-type;date;host&q-url-param-list=delete&q-signature=543a9f9f65c45e533a415afe5d014cdc9c73****Connection: close<Delete><Quiet>false</Quiet><Object><Key>example-object-1.jpg</Key></Object><Object><Key>example-object-2.jpg</Key><VersionId>MTg0NDUxNzc2ODQ2NjQ1MjM5MTk</VersionId></Object><Object><Key>example-object-3.jpg</Key><VersionId>MTg0NDUxNzc2ODQ2NjQwMTIwMDI</VersionId></Object><Object><Key>example-object-4.jpg</Key><VersionId>MTg0NDUxNzc2ODQ2NjQ0NjI0MDQ</VersionId></Object></Delete>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 703Connection: closeDate: Wed, 21 Aug 2019 12:04:06 GMTServer: tencent-cosx-cos-request-id: NWQ1ZDMzMzVfOTNjMjJhMDlfMzhiM18xMWY3****<DeleteResult><Deleted><Key>example-object-1.jpg</Key><DeleteMarker>true</DeleteMarker><DeleteMarkerVersionId>MTg0NDUxNzc2ODQ2NjM1NTI2NDY</DeleteMarkerVersionId></Deleted><Deleted><Key>example-object-2.jpg</Key><VersionId>MTg0NDUxNzc2ODQ2NjQ1MjM5MTk</VersionId></Deleted><Deleted><Key>example-object-3.jpg</Key><DeleteMarker>true</DeleteMarker><DeleteMarkerVersionId>MTg0NDUxNzc2ODQ2NjQwMTIwMDI</DeleteMarkerVersionId><VersionId>MTg0NDUxNzc2ODQ2NjQwMTIwMDI</VersionId></Deleted><Error><Key>example-object-4.jpg</Key><VersionId>MTg0NDUxNzc2ODQ2NjQ0NjI0MDQ</VersionId><Code>PathConflict</Code><Message>Path conflict.</Message></Error></DeleteResult>
本页内容是否解决了您的问题?