Search code examples
azureazure-storageazure-storage-account

Storage account API returns null


i am trying to retrieve retail prices of azure storage i am following this document. https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices#api-endpoint

In this document, I can able to find only virtual machine, compute, etc. but when I try to use the Retail Rates Prices API to get retail prices of storage account, as per above document information I made some changes I am getting response as null.

API endpoint as https://prices.azure.com/api/retail/prices

(https://i.sstatic.net/BEPzM.png)


Solution

  • I tried to reproduce the same in my environment I am getting the same null value:

    You can make use of below ApI endpoint for storage account as below:

    https://prices.azure.com/api/retail/prices?api-version=2021-10-01-preview&$filter=serviceFamily eq 'Storage'
    

    when I try to pass filter=serviceFamily eq 'Storage' I can able to get retail prices of azure storage successfully.

    enter image description here