Skip to main content

DeleteObject

Removes the specified object from QStorage.

Description​

The DeleteObject operation removes the specified object from a bucket. Once deleted, the object cannot be recovered.

note
  • The DELETE operation is idempotent - sending multiple delete requests for the same object has no additional effect.
  • QStorage does not provide a mechanism to undelete an object.

Request Syntax​

DELETE /cool-cat.jpeg?versionId=VersionId HTTP/1.1
Host: BucketName.qstorage.quilibrium.com
x-amz-expected-bucket-owner: OwnerAccountId
Values in italics indicate user input and should be replaced with actual values.

This operation does not have a request body.

Request Parameters​

URI Parameters​

NameDescriptionRequiredType
KeyKey name of the object to deleteYestext
versionIdVersion ID used to reference a specific version of the objectNotext

Headers​

NameDescriptionRequiredType
x-amz-mfaThe concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication deviceNotext
x-amz-request-payerConfirms that the requester knows that they will be charged for the request. Required for Requester Pays bucketsNotext
x-amz-expected-bucket-ownerThe account ID of the expected bucket ownerNotext
If-MatchDelete the object only if its entity tag (ETag) matches the specified tagNotext
x-amz-if-match-last-modified-timeDelete the object only if its modification time matches the provided timestampNotext
x-amz-if-match-sizeDelete the object only if its size matches the provided size in bytesNotext

Examples​

Example 1: Delete an object​

DELETE /hello.txt HTTP/1.1
Host: my-bucket.qstorage.quilibrium.com
Values in italics indicate user input and should be replaced with actual values.
HTTP/1.1 204
x-amz-id-2: Example7qoYGN7uMuFuYS6m7a4l
x-amz-request-id: TX234S0F24A06C7
Date: Wed, 01 Mar 2024 12:00:00 GMT
Values in italics indicate variable response values.

Example 2: Delete an object with bucket owner verification​

DELETE /document.pdf HTTP/1.1
Host: my-bucket.qstorage.quilibrium.com
x-amz-expected-bucket-owner: 123456789012
Values in italics indicate user input and should be replaced with actual values.
HTTP/1.1 204
x-amz-id-2: Example7qoYGN7uMuFuYS6m7a4l
x-amz-request-id: TX234S0F24A06C7
Date: Wed, 01 Mar 2024 12:00:00 GMT
Values in italics indicate variable response values.

Response Syntax​

HTTP/1.1 204
x-amz-id-2: RequestId
x-amz-request-id: AmazonRequestId
Date: ISO8601Date
Values in italics indicate variable response values.

Response Elements​

Response Headers​

NameDescriptionRequiredType
x-amz-delete-markerSpecifies whether the versioned object that was permanently deleted was (true) or was not (false) a delete markerNoString
x-amz-version-idReturns the version ID of the delete marker created as a result of the DELETE operationNoString
x-amz-request-chargedIf present, indicates that the requester was successfully charged for the requestNoString

Special Errors​

Error CodeDescription
NoSuchBucketThe specified bucket does not exist
NoSuchKeyThe specified key does not exist
403Forbidden. Authentication failed or you do not have permission to delete the object

Permissions​

You must have the s3:DeleteObject permission.

Try It Out​

Test DeleteObject

Delete an object from a bucket.

Coming Soon

This feature is currently under development and will be available soon.