You can retrieve more work items use the $top
filter in rest api Get Work Items between Builds.
For below example in powershell script:
# special character `$` in `$top` needs to be escaped.
$url = "https://dev.azure.com/ORG/PROJ/_apis/build/workitems?fromBuildId=8913&toBuildId=8917&`$top=200&api-version=6.1-preview.2"
$PAT="....."
$base64AuthInfo= [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$($PAT)"))
$result = Invoke-RestMethod -Uri $url -Headers @{authorization = "Basic $base64AuthInfo"} -Method get
$result.count
Note: You need to escape the special character $
in $top
filter by adding a back tick "'".
See below result from my test. I can got all the related work items.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…