You can call this operation to delete the tags of a specified object.

Versioning

By default, the DeleteObjectTagging operation is called to delete the tags of the current version of an object. If the current version of the object is a delete marker, OSS returns 404 Not Found. You can delete the tags of a specified version of an object by specifying the versionId parameter.

Request structure

DELETE /objectname? tagging
Host: bucketname.oss‐cn‐hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

Examples

  • Sample requests for objects in an unversioned bucket

    objectname is contained in bucketname that is unversioned. You can send a DELETE request to delete all tags of objectname.

    DELETE /objectname? tagging
    Host: bucketname.oss‐cn‐hangzhou.aliyuncs.com
    Date: Tue, 09 Apr 2019 03:00:33 GMT
    Authorization: OSS ************:********************

    Sample success responses

    204 (No Content)
    content‐length: 0
    server: AliyunOSS
    x‐oss‐request‐id: 5CAC0AD16D0232E2051B****
    date: Tue, 09 Apr 2019 03:00:33 GMT
  • Sample requests for objects in a versioned bucket

    objectname is contained in bucketname that is versioned. You can specify versionId in a DELETE request to delete all tags for the specified version of objectname.

    DELETE /objectname? tagging&versionId=CAEQExiBgID.jImWlxciIDQ2ZjgwODIyNDk5MTRhNzBiYmQwYTZkMTYzZjM0****
    Host: bucketname.oss-cn-hangzhou.aliyuncs.com
    Date: Wed, 24 Jun 2020 09:01:09 GMT
    Authorization: OSS ************:********************

    Sample success responses

    204 (No Content)
    content-length: 0
    server: AliyunOSS
    x-oss-request-id: 5EF3165525D95C3338E8****
    date: Wed, 24 Jun 2020 09:01:09 GMT
    x-oss-version-id: CAEQExiBgID.jImWlxciIDQ2ZjgwODIyNDk5MTRhNzBiYmQwYTZkMTYzZjM0****

SDKs

You can call GetObjectTagging by using the following OSS SDKs for different programming languages: