List Parts

Last Updated: Mar 21, 2017

The ListParts command can be used to list all successfully uploaded parts mapped to a specific upload ID.

Request syntax

  1. Get /ObjectName?uploadId=UploadId HTTP/1.1
  2. Host: BucketName.oss-cn-hangzhou.aliyuncs.com
  3. Date: GMT Date
  4. Authorization: Signature

Request parameters

Name Description
uploadId ID of a Multipart Upload event.
Type: string
Default value: none
max-parts The maximum part number in the response of the OSS.
Type: integer
Default value: 1,000
part-number-marker Starting position of a specific list. A part is listed only when the part number is greater than the value of this parameter.
Type: integer
Default value: none
encoding-type Specify the encoding of the returned content and the encoding type. The Key adopts UTF-8 encoding, but the XML 1.0 Standard does not support parsing certain control characters, such as the characters with ASCII values from 0 to 10. In case that the Key contains control characters not supported by the XML 1.0 Standard, you can specify the encoding-type to encode the returned Key.
Data type: string
Default value: none. Optional value: url

Response elements

Name Description
ListPartsResult The container that saves the result of the List Parts request.
Type: container
Sub-nodes: Bucket, Key, UploadId, PartNumberMarker, NextPartNumberMarker, MaxParts, IsTruncated, Part
Parent node: none
Bucket Specify the bucket name.
Type: string
Parent node: ListPartsResult
EncodingType Specify the encoding type for the returned result. If the encoding type is specified in the request, the Key will be encoded in the returned result.
Type: string
Parent node: ListPartsResult
Key Object name.
Type: string
Parent node: ListPartsResult
UploadId ID of an Upload event.
Type: string
Parent node: ListPartsResult
PartNumberMarker Starting position of the part numbers in the listing result.
Type: integer
Parent node: ListPartsResult
NextPartNumberMarker If not all results are returned this time, the response request will include the NextPartNumberMarker element to indicate the value of PartNumberMarker in the next request.
Type: integer
Parent node: ListPartsResult
MaxParts The maximum part number in the returned request.
Type: integer
Parent node: ListPartsResult
IsTruncated Whether the returned result list for List Parts is truncated. The “true” indicates that not all results are returned; “false” indicates that all results are returned.
Type: enumerative string
Valid values: true, false
Parent node: ListPartsResult
Part The container that saves part information.
Type: string
Sub-nodes: PartNumber, LastModified, ETag, Size
Parent node: ListPartsResult
PartNumber Part number.
Type: integer
Parent node: ListPartsResult.Part
LastModified Time when a part is uploaded.
Type: date
Parent node: ListPartsResult.part
ETag ETag value in the content of the uploaded part.
Type: string
Parent node: ListPartsResult.Part
Size Size of the uploaded part.
Type: integer
Parent node: ListPartsResult.Part

Detail analysis

  • ListParts supports two request parameters: max-parts and part-number-marker.
  • The maximum value of the max-parts parameter is 1,000; its default value is also 1,000.
  • The results returned by the OSS are listed in ascending order based on the part numbers.
  • Because errors may occur in network transmission, it is not recommended that you use the result (part number and ETag value) of List Parts to generate the final part list of Complete Multipart.

Example

Request example:

  1. Get /multipart.data?uploadId=0004B999EF5A239BB9138C6227D69F95 HTTP/1.1
  2. Host: oss-example.oss-cn-hangzhou.aliyuncs.com
  3. Date: Thu, 23 Feb 2012 07:13:28 GMT
  4. Authorization: OSS qn6qrrqxo2oawuk53otfjbyc:4qOnUMc9UQWqkz8wDqD3lIsa9P8=

Response example:

  1. HTTP/1.1 200
  2. Server: AliyunOSS
  3. Connection: keep-alive
  4. Content-length: 1221
  5. Content-type: application/xml
  6. x-oss-request-id: 106452c8-10ff-812d-736e-c865294afc1c
  7. Date: Thu, 23 Feb 2012 07:13:28 GMT
  8. <?xml version="1.0" encoding="UTF-8"?>
  9. <ListPartsResult xmlns=”http://doc.oss-cn-hangzhou.aliyuncs.com”>
  10. <Bucket>multipart_upload</Bucket>
  11. <Key>multipart.data</Key>
  12. <UploadId>0004B999EF5A239BB9138C6227D69F95</UploadId>
  13. <NextPartNumberMarker>5</NextPartNumberMarker>
  14. <MaxParts>1000</MaxParts>
  15. <IsTruncated>false</IsTruncated>
  16. <Part>
  17. <PartNumber>1</PartNumber>
  18. <LastModified>2012-02-23T07:01:34.000Z</LastModified>
  19. <ETag>&quot;3349DC700140D7F86A078484278075A9&quot;</ETag>
  20. <Size>6291456</Size>
  21. </Part>
  22. <Part>
  23. <PartNumber>2</PartNumber>
  24. <LastModified>2012-02-23T07:01:12.000Z</LastModified>
  25. <ETag>&quot;3349DC700140D7F86A078484278075A9&quot;</ETag>
  26. <Size>6291456</Size>
  27. </Part>
  28. <Part>
  29. <PartNumber>5</PartNumber>
  30. <LastModified>2012-02-23T07:02:03.000Z</LastModified>
  31. <ETag>&quot;7265F4D211B56873A381D321F586E4A9&quot;</ETag>
  32. <Size>1024</Size>
  33. </Part>
  34. </ListPartsResult>
Thank you! We've received your feedback.