Limiting a version listing

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

The prefix, max-keys, encoding-type, and delimiter parameters have the same functions and syntax as the prefix, max-keys, encoding-type, and delimiter 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 and syntax as the marker parameter you can use with requests for listings of the current (or only) versions of objects. For information about these query parameters, see Limiting a listing of current items.

version-id-marker query parameter

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

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 first item with a name that's alphanumerically greater than 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_2019.ppt
quarterly_rpts/Q3_2019.ppt
quarterly_rpts/Q4_2019.ppt
sales/
sales/budget_proposals/
sales/budget_proposals/BudgProp-2020
sales_quotas_2020.pdf

When the response body for a version listing request includes the IsTruncated element with a value of true, the response body also includes the NextKeyMarker and NextVersionIdMarker elements. If the alphanumerically last item in the version listing is:

Is a named item, the values of the NextKeyMarker and NextVersionIdMarker elements are the name and version ID of that item, respectively

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.

version-id-marker parameter rules

Valid values for the version-id-marker query parameter are integers greater than or equal to zero.

The version-id-marker parameter name is case sensitive.

© 2015, 2020 Hitachi Vantara LLC. All rights reserved.