使用Invoke-RestMethod返回多页api页面的最佳方法是什么?
$Asset = Invoke-RestMethod -uri https://api.samanage.com/hardwares.json -Credential $mycreds -Headers @{"Accept"="application/vnd.samanage.v1.1+xml"} -ContentType "application/json" -Method GET
我只得到100个结果。如果我指定单个页面,例如使用?page = 2或?page = 8,我会为每个指定的页面获得100个不同的结果。我需要一次抓取所有页面数据。
谢谢