更新时间:2025-12-01 GMT+08:00

查询事务集 - ShowTempSet

功能介绍

查询事务集

授权信息

账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。

  • 如果使用角色与策略授权,具体权限要求请参见权限和授权项
  • 如果使用身份策略授权,需具备如下身份策略权限。

    授权项

    访问级别

    资源类型(*为必须)

    条件键

    别名

    依赖的授权项

    codeartsperftest:cpts:getPerfTestProject

    Read

    cpts *

    g:ResourceTag/<tag-key>

    -

    -

URI

GET /v1/{project_id}/all-templates/{test_suite_id}

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

表示项目ID,参见获取方法说明

test_suite_id

Integer

测试工程ID,通过“创建工程”接口获取响应体中的project_id字段的值。

表2 Query参数

参数

是否必选

参数类型

描述

offset

Integer

查询偏移

limit

Integer

查询数量

请求参数

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

code

String

响应码

message

String

响应消息

temps

Array of TempDetailInfo objects

temps

表4 TempDetailInfo

参数

参数类型

描述

description

String

描述

id

Integer

事务ID,通过“创建事务”接口获取响应体中的tempId字段的值。

is_quoted

Boolean

是否被引用

name

String

事务名称

temp_type

Integer

事务类型(已弃用,兼容性保留)

update_time

String

更新时间

状态码:501

表5 响应Body参数

参数

参数类型

描述

-

String

response message

请求示例

查询事务集,事务所属工程ID是1。

/v1/projectId/all-templates/1

{
  "code" : "SVCSTG.CPTS.0000000",
  "message" : "success",
  "temps" : [ {
    "description" : "",
    "id" : 155175,
    "is_quoted" : false,
    "name" : "test",
    "temp_type" : 0,
    "update_time" : "2023-06-16T15:49:19.128871+08:00"
  } ]
}

响应示例

状态码:200

success

{
  "code" : "SVCSTG.CPTS.0000000",
  "message" : "success",
  "temps" : [ {
    "description" : "",
    "id" : 114448,
    "is_quoted" : false,
    "name" : "temp1",
    "temp_type" : 0,
    "update_time" : "2022-07-20T17:49:20.984763+08:00"
  }, {
    "description" : "",
    "id" : 115964,
    "is_quoted" : false,
    "name" : "temp2",
    "temp_type" : 0,
    "update_time" : "2022-07-20T17:38:12.696491+08:00"
  } ]
}

状态码

状态码

描述

200

success

501

unknown error

错误码

请参见错误码