Amazon Simple Storage Service
Developer Guide (API Version 2006-03-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

Retrieving All Versions of a Key

You can retrieve all versions of an object using the versions sub-resource and the prefix request parameter using the following process. For more information about prefix, go to GET Bucket.

Retrieving All Versions of a Key

1Set the prefix parameter to the key of the object you want to retrieve.
2

Send a GET Bucket request using the versions sub-resource and prefix.

GET /?versions&prefix=objectName HTTP/1.1


Example Retrieving Objects Using Prefix

The following example retrieves objects whose key is or begins with myObject.

GET /?versions&prefix=myObject HTTP/1.1
Host: bucket.s3.amazonaws.com
Date: Wed, 28 Oct 2009 22:32:00 GMT
Authorization: AWS AKIAIOSFODNN7EXAMPLE:0RQf4/cRonhpaBX5sCYVf1bNRuU=

You can use the other request parameters to retrieve a subset of all versions of the object. For more information, go to GET Bucket.