Iterating through pages API

Options
grattu
grattu Posts: 2 ✭✭
edited March 14 in Deployment & Integrations

Hi, I'm using the API to pull a list of devices from various groups. When I run the following the command I'm getting a partial list of my devices:

Invoke-RestMethod -Uri "https://webapi.teamviewer.com/api/v1/managed/groups/{id}/devices" -Method Get -Headers @{authorization = "Bearer $apikey"}     

The result is returning a nextPaginationToken, but I'm not sure how to use that in order to get the next part of the list of devices.

Any help on this is appreciated.


Thanks

Tagged: