How to fix Azure pricing data issue

Hasrat Ali 20 Reputation points
2023-09-14T05:06:23.3333333+00:00

I am getting zero items from azure pricing API when i calling 10 API at same time with diffrent query parameter. See below for details,

API URL: https://prices.azure.com/api/retail/prices?api-version=2023-01-01-preview

Next API URL:

https://prices.azure.com:443/api/retail/prices?api-version=2023-01-01-preview&$skip=1000

Next API URL:

https://prices.azure.com:443/api/retail/prices?api-version=2023-01-01-preview&$skip=2000

I am getting below response some time from above API for any random API,

Response,

{"BillingCurrency":"USD","CustomerEntityId":"Default","CustomerEntityType":"Retail","Items":[],"NextPageLink":null,"Count":0}

So can you please check at your end and prrovide me the solution. Also if possible then is there any diffrents in middle and last API call (Some header parameter that refere that its last API for get retail data. So we can diffrentiat both API and implement retry function for middle API only not for last API).

Please let me know if you have any solution.

Thanks

Hasrat Malik

Azure Cost Management
Azure Cost Management
A Microsoft offering that enables tracking of cloud usage and expenditures for Azure and other cloud providers.
3,389 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SwathiDhanwada-MSFT 18,916 Reputation points Moderator
    2023-09-28T07:15:56.28+00:00

    Hasrat Ali There was some changes introduced to the Azure Retail API recently to increase the number of items returned per page. We observed some throttling causing this issue - occasionally API returns empty items when the throttling happening. We have taken the counter steps to overcome the throttling and it should not be an issue anymore.

    If in case the throttling happens in future, you will be notified 429 status with a re-try time instead of giving empty response.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.