【问题标题】:Not able to download attachment from Azure Devops rest API using Postman无法使用 Postman 从 Azure Devops REST API 下载附件
【发布时间】:2021-11-16 13:12:22
【问题描述】:
我正在使用 Postman 访问 azure devops Rest API 以下载附件。(图)
即使在填写正确的标题后,参数也会显示{ "count": 1, "value": { "Message": "The request is invalid." } }。
我尝试了所有关于堆栈溢出的技术,但它们都不起作用。
我的目标是从 devops 工作项下载附件。
【问题讨论】:
标签:
azure
rest
azure-devops
postman
azure-devops-rest-api
【解决方案1】:
我猜你在请求 URL 中使用了Work Item ID,不正确,应该是Attachment ID。
要获取Attachment ID,需要先使用REST API获取。
GET https://dev.azure.com/orgname/proname/_apis/wit/workitems/<Work Item ID>?$expand=all&api-version=6.0
复制上面的Attachment ID,然后在下面的API中使用它,它对我有用。