ListObjects
Returns a list of all the objects in a bucket. You can use the request parameters as selection criteria to return a subset of the objects in a bucket. The API returns objects with the latest version when the versioning is enabled on the bucket. A 200 OK response can contain valid or invalid XML. Ensure that you design your application to parse the contents of the response and handle it appropriately.
Request Syntax
GET /bucket?delimiter=Delimiter&marker=Marker&max-keys =Maxkeys&prefix=Prefix HTTP/1.1 Host: msdps3.server:8443
Request Parameters
Bucket
Name of the bucket that contains the objects.
Required: Yes
Type: String
delimiter
A delimiter is a character used to group keys. It rolls up the keys that contain the same character between the prefix and the first occurrence of the delimiter into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the MaxKeys value. MSDP S3 supports only "/" string as delimiter.
Type: String
marker
The marker is the point where S3 interface for MSDP should begin listing objects. S3 interface for MSDP expects the marker which was returned by server in last request. The value of NextMarker of response should be used in request as marker.
Type: String
max-keys
Limits the number of keys that are returned in the response. By default, the action returns up to 1,000 key names.
Type: Integer
prefix
Limits the response to keys that begin with the specified prefix.
Type: String
Response Syntax
HTTP/1.1 200
<?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult>
<IsTruncated>boolean</IsTruncated>
<Marker>string</Marker>
<NextMarker>string</NextMarker>
<Contents>
<ETag>string</ETag>
<Key>string</Key>
<LastModified>timestamp</LastModified>
<Size>integer</Size>
<StorageClass>string</StorageClass>
</Contents>
...
<Name>string</Name>
<Prefix>string</Prefix>
<Delimiter>string</Delimiter>
<MaxKeys>integer</MaxKeys>
<CommonPrefixes>
<Prefix>string</Prefix>
</CommonPrefixes>
...
</ListBucketResult>Response Body
ListBucketResult
Root level tag for the ListBucketResult parameters.
Required: Yes
CommonPrefixes
When determining the number of returns, all the keys (up to 1,000) rolled into a common prefix count as one. CommonPrefixes contains all keys between Prefix and the next occurrence of the string that is specified by the delimiter.
Delimiter
Delimiter value that is passed in request.
IsTruncated
A flag indicating whether all the results satisfying the search criteria were returned by MSDP S3.
Marker
Indicates where listing begins in the bucket. Marker is included in response only if it is passed in request.
MaxKeys
The maximum number of objects that can be returned in the response body.
Name
The name of the bucket
NextMarker
When the response is truncated, you can use this value as the marker in the subsequent request to get the next set of objects.
Prefix
Limits the response to keys that begin with the specified prefix.
Contents
Metadata about each object that is returned.
ETag
SHA256 digest of the object.
Key
Object name.
LastModified
Last modification date and time of the object.
Size
Size of the object.
StorageClass
Storage class of the object.
For versioned bucket, it is recommended that you use List Object Versions API to get information about all objects. If using "list objects" in versioned bucket when results are truncated, key count in the results may be less than Max keys and you can make a follow-up paginated request.
When using list objects APIs on a versioned bucket, if all of objects under the specified prefix are delete markers, the specified prefix is displayed as a CommonPrefixes element.
Possible Error Response
Success
HTTP status code 200.
InvalidArgument(Marker is invalid.)
Invalid Argument. HTTP status code 400.
InvalidArgument(maxKeys is invalid)
Invalid Argument.
HTTP status code 400.
S3srvExtInvalidPrefix
Prefixes cannot start with a slash.
HTTP status code 400.
S3srvExtInvalidDelimiter
Only support the slash as a delimiter.
HTTP status code 400
AccessDenied
Access Denied.
HTTP status code 403.
NoSuchBucket
The specified bucket does not exist.
HTTP status code 404.
InternalError
Request failed because of an internal server error.
HTTP status code 500.