Attachments - Get
下载附件。
GET https://dev.azure.com/{organization}/{project}/_apis/wit/attachments/{id}?api-version=5.0
GET https://dev.azure.com/{organization}/{project}/_apis/wit/attachments/{id}?fileName={fileName}&download={download}&api-version=5.0
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
id
|
path | True |
string uuid |
附件 ID |
organization
|
path | True |
string |
Azure DevOps 组织的名称。 |
project
|
path |
string |
项目 ID 或项目名称 |
|
api-version
|
query | True |
string |
要使用的 API 版本。 应将其设置为“5.0”才能使用此版本的 API。 |
download
|
query |
boolean |
如果设置为 true ,请始终下载附件 |
|
file
|
query |
string |
文件的名称 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
string |
成功的操作 Media Types: "application/octet-stream", "application/zip" |
安全性
oauth2
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
Scopes
名称 | 说明 |
---|---|
vso.work | 授予读取工作项、查询、板、区域和迭代路径以及其他工作项跟踪相关元数据的能力。 此外,还允许通过服务挂钩执行查询、搜索工作项和接收有关工作项事件的通知。 |
示例
Download Attachment |
Get Attachment Content |
Get Project Attachment Content |
Download Attachment
Sample Request
GET https://dev.azure.com/fabrikam/_apis/wit/attachments/{id}?api-version=5.0
Sample Response
Get Attachment Content
Sample Request
GET https://dev.azure.com/fabrikam/_apis/wit/attachments/{id}?api-version=5.0
Sample Response
Get Project Attachment Content
Sample Request
GET https://dev.azure.com/fabrikam/_apis/wit/attachments/{id}?api-version=5.0
Sample Response
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈