Tagging

Tags for Buckets and Objects

GetBucketTagging

get

Returns the tag set associated with the bucket.

To use this operation, you must have permission to perform the `GetBucketTagging` operation. By default, the bucket owner has this permission and can grant this permission to others.

`GetBucketTagging` has the following special error:

  • Error code: `NoSuchTagSetError`

    • Description: There is no tag set associated with the bucket.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Query parameters
taggingboolean · enumRequiredPossible values:
Responses
200
Success
application/xml
get
GET /{Bucket} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
200

Success

<?xml version="1.0" encoding="UTF-8"?>
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <TagSet>
        <Tag>
            <Key>Project</Key>
            <Value>Project 1</Value>
        </Tag>
        <Tag>
            <Key>Client</Key>
            <Value>Client 1</Value>
        </Tag>
    </TagSet>
</Tagging>

PutBucketTagging

put

Sets the tags for a bucket.

When this operation sets the tags for a bucket, it will overwrite any current tags the bucket already has. You cannot use this operation to add tags to an existing list of tags.

To use this operation, you must have permissions to perform the `PutBucketTagging` operation. The bucket owner has this permission by default and can grant this permission to others.

`PutBucketTagging` has the following special errors:

  • Error code: `InvalidTagError`

    • Description: The tag provided was not a valid tag. This error can occur if the tag did not pass input validation.

  • Error code: `MalformedXMLError`

    • Description: The XML provided does not match the schema.

  • Error code: `OperationAbortedError `

    • Description: A conflicting conditional operation is currently in progress against this resource. Please try again.

  • Error code: `InternalError`

    • Description: The service was unable to apply the provided tag to the bucket.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Query parameters
taggingboolean · enumRequiredPossible values:
Header parameters
Content-MD5stringOptional

The base64 encoded MD5 digest of the message (without the headers) according to RFC 1864.

Body
Responses
200
Success
put
PUT /{Bucket} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Content-Type: application/xml
Accept: */*
Content-Length: 348

"<?xml version="1.0" encoding="UTF-8"?>
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <TagSet>
        <Tag>
            <Key>Project</Key>
            <Value>Project 1</Value>
        </Tag>
        <Tag>
            <Key>Client</Key>
            <Value>Client 1</Value>
        </Tag>
    </TagSet>
</Tagging>
"
200

Success

No content

DeleteBucketTagging

delete

Deletes the tags from the bucket.

To use this operation, you must have permission to perform the `PutBucketTagging` operation. By default, the bucket owner has this permission and can grant this permission to others.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Query parameters
taggingboolean · enumRequiredPossible values:
Responses
204
Success
delete
DELETE /{Bucket} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
204

Success

No content

GetObjectTagging

get

Returns the tag-set of 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 `GetObjectTagging` operation. 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 `GetObjectVersionTagging` operation.

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

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Keystring · min: 1Required

Object key for which to get the tagging information.

Query parameters
versionIdstringOptional

The versionId of the object for which to get the tagging information.

taggingboolean · enumRequiredPossible values:
Responses
200
Success
application/xml
get
GET /{Bucket}/{Key} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
200

Success

<?xml version="1.0" encoding="UTF-8"?>
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <TagSet>
        <Tag>
            <Key>Project</Key>
            <Value>Project 1</Value>
        </Tag>
        <Tag>
            <Key>Client</Key>
            <Value>Client 1</Value>
        </Tag>
    </TagSet>
</Tagging>

PutObjectTagging

put

Sets the supplied tag-set to an object that already exists in a bucket.

A tag is a key-value pair. You can associate tags with an object by sending a PUT request against the tagging subresource that is associated with the object. You can retrieve tags by sending a GET request.

Note that IONOS Object Storage limits the maximum number of tags to 10 tags per object.

To use this operation, you must have permission to perform the `PutObjectTagging` operation. By default, the bucket owner has this permission and can grant this permission to others.

To put tags of any other version, use the `versionId` query parameter. You also need permission for the `PutObjectVersionTagging` operation.

Special Errors

    • Code: InvalidTagError

    • Cause: The tag provided was not a valid tag. This error can occur if the tag did not pass input validation.

    • Code: MalformedXMLError

    • Cause: The XML provided does not match the schema.

    • Code: OperationAbortedError

    • Cause: A conflicting conditional operation is currently in progress against this resource. Please try again.

    • Code: InternalError

    • Cause: The service was unable to apply the provided tag to the object.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Keystring · min: 1Required

Name of the object key.

Query parameters
versionIdstringOptional

The versionId of the object that the tag-set will be added to.

taggingboolean · enumRequiredPossible values:
Header parameters
Content-MD5stringOptional

The base64 encoded MD5 digest of the message (without the headers) according to RFC 1864.

Body
Responses
200
Success
application/xml
ResponseobjectExample: {"VersionId":"null"}
put
PUT /{Bucket}/{Key} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Content-Type: application/xml
Accept: */*
Content-Length: 348

"<?xml version="1.0" encoding="UTF-8"?>
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <TagSet>
        <Tag>
            <Key>Project</Key>
            <Value>Project 1</Value>
        </Tag>
        <Tag>
            <Key>Client</Key>
            <Value>Client 1</Value>
        </Tag>
    </TagSet>
</Tagging>
"
200

Success

<?xml version="1.0"?>
<object>
	<VersionId>null</VersionId>
</object>

DeleteObjectTagging

delete

Removes the entire tag set from the specified object.

To use this operation, you must have permission to perform the `DeleteObjectTagging` operation.

To delete tags of a specific object version, add the `versionId` query parameter in the request. You will need permission for the `DeleteObjectVersionTagging` operation.

Authorizations
Path parameters
Bucketstring · min: 3 · max: 63Required

The bucket name.

Example: my-bucket
Keystring · min: 1Required

The key that identifies the object in the bucket from which to remove all tags.

Query parameters
versionIdstringOptional

The versionId of the object that the tag-set will be removed from.

taggingboolean · enumRequiredPossible values:
Responses
204
Success
application/xml
ResponseobjectExample: {"VersionId":"null"}
delete
DELETE /{Bucket}/{Key} HTTP/1.1
Host: s3.eu-central-3.ionoscloud.com
Authorization: YOUR_API_KEY
Accept: */*
204

Success

<?xml version="1.0"?>
<object>
	<VersionId>null</VersionId>
</object>

Was this helpful?