Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get a list of external links for a Work Item using the Azure DevOps API?

I have a GitHub repo whose development is managed on Azure DevOps, linked using Azure Boards. In the 'Development' field of each Work Item (e.g. User Story, Task) is a list of linked GitHub commmits for that item. I would like to use the Azure DevOps API to retrieve this list for each work item.

What I've tried:

  • This list doesn't seem to correspond to a field in the list of Work Item fields (from the https://dev.azure.com/{organization}/{project}/_apis/wit/fields endpoint). The number of GitHub links seems to match the System.ExternalLinkCount, but I can't find a way to then list these links.
  • Using the WIQL for WorkItemLinks (documentation here), but this looks like it's only for links between work items, not e.g. links from work items to other external resources
  • The general documentation covers GitHub links, but not in terms of the API.
like image 712
Tim Avatar asked Oct 15 '25 20:10

Tim


1 Answers

Please use $expand=relations parameter to get details of linked items.

There is difference between API in v5.1 and v6.0 where on the second flog is included by default.

enter image description here

like image 75
Krzysztof Madej Avatar answered Oct 18 '25 13:10

Krzysztof Madej



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!