Processes - Import Process Template

从 zip 文件导入进程。

POST https://dev.azure.com/{organization}/_apis/work/processadmin/processes/import?api-version=7.1-preview.1
POST https://dev.azure.com/{organization}/_apis/work/processadmin/processes/import?ignoreWarnings={ignoreWarnings}&replaceExistingTemplate={replaceExistingTemplate}&api-version=7.1-preview.1

URI 参数

名称 必需 类型 说明
organization
path True

string

Azure DevOps 组织的名称。

api-version
query True

string

要使用的 API 版本。 应将其设置为“7.1-preview.1”才能使用此版本的 API。

ignoreWarnings
query

boolean

忽略验证警告。 默认值为 false。

replaceExistingTemplate
query

boolean

替换现有模板。 默认值为 true。

请求正文

Media Types: "application/octet-stream"

名称 类型 说明
body

string

流式传输以上传

响应

名称 类型 说明
200 OK

ProcessImportResult

成功的操作

安全性

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_write 授予读取、创建和更新工作项和查询、更新板元数据、读取区域和迭代路径等工作项跟踪相关元数据、执行查询以及通过服务挂钩接收有关工作项事件的通知的能力。

示例

Sample Request

POST https://dev.azure.com/fabrikam/_apis/work/processadmin/processes/import?api-version=7.1-preview.1

Sample Response

persistent-Auth: true
lfs-Authenticate: NTLM
{
  "id": "adcc42ab-9882-485e-a3ed-7678f01f66bd",
  "promoteJobId": "00000000-0000-0000-0000-000000000000",
  "helpUrl": null,
  "validationResults": [],
  "isNew": false
}

定义

名称 说明
CheckTemplateExistenceResult

描述检查模板存在请求的结果。

ProcessImportResult

描述进程导入请求的结果。

ValidationIssue
ValidationIssueType

CheckTemplateExistenceResult

描述检查模板存在请求的结果。

名称 类型 说明
doesTemplateExist

boolean

指示模板是否存在。

existingTemplateName

string

现有模板的名称。

existingTemplateTypeId

string

现有模板类型标识符。

requestedTemplateName

string

请求的模板的名称。

ProcessImportResult

描述进程导入请求的结果。

名称 类型 说明
checkExistenceResult

CheckTemplateExistenceResult

检查模板存在结果。

helpUrl

string

帮助 URL。

id

string

导入操作的 ID。

isNew

boolean

此导入的过程是否为新进程。

promoteJobId

string

升级作业标识符。

validationResults

ValidationIssue[]

验证结果的列表。

ValidationIssue

名称 类型 说明
description

string

file

string

helpLink

string

issueType

ValidationIssueType

line

integer

ValidationIssueType

名称 类型 说明
error

string

warning

string