none
How do I view a listing of my Blobs in a Container via a URL?

    Question

  • Hi,

    I am trying to set the Public Access Level on a Container to Read.

    But for some reason I can't browse to it using the URL in a browser.

    I get a 404 The webpage cannot be found

    I've copied the URL from the Portal to my clipboard so it can't be wrong.

    eg: https://mystorageaccount.blob.core.windows.net/blob-container

    I can access the Blobs directly, but I can't browse the container.

    Shouldn't it appear as a directory listing when I go to the URL?

    Thanks

    Sunday, August 14, 2016 10:07 PM

Answers

  • Hi midi25,

     

    There are three public access types of Blob container, details are as follows:

     

    No public access

     Only the account owner can read resources in this container.

    Public read access for container and blobs

     Container-level public access and anonymous clients can read container and blob

    Public read access for blobs only

     Blob-level public access and anonymous clients can read blob data within the container, but not container data.

     

    According to your requirement, you should set Container-level access for your container.

    You could set public access for your container as following methods:

    1.Offical tool:

    Microsoft Azure Storage Explorer: http://storageexplorer.com/

    Right click the container, select “Set Public Access Level”, choose “Public read access for container and blobs”, click Apply.

    2. Set public access for your container via Blob Service REST API

    https://msdn.microsoft.com/en-us/library/dd179391.aspx

     

    When you want to browse the container, you could follow the below steps:

    1.Container URL:  https://<yourstoragename>.blob.core.windows.net/<yourcontainername>

    2.Modify the above URL to the format as follows:

    https://<yourstoragename>.blob.core.windows.net/<yourcontainername>/?restype=container&comp=list

    Remark:

    Operations on Azure Storage are based on REST API. Follow the link below to have a better understanding of it:

     List blobs: https://msdn.microsoft.com/en-us/library/dd135734.aspx

    3.Copy the new formatted URL and browse it in a browser directly, then the results would be as follows:

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, August 15, 2016 5:00 AM
    Moderator

All replies

  • Hi midi25,

     

    There are three public access types of Blob container, details are as follows:

     

    No public access

     Only the account owner can read resources in this container.

    Public read access for container and blobs

     Container-level public access and anonymous clients can read container and blob

    Public read access for blobs only

     Blob-level public access and anonymous clients can read blob data within the container, but not container data.

     

    According to your requirement, you should set Container-level access for your container.

    You could set public access for your container as following methods:

    1.Offical tool:

    Microsoft Azure Storage Explorer: http://storageexplorer.com/

    Right click the container, select “Set Public Access Level”, choose “Public read access for container and blobs”, click Apply.

    2. Set public access for your container via Blob Service REST API

    https://msdn.microsoft.com/en-us/library/dd179391.aspx

     

    When you want to browse the container, you could follow the below steps:

    1.Container URL:  https://<yourstoragename>.blob.core.windows.net/<yourcontainername>

    2.Modify the above URL to the format as follows:

    https://<yourstoragename>.blob.core.windows.net/<yourcontainername>/?restype=container&comp=list

    Remark:

    Operations on Azure Storage are based on REST API. Follow the link below to have a better understanding of it:

     List blobs: https://msdn.microsoft.com/en-us/library/dd135734.aspx

    3.Copy the new formatted URL and browse it in a browser directly, then the results would be as follows:

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, August 15, 2016 5:00 AM
    Moderator
  • Hi Jambor,

    I tried a few scenarios and this is what I found.

    This direct container link doesn't give me access to anything, with any of the public level access settings.
    https://mystorage.blob.core.windows.net/blob-container01

    This link doesn't give me access to anything when set to Private. (But this is how it should be) 
    https://mystorage.blob.core.windows.net/blob-container01/?restype=container&comp=list

    This link gives me access to an XML Container listing when set to Public read access for Container and Blob.
    https://mystorage.blob.core.windows.net/blob-container01/?restype=container&comp=list

    This link only gives me access to the Blobs in the Container when set to Public Read for Blob only.  

    https://mystorage.blob.core.windows.net/blob-container01/sample.txt

    It appears that you need to have the ?restype=container&comp=list appended to the end of the Container URL to get the directory listing to appear. (Thanks for showing me that)

    That's not mentioned in the Portal and/or Storage Explorer.

    Thanks

    Monday, August 15, 2016 3:06 PM
  • Hi midid25,

    I am glad to hear that my reply could help you. If you have any questions later, welcome to our forum. In addition, if the reply is helpful, please mark it as answer.

    Best Regard,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, August 16, 2016 1:15 AM
    Moderator
  • Hi Jambor,

    I have been reading up on the REST API.

    But I don't know how to use it properly.

    Do I need the make the calls in a piece of software?

    i.e Visual Studio etc?

    How do I get to set the values for the request headers etc.

    Do you know of any good articles for beginners.

    Thanks

    Tuesday, August 16, 2016 6:42 PM
  • Hi midi25,

    Azure has provided multiple-languages Storage SDK to access storage quickly. It is easily to use Azure Storage SDK. Please follow the links below to start your learning journey.
    Get started with Azure Blob storage using .NET
    https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-blobs/ 
    Azure Blob Storage Samples for .NET
    https://azure.microsoft.com/en-us/documentation/samples/storage-blob-dotnet-getting-started/

    Please choose your language, if use .NET, we could use method(e.g. CloudBlobContainer.ListBlobs), run it on your side and capture the network package via Fiddler.
    The following is a snapshot of network package:

    You could also read associated REST API Method document to use rest API to access the storage directly, here is the rest API to call list blobs: https://msdn.microsoft.com/en-us/library/azure/dd135734.aspx
    If you have any questions, please feel me to let me know.

    Best Regards,

    Jambor


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.




    Wednesday, August 17, 2016 10:02 AM
    Moderator