Delete multiple containers or objects



Deletes one or more containers and / or objects.

The body of the request is a plain-text, newline-separated list of URL encoded objects to delete. Each line must be of the form container or container/object. The body is subject to the following conditions and restrictions:

  • When a line is of the form container, the corresponding container must be empty.
  • No more than 10,000 lines (deletions) may be specified per request.
  • After the first 10 deletions have been processed, all subsequent deletions in the request will be processed at a rate not exceeding one deletion every 100msec.


Path Parameters
Type: string
Required: true
The unique name for the account. An account is also known as the project or tenant.
Query Parameters
Type: string
Required: true
Allow Empty value: true
Bulk delete operation flag. This parameter takes no value.
Header Parameters
Type: string
Indicates the response body format desired by the caller. For bulk operations, the available formats are text/plain, application/json, and application/xml.
Type: integer
Minimum Value: 0
Set to the length of the body content.
Type: string
Must be set to text/plain
Type: string
Required: true
Authentication token.


Supported Media Types
  • application/json
200 Response
A 200 response is always returned. Check the response body for details.
Root Schema : /paths/~1v1~1{account}/delete/responses/200/schema
Type: object
Nested Schema : /paths/~1v1~1{account}/delete/responses/200/schema/properties/Errors
Type: array
List of all errors that occurred.


cURL Command

The following example shows how to delete multiple containers (and objects in multiple containers) by submitting a DELETE request with the bulk-delete query parameter.

  1. Create a local file that lists the objects to be deleted and the containers they are in.

    Here's a sample of such a file:

    $ cat objects_to_delete
    In this example, the goal is to delete the following:
    • object1 and object2 in container1

    • container1, if it is empty

    • object3 in container2

    • container3, if it is empty

  2. Send a DELETE request to the account URL.
    • Specify the file that contains the list of containers and objects to be deleted.

    • Include the bulk-delete query parameter.

    • Set Content-Type to text/plain.

    curl -v -X DELETE \
         -H "X-Auth-Token: AUTH_tkb4fdf39c92e9f62cca9b7c196f8b6e6b" \
         -H "Content-Type: text/plain" \
         -T objects_to_delete \

Sample Response

HTTP/1.1 200 OK
Date: Tue,  28 Jun 2015 11:44:29 GMT
Content-Type: text/plain
Transfer-Encoding: chunked
Number Deleted: 5
Number Not Found: 0
Response Body: 
Response Status: 200 OK