查询流水线列表
功能介绍
此API用于查看流水线列表。
URI
GET /cpepipeline/v2/pipelines
请求消息
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
Content-Type | 是 | String | 消息体的类型(格式),默认取值为“application/json;charset=utf8”。 |
X-Auth-Token | 是 | String | 调用接口的认证方式分为Token和AK/SK两种,如果您使用的Token方式,此参数为必填,请填写Token的值。Token获取方式,请参考获取用户Token。 |
响应消息
参数 | 参数类型 | 描述 |
|---|---|---|
[数组元素] | Array of objects | 流水线列表,详情请见表3。 |
参数 | 参数类型 | 描述 |
|---|---|---|
id | String | 流水线ID。 |
name | String | 流水线名称。 |
description | String | 流水线描述。 |
createdTime | Integer | 流水线创建时间。 |
updatedTime | Integer | 流水线更新时间。 |
version | Integer | 流水线版本。 |
configMode | String | 流水线创建类型。 |
creator | Integer | 流水线创建者。 |
modelVersion | Integer | 流水线模型版本。 |
status | String | 流水线状态。 |
lastTriggerAt | Integer | 流水线最后执行时间。 |
enterpriseProjectId | String | 企业项目ID。 |
enterpriseProject | String | 企业项目名称。 |
extendInfo | Object | 扩展信息。详情请见表4。 |
参数 | 参数类型 | 描述 |
|---|---|---|
id | Integer | 流水线执行ID。 |
pipelineId | String | 流水线ID。 |
version | Integer | 流水线执行版本。 |
status | Integer | 流水线执行状态 |
stageStates | Array of objects | 最后一次执行的阶段状态,详情请见表6。 |
参数 | 参数类型 | 描述 |
|---|---|---|
name | String | 阶段名称。 |
approvalStatus | Integer | 审批状态。 |
status | Integer | 状态。 |
taskStates | Array of objects | 最后一次执行任务状态,详情请见表7。 |
请求示例
无
响应示例
[
{
"id": "c4f1a0cb-49d7-4e62-b4d0-a922f638c867",
"name": "vvasd",
"description": "",
"createdTime": 1753083611515,
"updatedTime": 1753083611515,
"version": 1,
"configMode": "ui",
"creator": "zhangyuhao",
"modelVersion": 1,
"status": 1,
"lastTriggerAt": 0,
"enterpriseProjectId": "0",
"enterpriseProject": null,
"extendInfo": {
"latestPipelineState": {
"id": 0,
"pipelineId": "c4f1a0cb-49d7-4e62-b4d0-a922f638c867",
"version": 1,
"status": 1,
"stageStates": [
{
"name": "Artifacts",
"approvalStatus": 0,
"status": 1,
"taskStates": [
{
"name": "ghy-test-comp-0626-3-62e353",
"displayName": "Empty",
"progress": 0,
"status": 1,
"orderIndex": 0
}
]
},
{
"name": "Environments",
"approvalStatus": 0,
"status": 1,
"taskStates": []
}
]
}
}
}
] 状态码
状态码 | 描述 |
|---|---|
200 | 操作成功。 |
400 | 错误的请求。 |
404 | 请求对象不存在。 |
500 | 内部错误。 |
错误码
请参考ServiceStage错误码。

