You can call this operation to list all parts that have been uploaded using a specified upload ID.
- The results returned by OSS are listed in ascending order of their part numbers.
- Errors may occur during network transmission. We recommend that you do not use the results (part numbers and ETag values) of ListParts to generate the final part list of CompleteMultipart.
Request syntax
Get /ObjectName?uploadId=UploadId HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: Signature
Request parameters
Parameter | Type | Description |
---|---|---|
uploadId | String | The ID of the multipart upload task.
Default value: null |
max-parts | Integer | The maximum number of parts to list in the OSS response.
Default value: 1,000 Maximum value: 1,000 |
part-number-marker | Integer | The number of the part after which the listing begins. All parts with the part numbers
greater than the value of this parameter are listed.
Default value: null |
Encoding-type | String | The encoding type of the object name in the response. The object name can contain
any characters encoded in UTF-8. However, the XML 1.0 standard cannot be used to parse
certain control characters, such as characters with an ASCII value from 0 to 10. You
can set the Encoding-type parameter to encode the returned object name. Set the value
to url.
Default value: null Valid value: url |
Response elements
Element | Type | Description |
---|---|---|
ListPartsResult | Container | The container that stores the response to the ListParts request.
Child node: Bucket, Key, UploadId, PartNumberMarker, NextPartNumberMarker, MaxParts, IsTruncated, and Part Parent node: none |
Bucket | String | The name of the bucket.
Parent node: ListPartsResult |
EncodingType | String | The encoding type of the object name in the response. If the Encoding-type parameter
is specified in the request, the object name in the response is encoded.
Parent node: ListPartsResult |
Key | String | The name of the object
Parent node: ListPartsResult |
UploadId | String | The ID of the upload task.
Parent node: ListPartsResult |
PartNumberMarker | Integer | The number of the part after which the listing begins. All parts with the part numbers
greater than the value of this parameter are listed.
Parent node: ListPartsResult |
NextPartNumberMarker | Integer | The number of the part after which the next listing begins. If the response does not
contain all required results, all parts with the part numbers greater than the value
of this parameter are listed.
Parent node: ListPartsResult |
MaxParts | Integer | The maximum number of parts in the response.
Parent node: ListPartsResult |
IsTruncated | Boolean | Indicates whether the list of parts returned in the response has been truncated. "true"
indicates that the response does not contain all required results. "false" indicates
that the response contains all required results.
Valid values: true and false Parent node: ListPartsResult |
Part | String | The container that stores information about the part.
Child node: PartNumber, LastModified, ETag, and Size Parent node: ListPartsResult |
PartNumber | Integer | The number that identifies a part.
Parent node: ListPartsResult.Part |
LastModified | Date | The time when the part was uploaded.
Parent node: ListPartsResult.Part |
ETag | String | The ETag value of the uploaded part.
Parent node: ListPartsResult.Part |
Size | Integer | The size of the uploaded part.
Parent node: ListPartsResult.Part |
Examples
Sample requests
Get /multipart.data?uploadId=0004B999EF5A239BB9138C6227D69F95 HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Thu, 23 Feb 2012 07:13:28 GMT
Authorization: OSS qn6qrrqxo2oawuk53otfjbyc:4qOnUMc9UQWqkz8wDqD3lIsa9P8=
Sample responses
HTTP/1.1 200
Server: AliyunOSS
Connection: keep-alive
Content-length: 1221
Content-type: application/xml
x-oss-request-id: 106452c8-10ff-812d-736e-c865294afc1c
Date: Thu, 23 Feb 2012 07:13:28 GMT
<?xml version="1.0" encoding="UTF-8"?>
<ListPartsResult xmlns=”http://doc.oss-cn-hangzhou.aliyuncs.com”>
<Bucket>multipart_upload</Bucket>
<Key>multipart.data</Key>
<UploadId>0004B999EF5A239BB9138C6227D69F95</UploadId>
<NextPartNumberMarker>5</NextPartNumberMarker>
<MaxParts>1000</MaxParts>
<IsTruncated>false</IsTruncated>
<Part>
<PartNumber>1</PartNumber>
<LastModified>2012-02-23T07:01:34.000Z</LastModified>
<ETag>"3349DC700140D7F86A0784842780****"</ETag>
<Size>6291456</Size>
</Part>
<Part>
<PartNumber>2</PartNumber>
<LastModified>2012-02-23T07:01:12.000Z</LastModified>
<ETag>"3349DC700140D7F86A0784842780****"</ETag>
<Size>6291456</Size>
</Part>
<Part>
<PartNumber>5</PartNumber>
<LastModified>2012-02-23T07:02:03.000Z</LastModified>
<ETag>"7265F4D211B56873A381D321F586****"</ETag>
<Size>1024</Size>
</Part>
</ListPartsResult>
SDKs
You can call this operation when you use SDK demos in any of the following languages: