如何从VSTS下载所有附件?

编程入门 行业动态 更新时间:2024-10-26 02:31:06
本文介绍了如何从VSTS下载所有附件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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?

我研究了rest API,但感到困惑,并且看来所有找到的文档都与Azure DevOps有关.我目前正在使用15.117.27024.0版本.

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.

谢谢大家的帮助.

我已经尝试通过邮递员使用GET命令,使用显示网页的非API" URL,但显示"JavaScript被禁用".在这一点上我很困惑,而且我真的不知道从这里去哪里.

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.您可以使用以下 REST API :

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

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

2.然后,您可以读取url和name属性,其中"rel"属性的值是响应正文中的"AttachedFile",这样您就可以获取附件ID.

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.然后您可以使用附件-获取 rest api以下载附件.

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

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

更多推荐

如何从VSTS下载所有附件?

本文发布于:2023-06-08 21:24:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/589316.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:附件   VSTS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!