azure-sdk-for-js icon indicating copy to clipboard operation
azure-sdk-for-js copied to clipboard

SDK does not provide means of getting Next Page of Subscription Aliases

Open StevenWolfeCAI opened this issue 10 months ago • 5 comments

  • Package Name: @azure/arm-subscriptions
  • Package Version: 5.1.0
  • Operating system:
  • [x] nodejs
    • version: v20
  • [ ] browser
    • name/version:
  • [x] typescript
    • version:
  • Is the bug related to documentation in
    • [ ] README.md
    • [ ] source code documentation
    • [ ] SDK API docs on https://docs.microsoft.com

Describe the bug When using the SDK to retrieve a list of Subscription Aliases there is no SDK means or documentation provided on getting anything beyond the first page.

To Reproduce Steps to reproduce the behavior:

  1. Use the SDK to try to retrieve more than one page of Subscription Aliases

Expected behavior The SDK should support functions to retrieve additional pages, if nextLink is present and populated.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context We have opened support tickets previously and verified this is not currently supported. We prefer not to "roll our own".

StevenWolfeCAI avatar Apr 26 '24 19:04 StevenWolfeCAI

will check

kazrael2119 avatar Apr 28 '24 02:04 kazrael2119

Hi @StevenWolfeCAI , JS SDK is generated from swagger, in swagger ,it is not support paging now. I tried to support paging locally and regenerated the sdk, here is the package: azure-arm-subscriptions-5.2.0.zip could you use this package and try again?

And add Service Attention label in this issue

kazrael2119 avatar Apr 28 '24 05:04 kazrael2119

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @anuragdalmia @ramaganesan-rg @shilpigautam.

github-actions[bot] avatar Apr 28 '24 05:04 github-actions[bot]

Hi @StevenWolfeCAI. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

github-actions[bot] avatar Apr 28 '24 05:04 github-actions[bot]

Hi @StevenWolfeCAI , JS SDK is generated from swagger, in swagger ,it is not support paging now. I tried to support paging locally and regenerated the sdk, here is the package: azure-arm-subscriptions-5.2.0.zip could you use this package and try again?

And add Service Attention label in this issue

@kazrael2119 Can you elaborate on how to page over the results using this new change you implemented?

The alias.list() call returns {value: x, nextLink: x}.... how do you then take the next link and get the next page? Does nextlink get passed as a param ? Do I need to attach it as a custom header in the list call? Is the function now returning an async iterator?

What change did you make?

cc: @anuragdalmia @ramaganesan-rg @ShilpiGautam.

searles9 avatar May 02 '24 19:05 searles9

it's not on the customer side, service team need to add a x-ms-pagable in the operation link that @kazrael2119 shared.

qiaozha avatar May 06 '24 06:05 qiaozha

it's not on the customer side, service team need to add a x-ms-pagable in the operation link that @kazrael2119 shared.

Can you elaborate? On the customer side how does the customer (me) get all of the results of the alias.list() sdk method? Are you suggesting that adding x-ms-pagable means if I call alias.list() with no parameters that I will get all results (because paging is handled internally), and there is no action that needs to be taken to loop through each page of results?

searles9 avatar May 06 '24 15:05 searles9

Hi @StevenWolfeCAI, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

github-actions[bot] avatar May 13 '24 15:05 github-actions[bot]