文档首页/ 测试计划 CodeArts TestPlan/ API参考/ API/ 报告与看板管理/ V5页面报表展示 异步 - V5AsyncGetReportList
更新时间:2026-06-12 GMT+08:00
分享

V5页面报表展示 异步 - V5AsyncGetReportList

功能介绍

此接口用于V5版本页面报表展示,支持异步查询

调用方法

请参见如何调用API

URI

GET /v5/{project_id}/versions/{version_uri}/custom-reports

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目UUID,项目唯一标识,固定长度32位字符(字母和数字)。获取方式请参见获取项目ID

version_uri

String

参数解释

版本URI

表2 Query参数

参数

是否必选

参数类型

描述

type

String

参数解释

报表类型 1:首页用例库,2:质量报告

page_no

Integer

参数解释

页码

默认取值

1

默认取值:

1

page_size

Integer

参数解释

每页数量

取值范围

1-200

请求参数

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

total

Integer

符合条件的所有记录数

value

Array of CustomReportListVo objects

自定义报表列表

reason

String

错误信息

page_size

Integer

每页展示条数

page_no

Integer

页码

has_more

Boolean

是否有更多

表4 CustomReportListVo

参数

参数类型

描述

id

String

报表ID

name

String

报表名称

workpiece_type

String

工件类型(用例:case,测试套:task)

analysis_dimension

String

分析维度

compare_dimension

String

对比维度

chart_data

Array of ReportChartDataVo objects

报表图表数据

filter

ReportFilter object

过滤条件

表5 ReportChartDataVo

参数

参数类型

描述

name

String

图表数据名称

value

Number

图表数据值

表6 ReportFilter

参数

参数类型

描述

version_uri

String

版本URI

iterator_uri

String

迭代URI

状态码:400

表7 响应Body参数

参数

参数类型

描述

error_code

String

参数解释

接口调用失败错误码

取值范围

不涉及

error_msg

String

参数解释

接口调用失败错误信息

取值范围

不涉及

状态码:500

表8 响应Body参数

参数

参数类型

描述

error_code

String

参数解释

接口调用失败错误码

取值范围

不涉及

error_msg

String

参数解释

接口调用失败错误信息

取值范围

不涉及

请求示例

V5页面报表展示

GET https://{endpoint}/v5/{project_id}/versions/{version_uri}/custom-reports?type=1&page_no=1&page_size=20

{
  "project_id" : "098ad17656684cc5a49a4f7007517f95",
  "version_uri" : "version-001",
  "type" : "1",
  "page_no" : 1,
  "page_size" : 20
}

响应示例

状态码:200

OK

{
  "total" : 2,
  "value" : [ {
    "report_uri" : "report-001",
    "report_name" : "首页用例统计",
    "report_type" : "1",
    "created_at" : 1700000000000
  }, {
    "report_uri" : "report-002",
    "report_name" : "质量分析报告",
    "report_type" : "2",
    "created_at" : 1700100000000
  } ],
  "reason" : ""
}

状态码:400

Bad Request

{
  "error_code" : "CLOUDTEST.00000001",
  "error_msg" : "返回的错误信息"
}

状态码:500

Internal Server Error

{
  "error_code" : "CLOUDTEST.00000001",
  "error_msg" : "返回的错误信息"
}

状态码

状态码

描述

200

OK

400

Bad Request

500

Internal Server Error

错误码

请参见错误码

相关文档