List Parts

最近更新时间:2020-04-03 02:29:31

List Parts


Description

This interface will list all uploaded blocks in the specified upload task.

Using this interface, it must contain the upload ID returned by KS3 when sending the request to start the blocking task. Since the default maximum number of blocks is 1000, the request returns up to 1000 uploaded blocks. You can specify max-parts to limit the number of blocks returned. If the number of uploaded blocks exceeds 1000, the value of IsTruncated in the response returned by KS3 will be true and an NextPartNumberMarker element will be added. In a continuous List Parts request, the user can set the part-number-marker parameter to the value of NextPartNumberMarker of the response returned by the previous request to complete the continuous list and block.

Request

Syntax

GET /{ObjectKey}?uploadId={UploadId} HTTP/1.1
Host: {BucketName}.{endpoint}
Date: {Date}
Authorization: {SignatureValue}

Attention:

Request Parameters

Parameter Description Required
encoding-type Indicates the encoding used for requests KS3 and KS3 responses. object key can contain any Unicode character. However, the XML 1.0 parser cannot parse certain characters, such as 0 to 10 in ASCII. Characters that cannot be parsed can be added to the request, and KS3 will encode them in the response.
Type: String
Default: None
Valid Value: url
No
uploadId Used to identify the block upload task.
Type: String
Default: None
Yes
max-parts Sets the maximum number of blocks in the response body.
Type: String
Default: 1,000
No
part-number-marker Specifies which block to start the enumeration from. Only blocks larger than the set value are listed.
Type: String
Default: None
No

Request Headers

This request uses only the public request headers. For more information, please click Public Request Headers

Response

Response Headers

This interface uses public response headers. For more information, please click Public Response Headers

In addition to the public response headers, the storage-class response header is returned, indicating the file type.

Name Description
storage-class Used to describe the Bucket file class.
Standard storage does not return this response header. Infrequent access storage is STANDARD_IA. Archive storage is ARCHIVE

Response Elements

Name Description
ListPartsResult Container for response information.
Child Node: Bucket, Key, UploadId, Initiator, Owner, StorageClass,PartNumberMarker, NextPartNumberMarker, MaxParts, IsTruncated, Part
Type: Container
Bucket The name of the space where the chunking upload task is started.
Type: String
Ancestors: ListPartsResult
Encoding-Type Encoding method of object key in the XML response sent by KS3. If the user specifies an encoding method, the KS3 response will encode object key using the encoding method specified by the user.
Type: String
Ancestors: ListBucketResult
Key The object key of the object that starts the block upload task.
Type: String
Ancestors: ListPartsResult
UploadId Used to identify the block upload task.
Type: String
Ancestors: ListPartsResult
Initiator Container containing the information of the initiator of the block upload task.
Child Node: ID, DisplayName
Type: Container
Ancestors ListPartsResult
ID User ID
Type: String
Ancestors: Initiator
DisplayName Display name of the user.
Type: String
Ancestors: Initiator
Owner Container that identifies the owner information of an object.
Child Node: ID, DisplayName
Type: Container
Ancestors: ListPartsResult
StorageClass How to store the uploaded objects.
Type: String
Notes:Standard store returns STANDARD. Infrequent access store the response content value is STANDARD_IA. Archive store the response content value is ARCHIVE.
Ancestors: ListPartsResult
PartNumberMarker Enumerates the start of the block.
Type: Integer
Ancestors: ListPartsResult
NextPartNumberMarker When a list is truncated, this parameter specifies the sequence number of the last block, which can be used to set the part-number-marker value in the continuous enumeration block request.
Type: Integer
Ancestors: ListPartsResult
MaxParts Maximum number of blocks allowed in response body。
Type: Integer
Ancestors: ListPartsResult
IsTruncated Whether the identification list is complete. If the number of uploaded blocks exceeds MaxParts, the list should be truncated.
Type: Boolean
Ancestors: ListPartsResult
Part A container that contains information for a specified block. The response can contain 0 or more block containers.
Child Node: PartNumber, LastModified, ETag, Size
Type: String
Ancestors: ListPartsResult
PartNumber Identifies the block serial number of the block.
Type: Integer
Ancestors: Part
LastModified Specifies the last time the block completed the upload.
Type: Date
Ancestors: Part
ETag Entity label returned after block upload。
Type: String
Ancestors: Part
Size The size of the block.
Type: Integer
Ancestors: Part

Special Errors

The request does not return any special errors.

Examples

Sample Request

GET /my-video.rm ?uploadId=1aa9cfad5e2e405c8f27965feb8b60cc &max-parts=2 &part-number-marker=1 HTTP/1.1
Host: ks3-example.ks3-cn-beijing.ksyun.com
Date: Mon, 1 Nov 2010 20:34:56 GMT
Authorization: authorization string

Sample Response

HTTP/1.1 200 OK
Date: Mon, 1 Nov 2010 20:34:56 GMT
Content-Length: 985
Connection: keep-alive
Server: Tengine

<?xml version="1.0" encoding="UTF-8"?>
<ListPartsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
    <Bucket>ks3-example</Bucket>
    <Key>my-video.rm</Key>
    <UploadId>1aa9cfad5e2e405c8f27965feb8b60cc</UploadId>
    <Initiator>
        <ID>73410125</ID>
        <DisplayName>ks3@kingsoft.com</DisplayName>
    </Initiator>
    <Owner>
        <ID>73410125</ID>
        <DisplayName>ks3@kingsoft.com</DisplayName>
    </Owner>
    <StorageClass>STANDARD</StorageClass>
    <PartNumberMarker>1</PartNumberMarker>
    <NextPartNumberMarker>3</NextPartNumberMarker>
    <MaxParts>2</MaxParts>
    <IsTruncated>true</IsTruncated>
    <Part>
        <PartNumber>2</PartNumber>
        <LastModified>2010-11-10T20:48:34.000Z</LastModified>
        <ETag>7778aef83f66abc1fa1e8477f296d394</ETag>
        <Size>10485760</Size>
    </Part>
    <Part>
        <PartNumber>3</PartNumber>
        <LastModified>2010-11-10T20:48:33.000Z</LastModified>
        <ETag>aaaa18db4cc2f85cedef654fccc4a4x8</ETag>
        <Size>10485760</Size>
    </Part>
</ListPartsResult>

金山云,开启您的云计算之旅

注册有礼