https://prices.azure.com:443/api/retail/prices return empty items occasionally

Yu Le Yi 25 Reputation points
2023-09-06T06:21:08.29+00:00

Hi and greetings,

I'm using https://prices.azure.com:443/api/retail/prices this api to get prices programlly recent days and it worked well until today.

Today I found the api occasionally return empty results:

###################################################################

lionyu@SHA-LAP-AC803:/tmp$ curl 'https://prices.azure.com:443/api/retail/prices?$filter=serviceName%20eq%20%27Virtual%20Machines%27%20and%20priceType%20eq%20%27Consumption%27%20and%20indexof%28meterName%2C%20%27Spot%27%29%20eq%20-1%20and%20indexof%28meterName%2C%20%27Low%20Priority%27%29%20eq%20-1%20and%20indexof%28productName%2C%20%27Dedicated%20Host%27%29%20eq%20-1%20and%20indexof%28productName%2C%20%27Cloud%20Services%27%29%20eq%20-1&currencyCode=EUR&$skip=9000'

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

###################################################################

This url should return some items because it's received from previous(skip=8000) page result's 'NextPageLink' field.

This happened about once over every ten requests, occasionally but definitely reproduceable. Any suggestion?

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

Accepted answer
  1. SwathiDhanwada-MSFT 18,996 Reputation points Moderator
    2023-09-07T15:28:24.7733333+00:00

    Yu Le Yi 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, you will be notified 429 status with a re-try time instead of giving empty response in future.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.