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
| Name | Description | Required | Type |
|---|---|---|---|
| Key | Key name of the object to delete | Yes | text |
| versionId | Version ID used to reference a specific version of the object | No | text |
Headers
| Name | Description | Required | Type |
|---|---|---|---|
| x-amz-mfa | The concatenation of the authentication device's serial number, a space, and the value that is displayed on your authentication device | No | text |
| x-amz-request-payer | Confirms that the requester knows that they will be charged for the request. Required for Requester Pays buckets | No | text |
| x-amz-expected-bucket-owner | The account ID of the expected bucket owner | No | text |
| If-Match | Delete the object only if its entity tag (ETag) matches the specified tag | No | text |
| x-amz-if-match-last-modified-time | Delete the object only if its modification time matches the provided timestamp | No | text |
| x-amz-if-match-size | Delete the object only if its size matches the provided size in bytes | No | text |
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
| Name | Description | Required | Type |
|---|---|---|---|
| x-amz-delete-marker | Specifies whether the versioned object that was permanently deleted was (true) or was not (false) a delete marker | No | String |
| x-amz-version-id | Returns the version ID of the delete marker created as a result of the DELETE operation | No | String |
| x-amz-request-charged | If present, indicates that the requester was successfully charged for the request | No | String |
Special Errors
| Error Code | Description |
|---|---|
| NoSuchBucket | The specified bucket does not exist |
| NoSuchKey | The specified key does not exist |
| 403 | Forbidden. 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.