Delete Multiple Objects
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 URI
POST /v1/{bucketName}/?delete
| Parameter name | Parameter type | Required or not | Description | Example value | Parameter location |
|---|---|---|---|---|---|
| bucketName | String | Yes | Bucket name | "bucketName_example" | Path |
Parameters of request body
Description of the data structure of request body fields
| Parameter name | Parameter type | Required or not | Description | Example value |
|---|---|---|---|---|
| objects | List |
Yes | A container holding object information to be deleted, containing one or more object elements |
Description of Objects field data structure
| Parameter name | Parameter type | Required or not | Description | Example value |
|---|---|---|---|---|
| key | String | No | my-object2 |
Response body parameters
Description of the data structure of response body fields
| Parameter name | Parameter type | Description | Example value |
|---|---|---|---|
| errors | List |
Delete the container containing information about erroneous objects, which includes one or more object elements. |
Description of Errors field data structure
| Parameter name | Parameter type | Description | Example value |
|---|---|---|---|
| key | String | Delete the name of the erroneous object. | my-object2 |
| code | String | Error Code. | InvalidArgument |
| message | String | Error Message. | Invalid Argument. |
Request example
JSON
1POST /v1/bucketName_example/?delete
2 <Common request headers>
3{
4 "objects" : [ {
5 "key" : "my-object2"
6 } ]
7}
Response example
JSON
1HTTP/1.1 200 OK
2 <Common response headers>
3{
4 "errors" : [ {
5 "code" : "InvalidArgument",
6 "message" : "Invalid Argument.",
7 "key" : "my-object2"
8 }, {
9 "code" : "InvalidArgument",
10 "message" : "Invalid Argument.",
11 "key" : "my-object2"
12 } ]
13}
Error code
Please refer to the general error codes
