Get Object Tagging

Last updated:2021-09-14 16:18:18

You can call this operation to query the tags of an object.

Permission

To call this operation, you must have the GetObjectTagging permission on the object. KS3 returns corresponding information based on whether you have the GetObjectTagging permission. If you do not have the GetObjectTagging permission on the object, KS3 returns an HTTP 403 error with the error message “access denied.”

Request syntax

GET /<ObjectKey>?tagging HTTP 1.1
Host:<BucketName>.<Region>.ksyuncs.com
Date: GMT Date
Authorization: Auth String

References:

Request headers

A GetObjectTagging request contains only common request headers. For more information, see common request headers.

Response headers

The response to a GetObjectTagging request contains only common response headers. For more information, see common response headers.

Response elements

Element Type Description
Tagging Container The collection of tags.Child node: TagSet
TagSet Container The collection of tags.
Parent node: Tagging.
Child node: Tag
Tag Container The collection of tags.
Parent node: TagSet.
Child nodes: Key and Value
Key String The key of the object tag.
Parent node: Tag.
Child node: none
Value String The value of the object tag.
Parent node: Tag.
Child node: none

Special errors

No special errors are returned.

Examples

  • Sample request
GET /<ObjectKey>?tagging HTTP 1.1
Host:<BucketName>.<Region>.ksyuncs.com
Date: GMT Date
Authorization: Auth String
  • Sample response
HTTP/1.1 200 OK
Content-Type: application/xml
Connection: close
Date: Fri, 19 Jan 2020 11:40:22 GMT
Server: ks3
<Tagging>
    <TagSet>
        <Tag>
            <Key>age</Key>
            <Value>18</Value>
        </Tag>
        <Tag>
            <Key>name</Key>
            <Value>xiaoming</Value>
        </Tag>
    </TagSet>
</Tagging>

Did you find the above information helpful?

Unhelpful
Mostly Unhelpful
A little helpful
Helpful
Very helpful

What might be the problems?

Insufficient
Outdated
Unclear or awkward
Redundant or clumsy
Lack of context for the complex system or functionality

More suggestions

0/200

Please give us your feedback.

Submitted

Thank you for your feedback.

问题反馈