Processes - Import Process Template
从 zip 文件导入进程。
POST https://dev.azure.com/{organization}/_apis/work/processadmin/processes/import?api-version=7.1
POST https://dev.azure.com/{organization}/_apis/work/processadmin/processes/import?ignoreWarnings={ignoreWarnings}&replaceExistingTemplate={replaceExistingTemplate}&api-version=7.1
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
organization
|
path | True |
string |
Azure DevOps 组织的名称。 |
|
api-version
|
query | True |
string |
要使用的 API 版本。 这应设置为“7.1”才能使用此版本的 API。 |
|
ignore
|
query |
boolean |
忽略验证警告。 默认值为 false。 |
|
|
replace
|
query |
boolean |
替换现有模板。 默认值为 true。 |
请求正文
Media Types: "application/octet-stream"
| 名称 | 类型 | 说明 |
|---|---|---|
| body |
string (Stream) |
要上传的流 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
成功作 |
安全性
oauth2
类型:
oauth2
流向:
accessCode
授权 URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
令牌 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
作用域
| 名称 | 说明 |
|---|---|
| vso.work_write | 授予读取、创建和更新工作项和查询、更新板元数据、读取区域和迭代路径、其他工作项跟踪相关元数据、执行查询以及通过服务挂钩接收有关工作项事件的通知的能力。 |
示例
示例请求
POST https://dev.azure.com/fabrikam/_apis/work/processadmin/processes/import?api-version=7.1
示例响应
persistent-Auth: true
lfs-Authenticate: NTLM
{
"id": "adcc42ab-9882-485e-a3ed-7678f01f66bd",
"promoteJobId": "00000000-0000-0000-0000-000000000000",
"helpUrl": null,
"validationResults": [],
"isNew": false
}
定义
| 名称 | 说明 |
|---|---|
|
Check |
描述检查模板存在请求的结果。 |
|
Process |
描述进程导入请求的结果。 |
|
Validation |
|
|
Validation |
CheckTemplateExistenceResult
描述检查模板存在请求的结果。
| 名称 | 类型 | 说明 |
|---|---|---|
| doesTemplateExist |
boolean |
指示模板是否存在。 |
| existingTemplateName |
string |
现有模板的名称。 |
| existingTemplateTypeId |
string (uuid) |
现有模板类型标识符。 |
| requestedTemplateName |
string |
请求的模板的名称。 |
ProcessImportResult
描述进程导入请求的结果。
| 名称 | 类型 | 说明 |
|---|---|---|
| checkExistenceResult |
检查模板是否存在结果。 |
|
| helpUrl |
string |
帮助 URL。 |
| id |
string (uuid) |
导入作的 ID。 |
| isNew |
boolean |
此导入的过程是否为新进程。 |
| promoteJobId |
string (uuid) |
提升作业标识符。 |
| validationResults |
验证结果的列表。 |
ValidationIssue
| 名称 | 类型 | 说明 |
|---|---|---|
| description |
string |
|
| file |
string |
|
| helpLink |
string |
|
| issueType | ||
| line |
integer (int32) |
ValidationIssueType
| 值 | 说明 |
|---|---|
| error | |
| warning |