Menu
Amazon Simple Storage Service
API Reference (API Version 2006-03-01)

GET Object tagging

Description

This implementation of the GET operation returns the tags associated with an object. You send the GET request against the tagging subresource associated with the object.

To use this operation, you must have permission to perform the s3:GetObjectTagging action. By default, the GET operation returns information about current version of an object. For a versioned bucket, you can have multiple versions of an object in your bucket. To retrieve tags of any other version, use the versionId query parameter. You also need permission for the s3:GetObjectVersionTagging action.

By default, the bucket owner has this permission and can grant this permission to others.

Requests

Syntax

GET /ObjectName?tagging HTTP/1.1 Host: BucketName.s3.amazonaws.com Date: date Authorization: authorization string (see Authenticating Requests (AWS Signature Version 4))

Request Parameters

This implementation of the operation does not use request parameters.

Request Headers

This implementation of the operation uses only request headers that are common to all operations. For more information, see Common Request Headers.

Request Elements

This implementation of the operation does not use request elements.

Responses

Response Headers

This implementation of the operation uses only response headers that are common to most responses. For more information, see Common Response Headers.

Response Elements

Name Description
Tagging

Container for the TagSet element.

Type: Container

Ancestors: None

TagSet

Contains the tag set.

Type: Container

Ancestors: Tagging

Tag

Contains the tag information.

Type: Container

Ancestors: TagSet

Key

Name of the tag

Type: String

Ancestors: Tag

Value

Value of the tag

Type: String

Ancestors: Tag

Examples

Sample Request

The following request returns the tag set of the specified object.

GET /example-object?tagging HTTP/1.1 Host: examplebucket.s3.amazonaws.com Date: Thu, 22 Sep 2016 21:33:08 GMT Authorization: authorization string

Sample Response

HTTP/1.1 200 OK Date: Thu, 22 Sep 2016 21:33:08 GMT Connection: close Server: AmazonS3 <?xml version="1.0" encoding="UTF-8"?> <Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> <TagSet> <Tag> <Key>tag1</Key> <Value>val1</Value> </Tag> <Tag> <Key>tag2</Key> <Value>val2</Value> </Tag> </TagSet> </Tagging>