可以获取流水线运行实例列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
GET /organization/{organizationId}/pipelines/{pipelineId}/pipelineRuns HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| organizationId |
string |
是 |
企业标识,也称企业 id,字符串形式,可在云效访问链接中获取,如 https://devops.aliyun.com/organization/【OrganizationId】 |
5ebbc0228123212b59xxxxx |
| pipelineId |
integer |
是 |
流水线 ID,可在流水线链接中获取,如 https://flow.aliyun.com/pipelines/【PipelineId】/current |
1233 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| startTime |
integer |
否 |
开始时间,使用 Unix 时间戳,单位为毫秒。 |
1586863220000 |
| endTime |
integer |
否 |
结束时间,使用 Unix 时间戳,单位为毫秒。 |
1586863220000 |
| status |
string |
否 |
状态 FAIL 运行失败 SUCCESS 运行成功 RUNNING 运行中 |
RUNNING |
| maxResults |
integer |
否 |
最大返回数量 |
20 |
| nextToken |
string |
否 |
分页 token |
aaaaaa |
| triggerMode |
integer |
否 |
|
1 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| requestId |
string |
请求 id,每次请求都是唯一值,便于后续排查问题 |
ASSDS-ASSASX-XSAXSA-XSAXSAXS |
| errorMessage |
string |
错误信息 |
”“ |
| errorCode |
string |
错误码 |
”“ |
| success |
boolean |
true 接口调用成功,false 接口调用失败 |
true |
| totalCount |
integer |
总数 |
50 |
| nextToken |
string |
下一个分页 token,为空时,表示没有下一页 |
xzxsasasaas |
| pipelineRuns |
array<object> |
流水线运行实例 |
|
|
object |
|||
| pipelineId |
integer |
流水线 id |
1234 |
| startTime |
integer |
开始时间,使用 Unix 时间戳,单位为毫秒。 |
1586863220000 |
| creatorAccountId |
string |
运行人阿里云账号 id |
1222222222 |
| endTime |
integer |
结束时间,使用 Unix 时间戳,单位为毫秒。 |
1586863220000 |
| pipelineRunId |
integer |
流水线实例 id |
11 |
| triggerMode |
integer |
|
1 |
| status |
string |
运行状态 |
状态 FAIL 运行失败 SUCCESS 运行成功 RUNNING 运行中 |
示例
正常返回示例
JSON格式
{
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
"errorMessage": "”“",
"errorCode": "”“",
"success": true,
"totalCount": 50,
"nextToken": "xzxsasasaas",
"pipelineRuns": [
{
"pipelineId": 1234,
"startTime": 1586863220000,
"creatorAccountId": "1222222222",
"endTime": 1586863220000,
"pipelineRunId": 11,
"triggerMode": 1,
"status": "状态 FAIL 运行失败 SUCCESS 运行成功 RUNNING 运行中"
}
]
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParam.ParamNotPresent | The parameter is invalid. | 参数有误,请检查参数 |
| 400 | InvalidUser.NotFound | The user that is invoking the API service is not a registered user. | 调用 API 的用户,未注册为云效用户 |
| 403 | Forbidden.UserNotInCurrentOrganization | The user is not in the organization and is not authorized to perform the operation. | 当前用户不在该企业中,无权进行操作。 |
| 404 | InvalidOrganization.NotFound | The organization is not found. | 企业不存在,请检查企业ID是否正确 |
| 404 | InvalidPipeline.NotFound | The pipeline is not found. | 流水线不存在 |
| 404 | InvalidPipelineRun.NotFound | The pipeline execution instance is not found. | 流水线运行实例不存在 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。