Azure Retail Prices API broken paging

Saulius Mašnauskas 5 Reputation points
2023-03-10T15:59:08.0366667+00:00

Azure Retail Prices API stopped responding the NextPageLink property to help with paginating through all the items.

Steps to reproduce:

  1. GET https://prices.azure.com/api/retail/prices?$filter=serviceName eq 'Virtual Machines'
  2. Check the NextPageLink property

Expected:

It contains the link to the next page, e.g. https://prices.azure.com/api/retail/prices?$filter=serviceName eq 'Virtual Machines'&$skip=100

Actual:

It's empty.

Workaround:

Generating the link yourself. Instead of getting the next page link from the response, check the returned item count. If it's 100, then increment the skip counter and request again.

The behavior of NextPageLink is documented: https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices#api-response-pagination

We noticed it being empty today (2023-03-10).

Furthermore, this happens with both the default and the preview API versions.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,196 questions
{count} vote

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 23,646 Reputation points Microsoft Employee
    2023-03-15T06:08:34.99+00:00

    Hello, @Saulius Mašnauskas !

    Thank you very much for reporting this! We also greatly appreciate your inclusion of a workaround.

    Azure Retail Prices API stopped responding the NextPageLink property to help with paginating through all the items.

    The issue should now be resolved. Let me know if you are still running into this and I would be happy to troubleshoot this with you.

    The NextPageLink should now be working correctly:

    User's image

    0 comments No comments