Azure DevOps REST API调用仅检索前100条记录 [英] Azure DevOps REST API call retrieving only top 100 records
问题描述
我正在使用下面的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屋!