Limiting a version listing

You can use delimiter, key-marker, max-keys, prefix, and version-id-marker query parameters, alone or in combination with each other, to limit the items included in a version listing.

The delimiter, max-keys, and prefix parameters have the same functions as the delimiter, max-keys, and prefix parameters you can use with requests for listings of the current (or only) versions of objects in a bucket. The key-marker parameter has the same function as the marker parameter you can use with requests for listings of the current (or only) versions of objects. For information on these query parameters, see Limiting a listing of current items.

You use the version-id-marker parameter in conjunction with the key-marker parameter to start the returned bucket listing with the first item with a name that’s equal to the character string specified by the key-marker parameter and a version ID that’s greater than the value specified by the version-id-marker parameter. If no such item exists, the returned bucket listing starts with the item following the first item with a name that starts with the character string specified by the key-marker parameter.

For example, the version ID of the first version of the object named mktg/campaign_GoGetEm_expenses.xls is 87288784288321. The bucket listing returned in response to a GET request with the key-marker=mktg/campaign_GoGetEm_expenses.xls and version-id-marker=87288784288321 query parameters contains only these items:

mktg/campaign_GoGetEm_expenses.xls (second version)
mktg/campaign_LiveIt_expenses.xls
quarterly_rpts/
quarterly_rpts/Q2_2012.ppt
quarterly_rpts/Q3_2012.ppt
quarterly_rpts/Q4_2012.ppt
sales/
sales/budget_proposals/
sales/budget_proposals/BudgProp-2013
sales_quotas_2013.pdf

The key-marker and version-id-marker query parameters are useful when more than the requested number of items satisfy the request criteria. In this case, the response body includes the IsTruncated element with a value of true. It also includes the NextKeyMarker and NextVersionIdMarker elements:

If the alphanumerically last item in the returned listing is a named item, the values of these elements are the name and version ID of that item, respectively.

If the alphanumerically last item in the returned listing is a common prefix, the value the NextKeyMarker element is that prefix, and NextVersionIdMarker is an empty element.

To request the next part of the listing, you include the key-marker and version-id-marker query parameters in a new request. For the value of the key-marker parameter, you use the value of the NextKeyMarker element from the previously returned listing. For the value of the version-id-marker parameter, you use the value of the NextVersionIdMarker element from the previously returned listing.

Trademarks and Legal Disclaimer

© 2016 Hitachi Data Systems Corporation. All rights reserved.