Skip to main content

DeleteObjectTagging

DeleteObjectTagging removes the tag set from an object. Objects on STRG carry no tags, so there is never a tag set to remove: the operation checks that the bucket exists and answers 204 No Content, leaving the object exactly as it was. That keeps tools which clear object tags as part of their normal flow working without any changes, and it matches GetObjectTagging, which always answers with an empty tag set.

Good to know on STRG
  • Objects have no tags, so DeleteObjectTagging always succeeds and changes nothing.
  • The object itself is not looked up: the answer is 204 whether or not the key or version exists.
  • versionId is welcome and has nothing to act on, and the response carries no x-amz-version-id.
  • PutObjectTagging is answered with 501 NotImplemented, so a client knows straight away, and so is x-amz-tagging on an upload or a copy.
  • x-amz-expected-bucket-owner is welcome and has nothing to check: a key only ever reaches buckets of its own account.

When you'd use it​

  • Scripts written for Amazon S3. A clean-up or publishing script that clears an object's tags before moving on keeps running unchanged against STRG.
  • Tools that manage objects as a whole. Backup, sync and infrastructure-as-code tools that bring an object in line with a description of it - content, metadata and tags - may clear its tags along the way. On STRG that request succeeds, so the run carries on.

Request​

DELETE /photos/2024/cat.jpg?tagging HTTP/1.1
Host: my-bucket.s3.eu-central-1.strg.com
Authorization: AWS4-HMAC-SHA256 Credential=...
x-amz-date: 20260926T120000Z
x-amz-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

The path-style form is DELETE /my-bucket/photos/2024/cat.jpg?tagging on s3.eu-central-1.strg.com - Addressing explains both.

Permissions​

The access key needs Write objects (objects:write). For a key limited to certain buckets or to an object prefix, the bucket and the object key need to fall within them. Access keys has the details.

URI parameters​

NameTypeRequiredDescription
BucketStringYesThe bucket containing the object.
KeyStringYesThe object key.
taggingFlagYesSelects this operation. Sent with no value.
versionIdStringNoWelcome, with nothing to act on: no version has tags to remove.

Any other query parameter is answered with 501 NotImplemented.

Request headers​

NameTypeRequiredDescription
x-amz-expected-bucket-ownerStringNoWelcome, with nothing to check: an access key only ever reaches its own account's buckets.

Request body​

None.

Response​

A successful request answers 204 No Content with no body.

Response headers​

NameDescription
x-amz-version-idNot returned, as no version's tags change.
x-amz-request-idThe request ID, handy for a support request.

Response body​

None.

Errors​

These are the errors this request can return, and the situation behind each one.

CodeHTTP statusWhen
NoSuchBucket404The bucket does not exist, it is in a region other than the endpoint's, or the account has no storage in this endpoint's region.
AccessDenied403The access key lacks Write objects, the bucket or key is outside the key's buckets or object prefix, or a presigned URL has expired.
InvalidAccessKeyId403The access key does not exist, has expired or been revoked - or it was created moments ago and is not usable in this endpoint's region yet, in which case the same request works shortly afterwards.
SignatureDoesNotMatch403The request signature does not match.
RequestTimeTooSkewed403The request time is more than 15 minutes from the server's.
AuthorizationHeaderMalformed400The signature's credential scope names a region other than the endpoint's.
NotImplemented501The request carries a query parameter this operation does not use.
SlowDown503Too many requests. The Retry-After header says when a retry is welcome; the AWS SDKs retry on their own.
ServiceUnavailable503A temporary failure; the same request can be retried.
InternalError500An unexpected failure while checking the bucket; the same request can be retried.

Differences from Amazon S3​

The table lists each place where STRG behaves differently, and what that means for a client.

AspectAmazon S3STRG
Object tagsStored, and removed by this operationObjects have no tags; this operation succeeds and changes nothing
A key or version that does not existAn error204 No Content - the object is not looked up
versionIdRemoves that version's tagsWelcome, with nothing to act on
x-amz-version-id in the responseThe version whose tags were removedNot returned
Bucket in another region301 redirect with x-amz-bucket-region404 NoSuchBucket. A bucket is reached through its own regional endpoint.
x-amz-expected-bucket-ownerChecked against the bucket ownerWelcome, with nothing to check

Examples​

aws s3api delete-object-tagging \
--bucket my-bucket \
--key photos/2024/cat.jpg \
--endpoint-url https://s3.eu-central-1.strg.com \
--region eu-central-1
View as Markdown