GET Object Attributes¶
The GET Object Attributes operation returns a subset of object metadata without
fetching the object itself. This operation is useful to quickly retrieve specific
information about an object, such as its ETag, ObjectParts, StorageClass,
and ObjectSize, without the overhead of a full GET or HEAD request.
ARTESCA extends this functionality to support the retrieval of user-defined metadata
using the x-amz-meta-* and x-amz-meta-<key> attributes.
Requests¶
Syntax¶
GET /{{ObjectName}}?attributes HTTP/1.1
Host: {{BucketName}}.{{StorageService}}.com
Authorization: {{authorizationString}}
Date: {{date}}
x-amz-expected-bucket-owner: {{ExpectedBucketOwner}}
x-amz-object-attributes: {{ObjectAttributes}}
Parameters¶
Parameter |
Type |
Description |
|---|---|---|
|
string |
The version ID of the object whose attributes are being requested. Default: None |
Headers¶
The GET Object Attributes operation uses the following request headers in addition to those that are common to all operations (refer to Common Request Headers).
Header |
Type |
Description |
|---|---|---|
|
string |
Specifies the attributes to return. Attribute names are comma-separated. Valid Values:
Required: Yes Note User metadata values concern only user metadata, not tagging. Note When using
|
|
string |
The account ID of the expected
bucket owner. If the bucket is owned
by a different account, the request
fails with the HTTP status code
Default: None |
Note
The AWS Checksum attribute is not supported by ARTESCA. Requesting
Checksum in the x-amz-object-attributes header will result in a
501 Not Implemented response error.
Elements¶
The GET Object Attributes operation does not use request elements.
Responses¶
Headers¶
Header |
Type |
Description |
|---|---|---|
|
Boolean |
Specifies whether the object is a delete marker. Valid Values:
|
|
string |
The version ID of the object. Default: None |
|
string |
The date and time at which the object was last modified. Default: None |
Elements¶
The GET Object Attributes operation returns an XML response body with the following elements.
Element |
Type |
Description |
|---|---|---|
|
Container |
Root element for the response. |
|
string |
The entity tag of the object. |
|
Container |
A collection of parts associated with a multipart upload. |
|
integer |
The total number of parts. |
|
string |
The storage class of the object. |
|
integer |
The size of the object in bytes. |
|
string |
User-defined metadata keys and values.
These elements are only returned when
the Note This is a Scality extension. |
Errors¶
Error |
HTTP Code |
Description |
|---|---|---|
|
400 |
The |
|
400 |
An invalid value was provided for
|
|
403 |
Access denied. Verify that the requester
has the |
|
404 |
The specified object does not exist. |
|
404 |
The specified |
|
405 |
The specified object is a delete marker. |
|
501 |
The |
Examples¶
Getting Object Attributes¶
Request¶
GET /my-object?attributes HTTP/1.1
Host: {{bucketName}}.s3.example.com
Date: Wed, 28 Oct 2009 22:32:00 GMT
Authorization: {{authorizationString}}
x-amz-object-attributes: ETag,ObjectSize,StorageClass
Response¶
HTTP/1.1 200 OK
x-amz-id-2: eftixk72aD6Ap51TnqcoF8eFidJG9Z/2
x-amz-request-id: 318BC8BC148832E5
Date: Wed, 28 Oct 2009 22:32:00 GMT
Last-Modified: Wed, 12 Oct 2009 17:50:00 GMT
Content-Type: application/xml
Server: ScalityS3
<?xml version="1.0" encoding="UTF-8"?>
<GetObjectAttributesResponse>
<ETag>fba9dede5f27731c9771645a39863328</ETag>
<StorageClass>STANDARD</StorageClass>
<ObjectSize>434234</ObjectSize>
</GetObjectAttributesResponse>
Getting Object Attributes for a Multipart-Uploaded Object¶
Request¶
GET /my-multipart-object?attributes HTTP/1.1
Host: {{bucketName}}.s3.example.com
Date: Wed, 28 Oct 2009 22:32:00 GMT
Authorization: {{authorizationString}}
x-amz-object-attributes: ObjectParts,ObjectSize
Response¶
HTTP/1.1 200 OK
x-amz-id-2: eftixk72aD6Ap51TnqcoF8eFidJG9Z/2
x-amz-request-id: 318BC8BC148832E5
Date: Wed, 28 Oct 2009 22:32:00 GMT
Last-Modified: Sun, 1 Jan 2006 12:00:00 GMT
Content-Type: application/xml
Server: ScalityS3
<?xml version="1.0" encoding="UTF-8"?>
<GetObjectAttributesResponse>
<ObjectSize>209715200</ObjectSize>
<ObjectParts>
<PartsCount>5</PartsCount>
</ObjectParts>
</GetObjectAttributesResponse>
Getting Attributes of a Specific Version of an Object¶
Request¶
GET /my-object?attributes&versionId=3/L4kqtJlcpXroDTDmpUMLUo HTTP/1.1
Host: {{bucketName}}.s3.example.com
Date: Wed, 28 Oct 2009 22:32:00 GMT
Authorization: {{authorizationString}}
x-amz-object-attributes: ETag,ObjectSize,StorageClass
Response¶
HTTP/1.1 200 OK
x-amz-id-2: eftixk72aD6Ap51TnqcoF8eFidJG9Z/2
x-amz-request-id: 318BC8BC148832E5
Date: Wed, 28 Oct 2009 22:32:00 GMT
Last-Modified: Sun, 1 Jan 2006 12:00:00 GMT
x-amz-version-id: 3/L4kqtJlcpXroDTDmJ+rmSpXd3QBpUMLUo
Content-Type: application/xml
Server: ScalityS3
<?xml version="1.0" encoding="UTF-8"?>
<GetObjectAttributesResponse>
<ETag>fba9dede5f27731c9771645a39863328</ETag>
<StorageClass>STANDARD</StorageClass>
<ObjectSize>434234</ObjectSize>
</GetObjectAttributesResponse>
Getting Object Attributes with User-Defined Metadata¶
This example uses the x-amz-meta-* Scality extension value in the
x-amz-object-attributes header to retrieve user-defined metadata along
with standard object attributes.
Request¶
GET /my-object?attributes HTTP/1.1
Host: {{bucketName}}.s3.example.com
Date: Wed, 28 Oct 2009 22:32:00 GMT
Authorization: {{authorizationString}}
x-amz-object-attributes: ETag,ObjectSize,StorageClass,x-amz-meta-*
Response¶
HTTP/1.1 200 OK
x-amz-id-2: eftixk72aD6Ap51TnqcoF8eFidJG9Z/2
x-amz-request-id: 318BC8BC148832E5
Date: Wed, 28 Oct 2009 22:32:00 GMT
Last-Modified: Wed, 12 Oct 2009 17:50:00 GMT
Content-Type: application/xml
Server: ScalityS3
<?xml version="1.0" encoding="UTF-8"?>
<GetObjectAttributesResponse>
<ETag>fba9dede5f27731c9771645a39863328</ETag>
<StorageClass>STANDARD</StorageClass>
<ObjectSize>434234</ObjectSize>
<x-amz-meta-department>Legal</x-amz-meta-department>
<x-amz-meta-project>compliance-2026</x-amz-meta-project>
</GetObjectAttributesResponse>

