News:

GinGly.com - Used by 85,000 Members - SMS Backed up 7,35,000 - Contacts Stored  28,850 !!

Main Menu

Delimited Blob List

Started by thiruvasagamani, Dec 09, 2008, 03:22 PM

Previous topic - Next topic

thiruvasagamani

Delimited Blob List

This example also shows the result of an enumeration operation returning blobs beneath a container named mycontainer. Here is the request URI:


GET http://myaccount.blob.core.windows.net/mycontainer?comp=list&delimiter=/&maxresults=4&timeout=300

In this case the delimiter parameter has been specified as '/'. The response body includes the BlobPrefix tag, which represents the group of blobs beginning with the same substring, including the delimiter. Thus two blobs returned in the previous example, myfolder/blobA.txt and myfolder/blobB.txt, are in this example represented in the response by a single BlobPrefix tag, whose name is myfolder/. To return the blobs beginning with this prefix, make a subsequent request in which the prefix parameter is set to myfolder/.

The sample blobs in the storage service for this example are as follows. The first four are returned in the first enumeration operation, as MaxResults is set to 4. Note that myfolder/blobA.txt and myfolder/blobB.txt are grouped together in the response body in the BlobPrefix tag and count as a single blob in terms of the number of entities returned.

    * blob1.txt
    * blob2.txt
    * myfolder/blobA.txt
    * myfolder/blobB.txt
    * newblob1.txt
    * newblob2.txt

The next blob to be returned is newblob2.txt, returned in the NextMarker tag.


<?xml version="1.0" encoding="utf-8"?>
<EnumerationResults ContainerName="http://myaccount.blob.core.windows.net/mycontainer">
  <MaxResults>4</MaxResults>
  <Blobs>
    <Blob>
      <Name>blob1.txt</Name>
      <Url>http://myaccount.blob.core.windows.net/mycontainer/blob1.txt</Url>
      <LastModified>Thu, 18 Sep 2008 18:41:57 GMT</LastModified>
      <Etag>0x8CAE7D55D050B8B</Etag>
      <Size>8</Size>
      <ContentType>text/plain; charset=UTF-8</ContentType>
      <ContentEncoding />
      <ContentLanguage />
    </Blob>
    <Blob>
      <Name>blob2.txt</Name>
      <Url>http://myaccount.blob.core.windows.net/mycontainer/blob2.txt</Url>
      <LastModified>Thu, 18 Sep 2008 18:41:57 GMT</LastModified>
      <Etag>0x8CAE7D55CF6C339</Etag>
      <Size>14</Size>
      <ContentType>text/plain; charset=UTF-8</ContentType>
      <ContentEncoding />
      <ContentLanguage />
    </Blob>
    <BlobPrefix>
      <Name>myfolder/</Name>
    </BlobPrefix>
    <Blob>
      <Name>newblob1.txt</Name>
      <Url>http://myaccount.blob.core.windows.net/mycontainer/newblob1.txt</Url>
      <LastModified>Thu, 18 Sep 2008 18:41:57 GMT</LastModified>
      <Etag>0x8CAE7D55CF6C339</Etag>
      <Size>25</Size>
      <ContentType>text/plain; charset=UTF-8</ContentType>
      <ContentEncoding />
      <ContentLanguage />
    </Blob>
  </Blobs>
  <NextMarker>newblob2.txt</NextMarker>
</EnumerationResults>


Thiruvasakamani Karnan