Amazon Simple Storage Service
Developer Guide (API Version 2006-03-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid 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.