如何从 VSTS 下载所有附件? [英] How to Download All Attachments from VSTS?

查看:47
本文介绍了如何从 VSTS 下载所有附件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试根据 ID 号将所有工作项附件从 VSTS 下载到他们自己的文件夹中.如果这是可能的,人们将如何继续实现这一目标?

我已经研究了 rest API 但一直很困惑,而且我发现的所有文档似乎都是关于 Azure DevOps.我目前使用的是 15.117.27024.0 版本.

我提供了一些背景信息,如果这不足以诊断我的问题,我将非常乐意提供更多信息.

谢谢大家的帮助.

我尝试通过邮递员使用非 API"URL 使用 GET 命令,该 URL 显示网页但显示JavaScript 已禁用".我现在很困惑,真的不知道从哪里开始.

解决方案

1.您可以使用以下

3.然后就可以使用

I am attempting to download all Work item attachments from VSTS into their own folder based on their ID number. If this is possible, how would one go on about achieving this?

I've looked into rest API but have been confused, and it appears all documentation I've found is regarding Azure DevOps. I am currently on version 15.117.27024.0.

I've provided some background info, and if that is not sufficient enough in diagnosing my problem, I will be more than happy to provide more.

Thank you all for your help.

I've tried using the GET command through postman using the "Non API" URL where the web page displays but says "JavaScript is disabled". I am pretty confused at this point and don't really know where to go from here.

解决方案

1.You could get all the attachment IDs on a work item using following REST API:

GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitems?ids={id}&$expand=all&api-version=5.0

2.Then you could read the url and name property which the value of "rel" property is the "AttachedFile" in the body of the response , so that you could get the attachment id.

3.Then you can use the Attachments- Get rest api to download an attachment.

GET https://dev.azure.com/{organization}/{project}/_apis/wit/attachments/{id}?api-version=5.0

这篇关于如何从 VSTS 下载所有附件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆