• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (OBS)
  4. Operations on Objects
  5. DELETE Multiple Objects
  6. Requests

Requests

Syntax

POST /?delete HTTP/1.1  
 User-Agent: agent
 Host: bucketname.obs.example.com 
 Accept: */*
 Date: date
 Authorization: Signature  
 Content-MD5: MD5 
 Content-Length: length 
 Expect: expect

 <?xml version="1.0" encoding="UTF-8"?> 
 <Delete> 
 <Quiet>true</Quiet>  
 <Object> 
 <Key>Key1</Key> 
 </Object>  
 <Object>  
 <Key>Key2</Key> 
 </Object> 
 </Delete>  

Request Parameters

This request involves no parameters.

Request Headers

This request uses common headers. For details about common request headers, see section Common Request Headers.

Request Elements

This request uses elements to specify the list of objects to be deleted in batches. Table 1 describes the elements.

Table 1 Request elements

Element

Description

Remarks

Quiet

Indicates the element to enable quite mode for the request. If the element is specified, OBS returns only the list of objects that failed to be deleted.

This element is only valid when its value is true. Otherwise, OBS ignores it.

Type: Boolean

Optional

Delete

Indicates the list of objects to be deleted.

Type: XML

Mandatory

Object

Indicates an object to be deleted.

Type: XML

Mandatory

Key

Indicates the key of an object to be deleted.

Type: String

Mandatory

VersionId

Indicates the version ID of an object to be deleted.

Type: String

Optional

Request constraints:

This request can delete a maximum of 1000 objects at a time. If you send the request to delete more than 1000 objects, OBS returns an error response.

After receiving the request, OBS deletes objects simultaneously in a circular manner. During this process, OBS may encounter an internal error. For example, data inconsistency may occur because the metadata of an object still exists after the object's index data is deleted.