Automate extracting Devops work Items

%3CLINGO-SUB%20id%3D%22lingo-sub-2056407%22%20slang%3D%22en-US%22%3EAutomate%20extracting%20Devops%20work%20Items%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2056407%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20there.%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20automate%20the%20process%20of%20exporting%20all%20work%20items%20from%20a%20devops%20project%26nbsp%3Bout%20to%20csv%E2%80%99s%20%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EKind%20Regards%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello there. 

Is there a way to automate the process of exporting all work items from a devops project out to csv’s  

Kind Regards 

Rob

2 Replies
You could use the Azure DevOps API. You can call the Get Backlog Level Work Items: https://docs.microsoft.com/en-us/rest/api/azure/devops/work/backlogs/get%20backlog%20level%20work%20... This will get all the Backlog Item IDs, but not the detail. You can then use Work Items - List to get all the details, but this only accepts 200 IDs per request. Therefore, you will need to batch the IDs from the first call. https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/list?view=azure-devops-rest-... This does reply back as JSON, so can use script like PowerShell to convert to CSV file. Hope this helps
Thank you very much, I shall look into your suggestions.

Stay safe

Regards Rob