DeleteMultipleObjects
Updated at:2025-11-03
API description
This command allows multiple objects within the same bucket to be deleted through a single HTTP request.
- A maximum of 1,000 objects can be deleted in a single request.
- The message body must not exceed 2 MB.
- The returned message body only contains details for objects that failed to be deleted; if all objects are deleted successfully, no message body is returned.
Request
-
Request syntax
Plain Text1 POST /?delete HTTP/1.1 2 Host: <BucketName>.bj.bcebos.com 3 Date: <Date> 4 Authorization: <AuthorizationString> 5 Content-Length: <ContentLength> 6 Content-Type: text/plain 7 { 8 "objects": [ 9 { 10 "key": "my-object1" 11 }, 12 { 13 "key": "my-object2" 14 } 15 ] 16 } -
Request headers
No special header parameters
-
Request parameters
| Parameter name | Query | Description | Parent node |
|---|---|---|---|
| objects | Request Body parameters | A container holding information about objects to be deleted, including one or more object elements. | - |
| +key | Request Body parameters | The name of the object to be deleted. | objects |
Response
| Parameter name | Description | Parent node |
|---|---|---|
| errors | Delete the container containing information about erroneous objects, which includes one or more object elements. | - |
| +key | Delete the name of the erroneous object. | errors |
| +code | Error Code. | errors |
| +message | Error Message. | errors |
Example
-
Request example
Plain Text1 POST /?delete HTTP/1.1 2 Host: <BucketName>.bj.bcebos.com 3 Date: Wed, 06 Apr 2016 06:34:40 GMT 4 Authorization: AuthorizationString 5 Content-Length: 11434 6 Content-Type: text/plain 7 { 8 "objects": [ 9 { 10 "key": "my-object1" 11 }, 12 { 13 "key": "my-object2" 14 } 15 ] 16 } -
Response example
Plain Text1 HTTP/1.1 200 OK 2 x-bce-request-id : 4db2b34d-654d-4d8a-b49b-3049ca786409 3 Date: Wed, 06 Apr 2016 06:34:40 GMT 4 Connection: close 5 Content-Length: 1324 6 Server: BceBos 7 { 8 "errors": [ 9 { 10 "key": "my-object1", 11 "code": "NoSuchKey", 12 "message": "The specified key does not exist." 13 }, 14 { 15 "key": "my-object2", 16 "code": "InvalidArgument", 17 "message": "Invalid Argument." 18 } 19 ] 20 }
