• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (OBS)
  4. Operations on Buckets
  5. GET Bucket Object versions
  6. Examples

Examples

Sample Request

GET /?versions HTTP/1.1 
 User-Agent: curl/7.19.0
 Host: bucketname.obs.example.com
 Accept: */* 
 Date: Thu, 16 Jan 2014 03:31:26 +0000 
 Authorization: AWS C9590CEB8EC051BDEC9D:KfF0yCAt+LAE/AE0YTxQS7IzQ8U=

Sample Response

HTTP/1.1 200 OK 
 Server: OBS 
 x-amz-request-id: DCD2FC9CAB7800000143991A7DEECBF4 
 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc 
 x-amz-id-2: 00QkPL575tIUmU8kth0zA16DlRzzdDiVDHK4OaGeujayXCfdD7phC21ZZYmVqx3W 
 Content-Type: application/xml 
 Date: Thu, 16 Jan 2014 03:31:26 GMT 
 Content-Length: 1275

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
 <ListVersionsResult xmlns="http://obs.example.com/doc/2015-06-30/"> 
<Name>bucket</Name> 
 <Prefix/> 
 <KeyMarker/> 
 <VersionIdMarker/> 
 <MaxKeys>1000</MaxKeys> 
 <IsTruncated>false</IsTruncated> 
 <DeleteMarker> 
 <Key>key0</Key> 
 <VersionId>AAABQ5kabBnc0vycq3gAAABCVURTRkha</VersionId> 
 <IsLatest>true</IsLatest> 
 <LastModified>2014-01-16T03:31:22.265Z</LastModified> 
 <Owner> 
 <ID>DCD2FC9CAB78000001438EC051BD0002</ID> 
 <DisplayName>user</DisplayName> 
 </Owner> 
 </DeleteMarker> 
 <Version> 
 <Key>key0</Key> 
 <VersionId>AAABQ5kZxWTc0vycq3gAAABBVURTRkha</VersionId> 
 <IsLatest>false</IsLatest> 
 <LastModified>2014-01-16T03:30:39.575Z</LastModified> 
 <ETag>"6b0e1cad9fd2eff22004e28aa8073420"</ETag> 
 <Size>80</Size> 
 <Owner> 
 <ID>DCD2FC9CAB78000001438EC051BD0002</ID> 
 <DisplayName>user</DisplayName> 
 </Owner> 
 <StorageClass>STANDARD</StorageClass> 
 </Version> 
 <Version> 
 <Key>suspend</Key> 
 <VersionId>null</VersionId> 
 <IsLatest>true</IsLatest> 
 <LastModified>2014-01-16T03:25:58.443Z</LastModified> 
 <ETag>"a65d3be0857de44e470e0c069e4b04e3"</ETag> 
 <Size>80</Size> 
 <Owner> 
 <ID>DCD2FC9CAB78000001438EC051BD0002</ID> 
 <DisplayName>user</DisplayName> 
 </Owner> 
 <StorageClass>STANDARD</StorageClass> 
 </Version> 
 </ListVersionsResult>

Sample Request (Example of getting bucket object versions by using key-marker and version-id-marker)

GET /?versions&key-marker=key0&version-id-marker=AAABQ5kabBnc0vycq3gAAABCVURTRkha HTTP/1.1 
 User-Agent: curl/7.19.0
 Host: bucketname.obs.example.com 
 Accept: */* 
 Date: Thu, 16 Jan 2014 04:48:20 +0000 
 Authorization: AWS C9590CEB8EC051BDEC9D:iw+nTJEMO5KLMoE66sqzkRF3ik0=

Sample Response (Example of getting bucket object versions by using key-marker and version-id-marker)

HTTP/1.1 200 OK 
 Server: OBS 
 x-amz-request-id: DCD2FC9CAB78000001439960E2F3F18A 
 x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc 
 x-amz-id-2: P1j6zAy1GOP9KoRUWgJt3mJGKNLlAU4dn7BfL16VXpeWCX/25cZpshp5mTbu1kyw 
 Content-Type: application/xml 
 Date: Thu, 16 Jan 2014 04:48:20 GMT 
 Content-Length: 1051 

 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
 <ListVersionsResult xmlns="http://obs.example.com/doc/2015-06-30/"> 
 <Name>bucket</Name> 
 <Prefix/> 
 <KeyMarker>key0</KeyMarker> 
 <VersionIdMarker>AAABQ5kabBnc0vycq3gAAABCVURTRkha</VersionIdMarker> 
 <MaxKeys>1000</MaxKeys> 
 <IsTruncated>false</IsTruncated> 
 <Version> 
 <Key>key0</Key> 
 <VersionId>AAABQ5kZxWTc0vycq3gAAABBVURTRkha</VersionId> 
 <IsLatest>false</IsLatest> 
 <LastModified>2014-01-16T03:30:39.575Z</LastModified> 
 <ETag>"6b0e1cad9fd2eff22004e28aa8073420"</ETag> 
 <Size>80</Size> 
 <Owner> 
 <ID>DCD2FC9CAB78000001438EC051BD0002</ID> 
 <DisplayName>user</DisplayName> 
 </Owner> 
 <StorageClass>STANDARD</StorageClass> 
 </Version> 
 <Version> 
 <Key>suspend</Key> 
 <VersionId>null</VersionId> 
 <IsLatest>true</IsLatest> 
 <LastModified>2014-01-16T03:25:58.443Z</LastModified> 
 <ETag>"a65d3be0857de44e470e0c069e4b04e3"</ETag> 
 <Size>80</Size> 
 <Owner> 
 <ID>DCD2FC9CAB78000001438EC051BD0002</ID> 
 <DisplayName>user</DisplayName> 
 </Owner> 
 <StorageClass>STANDARD</StorageClass> 
 </Version> 
 </ListVersionsResult>