Runs - Get

获取特定管道的运行。

GET https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs/{runId}?api-version=7.1

URI 参数

名称 必需 类型 说明
organization
path True

string

Azure DevOps 组织的名称。

pipelineId
path True

integer (int32)

管道 ID

project
path True

string

项目 ID 或项目名称

runId
path True

integer (int32)

运行 ID

api-version
query True

string

要使用的 API 版本。 这应设置为“7.1”才能使用此版本的 API。

响应

名称 类型 说明
200 OK

Run

成功作

安全性

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.build 授予访问生成项目(包括生成结果、定义和请求)的能力,以及通过服务挂钩接收有关生成事件的通知的能力。

定义

名称 说明
Container
ContainerResource
PipelineReference

对管道的引用。

PipelineResource
ReferenceLinks

表示 REST 引用链接集合的类。

Repository
RepositoryResource
RepositoryType
Run
RunResources
RunResult
RunState
Variable

Container

名称 类型 说明
environment

object

image

string

mapDockerSocket

boolean

options

string

ports

string[]

volumes

string[]

ContainerResource

名称 类型 说明
container

Container

PipelineReference

对管道的引用。

名称 类型 说明
folder

string

管道文件夹

id

integer (int32)

管道 ID

name

string

管道名称

revision

integer (int32)

修订号

url

string

PipelineResource

名称 类型 说明
pipeline

PipelineReference

对管道的引用。

version

string

表示 REST 引用链接集合的类。

名称 类型 说明
links

object

链接的只读视图。 由于引用链接是只读的,因此我们只想将其公开为只读链接。

Repository

名称 类型 说明
type

RepositoryType

RepositoryResource

名称 类型 说明
refName

string

repository

Repository

version

string

RepositoryType

说明
azureReposGit
azureReposGitHyphenated
gitHub
gitHubEnterprise
unknown

Run

名称 类型 说明
_links

ReferenceLinks

表示 REST 引用链接集合的类。

createdDate

string (date-time)

finalYaml

string

finishedDate

string (date-time)

id

integer (int32)

name

string

pipeline

PipelineReference

对管道的引用。

resources

RunResources

result

RunResult

state

RunState

templateParameters

object

url

string

variables

<string,  Variable>

RunResources

名称 类型 说明
containers

<string,  ContainerResource>

pipelines

<string,  PipelineResource>

repositories

<string,  RepositoryResource>

RunResult

说明
canceled
failed
succeeded
unknown

RunState

说明
canceling
completed
inProgress
unknown

Variable

名称 类型 说明
isSecret

boolean

value

string