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...

Listing the Objects in a Versioning-Enabled Bucket

To list all of the versions of all of the objects in a bucket, you use the versions sub-resource in a GET Bucket request. Amazon S3 can only retrieve a maximum of 1000 objects, and each object version counts fully as an object. Therefore, if a bucket contains two keys (e.g. photo.gif and picture.jpg), and the first key has 990 versions and the second key has 400 versions; a single request would retrieve all 990 versions of photo.gif and only the most recent 10 versions of picture.jpg.

Amazon S3 returns object versions in the order in which they were stored, with the most recently stored returned first.

To list all object versions in a bucket

  • In a GET Bucket request, include the versions sub-resource.

    GET /?versions HTTP/1.1
    Host: bucketName.s3.amazonaws.com
    Date: Wed, 28 Oct 2009 22:32:00 +0000
    Authorization: AWS 02236Q3V0WHVSRW0EXG2:0RQf4/cRonhpaBX5sCYVf1bNRuU=