Azure / Azure/azure-rest-api-specs
Pullrequestquery not returning any results.
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 444
Description
$body = @"
{
"queries": [{
"items": [
"4fed50dfea551e797a6af4acf060dc816d3f956e"
],
"type": "commit"
}]
}
"@
#
$someLink = "https://dev.azure.com/$organization/$project/_apis/git/repositories/$repositoryId/pullrequestquery?api-version=5.1"query?api-version=5.1"
Returns:
{
"queries": [
{
"type": "commit",
"items": "4fed50dfea551e797a6af4acf060dc816d3f956e"
}
],
"results": [
{
}
]
}
I use the following to output the result:
Write-Host "CovertTo-Json Out-Host"
$x | ConvertTo-Json | Out-Host
$x.results | ConvertTo-Json | Out-Host
Write-Host "CovertTo-Json Out-Host"
$x | ConvertTo-Json -Depth 1 | Out-Host
$x.results | ConvertTo-Json -Depth 1 | Out-Host
Write-Host "CovertTo-Json Out-Host"
$x | ConvertTo-Json -Depth 2 | Out-Host
$x.results | ConvertTo-Json -Depth 2 | Out-Host
Write-Host "CovertTo-Json Out-Host"
$x | ConvertTo-Json -Depth 3 | Out-Host
$x.results | ConvertTo-Json -Depth 3 | Out-Host
Write-Host "CovertTo-Json Out-Host"
$x | ConvertTo-Json -Depth 4 | Out-Host
$x.results | ConvertTo-Json -Depth 4 | Out-Host
Write-Host "CovertTo-Json Out-Host"
$x | ConvertTo-Json -Depth 5 | Out-Host
$x.results | ConvertTo-Json -Depth 5 | Out-Host
I've tried different commit id's . Commit id's from active and completed pull requests, the results is always empty.

https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20request%20query/get?view=azure-devops-rest-5.1
Contributor guide
Research direction
Start with the Azure DevOps Git pullrequestquery endpoint and the linked REST API documentation. Reproduce the commit query using the request body and URL shown, then compare the returned queries and results with the documented behavior. Done means the empty result is explained and the affected API specification or documentation clearly reflects the verified behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100