You can use the max-parts, part-number-marker, and encoding-type query parameters to limit the parts included in a part listing.
max-parts query parameter
By default, a part listing for a multipart upload can include at most one thousand parts. However, you can use the max-parts query parameter to specify a smaller maximum number of parts to be included in the returned listing. If more than the maximum number of parts satisfy the criteria for a request, you can use query parameters to retrieve the parts in groups.
max-parts parameter rules
Valid values for the max-parts query parameter are integers in the range zero through one thousand. If you specify an integer greater than one thousand, HCP returns a 400 (Invalid Argument) status code and does not return a part listing.
The max-parts parameter name is case sensitive.
part-number-marker query parameter
By default, a part listing starts with the lowest-numbered part of the multipart upload. You can use the part-number-marker query parameter to request a listing that starts with a part with a higher number. When you include this query parameter in the request for a part listing, the returned listing starts with the part with the next higher number than the value you specified for the parameter.
part-number-marker parameter rules
Valid values for the part-number-marker query parameter are integers in the range 0 (zero) through 10,000.
The part-number-marker parameter name is case sensitive.
encoding-type parameter
You use the encoding-type query parameter to request the S3 compatible API to encode the response. You can also use this query parameter to specify the encoding method to use.
encoding-type parameter rules
The key for an object can contain any Unicode character. Some characters, such as those with an ASCII value from 0 to 10, cannot be parsed by XML 1.0 parsers. For these characters, you can add the encoding-type query parameter to request the S3 compatible API to encode the keys in the response.
The encoding-type parameter name is case sensitive.
IsTruncated and NextPartNumberMarker response body elements
The response body for a part listing request includes the IsTruncated element. If the multipart upload has any parts with higher numbers than the last part included in the returned listing, the value of the IsTruncated element is true. If the returned listing includes the highest-numbered part, the value of the IsTruncated element is false.
If the value of the IsTruncated element is true, the response body includes the NextPartNumberMarker element. The value of this element is the part number of the last part included in the returned listing. This is the number to use as the value of the part-number-marker query parameter in a request to retrieve the next group of parts of the multipart upload.
Paging through a part listing
By using the max-parts and part-number-marker query parameters in conjunction with each other, you can page through a multipart upload listing. For example, suppose a multipart upload with object name acctg/AcctgAtExampleCorp-Introduction.mov and upload ID 9 has parts numbered 1,2, 3, 4, 5, 6, 7, and 8. To page through a listing of these parts three parts at a time, you would use a sequence of requests like this:
1.Request line:
GET /acctg/AcctgAtExampleCorp-Introduction.mov?uploadId=9&max-parts=3 HTTP/1.1
The response body lists parts 1, 2, and 3 and includes these elements:
<IsTruncated>true</IsTruncated>
<NextPartNumberMarker>3</NextPartNumberMarker>
2.Request line:
GET /acctg/AcctgAtExampleCorp-Introduction.mov?uploadId=9&max-parts=3
&part-number-marker=3 HTTP/1.1
The response body lists parts 4, 5, and 6 and includes these elements:
<IsTruncated>true</IsTruncated>
<NextPartNumberMarker>6</NextPartNumberMarker>
3.Request line:
GET /acctg/AcctgAtExampleCorp-Introduction.mov?uploadId=9&max-parts=3
&part-number-marker=6 HTTP/1.1
The response body lists parts 7 and 8 and includes this element:
<IsTruncated>false</IsTruncated>
© 2015, 2020 Hitachi Vantara LLC. All rights reserved.