GET Bucket (List Objects)

  • Description: get all objects under the bucket.

  • Request Syntax:

GET /?formatter=json HTTP/1.1
Host: <Your-Bucket-Name>.ss.bscstorage.com
Date: <date>
Authorization: <authorization string> #Please refer to signature algorithm

or

GET /<Your-Bucket-Name>/?formatter=json HTTP/1.1
Host: ss.bscstorage.com
Date: <date>
Authorization: <authorization string> #Please refer to signature algorithm
  • Request parameters:
Parameter Description Required
delimiter Folded display characters. Usually use:‘/’ No
marker The initial position of the Key, the system will list the value larger than the Key, usually used as a 'paging' scenario No
max-keys The default maximum number of Key value is 400 No
prefix List the Keys that start with the specified character No

Example of response format(HTTP Body):

{

    Delimiter: "/",

    Prefix: "html/",

    CommonPrefixes: [

        {
            Prefix: "html/assets/"
        },

        {
            Prefix: "html/attributions/"
        },

        {
            Prefix: "html/documentation/"
        },

        ...
    ],

    Marker: null,

    ContentsQuantity: 5,

    CommonPrefixesQuantity: 3,

    NextMarker: null,

    IsTruncated: false,

    Contents: [

        {
            SHA1: "9fc710aa89efbe42020b0310d16a07449bf06131",
            Name: "html/coming-soon.html",
            Expiration-Time: null,
            Last-Modified: "Fri, 21 Mar 2014 01:50:46 UTC",
            Owner: "Baishan0000000000000001",
            MD5: "934d922cac80449ee361cefeb3276b3e",
            Content-Type: "text/html",
            Size: 8781
        },

        {
            SHA1: "a9625a128263f05e331f6d78add9bd15911c3565",
            Name: "html/ebook.html",
            Expiration-Time: null,
            Last-Modified: "Fri, 21 Mar 2014 01:50:47 UTC",
            Owner: "Baishan0000000000000001",
            MD5: "cb7ed943ead4aeb513aa8c0b76865a8b",
            Content-Type: "text/html",
            Size: 18734
        },

        ...
    ]
}
  • Return value Description:
Name Description
Contents Metadata array of object
CommonPrefixes After folding the prefix, the next level is the prefix array
Delimiter Currently used collapse character
Prefix Currently used prefix
Marker Currently used marker
ContentsQuantity Number of elements in contents
CommonPrefixesQuantity Number of elements in Common Prefixes
NextMarker Marker on next page
IsTruncated Is there another page
SHA1 SHA1 value of file content
Name Key (file name) of object
Last-Modified Last modification time of object
Owner Owner of the object
MD5 MD5 value of file content
Content-Type MIME-type of the file
Size File size (bytes)
  • Example:

If there are some files as follows under a bucket (for convenience, they are not displayed in the JSON format, only show some useful information, the same below):

join/mailaddresss.txt
join/mycodelist.txt
join/personalfiles/connects.docx
join/personalfiles/myphoto.jpg
join/readme.txt
join/userlist.txt
join/zero.txt
mary/personalfiles/mary.jpg
mary/readme.txt
sai/readme.txt

Use prefix to specify files starting with join /

GET /?prefix=join/&formatter=json HTTP/1.1
Host: <Your-Bucket-Name>.ss.bscstorage.com
Date: <date>
Authorization: <authorization string> #Please refer to signature algorithm

return:

Contents:
    join/mailaddresss.txt
    join/mycodelist.txt
    join/personalfiles/connects.docx
    join/personalfiles/myphoto.jpg
    join/readme.txt
    join/userlist.txt
    join/zero.txt

Use the delimiter to specify that the collapse method is '/':

GET /?delimiter=/&formatter=json HTTP/1.1
Host: <Your-Bucket-Name>.ss.bscstorage.com
Date: <date>
Authorization: <authorization string> #Please refer to signature algorithm

return:

Contents:

CommonPrefix:
    join
    mary
    sai

Use prefix to specify the file starting with join /, and use delimiter to specify the folding method as '/':

GET /?prefix=join/&delimiter=/&formatter=json HTTP/1.1
Host: <Your-Bucket-Name>.ss.bscstorage.com
Date: <date>
Authorization: <authorization string> #请参照《签名算法》

return:

Contents:
    join/mailaddresss.txt
    join/mycodelist.txt
    join/readme.txt
    join/userlist.txt
    join/zero.txt
CommonPrefix:
    join/personalfiles/

Use max-keys to limit the maximum list length:

GET /?prefix=join/&delimiter=/&max-keys=4&formatter=json HTTP/1.1
Host: <Your-Bucket-Name>.ss.bscstorage.com
Date: <date>
Authorization: <authorization string> #请参照《签名算法》

return:

IsTruncated : true
Next-Marker : join/userlist.txt
Contents:
    join/mailaddresss.txt
    join/mycodelist.txt
    join/readme.txt
CommonPrefix:
    join/personalfiles/

Use marker to continue to get the subsequent results of the previous column operations:

GET /?prefix=join/&delimiter=/&max-keys=4&marker=join/userlist.txt&formatter=json HTTP/1.1
Host: <Your-Bucket-Name>.ss.bscstorage.com
Date: <date>
Authorization: <authorization string> #请参照《签名算法》

return:

IsTruncated : false
Contents:
    join/userlist.txt
    join/zero.txt

results matching ""

    No results matching ""