DeleteObjects

Enables you to delete multiple objects from a bucket using a single HTTP request.

If you know the object keys that you want to delete, then this action provides a suitable alternative to sending individual delete requests, therefore reducing per-request overhead.

The request contains a list of keys that you want to delete. Tebi does not put a hard limit on the number of objects that you can delete in a single request.

In the XML, provide the object key names. For each key, Tebi performs a delete action and returns the result of that delete, success, or failure in the response. Note that if the object specified in the request is not found, Tebi returns the result as deleted.

You must have Delete ACL to be able to call this action.

The following operations are related to DeleteObjects:

Request Syntax

 1POST /?delete HTTP/1.1
 2Host: <BUCKET>.s3.tebi.io
 3
 4<?xml version="1.0" encoding="UTF-8"?>
 5<Delete xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
 6    <Object>
 7        <Key>string</Key>
 8        <VersionId>string</VersionId>
 9    </Object>
10    ...
11    <Quiet>boolean</Quiet>
12</Delete>

The request uses the following URI parameter:

  • <BUCKET>: Bucket name containing the objects to delete. Required.

The request accepts the following data in XML format:

  • Delete: Root level tag for the Delete parameters.

  • Object: Objects to delete.

  • Quiet: Element to enable quiet mode for the request. When you add this element, you must set its value to true.

Response Syntax

 1HTTP/1.1 200
 2Content-Type: application/xml
 3Content-Length: ContentLength
 4
 5<?xml version="1.0" encoding="UTF-8"?>
 6<DeleteResult>
 7<Deleted>
 8    <DeleteMarker>boolean</DeleteMarker>
 9    <DeleteMarkerVersionId>string</DeleteMarkerVersionId>
10    <Key>string</Key>
11    <VersionId>string</VersionId>
12</Deleted>
13...
14<Error>
15    <Code>string</Code>
16    <Key>string</Key>
17    <Message>string</Message>
18    <VersionId>string</VersionId>
19</Error>
20...
21</DeleteResult>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in XML format by the service:

  • DeleteResult: Root level tag for the DeleteResult parameters.

  • Deleted: Container element for a successful delete. It identifies the object that was successfully deleted.

  • Error: Container for a failed delete action that describes the object that Tebi attempted to delete and the error it encountered.

See Also

Refer here for more information.