How to find commit ID of a work Item from Azure Devops REST API

Monika Leslivania 0 Reputation points
2024-08-11T19:41:51.3066667+00:00

Hi,

I need to find commit ID of a workItem using REST API. Tried to see all the return output body from here:
GET https://dev.azure.com/{org}/{project}/_apis/wit/workitems/{workItem Id}?api-version=7.1-preview

but I could not find commit Id.

I also tried

GET https://dev.azure.com/{org}/{project}/_apis/git/repositories/{repository}/commits?includeWorkItems=true&searchCriteria.author={author}&searchCriteria.itemVersion.version={branchName}&searchCriteria.itemVersion.versionType=branch&api-version=7.0

but I cant find the related work items even though I've added this parameter includeWorkItems=true.

Is there anything that I'm missing?

Thanks in advance.

Community Center | Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 60,326 Reputation points
    2024-08-11T20:32:25.7+00:00

    We do not currently provide support for Azure DevOps on this site. Please use their official support channel for assistance.

    FYI, everything is a link in the work item. Get the links for the work item you care about and then filter down to commits. That is where I'd start.

    0 comments No comments

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.