Beefcake
Beefcake

Reputation: 801

How to use Pagination when calling Azure REST API

I'm just using a simple logic app to call the whole list of Azure VMs, however only the first 50 are returned, along with a NextLink pagination. I'm not too sure how to call the rest of the results.

I've been looking at the MS page, but I'm still unsure what needs to be done: https://learn.microsoft.com/en-us/rest/api/compute/virtualmachines/listall#virtualmachinelistresult

Can this be done via a header in the HTTP request?

enter image description here

Paginated results: enter image description here

Upvotes: 0

Views: 5051

Answers (1)

Gaurav Mantri
Gaurav Mantri

Reputation: 136306

If you notice, the value of the nextLink is a URL. You will use this URL only for fetching the next set of results.

Upvotes: 1

Related Questions