可以获取流水线的运行历史

调试

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

请求参数

名称 类型 是否必选 示例值 描述
Action String GetPipelineInstHistory

系统规定参数。取值:GetPipelineInstHistory。

OrgId String 5ebbc0228123212b59xxxxx

企业标识,也称企业id,字符串形式,可在云效访问链接中获取,如

https://devops.aliyun.com/organization/【OrgId】

PageSize Long 10

每页数据大小,最大值为20

PageStart Long 0

起始记录索引,从0开始.pageStart=(pageNum-1)*pageSize

PipelineId Long 123

流水线ID,可在流水线链接中获取,如

https://flow.aliyun.com/pipelines/【PipelineId】/current

StartTime String 2020-12-08 08:00:00

流水线开始运行时间区间起点,如2020-12-08 08:00:00

UserPk String 1234354314543321

用户pk,非必填,只有调用接口使用的ak和用户pk不一致时,才需要

EndTime String 2020-12-20 08:00:00

流水线开始运行时间区间结束点,如2020-12-20 08:00:00

返回数据

名称 类型 示例值 描述
Data Struct

运行历史数据

DataList Array of PipelineInst

运行历史列表

CreateTime Long 1607448066000

运行开始时间

Creator String 5e6f6c1403283833284xxxx

运行人

Deletion String N

N未删除,Y已删除

FlowInstId Integer 1234

流水线运行实例ID

FlowInstance Struct

运行实例信息

AutoDrivenStatus Boolean true

自动运行

CreateTime Long 1607448066000

运行开始时间

Creator String 5e6f6c1403283833284xxxx

运行人

Groups Array of Group

分组

CreateTime Long 1607448066000

运行时间

Creator String 5e6f6c1403283833284xxxx

运行人

DeleteStatus String N

N 未删除

EndTime Long 1607448066000

结束时间

FlowInstId Integer 1234

运行实例id

Id Integer 123

id

IdExtent Integer 0

0

Modifier String 5e6f6c1403283833284xxxx

修改人

ModifyTime Long 1607448066000

结束时间

Name String java构建

分组名称

ResultStatus String SUCCESS

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

StartTime Long 1607448066000

开始时间

Status String SUCCESS

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

Id Integer 122

123

Modifier String 5e6f6c1403283833284xxxx

修改人

ModifyTime Long 1607448066000

运行结束时间

Result Struct

结果

Caches String "[]"

缓存信息

DateTime String 1607448066000

时间戳

EnginePipelineId Integer 12

流水线id

EnginePipelineInstId Integer 123

流水线实例id

EnginePipelineName String 流水线1

流水线名称

EnginePipelineNumber Integer 1

流水线实例构建号

MixFlowInstId String 1

1

Sources String ”[]“

代码信息

TimeStamp String 1607448066000

运行的时间戳

TriggerMode String 1

1 手动触发 2定时触发 3代码提交触发

ResultStatus String SUCCESS

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

RunningStatus String SUCCESS

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

StageTopo String [ [ "Group0-Stage0" ] ]

阶段列表

Stages Map {}

阶段信息

Status String SUCCESS

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

StatusName String 已完成

运行状态

SystemCode String AONE

AONE

SystemId String 1198382

1198382

Id Integer 12345

历史id

InstNumber Integer 1

构建号

Modifier String 5e6f6c1403283833284xxxx

修改人

ModifyTime Long 1607448066000

运行结束时间

Packages String []

构建包信息

PipelineConfigId Integer 123

流水线配置id

PipelineId Integer 1234

流水线id

Status String SUCCES

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

StatusName String 已完成

流水线运行状态

TriggerMode Integer 1

触发模式 1人工触发 2定时触发 3代码提交触发

Total Integer 10

运行历史总数

ErrorCode String ""

错误码

ErrorMessage String ""

错误信息

RequestId String ASSDS-ASSASX-XSAXSA-XSAXSAXS

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

Success Boolean true

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

示例

请求示例

http(s)://[Endpoint]/?Action=GetPipelineInstHistory
&OrgId=5ebbc0228123212b59xxxxx
&PageSize=10
&PageStart=0
&PipelineId=123
&StartTime=2020-12-08 08:00:00
&<公共请求参数>

正常返回示例

JSON格式

{"RequestId":"ASSDS-ASSASX-XSAXSA-XSAXSAXS","Data":{"Total":"10","DataList":[{"Status":"SUCCES","ModifyTime":"1607448066000","CreateTime":"1607448066000","StatusName":"已完成","TriggerMode":"1","Creator":"5e6f6c1403283833284xxxx","Packages":"","Deletion":"N","PipelineId":"1234","Id":"12345","Modifier":"5e6f6c1403283833284xxxx","FlowInstId":"1234","PipelineConfigId":"123","InstNumber":"1","FlowInstance":{"Status":"SUCCESS","ModifyTime":"1607448066000","ResultStatus":"SUCCESS","Stages":"{}","SystemCode":"AONE","CreateTime":"1607448066000","SystemId":"1198382","StatusName":"已完成","Creator":"5e6f6c1403283833284xxxx","AutoDrivenStatus":"true","RunningStatus":"SUCCESS","StageTopo":"[             [               \"Group0-Stage0\"             ]           ]","Id":"122","Modifier":"5e6f6c1403283833284xxxx","Groups":[{"Status":"SUCCESS","IdExtent":"0","ModifyTime":"1607448066000","EndTime":"1607448066000","ResultStatus":"SUCCESS","CreateTime":"1607448066000","StartTime":"1607448066000","Id":"123","DeleteStatus":"N","Creator":"5e6f6c1403283833284xxxx","Modifier":"5e6f6c1403283833284xxxx","FlowInstId":"1234","Name":"java构建"}],"Result":{"MixFlowInstId":"1","EnginePipelineId":"12","EnginePipelineName":"流水线1","TriggerMode":"1","Caches":"\"[]\"","Sources":"”[]“","TimeStamp":"1607448066000","DateTime":"1607448066000","EnginePipelineInstId":"123","EnginePipelineNumber":"1"}}}]},"ErrorCode":"\"\"","ErrorMessage":"\"\"","Success":"true"}

错误码

HttpCode 错误码 错误信息 描述
404 InvalidPipeline.NotFound The specified pipeline does not exist. 未找到流水线
404 InvalidUser.NotFound The specified user does not exist. 用户数据有误,未找到该用户
400 InvalidUser.UserNotInCurrentOrganization The user does not belong to the specified organization. 当前用户不属于该企业
500 SystemError.UnKnownError An error occurred while processing your request. 系统未知异常
404 InvalidOrganization.NotFound The specified organization doe not exist. 企业信息有误,未找到该企业

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