I am trying to get all workitems, linked to all pull requests in a repo.
First, I run the API Command to get all Pull Requests: https://dev.azure.com/{organization}/{project}/_apis/git/pullrequests?api-version=5.1
That works just fine.
Then Looping through each Pull Request, I try to get all Work Items https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/pullRequests/{pullRequestId}/workitems?api-version=5.1
Even though I am an Admin, I still get this error: innerException : null message : TF401019: The Git repository with name or identifier {MY Repo ID} does not exist or you do not have permissions for the operation you are attempting. typeName : Microsoft.TeamFoundation.Git.Server.GitRepositoryNotFoundException, Microsoft.TeamFoundation.Git.Server typeKey : GitRepositoryNotFoundException errorCode : 0 eventId : 300
Can Anyone help me figure out how to get these related work items for the pull requests?
API Web Pages:
https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20requests?view=azure-devops-rest-5.1
https://docs.microsoft.com/en-us/rest/api/azure/devops/git/pull%20request%20work%20items/list?view=azure-devops-rest-5.1