文档

GetPipelineRun - 获取流水线运行实例

可以获取流水线运行实例。

接口说明

API 名称:GetPipelineRun

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求语法

GET /organization/{organizationId}/pipelines/{pipelineId}/pipelineRuns/{pipelineRunId}

请求参数

名称类型必填描述示例值
organizationIdstring

企业标识,也称企业 id,字符串形式,可在云效访问链接中获取,如 https://devops.aliyun.com/organization/【OrganizationId】

5ebbc0228123212b59xxxxx
pipelineIdlong

流水线 ID,可在流水线链接中获取,如 https://flow.aliyun.com/pipelines/【PipelineId】/current

12222
pipelineRunIdlong

流水线运行实例 id

1

返回参数

名称类型描述示例值
object
requestIdstring

请求 id,每次请求都是唯一值,便于后续排查问题

ASSDS-ASSASX-XSAXSA-XSAXSAXS
errorMessagestring

错误信息

""
pipelineRunobject

流水线运行实例

creatorAccountIdstring

创建者阿里云账号 id

1111111111
createTimelong

创建时间

1586863220000
updateTimelong

更新时间

1586863220000
modifierAccountIdstring

更新人阿里云账号 id

11111111111
pipelineIdlong

流水线 Id

1234
pipelineRunIdlong

流水线运行实例 id

1
statusstring

状态 FAIL 运行失败 SUCCESS 运行成功 RUNNING 运行中

SUCCESS
triggerModeinteger
  • 触发模式

    1 人工触发

    2 定时触发

    3 代码提交触发

    5 流水线触发

    6WEBHOOK 触发

1
stageGrouparray

阶段拓扑信息

array

Group

string

阶段

阶段名称
sourcesobject []

代码源

signstring

代码源唯一标识

assaaaaaasasasa
typestring

代码库类型 Codeup codeup 代码源 aliyunGit 阿里云 code giteeGit 码云

Codeup
dataobject

代码源信息

branchstring

代码分支

master
commintstring

提交信息 JSON 数据

{}
repostring

代码库地址

http://codeup.aliyun.com/a.git
stagesobject []

阶段信息

namestring

阶段名称

Java构建
stageInfoobject

阶段详情

endTimelong

结束时间

1586863220000
startTimelong

开始时间

1586863220000
namestring

阶段名称

Java构建
statusstring

状态 FAIL 运行失败 SUCCESS 运行成功 RUNNING 运行中

RUNNING
jobsobject []

任务

endTimelong

结束时间

1586863220000
idlong

任务 Id

21212
namestring

任务名称

Java构建
paramsstring

触发参数

{}
statusstring

状态 FAIL 运行失败 SUCCESS 运行成功 RUNNING 运行中

RUNNING
startTimelong

开始时间

1586863220000
actionsobject []

后续操作,具体参考文档 https://help.aliyun.com/document_detail/2360596.html

typestring

参考文档 https://help.aliyun.com/document_detail/2360596.html

PassPipelineValidate
disableboolean

参考文档 https://help.aliyun.com/document_detail/2360596.html

true
paramsobject

参考文档 https://help.aliyun.com/document_detail/2360596.html

any
successboolean

true 接口调用成功,false 接口调用失败

true
errorCodestring

错误码

""

示例

正常返回示例

JSON格式

{
  "requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
  "errorMessage": "\"\"",
  "pipelineRun": {
    "creatorAccountId": "1111111111",
    "createTime": 1586863220000,
    "updateTime": 1586863220000,
    "modifierAccountId": "11111111111",
    "pipelineId": 1234,
    "pipelineRunId": 1,
    "status": "SUCCESS",
    "triggerMode": 1,
    "stageGroup": [
      [
        "阶段名称"
      ]
    ],
    "sources": [
      {
        "sign": "assaaaaaasasasa",
        "type": "Codeup",
        "data": {
          "branch": "master",
          "commint": "{}",
          "repo": "http://codeup.aliyun.com/a.git"
        }
      }
    ],
    "stages": [
      {
        "name": "Java构建",
        "stageInfo": {
          "endTime": 1586863220000,
          "startTime": 1586863220000,
          "name": "Java构建",
          "status": "RUNNING",
          "jobs": [
            {
              "endTime": 1586863220000,
              "id": 21212,
              "name": "Java构建",
              "params": "{}",
              "status": "RUNNING",
              "startTime": 1586863220000,
              "actions": [
                {
                  "type": "PassPipelineValidate",
                  "disable": true,
                  "params": {
                    "key": ""
                  }
                }
              ]
            }
          ]
        }
      }
    ]
  },
  "success": true,
  "errorCode": "\"\""
}

错误码

HTTP status code错误码错误信息描述
400InvalidParam.ParamNotPresentThe parameter is invalid.参数有误,请检查参数
400InvalidUser.NotFoundThe user that is invoking the API service is not a registered user.调用 API 的用户,未注册为云效用户
403Forbidden.UserNotInCurrentOrganizationThe user is not in the organization and is not authorized to perform the operation.当前用户不在该企业中,无权进行操作。
404InvalidOrganization.NotFoundThe organization is not found.企业不存在,请检查企业ID是否正确
404InvalidPipeline.NotFoundThe pipeline is not found.流水线不存在
404InvalidPipelineRun.NotFoundThe pipeline execution instance is not found.流水线运行实例不存在

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
暂无变更历史
  • 本页导读 (0)
文档反馈