S3 List Objects V2

GET https://s3.{{region}}.backblazeb2.com/:bucket/?list-type=2

Returns a list of up to 1,000 objects in the bucket, sorted alphabetically by key.

Use the query parameters to filter the search.

By default, sets of up to 1,000 results are returned. You can set the max-keys to set the maximum result set size to less than 1,000. If the search results in more than the maximum result set size, then the first set is returned in the initial response, the response element contains the value true and the element contains a token to retrieve the next set of results. Use this token as the continuation-token query parameter in another request to retrieve the next set of results.

Request Params

KeyDatatypeRequiredDescription
list-typenumberMust be set to 2 for V2 object list
continuation-tokennullOptional. Continuation token returned by a previous request.
delimiternullOptional. The delimiter is used to group keys.
encoding-typenullOptional. Specifies an encoding method to use for characters that are not supported in XML 1.0.
fetch-ownernullOptional. Set to 'true' to return the owner with each key.
max-keysnullOptional. The maximum number of keys that should be returned.
prefixnullOptional. Limit response to keys with this prefix.
start-afternullOptional. B2 will start listing after this key.

HEADERS

KeyDatatypeRequiredDescription
x-amz-expected-bucket-ownernullOptional. Account ID of the expected bucket owner. If the bucket is owned by a different owner, a 403 Access Denied error will be returned.

RESPONSES

status: OK

"\u003c?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?\u003e\n\u003cListBucketResult xmlns=\"http://s3.amazonaws.com/doc/2006-03-01/\"\u003e\n    \u003cContents\u003e\n        \u003cETag\u003e\"85f30635602dc09bd85957a6e82a2c21\"\u003c/ETag\u003e\n        \u003cKey\u003eobject-1\u003c/Key\u003e\n        \u003cLastModified\u003e2022-01-28T23:24:07.000Z\u003c/LastModified\u003e\n        \u003cSize\u003e11\u003c/Size\u003e\n        \u003cStorageClass\u003eSTANDARD\u003c/StorageClass\u003e\n    \u003c/Contents\u003e\n    \u003cContents\u003e\n        \u003cETag\u003e\"85f30635602dc09bd85957a6e82a2c21\"\u003c/ETag\u003e\n        \u003cKey\u003eobject-2\u003c/Key\u003e\n        \u003cLastModified\u003e2022-01-28T23:25:45.000Z\u003c/LastModified\u003e\n        \u003cSize\u003e11\u003c/Size\u003e\n        \u003cStorageClass\u003eSTANDARD\u003c/StorageClass\u003e\n    \u003c/Contents\u003e\n    \u003cContents\u003e\n        \u003cETag\u003e\"3729bf569924c845dfe90bfe6281a9ff-1\"\u003c/ETag\u003e\n        \u003cKey\u003eobject-3\u003c/Key\u003e\n        \u003cLastModified\u003e2022-01-28T23:27:20.000Z\u003c/LastModified\u003e\n        \u003cSize\u003e11\u003c/Size\u003e\n        \u003cStorageClass\u003eSTANDARD\u003c/StorageClass\u003e\n    \u003c/Contents\u003e\n    \u003cIsTruncated\u003efalse\u003c/IsTruncated\u003e\n    \u003cMaxKeys\u003e1000\u003c/MaxKeys\u003e\n    \u003cName\u003emy-bucket-name\u003c/Name\u003e\n    \u003cPrefix\u003e\u003c/Prefix\u003e\n    \u003cKeyCount\u003e3\u003c/KeyCount\u003e\n\u003c/ListBucketResult\u003e"