Why are we unable to fetch the success state when trying to retrieve the details of a successful PR using the Azure REST API?

Medapati, Venkata Siva Reddy 0 Reputation points
2025-03-11T11:01:35.57+00:00

When attempting to fetch the validation status of successful pull requests via the Azure DevOps REST API, we are unable to retrieve the "state: success" status. Instead, the API only returns statuses such as "Pending", "Not Applicable", and "Failed" when we query the following API URL:

https://dev.azure.com/$organization/$project/_apis/git/repositories/$repository/pullRequests/$pullRequestId/statuses?api-version=$apiVersion

Azure DevOps
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.