I'm having some troubles to get all Work Items. I want to get all of the Test Cases ( they are more than 300), but unfortunately I can get only 187 of them.
$uri = "/_apis/wit/reporting/workitemrevisions?includeLatestOnly=true&api-version=5.0-preview.2"
$workItems = $response | Where-Object ({$_.fields.'System.WorkItemType' -eq 'Test Case'})
We can add the field maxPageSize
to specify the maximum number of results to return in the result. Please refer this doc for more details
Sample url:
$uri = "/_apis/wit/reporting/workitemrevisions?includeLatestOnly=true&$maxPageSize={$maxPageSize}&api-version=6.0-preview.2"
Update1
As test result, the maximum number is 1000
@Vito Liu-MSFT
I tried with batches [Work Items - List][1]. Devided 10 000 items to 50 different groups and queried them. Working fine and gives me back the result I want. [1]: https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/list?view=azure-devops-rest-6.0
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.