Gronnesby
Gronnesby

Reputation: 148

List blobs in Azure storage container via URL

I have a storage account set up and a single container in it. The access level is set to public and I can access the individual blobs as so:

https://img.blob.core.windows.net/images/name_of_blob

However, when I try to access the URL of the container (images) directly:

https://img.blob.core.windows.net/images/

I get this response:

<Error>
  <Code>ResourceNotFound</Code>
  <Message>The specified resource does not exist.</Message>
</Error>

Is there a way to get a list of all the blobs within the container through a URL request?

Upvotes: 2

Views: 2116

Answers (2)

Matt Stannett
Matt Stannett

Reputation: 2728

How about using the REST API?

Something like:

GET https://myaccount.blob.core.windows.net/mycontainer?restype=container&comp=list

Be sure to pass in any required headers as per the documentation linked above.

Upvotes: 4

Fakhruddin Bandukwala
Fakhruddin Bandukwala

Reputation: 18

When you created the container, the public access level must have been set at 'Blob'. If you set the public access level at 'Container' from the dropdown, you should be able to access the list.

Upvotes: 0

Related Questions