Available in Classic and VPC
Get the metadata (attributes) of an object stored in a Ncloud Storage bucket.
Request
This section describes the request format. The method and URI are as follows:
| Method | URI |
|---|---|
| GET | /{Key}?attributes |
Request headers
The following describes the request headers.
For information about the headers common to all Ncloud Storage APIs, see Ncloud Storage request headers.
| Field | Required | Description |
|---|---|---|
x-amz-object-attributes |
Required | List of object attributes to retrieve
|
x-amz-max-parts |
Optional | Maximum number of parts to include in the response
|
x-amz-part-number-marker |
Optional | Starting part number for the part query
|
x-amz-server-side-encryption-customer-algorithm |
Optional | User encryption algorithm (AES256) |
x-amz-server-side-encryption-customer-key |
Optional | User-provided encryption key |
x-amz-server-side-encryption-customer-key-MD5 |
Optional | User-provided encryption key's MD5 value |
Request query parameters
You can use the following query parameters with your request:
| Field | Type | Required | Description |
|---|---|---|---|
attributes |
String | Required | Classification of object attribute query request
|
versionId |
String | Optional | Version ID of the object to query
|
Request example
The request example is as follows:
GET /object.csv?attributes HTTP/1.1
Host: {Bucket}.kr.ncloudstorage.com
x-amz-object-attributes: ETag,ObjectSize,StorageClass
Response
This section describes the response format.
Response headers
The following describes the response headers.
For information about the headers common to all Ncloud Storage APIs, see Ncloud Storage response headers.
| Field | Required | Description |
|---|---|---|
Last-Modified |
- | Last modification date and time of the object |
x-amz-version-id |
- | Version ID of the object
|
x-amz-delete-marker |
- | Whether it is a deletion marker
|
Response body
The response body includes the following data: Only fields corresponding to the requested attribute (x-amz-object-attributes) are included in the response.
| Field | Type | Required | Description |
|---|---|---|---|
GetObjectAttributesResponse |
Object | - | Object attribute query result |
GetObjectAttributesResponse.ETag |
String | - | Unique object identifier (entity tag) |
GetObjectAttributesResponse.ObjectSize |
Integer | - | Object size (byte) |
GetObjectAttributesResponse.StorageClass |
String | - | Storage class
|
GetObjectAttributesResponse.Checksum |
Object | - | Checksum information |
GetObjectAttributesResponse.ObjectParts |
Object | - | Part information of multipart object |
Checksum
The following describes Checksum. Only the fields corresponding to the checksum algorithm set for the object are displayed.
| Field | Type | Required | Description |
|---|---|---|---|
ChecksumCRC32 |
String | - | CRC32 checksum value |
ChecksumCRC32C |
String | - | CRC32C checksum value |
ChecksumSHA1 |
String | - | SHA1 checksum value |
ChecksumSHA256 |
String | - | SHA256 checksum value |
ChecksumCRC64NVME |
String | - | CRC64NVME checksum value |
ChecksumType |
String | - | Checksum type
|
ObjectParts
The following describes ObjectParts. This is displayed for objects created via multipart upload.
| Field | Type | Required | Description |
|---|---|---|---|
IsTruncated |
Boolean | - | Whether subsequent parts exist
|
MaxParts |
Integer | - | Maximum number of parts included in the response |
PartNumberMarker |
Integer | - | Starting part number for the part query |
NextPartNumberMarker |
Integer | - | Starting part number for the next page query
|
PartsCount |
Integer | - | Total number of parts in the object |
Part |
Array | - | Part list |
Part
The following describes Part.
| Field | Type | Required | Description |
|---|---|---|---|
PartNumber |
Integer | - | Part number |
Size |
Integer | - | Part size (byte) |
Response status codes
The following describes the response status codes.
For information about the HTTP status codes common to all Ncloud Storage APIs, see Common Ncloud Storage response status codes.
| Error code | HTTP status code | Description |
|---|---|---|
InvalidRequest |
400 | The x-amz-object-attributes header is missing or empty.
|
InvalidArgument |
400 | An invalid attribute name was specified
|
AccessDenied |
403 | No permission to access the object
|
NoSuchKey |
404 | Specified object does not exist. |
NoSuchVersion |
404 | Specified version does not exist. |
MethodNotAllowed |
405 | Specific version of a delete marker was queried. |
Response example
The following is a sample response when all attributes (ETag, ObjectSize, StorageClass, Checksum, ObjectParts) are queried.
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8"?>
<GetObjectAttributesResponse xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<ETag>******</ETag>
<ObjectSize>1024</ObjectSize>
<StorageClass>STANDARD</StorageClass>
<Checksum>
<ChecksumSHA256>******</ChecksumSHA256>
<ChecksumType>COMPOSITE</ChecksumType>
</Checksum>
<ObjectParts>
<IsTruncated>false</IsTruncated>
<MaxParts>1000</MaxParts>
<PartNumberMarker>0</PartNumberMarker>
<PartsCount>2</PartsCount>
<Part>
<PartNumber>1</PartNumber>
<Size>512</Size>
</Part>
<Part>
<PartNumber>2</PartNumber>
<Size>512</Size>
</Part>
</ObjectParts>
</GetObjectAttributesResponse>