How to find and download a blob by tags

BALIVADA Durga P 1 Reputation point
2021-12-06T09:15:07.25+00:00

Hi

i have created a storage account with private access and i have created a container and upload few files inside that and i have added tags for that blobs now i want to release my code based on the tags so i'm looking for proper API to download the files and i found below microsoft link

https://learn.microsoft.com/en-us/rest/api/storageservices/find-blobs-by-tags

But i can't able to find my blob for the respective tags which i have created when i trying to get the api using postman getting below error

155255-bloberror.png

Any suggestions ?

note: for security purpose i have removed my sas token

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,538 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,281 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Jaliya Udagedara 2,716 Reputation points MVP
    2021-12-06T10:44:20.127+00:00

    You need something like below.

    curl --location --request GET 'https://<AccountName>.blob.core.windows.net?comp=blobs&where=env='\''dev'\''' \  
    --header 'x-ms-version: 2015-02-21' \  
    --header 'x-ms-date: Mon, 06 Dec 2021 10:34:00 GMT' \  
    --header '[SharedKey|SharedKeyLite] <AccountName>:<Signature>  
    

    More Info: Authorize with Shared Key


  2. Sumarigo-MSFT 42,601 Reputation points Microsoft Employee
    2021-12-07T08:49:23.02+00:00

    @BALIVADA Durga P Welcome to Microsoft Q&A Forum, Thank you for posting you query here!

    This should ideally work, but it could be some issue in encoding that is causing the problem, Can you try encoding it and send like where=env%3d'dev'

    155587-image.png

    Please let us know if you have any further queries. I’m happy to assist you further.

    ----------

    Please do not forget to 155623-image.png and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.