[SOLVED] Azure DevOps : How to export the Work Items from an Azure DevOps Project using REST APIs?

Issue

This Content is from Stack Overflow. Question asked by Mugil Karthikeyan

My old Azure DevOps Organization has multiple projects and I’d like to export and import the Azure DevOps Project between the organizations, especially the Work Items in Boards.

enter image description here

I came across the Microsoft document – https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/create?view=azure-devops-rest-7.1&tabs=HTTP

Do we have any reference projects that uses Azure DevOps REST APIs to export and import the Azure DevOps Project?



Solution

No, there doesn’t have a built-in feature to achieve your requirement.

If you use F12 to capture the network traffic you will find the related request structure like this:

enter image description here

CSV file was not been uploaded directly, it was firstly been parsed and then put it into the request.

It is obviously unrealistic to use such a request because it is too complicated.

A feasible solution is to use the REST API to get the workitems information, and then save this information to a CSV file. Then read the CSV file information and fill it into the REST API of Create Workitems.


This Question was asked in StackOverflow by Mugil Karthikeyan and Answered by Bowman Zhu-MSFT It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?