S3 Delete Objects
    • Dark
      Light

    S3 Delete Objects

    • Dark
      Light

    Article Summary

    POSThttps://s3.<your-region>.backblazeb2.com/<your-bucket-name>/?delete

    Deletes multiple objects from a bucket in a single request. In the XML body, provide the objects keys and, optionally, version IDs if you want to delete a specific object version.

    AUTHORIZATION AWS Signature

    This request is using AWS Signature from collection Backblaze B2 Cloud Storage S3 Compatible API.

    PARAMS

    delete

    Must be present to delete multiple objects.

    PATH VARIABLES

    bucket

    Required. The name of the bucket

    BODY (raw XML)

    <Delete>
        <Object>
            <Key>key1</Key>
        </Object>
        <Object>
            <Key>key2</Key>
            <VersionId>versionId</VersionId>
        </Object>
        <Quiet>true</Quiet>
    </Delete>

    Example Request

    curl --location 'https://s3.<your-region>.backblazeb2.com/my-bucket-name/?delete=null' \
    --data '<Delete>
        <Object>
            <Key>object-1</Key>
        </Object>
        <Object>
            <Key>object-2</Key>
        </Object>
    </Delete>'

    Example Response

    204 NO CONTENT

    Body

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <DeleteResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
        <Deleted>
            <DeleteMarker>true</DeleteMarker>
            <DeleteMarkerVersionId>4_z6145af89f355ac2f74ed0c1b_f401a918cd72e68af_d20220128_m234522_c004_v0402003_t0046</DeleteMarkerVersionId>
            <Key>object-1</Key>
        </Deleted>
        <Deleted>
            <DeleteMarker>true</DeleteMarker>
            <DeleteMarkerVersionId>4_z6145af89f355ac2f74ed0c1b_f401a918cd72e68b0_d20220128_m234522_c004_v0402002_t0049</DeleteMarkerVersionId>
            <Key>object-2</Key>
        </Deleted>
    </DeleteResult>


    Headers (9)

    x-amz-request-id699c79d678ac85eb

    x-amz-id-2

    aMb41pGbJOWYzrTUIY0JmFjSgZMljS2L4

    Cache-Control

    max-age=0, no-cache, no-store

    Content-Type


    Content-Length

    611

    Date

    Fri, 28 Jan 2022 22:46:26 GMT

    Keep-Alive

    timeout=5

    Connection

    keep-alive







    Was this article helpful?

    What's Next