# 查询任务集 - ShowTaskSet
#### 功能介绍
查询任务集
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/CPTS/doc?api=ShowTaskSet)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-cpts/cpts_api_0019.html)。
- 如果使用身份策略授权，需具备如下身份策略权限。
  
  | 授权项                                    | 访问级别 | 资源类型（\*为必须） | 条件键                       | 别名 | 依赖的授权项 |
  |:---|:---|:---|:---|:---|:---|
  | codeartsperftest:cpts:listPerfTestTask | List | cpts \*     | g:ResourceTag/\<tag-key\> | -  | -      |
     
  
 
#### URI
GET /v1/{project_id}/all-tasks/{test_suite_id}
表1路径参数 
| 参数            | 是否必选 | 参数类型    | 描述                                                                              |
|:---|:---|:---|:---|
| project_id    | 是    | String  | 表示项目ID，参见[获取方法说明](https://support.huaweicloud.com/api-cpts/cpts_api_0017.html)。 |
| test_suite_id | 是    | Integer | 测试工程ID，通过"创建工程"接口获取响应体中的project_id字段的值。                                         |
   
表2Query参数 
| 参数     | 是否必选 | 参数类型    | 描述   |
|:---|:---|:---|:---|
| offset | 否    | Integer | 查询偏移 |
| limit  | 否    | Integer | 查询数量 |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数      | 参数类型                                                 | 描述      |
|:---|:---|:---|
| code    | String                                               | 响应码     |
| extend  | Array of strings                                     | 扩展信息    |
| message | String                                               | 响应消息    |
| tasks   | Array of [Task] objects | 工程集详细信息 |
   
 表4Task 
| 参数               | 参数类型                                                     | 描述          |
|:---|:---|:---|
| bench_concurrent | Integer                                                  | 基准并发        |
| description      | String                                                   | 描述信息        |
| id               | Integer                                                  | 任务ID        |
| name             | String                                                   | 任务名称        |
| operate_mode     | Integer                                                  | 任务压测模式      |
| task_run_info    | [TaskRunInfo] object | 任务运行信息      |
| update_time      | String                                                   | 更新时间        |
| parallel         | Boolean                                                  | 任务间用例是否并行执行 |
   
 表5TaskRunInfo 
| 参数       | 参数类型    | 描述                    |
|:---|:---|:---|
| id       | Integer | 报告ID                  |
| run_type | Integer | 任务类型（0：旧版本任务；1：新版本任务） |
   
**状态码：501**
表6响应Body参数 
| 参数 | 参数类型   | 描述               |
|:---|:---|:---|
| -  | String | response message |
   
#### 请求示例
查询id为1的工程，关联的任务集合。
```
/v1/{project_id}/all-tasks/1
```
#### 响应示例
**状态码：200**
```
{
  "code" : "SVCSTG.CPTS.0000000",
  "extend" : [ ],
  "message" : "success",
  "tasks" : [ {
    "bench_concurrent" : 100,
    "description" : "",
    "id" : 52631,
    "name" : "task1",
    "operate_mode" : 2,
    "parallel" : true,
    "task_run_info" : {
      "id" : 0,
      "run_type" : 0
    },
    "update_time" : "2022-01-05T11:16:08.415954+08:00"
  }, {
    "bench_concurrent" : 100,
    "description" : "",
    "id" : 52621,
    "name" : "task2",
    "operate_mode" : 2,
    "parallel" : true,
    "task_run_info" : {
      "id" : 0,
      "run_type" : 0
    },
    "update_time" : "2021-12-31T15:43:53.014385+08:00"
  } ]
}
```
#### 状态码
| 状态码 | 描述            |
|:---|:---|
| 200 | success       |
| 501 | unknown error |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-cpts/ErrorCode.html)。
