查询check run列表,支持分页功能。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求语法
GET /api/v4/projects/check_runs/list_check_runs HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| organizationId |
string |
是 |
企业标识,也称企业 id,字符串形式,可在云效访问链接中获取,如 https://devops.aliyun.com/organization/【OrganizationId】 |
5ebbc0228123212b59xxxxx |
| accessToken |
string |
否 |
个人访问令牌。 使用阿里云 AK+SK 或使用 STS 临时授权方式不需要传该字段 |
f0b1e61db5961df5975a93f9129d2513 |
| repositoryIdentity |
string |
是 |
代码库 ID 或者全路径 |
2835387 或 codeup/codeup-demo |
| ref |
string |
是 |
分支名称、标签名称或者提交 ID |
40f4ccfe019cdd4a62d4acb0c57130106fc7e1be |
| page |
integer |
否 |
页码,默认值为 1,从第 1 页开始 |
1 |
| pageSize |
integer |
否 |
每页大小,默认值为 20,取值范围【1,100】 |
20 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| requestId |
string |
请求 ID |
ASSDS-ASSASX-XSAXSA-XSAXSAXS |
| success |
boolean |
调用是否成功 |
true |
| errorCode |
string |
错误码 |
SYSTEM_UNKNOWN_ERROR |
| errorMessage |
string |
错误信息 |
"" |
| result |
array<object> |
返回结果列表 |
|
|
array<object> |
返回结果 |
||
| id |
integer |
唯一标识 |
1 |
| createdAt |
string |
创建时间,采用 ISO 8601 格式并包含时区偏移。 |
2022-01-14T21:08:26+08:00 |
| updatedAt |
string |
更新时间,采用 ISO 8601 格式并包含时区偏移。 |
2022-01-14T21:08:26+08:00 |
| startedAt |
string |
开始时间 |
2023-03-15T08:00:00Z |
| completedAt |
string |
完结时间 |
2023-03-15T08:00:00Z |
| externalId |
string |
外部系统 ID |
42 |
| name |
string |
名称 |
my-check-ci |
| headSha |
string |
提交 ID |
40f4ccfe019cdd4a62d4acb0c57130106fc7e1be |
| status |
string |
状态
|
completed |
| conclusion |
string |
结论
|
success |
| detailsUrl |
string |
三方交互系统的详情地址,由用户自行决定,平台仅提供跳转能力 |
xxx |
| checkSuite |
object |
检查套件 |
|
| id |
integer |
检查套件 ID,唯一标识 |
1 |
| writer |
object |
写入人简要信息 |
|
| id |
string |
用户阿里云账号 ID |
xxx |
| type |
string |
写入人类型
|
User |
| name |
string |
写入人名称 |
test-codeup |
| slug |
string |
别名 |
test-codeup |
| logoUrl |
string |
写入人头像地址 |
xxx |
| output |
object |
页面展示信息 |
|
| title |
string |
UI 模块的标题(非 name) |
Mighty Readme report |
| summary |
string |
检查运行的摘要信息 说明
支持 markdown 格式;最大字符长度为 64KB,即 65535 个字符 |
摘要信息内容 |
| text |
string |
详情信息 说明
支持 markdown 格式;最大字符长度为 64KB,即 65535 个字符 |
详情信息内容 |
| images |
array<object> |
图片信息列表 说明
check run 支持在 output 的展示模块中,展示图片信息 |
|
|
object |
图片信息 |
||
| alt |
string |
alt 文本信息 |
test-image-alt |
| imageUrl |
string |
图片地址,须确保能够有效访问,否则页面无法展示 |
xxx |
| caption |
string |
图片信息的简要描述 |
test |
| annotations |
array<object> |
检查注释列表 |
|
|
object |
检查注释 |
||
| id |
integer |
检查注释 ID,唯一标识 |
11806 |
| path |
string |
文件路径 |
demo/test.txt |
| startLine |
integer |
起始行 说明
从 1 开始;需要用户自行确保文件行数的有效性,否则无法展示 |
1 |
| endLine |
integer |
结束行 |
2 |
| startColumn |
integer |
起始列 说明
当且仅当 startLine=endLine 时,该字段值有效 |
3 |
| endColumn |
integer |
结束列 说明
当且仅当 startLine=endLine 时,该字段值有效 |
5 |
| annotationLevel |
string |
检查注释的等级
|
warning |
| message |
string |
简要描述信息 |
回写检查注释的简要描述信息 |
| title |
string |
检查注释的标题 |
检查注释的标题 |
| rawDetails |
string |
详情信息,限制 64KB 以内的大小 |
详情信息 |
示例
正常返回示例
JSON格式
{
"requestId": "ASSDS-ASSASX-XSAXSA-XSAXSAXS",
"success": true,
"errorCode": "SYSTEM_UNKNOWN_ERROR",
"errorMessage": "\"\"",
"result": [
{
"id": 1,
"createdAt": "2022-01-14T21:08:26+08:00\n",
"updatedAt": "2022-01-14T21:08:26+08:00\n",
"startedAt": "2023-03-15T08:00:00Z\n",
"completedAt": "2023-03-15T08:00:00Z\n",
"externalId": "42",
"name": "my-check-ci\n",
"headSha": "40f4ccfe019cdd4a62d4acb0c57130106fc7e1be",
"status": "completed",
"conclusion": "success",
"detailsUrl": "xxx",
"checkSuite": {
"id": 1
},
"writer": {
"id": "xxx",
"type": "User",
"name": "test-codeup\n",
"slug": "test-codeup\n",
"logoUrl": "xxx"
},
"output": {
"title": "Mighty Readme report\n",
"summary": "摘要信息内容",
"text": "详情信息内容",
"images": [
{
"alt": "test-image-alt\n",
"imageUrl": "xxx",
"caption": "test"
}
]
},
"annotations": [
{
"id": 11806,
"path": "demo/test.txt\n",
"startLine": 1,
"endLine": 2,
"startColumn": 3,
"endColumn": 5,
"annotationLevel": "warning",
"message": "回写检查注释的简要描述信息\n",
"title": "检查注释的标题",
"rawDetails": "详情信息\n"
}
]
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。