Azure DevOps REST API调用仅检索前100条记录 [英] Azure DevOps REST API call retrieving only top 100 records

查看:55
本文介绍了Azure DevOps REST API调用仅检索前100条记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用下面的API调用来检索所有CouldTests,但它仅返回100条记录.如何检索所有记录?.

I am using the below API call for retrieving all the CouldTests, but it is returning only 100 records. How can retrieve all the records?.

$ uri = https://{instance}/{collection}/{project}/_apis/test/runs?minLastUpdatedDate = 2020-01-28& maxLastUpdatedDate = 2020-01-29& releaseIds = 123456& $ top = 2000 $ TestRuns =调用静态方法 -Uri $uri
-Headers $ headers

$uri = https://{instance}/{collection}/{project}/_apis/test/runs?minLastUpdatedDate=2020-01-28&maxLastUpdatedDate=2020-01-29&releaseIds=123456&$top=2000 $TestRuns = Invoke-RestMethod -Uri $uri
-Headers $headers

感谢您的帮助.预先感谢

Any help is appreciated. Thanks in advance

有关上述链接的更多信息,请参阅:

For more about the above Link please refer.:https://docs.microsoft.com/en-us/rest/api/azure/devops/test/runs/query?view=azure-devops-server-rest-5.0

推荐答案

使用Invoke-WebRequest而不是Invoke-RestMethod,并且可以正常工作.

Used Invoke-WebRequest instead of Invoke-RestMethod and it is working.

这篇关于Azure DevOps REST API调用仅检索前100条记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆