Releases - Get Release Definition Summary
获取给定定义 ID 的版本摘要。
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?definitionId={definitionId}&releaseCount={releaseCount}&api-version=4.1-preview.6
GET https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases?definitionId={definitionId}&releaseCount={releaseCount}&includeArtifact={includeArtifact}&definitionEnvironmentIdsFilter={definitionEnvironmentIdsFilter}&api-version=4.1-preview.6
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
organization
|
path | True |
string |
Azure DevOps 组织的名称。 |
project
|
path | True |
string |
项目 ID 或项目名称 |
api-version
|
query | True |
string |
要使用的 API 版本。 这应设置为“4.1-preview.6”才能使用此版本的 API。 |
definition
|
query | True |
integer int32 |
要获取发布摘要的定义 ID。 |
release
|
query | True |
integer int32 |
要包含在摘要中的版本计数。 |
definition
|
query |
string array (int32) |
||
include
|
query |
boolean |
包括项目详细信息。默认值为“false”。 |
响应
名称 | 类型 | 说明 |
---|---|---|
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.release | 授予读取发布项目(包括发布、发布定义和发布环境)的能力。 |
定义
ApprovalExecutionOrder
值 | 说明 |
---|---|
afterGatesAlways | |
afterSuccessfulGates | |
beforeGates |
ApprovalOptions
名称 | 类型 | 说明 |
---|---|---|
autoTriggeredAndPreviousEnvironmentApprovedCanBeSkipped |
boolean |
|
enforceIdentityRevalidation |
boolean |
|
executionOrder | ||
releaseCreatorCanBeApprover |
boolean |
|
requiredApproverCount |
integer |
|
timeoutInMinutes |
integer |
ApprovalStatus
获取或设置审批的状态。
值 | 说明 |
---|---|
approved | |
canceled | |
pending | |
reassigned | |
rejected | |
skipped | |
undefined |
ApprovalType
获取或设置审批类型。
值 | 说明 |
---|---|
all | |
postDeploy | |
preDeploy | |
undefined |
Artifact
名称 | 类型 | 说明 |
---|---|---|
alias |
string |
获取或设置别名。 |
definitionReference |
<string,
Artifact |
获取或设置定义引用。 例如{“project”:{“id”:“fed755ea-49c5-4399-acea-fd5b5aa90a6c”,“name”:“myProject”},“definition”:{“id”:“1”,“name”:“mybuildDefinition”},“connection”:{“id”:“1”,“name”:“myConnection”}} |
isPrimary |
boolean |
获取或设置,因为项目是主要项目还是非主要项目。 |
type |
string |
获取或设置类型。 其值可以是“Build”、“Jenkins”、“GitHub”、“Nuget”、“Team Build (external) ”、“ExternalTFSBuild”、“Git”、“TFVC”、“ExternalTfsXamlBuild”。 |
ArtifactSourceReference
名称 | 类型 | 说明 |
---|---|---|
id |
string |
|
name |
string |
AuthorizationHeader
名称 | 类型 | 说明 |
---|---|---|
name |
string |
|
value |
string |
ConditionType
获取或设置条件类型。
值 | 说明 |
---|---|
artifact |
条件类型为项目。 |
environmentState |
条件类型为环境状态。 |
event |
条件类型为事件。 |
undefined |
条件类型未定义。 |
ConfigurationVariableValue
名称 | 类型 | 说明 |
---|---|---|
isSecret |
boolean |
获取或设置变量是否为机密。 |
value |
string |
获取或设置配置变量的值。 |
DataSourceBindingBase
表示服务终结点请求的数据源绑定。
名称 | 类型 | 说明 |
---|---|---|
dataSourceName |
string |
获取或设置数据源的名称。 |
endpointId |
string |
获取或设置终结点 ID。 |
endpointUrl |
string |
获取或设置服务终结点的 URL。 |
headers |
获取或设置授权标头。 |
|
parameters |
object |
获取或设置数据源的参数。 |
resultSelector |
string |
获取或设置结果选择器。 |
resultTemplate |
string |
获取或设置结果模板。 |
target |
string |
获取或设置数据源的目标。 |
Demand
名称 | 类型 | 说明 |
---|---|---|
name |
string |
|
value |
string |
DeploymentAttempt
名称 | 类型 | 说明 |
---|---|---|
attempt |
integer |
|
deploymentId |
integer |
|
hasStarted |
boolean |
指定部署是否已启动 |
id |
integer |
|
issues |
Issue[] |
与部署相关的所有问题 |
job | ||
lastModifiedBy | ||
lastModifiedOn |
string |
|
operationStatus | ||
postDeploymentGates | ||
preDeploymentGates | ||
queuedOn |
string |
|
reason | ||
releaseDeployPhases | ||
requestedBy | ||
requestedFor | ||
runPlanId |
string |
|
status | ||
tasks |
DeploymentJob
名称 | 类型 | 说明 |
---|---|---|
job | ||
tasks |
DeploymentOperationStatus
获取部署的操作状态。
值 | 说明 |
---|---|
all |
部署操作状态为全部。 |
approved |
部署操作状态已批准。 |
canceled |
部署操作状态已取消。 |
cancelling |
部署操作状态正在取消。 |
deferred |
部署操作状态延迟。 |
evaluatingGates |
部署操作状态为 EvaluatingGates。 |
gateFailed |
部署操作状态为 GateFailed。 |
manualInterventionPending |
部署操作状态为手动交互挂起。 |
pending |
部署操作状态为挂起。 |
phaseCanceled |
部署操作状态为阶段取消。 |
phaseFailed |
部署操作状态为阶段失败。 |
phaseInProgress |
部署操作状态为分阶段执行。 |
phasePartiallySucceeded |
部署操作状态为阶段部分成功。 |
phaseSucceeded |
部署操作状态为阶段成功。 |
queued |
部署操作状态已排队。 |
queuedForAgent |
代理的部署操作状态已排队。 |
queuedForPipeline |
部署操作状态已排队等待管道。 |
rejected |
部署操作状态被拒绝。 |
scheduled |
部署操作状态已计划。 |
undefined |
部署操作状态未定义。 |
DeploymentReason
获取部署原因。
值 | 说明 |
---|---|
automated |
部署原因是自动化的。 |
manual |
部署原因为手动。 |
none |
部署原因无。 |
scheduled |
已计划部署原因。 |
DeploymentStatus
获取部署的状态。
值 | 说明 |
---|---|
all |
部署状态为全部。 |
failed |
部署状态失败。 |
inProgress |
部署状态为“正在进行”。 |
notDeployed |
部署状态未部署。 |
partiallySucceeded |
部署状态部分成功。 |
succeeded |
部署状态为成功。 |
undefined |
部署状态未定义。 |
DeployPhase
名称 | 类型 | 说明 |
---|---|---|
name |
string |
|
phaseType | ||
rank |
integer |
|
workflowTasks |
DeployPhaseStatus
值 | 说明 |
---|---|
canceled | |
cancelling | |
failed | |
inProgress | |
notStarted | |
partiallySucceeded | |
skipped | |
succeeded | |
undefined |
DeployPhaseTypes
值 | 说明 |
---|---|
agentBasedDeployment | |
machineGroupBasedDeployment | |
runOnServer | |
undefined |
EnvironmentOptions
名称 | 类型 | 说明 |
---|---|---|
autoLinkWorkItems |
boolean |
|
badgeEnabled |
boolean |
|
emailNotificationType |
string |
|
emailRecipients |
string |
|
enableAccessToken |
boolean |
|
publishDeploymentStatus |
boolean |
|
skipArtifactsDownload |
boolean |
|
timeoutInMinutes |
integer |
EnvironmentStatus
获取环境状态。
值 | 说明 |
---|---|
canceled | |
inProgress | |
notStarted | |
partiallySucceeded | |
queued | |
rejected | |
scheduled | |
succeeded | |
undefined |
GateStatus
值 | 说明 |
---|---|
failed | |
inProgress | |
none | |
pending | |
succeeded |
IdentityRef
名称 | 类型 | 说明 |
---|---|---|
_links |
此字段包含零个或多个有关图形主题的有趣链接。 可以调用这些链接来获取有关此图主题的其他关系或更详细的信息。 |
|
descriptor |
string |
描述符是在系统运行时引用图形主题的主要方法。 此字段将唯一标识帐户和组织中的同一图形主题。 |
directoryAlias |
string |
|
displayName |
string |
这是图形主题的非唯一显示名称。 若要更改此字段,必须在源提供程序中更改其值。 |
id |
string |
|
imageUrl |
string |
|
inactive |
boolean |
|
isAadIdentity |
boolean |
|
isContainer |
boolean |
|
profileUrl |
string |
|
uniqueName |
string |
|
url |
string |
此 URL 是指向此图主题的源资源的完整路由。 |
Issue
名称 | 类型 | 说明 |
---|---|---|
issueType |
string |
|
message |
string |
ManualIntervention
名称 | 类型 | 说明 |
---|---|---|
approver |
获取或设置应批准的标识。 |
|
comments |
string |
获取或设置要审批的注释。 |
createdOn |
string |
获取创建日期。 |
id |
integer |
获取手动干预的唯一标识符。 |
instructions |
string |
获取或设置审批说明。 |
modifiedOn |
string |
获取修改日期。 |
name |
string |
获取或设置名称。 |
release |
获取用于手动干预的 releaseReference。 |
|
releaseDefinition |
获取用于手动干预的 releaseDefinitionReference。 |
|
releaseEnvironment |
获取用于手动干预的 releaseEnvironmentReference。 |
|
status |
获取或设置手动干预的状态。 |
|
taskInstanceId |
string |
获取任务实例标识符。 |
url |
string |
获取用于访问手动干预的 URL。 |
ManualInterventionStatus
获取或设置手动干预的状态。
值 | 说明 |
---|---|
approved |
手动干预已获批准。 |
canceled |
取消手动干预。 |
pending |
手动干预处于挂起状态。 |
rejected |
手动干预被拒绝。 |
unknown |
手动干预未设置状态。 |
ProcessParameters
名称 | 类型 | 说明 |
---|---|---|
dataSourceBindings |
表示服务终结点请求的数据源绑定。 |
|
inputs | ||
sourceDefinitions |
ProjectReference
名称 | 类型 | 说明 |
---|---|---|
id |
string |
获取此字段的唯一标识符。 |
name |
string |
获取项目的名称。 |
PropertiesCollection
类将属性包表示为键值对的集合。 接受除 之外DBNull
的所有基元类型的值 (具有TypeCode != TypeCode.Object
) 的任何类型。 Byte[]、Int32、Double、DateType 和 String 类型的值保留其类型,其他基元将重新调整为 String。 Byte[] 应为 base64 编码字符串。
名称 | 类型 | 说明 |
---|---|---|
count |
integer |
集合中的属性计数。 |
item |
object |
|
keys |
string[] |
集合中的键集。 |
values |
string[] |
集合中的值集。 |
ReferenceLinks
表示 REST 引用链接集合的类。
名称 | 类型 | 说明 |
---|---|---|
links |
object |
链接的只读视图。 由于引用链接是只读的,因此我们只想将其公开为只读。 |
Release
名称 | 类型 | 说明 |
---|---|---|
_links |
获取用于访问发布的链接。 |
|
artifacts |
Artifact[] |
获取或设置项目列表。 |
comment |
string |
获取或设置注释。 |
createdBy |
获取或设置创建者的标识。 |
|
createdOn |
string |
获取创建日期。 |
definitionSnapshotRevision |
integer |
获取定义快照的修订号。 |
description |
string |
获取或设置版本的说明。 |
environments |
获取环境列表。 |
|
id |
integer |
获取此字段的唯一标识符。 |
keepForever |
boolean |
是否从保留策略中排除发布。 |
logsContainerUrl |
string |
获取日志容器 URL。 |
modifiedBy |
获取或设置修改的标识。 |
|
modifiedOn |
string |
获取修改日期。 |
name |
string |
获取名称。 |
poolName |
string |
获取池名称。 |
projectReference |
获取或设置项目引用。 |
|
properties |
类将属性包表示为键值对的集合。 接受除 之外 |
|
reason |
获取发布原因。 |
|
releaseDefinition |
获取 releaseDefinitionReference,它指定与此版本关联的发布定义的引用。 |
|
releaseNameFormat |
string |
获取发布名称格式。 |
status |
获取状态。 |
|
tags |
string[] |
获取或设置标记列表。 |
triggeringArtifactAlias |
string |
|
variableGroups |
获取变量组的列表。 |
|
variables |
<string,
Configuration |
获取或设置变量的字典。 |
ReleaseApproval
名称 | 类型 | 说明 |
---|---|---|
approvalType |
获取或设置审批类型。 |
|
approvedBy |
获取批准者的标识。 |
|
approver |
获取或设置应批准的标识。 |
|
attempt |
integer |
获取或设置尝试,指定其所属的部署尝试。 |
comments |
string |
获取或设置要审批的注释。 |
createdOn |
string |
获取创建日期。 |
history |
获取指定与此审批关联的所有审批的历史记录。 |
|
id |
integer |
获取此字段的唯一标识符。 |
isAutomated |
boolean |
获取或设置,因为审批是否自动。 |
isNotificationOn |
boolean |
|
modifiedOn |
string |
获取修改日期。 |
rank |
integer |
获取或设置指定审批顺序的排名。 例如,同一级别表示并行审批。 |
release |
获取 releaseReference,它指定此审批关联的版本的引用。 |
|
releaseDefinition |
获取 releaseDefinitionReference,它指定与此审批关联的发布定义的引用。 |
|
releaseEnvironment |
获取 releaseEnvironmentReference,它指定与此审批关联的发布环境的引用。 |
|
revision |
integer |
获取修订号。 |
status |
获取或设置审批的状态。 |
|
trialNumber |
integer |
|
url |
string |
获取用于访问审批的 URL。 |
ReleaseApprovalHistory
名称 | 类型 | 说明 |
---|---|---|
approver | ||
changedBy | ||
comments |
string |
|
createdOn |
string |
|
modifiedOn |
string |
|
revision |
integer |
ReleaseCondition
名称 | 类型 | 说明 |
---|---|---|
conditionType |
获取或设置条件类型。 |
|
name |
string |
获取或设置条件的名称。 例如“ReleaseStarted”。 |
result |
boolean |
|
value |
string |
获取或设置条件的值。 |
ReleaseDefinitionApprovals
名称 | 类型 | 说明 |
---|---|---|
approvalOptions | ||
approvals |
ReleaseDefinitionApprovalStep
名称 | 类型 | 说明 |
---|---|---|
approver | ||
id |
integer |
|
isAutomated |
boolean |
|
isNotificationOn |
boolean |
|
rank |
integer |
ReleaseDefinitionEnvironmentSummary
名称 | 类型 | 说明 |
---|---|---|
id |
integer |
|
lastReleases | ||
name |
string |
ReleaseDefinitionGate
名称 | 类型 | 说明 |
---|---|---|
tasks |
ReleaseDefinitionGatesOptions
名称 | 类型 | 说明 |
---|---|---|
isEnabled |
boolean |
|
samplingInterval |
integer |
|
stabilizationTime |
integer |
|
timeout |
integer |
ReleaseDefinitionGatesStep
名称 | 类型 | 说明 |
---|---|---|
gates | ||
gatesOptions | ||
id |
integer |
ReleaseDefinitionShallowReference
名称 | 类型 | 说明 |
---|---|---|
_links |
获取指向发布定义的相关资源、API 和视图的链接。 |
|
id |
integer |
获取发布定义的唯一标识符。 |
name |
string |
获取或设置发布定义的名称。 |
url |
string |
获取用于访问发布定义的 REST API URL。 |
ReleaseDefinitionSummary
名称 | 类型 | 说明 |
---|---|---|
environments | ||
releaseDefinition | ||
releases |
Release[] |
ReleaseDeployPhase
名称 | 类型 | 说明 |
---|---|---|
deploymentJobs | ||
errorLog |
string |
|
id |
integer |
|
manualInterventions | ||
name |
string |
|
phaseId |
string |
|
phaseType | ||
rank |
integer |
|
runPlanId |
string |
|
status |
ReleaseEnvironment
名称 | 类型 | 说明 |
---|---|---|
conditions |
获取条件列表。 |
|
createdOn |
string |
获取创建日期。 |
definitionEnvironmentId |
integer |
获取定义环境 ID。 |
demands |
Demand[] |
获取要求。 |
deployPhasesSnapshot |
获取快照部署阶段的列表。 |
|
deploySteps |
获取部署步骤。 |
|
environmentOptions |
获取环境选项。 |
|
id |
integer |
获取此字段的唯一标识符。 |
modifiedOn |
string |
获取修改日期。 |
name |
string |
获取名称。 |
nextScheduledUtcTime |
string |
获取下一个计划的 UTC 时间。 |
owner |
获取发布环境所有者的标识。 |
|
postApprovalsSnapshot |
获取部署后审批快照列表。 |
|
postDeployApprovals |
获取部署后审批的列表。 |
|
postDeploymentGatesSnapshot | ||
preApprovalsSnapshot |
获取快照预部署审批的列表。 |
|
preDeployApprovals |
获取预部署审批的列表。 |
|
preDeploymentGatesSnapshot | ||
processParameters |
获取进程参数。 |
|
queueId |
integer |
获取队列 ID。 |
rank |
integer |
获取排名。 |
release |
获取发布引用,该引用指定与此发布环境关联的版本的引用。 |
|
releaseCreatedBy |
获取创建发布的标识。 |
|
releaseDefinition |
获取 releaseDefinitionReference,它指定与此发布环境关联的发布定义的引用。 |
|
releaseDescription |
string |
获取版本说明。 |
releaseId |
integer |
获取发布 ID。 |
scheduledDeploymentTime |
string |
获取发布环境的计划部署时间。 |
schedules |
获取计划列表。 |
|
status |
获取环境状态。 |
|
timeToDeploy |
number |
获取部署时间。 |
triggerReason |
string |
获取触发器原因。 |
variableGroups |
获取变量组的列表。 |
|
variables |
<string,
Configuration |
获取变量的字典。 |
workflowTasks |
获取工作流任务的列表。 |
ReleaseEnvironmentShallowReference
名称 | 类型 | 说明 |
---|---|---|
_links |
获取指向发布环境的相关资源、API 和视图的链接。 |
|
id |
integer |
获取发布环境的唯一标识符。 |
name |
string |
获取或设置发布环境的名称。 |
url |
string |
获取用于访问发布环境的 REST API URL。 |
ReleaseGates
名称 | 类型 | 说明 |
---|---|---|
deploymentJobs | ||
id |
integer |
|
lastModifiedOn |
string |
|
runPlanId |
string |
|
stabilizationCompletedOn |
string |
|
startedOn |
string |
|
status |
ReleaseReason
获取发布的原因。
值 | 说明 |
---|---|
continuousIntegration | |
manual | |
none | |
schedule |
ReleaseSchedule
名称 | 类型 | 说明 |
---|---|---|
daysToRelease |
要发布的一周中的天数 |
|
jobId |
string |
Team Foundation 作业定义作业 ID |
startHours |
integer |
要开始的本地时区小时数 |
startMinutes |
integer |
要开始的本地时区分钟数 |
timeZoneId |
string |
发布计划的时区 ID,例如“UTC” |
ReleaseShallowReference
名称 | 类型 | 说明 |
---|---|---|
_links |
获取指向发布的相关资源、API 和视图的链接。 |
|
id |
integer |
获取发布的唯一标识符。 |
name |
string |
获取或设置发布的名称。 |
url |
string |
获取用于访问发布的 REST API URL。 |
ReleaseStatus
获取状态。
值 | 说明 |
---|---|
abandoned | |
active | |
draft | |
undefined |
ReleaseTask
名称 | 类型 | 说明 |
---|---|---|
agentName |
string |
|
dateEnded |
string |
|
dateStarted |
string |
|
finishTime |
string |
|
id |
integer |
|
issues |
Issue[] |
|
lineCount |
integer |
|
logUrl |
string |
|
name |
string |
|
percentComplete |
integer |
|
rank |
integer |
|
startTime |
string |
|
status | ||
task | ||
timelineRecordId |
string |
ScheduleDays
要发布的一周中的天数
值 | 说明 |
---|---|
all | |
friday | |
monday | |
none | |
saturday | |
sunday | |
thursday | |
tuesday | |
wednesday |
TaskInputDefinitionBase
名称 | 类型 | 说明 |
---|---|---|
aliases |
string[] |
|
defaultValue |
string |
|
groupName |
string |
|
helpMarkDown |
string |
|
label |
string |
|
name |
string |
|
options |
object |
|
properties |
object |
|
required |
boolean |
|
type |
string |
|
validation | ||
visibleRule |
string |
TaskInputValidation
名称 | 类型 | 说明 |
---|---|---|
expression |
string |
条件表达式 |
message |
string |
说明用户在验证失败时如何更正的消息 |
TaskSourceDefinitionBase
名称 | 类型 | 说明 |
---|---|---|
authKey |
string |
|
endpoint |
string |
|
keySelector |
string |
|
selector |
string |
|
target |
string |
TaskStatus
值 | 说明 |
---|---|
canceled | |
failed | |
failure | |
inProgress | |
partiallySucceeded | |
pending | |
skipped | |
succeeded | |
success | |
unknown |
VariableGroup
名称 | 类型 | 说明 |
---|---|---|
createdBy |
获取或设置创建者的标识。 |
|
createdOn |
string |
获取创建日期。 |
description |
string |
获取或设置说明。 |
id |
integer |
获取此字段的唯一标识符。 |
modifiedBy |
获取或设置修改的标识。 |
|
modifiedOn |
string |
获取修改日期。 |
name |
string |
获取或设置名称。 |
providerData |
获取或设置提供程序数据。 |
|
type |
string |
获取或设置类型。 |
variables |
<string,
Variable |
VariableGroupProviderData
VariableValue
名称 | 类型 | 说明 |
---|---|---|
isSecret |
boolean |
|
value |
string |
WorkflowTask
名称 | 类型 | 说明 |
---|---|---|
alwaysRun |
boolean |
|
condition |
string |
|
continueOnError |
boolean |
|
definitionType |
string |
|
enabled |
boolean |
|
inputs |
object |
|
name |
string |
|
overrideInputs |
object |
|
refName |
string |
|
taskId |
string |
|
timeoutInMinutes |
integer |
|
version |
string |
WorkflowTaskReference
名称 | 类型 | 说明 |
---|---|---|
id |
string |
|
name |
string |
|
version |
string |