Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Object Storage
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Buckets
      • Creating a bucket
      • Deleting a bucket
      • Limiting the maximum size of a bucket
      • Allowing public access to a bucket
      • Bucket encryption
      • Managing object lifecycles
      • Managing CORS configurations
      • Editing a bucket ACL
      • Logging actions with the bucket
    • Objects
      • Uploading an object
      • Getting information about an object
      • Downloading an object
      • Getting a public link to an object
      • Deleting an object
      • Deleting a partially uploaded object
      • Editing an object ACL
    • Static website hosting
      • Hosting setup
      • Support for your own domain
      • Support for multiple domain names
      • Configuring HTTPS
  • Concepts
    • Overview
    • Bucket
    • Objects
    • Bucket versioning
    • Object lifecycles
    • CORS
    • Static website hosting
    • Pre-signed URLs
    • Multipart upload
    • Access control lists (ACLs)
    • Bucket Policy
    • Upload file via HTML form
    • Storage class
    • Logging actions with a bucket
    • Backups
    • TLS protocol
    • Quotas and limits
  • Tools
    • All tools
    • Console clients
      • AWS CLI
      • S3cmd
    • File browsers
      • CyberDuck
      • WinSCP
    • SDK
      • AWS SDK for Java
      • Python SDK (boto)
    • FUSE
      • s3fs
      • goofys
  • Amazon S3-compatible HTTP API
    • How to use the API
    • Signing requests
    • API reference
      • All services and methods
      • Bucket
        • All methods
        • create
        • getBucketEncryption
        • getMeta
        • listObjects
        • listBuckets
        • deleteBucket
        • deleteBucketEncryption
        • putBucketEncryption
        • putBucketVersioning
        • getBucketVersioning
        • putBucketLogging
        • getBucketLogging
        • listObjectVersions
      • Object
        • All methods
        • upload
        • get
        • copy
        • getObjectMeta
        • delete
        • deleteMultipleObjects
        • options
      • Multipart upload
        • General multipart upload procedure
        • startUpload
        • uploadPart
        • copyPart
        • listParts
        • abortUpload
        • completeUpload
        • listUploads
      • Static Website Hosting
        • All methods
        • upload
        • get
        • delete
        • Static website response codes
      • CORS
        • All methods
        • XML structure of CORS configuration
        • upload
        • get
        • delete
      • Lifecycles
        • All methods
        • XML structure of lifecycle configuration
        • upload
        • get
        • delete
      • ACL
        • All methods
        • XML structure of ACL configuration
        • objectGetAcl
        • objectPutAcl
        • bucketGetAcl
        • bucketPutAcl
      • Bucket Policy
        • All methods
        • GetBucketPolicy
        • PutBucketPolicy
        • DeleteBucketPolicy
        • Data schema
        • Actions
        • Conditions
      • Common request headers
      • Common response headers
      • Responses
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Before January 1, 2019
      • From January 1 to March 1, 2019
  • Questions and answers
  1. Amazon S3-compatible HTTP API
  2. API reference
  3. Object
  4. deleteMultipleObjects

deleteMultipleObjects method

  • Request
    • Path parameters
    • Query parameters
    • Headers
    • Data schema
  • Response
    • Headers
    • Response codes
    • Data structure

Deletes objects based on a list of keys passed in a request.

It takes less time than deleting the same objects one by one via separate requests.

The delete list may contain a maximum of 1000 keys.

If an object doesn't exist, Object Storage marks it as deleted in the response.

You can configure responses so that Object Storage returns one of the following selections:

  • Statuses of all delete operations.
  • Only statuses with errors deleting objects. In this case, if no errors occurred, an empty response is returned.

Request

POST /{bucket}?delete HTTP/1.1

Path parameters

Parameter Description
bucket Bucket name.

Query parameters

Parameter Description
delete Flag indicating a delete operation.

Headers

Use only common request headers in requests.

For this request, the Content-MD5 and Content-Length headers are required.

Data schema

The list of keys to delete is passed in XML format.

<?xml version="1.0" encoding="UTF-8"?>
<Delete>
    <Quiet>true</Quiet>
    <Object>
         <Key>Key</Key>
    </Object>
    ...
</Delete>
Tag Description
Delete Contains the response body.

Path: /Delete.
Quiet <Quiet>true</Quiet> enables quiet mode.

Object Storage only includes deletion errors in the response. If there are no errors, there won't be a response body.

If omitted, the default value is false.

Path: /Delete/Quiet.
Object Contains parameters for deleting an object.

Path: /Delete/Object.
Key Object key.

Path: /Delete/Object/Key.

Response

Headers

Responses can only contain common response headers.

Response codes

For a list of possible responses, see Responses.

A successful response contains additional data in XML format with the schema described below.

Data structure

<DeleteResult>
  <Deleted>
    <Key>some/key.txt</Key>
  </Deleted>
  <Error>
    <Key>some/another/key.txt</Key>
    <Code>TextErrorCode</Code>
    <Message>Describing message</Message>
  </Error>
</DeleteResult>
Tag Description
DeleteResult Response body.

Path: /DeleteResult.
Deleted Successfully deleted object.

Missing if the request was set to <Quiet>true</Quiet>.

Path: /DeleteResult/Deleted.
Key Object key.

Path: /DeleteResult/Deleted/Key or /DeleteResult/Error/Key
Error Error deleting an object.

Path: /DeleteResult/Error.
Code Error code.
Path: /DeleteResult/Error/Code.
Message Error description.
Path: /DeleteResult/Error/Message.
In this article:
  • Request
  • Path parameters
  • Query parameters
  • Headers
  • Data schema
  • Response
  • Headers
  • Response codes
  • Data structure
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC