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 组织的名称。 |
|
pipeline
|
path | True |
integer (int32) |
管道 ID |
|
project
|
path | True |
string |
项目 ID 或项目名称 |
|
run
|
path | True |
integer (int32) |
运行 ID |
|
api-version
|
query | True |
string |
要使用的 API 版本。 这应设置为“7.1”才能使用此版本的 API。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 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.build | 授予访问生成项目(包括生成结果、定义和请求)的能力,以及通过服务挂钩接收有关生成事件的通知的能力。 |
定义
| 名称 | 说明 |
|---|---|
| Container | |
|
Container |
|
|
Pipeline |
对管道的引用。 |
|
Pipeline |
|
|
Reference |
表示 REST 引用链接集合的类。 |
| Repository | |
|
Repository |
|
|
Repository |
|
| Run | |
|
Run |
|
|
Run |
|
|
Run |
|
| Variable |
Container
| 名称 | 类型 | 说明 |
|---|---|---|
| environment |
object |
|
| image |
string |
|
| mapDockerSocket |
boolean |
|
| options |
string |
|
| ports |
string[] |
|
| volumes |
string[] |
ContainerResource
| 名称 | 类型 | 说明 |
|---|---|---|
| container |
PipelineReference
对管道的引用。
| 名称 | 类型 | 说明 |
|---|---|---|
| folder |
string |
管道文件夹 |
| id |
integer (int32) |
管道 ID |
| name |
string |
管道名称 |
| revision |
integer (int32) |
修订号 |
| url |
string |
PipelineResource
| 名称 | 类型 | 说明 |
|---|---|---|
| pipeline |
对管道的引用。 |
|
| version |
string |
ReferenceLinks
表示 REST 引用链接集合的类。
| 名称 | 类型 | 说明 |
|---|---|---|
| links |
object |
链接的只读视图。 由于引用链接是只读的,因此我们只想将其公开为只读链接。 |
Repository
| 名称 | 类型 | 说明 |
|---|---|---|
| type |
RepositoryResource
| 名称 | 类型 | 说明 |
|---|---|---|
| refName |
string |
|
| repository | ||
| version |
string |
RepositoryType
| 值 | 说明 |
|---|---|
| azureReposGit | |
| azureReposGitHyphenated | |
| gitHub | |
| gitHubEnterprise | |
| unknown |
Run
| 名称 | 类型 | 说明 |
|---|---|---|
| _links |
表示 REST 引用链接集合的类。 |
|
| createdDate |
string (date-time) |
|
| finalYaml |
string |
|
| finishedDate |
string (date-time) |
|
| id |
integer (int32) |
|
| name |
string |
|
| pipeline |
对管道的引用。 |
|
| resources | ||
| result | ||
| state | ||
| templateParameters |
object |
|
| url |
string |
|
| variables |
<string, Variable> |
RunResources
| 名称 | 类型 | 说明 |
|---|---|---|
| containers |
<string,
Container |
|
| pipelines |
<string,
Pipeline |
|
| repositories |
<string,
Repository |
RunResult
| 值 | 说明 |
|---|---|
| canceled | |
| failed | |
| succeeded | |
| unknown |
RunState
| 值 | 说明 |
|---|---|
| canceling | |
| completed | |
| inProgress | |
| unknown |
Variable
| 名称 | 类型 | 说明 |
|---|---|---|
| isSecret |
boolean |
|
| value |
string |