从API查询返回多个页面(PowerShell)

时间:2018-04-11 00:27:24

标签: api powershell

使用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个不同的结果。我需要一次抓取所有页面数据。

谢谢

0 个答案:

没有答案