Common List Response Elements
The SOAP and REST XML list response share the same structure and element names.
Example
<?xml version="1.0" encoding="UTF-8"?> <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01"> <Name>johnsmith</Name> <Prefix>photos/2006/</Prefix> <Marker/> <MaxKeys>1000</MaxKeys> <Delimiter>/</Delimiter> <IsTruncated>false</IsTruncated> <Contents> <Key>photos/2006/index.html</Key> <LastModified>2006-01-01T12:00:00.000Z</LastModified> <ETag>"ce1acdafcc879d7eee54cf4e97334078"</ETag> <Size>1234</Size> <Owner> <ID>214153b66967d86f031c7249d1d9a80249109428335cd08f1cdc487b4566cb1b</ID> <DisplayName>John Smith</DisplayName> </Owner> <StorageClass>STANDARD</StorageClass> </Contents> <CommonPrefixes> <Prefix>photos/2006/January/</Prefix> </CommonPrefixes> </ListBucketResult>
ListBucketResult is the root element of the list response document. To make the list response self-describing, ListBucketResult echoes back the list request parameters that generated it. ListBucketResult also contains the following elements:
Element | Description |
---|---|
IsTruncated |
A flag that indicates whether or not all results of your query were returned in this response. If your results were truncated, you can make a follow-up paginated request using the Marker parameter to retrieve the rest of the results. |
NextMarker |
A convenience element, useful when paginating with delimiters. The value of NextMarker, if present, is the largest (alphabetically) of all key names and all CommonPrefixes prefixes in the response. If the IsTruncated flag is set, request the next page of results by setting Marker to NextMarker. This element is only present in the response if the Delimiter parameter was sent with the request. |
The Contents Element (of type ListEntry) contains information about each key that is part of the list results.
Element | Description |
---|---|
Key |
The object's key. |
LastModified |
The time that the object was placed into Amazon S3. |
ETag |
The object's entity tag is an opaque string used to quickly check an object for changes. With high probability, the object data associated with a key is unchanged if and only if the entity tag is unchanged. Entity tags are useful in conditional gets. |
Size |
The number of bytes of object data stored under this key. Size does not include metadata or the size of the key. |
Owner |
This element represents the identity of the principal who created the object. It is only present if you have permission to view it. For more information, see Access Control. |
StorageClass |
Always has the value |
The CommonPrefixes element might be present when you make a list request with the delimiter parameter. Each element in this collection represents a group of keys that share a common prefix terminated by the specified delimiter. To expand the list of keys under this prefix, make a new list request formed by substituting the value of the CommonPrefixes/Prefix response element for the Prefix request parameter.
Access Control
The Owner element is only present in a given ListEntry element
if you have READ_ACP
permission on the object in
question, or if you own the containing bucket. Otherwise, it is
omitted.