Documentation Index

Fetch the complete documentation index at: https://docs.wasabi.com/llms.txt

Use this file to discover all available pages before exploring further.

Object Tagging With the Wasabi S3 API

Prev Next

GET Object Tagging

Wasabi supports functionality to fetch the tag set of an object when the object:

  • Does not have any tags

  • Does have tags

When the Object Does Not Have Any Tags

GET https://s3.wasabisys.com/my_bucket/Test-object1.txt?tagging

Response body:

<?xml version="1.0" encoding="UTF-8"?>
<Tagging>
   <TagSet></TagSet>
</Tagging>
Status 200 OK

When the Object Has Tags

GET https://s3.wasabisys.com/my_bucket/Test-object2.pdf?tagging

Response body:

<!--?xml version="1.0" encoding="UTF-8"?-->
<Tagging>
   <TagSet>
      <Tag>
         <Key>key2</Key>
         <Value>value2</Value>
      </Tag>
      <Tag>
         <Key>key1</Key>
         <Value>value1</Value>
      </Tag>
   </TagSet>
</Tagging>
Status 200 OK

PUT Object Tagging

Wasabi supports functionality for:

  • Adding the tag value of an existing object in a bucket

  • Appending the tag value of an existing object in a bucket

Adding the Tag Value of an Existing Object in a Bucket

PUT https://s3.wasabisys.com/my_bucket/Test-object3.pdf?tagging

Content-Type: text/xml
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
   <TagSet>
      <Tag>
         <Key>tag1</Key>
         <Value>value1</Value>
      </Tag>
   </TagSet>
</Tagging>

Response body:

Status 200 OK

Appending the Tag Value of an Existing Object in a Bucket

In this example, an existing object already has the tag value of “key5” –“value5”, You can append a new tag pair along with the existing pair.

PUT https://s3.wasabisys.com/my_bucket/Test-object4.jpg?tagging

Content-Type: text/xml

Response body:

<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
   <TagSet>
      <Tag>
         <Key>key5</Key>
         <Value>value5</Value>
      </Tag>
      <Tag>
         <Key>key6</Key>
         <Value>value6</Value>
      </Tag>
   </TagSet>
</Tagging>
Status 200 OK

To PUT tags of any other version, use the versionId query parameter.

DELETE Object Tagging

This removes the entire tag set from the specified object.

DELETE https://s3.wasabisys.com/my_bucket/Test-object5.pdf?tagging

Response body:

<empty>
Status 204 No Content

To delete tags of any other version, use the versionId query parameter.