
# 查询测试中心ETL数据列表 - QueryTesthubEtlDataList
#### 功能介绍
此接口用于查询测试中心ETL数据列表
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-testman/cloudtest_03_2000.html)。
#### URI
POST /v4/testhub/etl/query/data-list
#### 请求参数
表1请求Body参数 
| 参数                | 是否必选 | 参数类型    | 描述         |
|:---|:---|:---|:---|
| table_name        | 否    | String  | 需要查询的表名称   |
| is_bak            | 否    | Boolean | 是否是bak表数据  |
| start_time        | 否    | String  | 查询时间段起始时间  |
| end_time          | 否    | String  | 查询时间段截止时间  |
| filter_time_field | 否    | String  | 用于时间段过滤的字段 |
| sort_field        | 否    | String  | 用于排序的字段    |
| offset            | 否    | Integer | 分页偏移量      |
| limit             | 否    | Integer | 分页大小       |
| schema_no         | 否    | String  | 分库编号       |
| project_uuid      | 否    | String  | 项目UUID     |
   
#### 响应参数
**状态码：200**
表2响应Body参数 
| 参数     | 参数类型                                                                                                         | 描述               |
|:---|:---|:---|
| total  | Long                                                                                                         | 总数量              |
| values | Array of [queryResourceTableDataJson] objects | 查询测试中心ETL数据列表返回体 |
   
 表3queryResourceTableDataJson 
| 参数               | 参数类型   | 描述    |
|:---|:---|:---|
| uri              | String | 主键uri |
| BASEFIELDCHANGES | String | 字段变更  |
| tmssUpdateTime   | String | 更新时间  |
   
**状态码：400**
表4响应Body参数 
| 参数         | 参数类型   | 描述                                                                                                                                                                |
|:---|:---|:---|
| error_code | String | **参数解释** 接口调用失败错误码 **取值范围** 不涉及  |
| error_msg  | String | **参数解释** 接口调用失败错误信息 **取值范围** 不涉及 |
   
**状态码：500**
表5响应Body参数 
| 参数         | 参数类型   | 描述                                                                                                                                                                |
|:---|:---|:---|
| error_code | String | **参数解释** 接口调用失败错误码 **取值范围** 不涉及  |
| error_msg  | String | **参数解释** 接口调用失败错误信息 **取值范围** 不涉及 |
   
#### 请求示例
查询测试中心ETL数据列表
```
POST https://{endpoint}/v4/testhub/etl/query/data-list
{
  "table_name" : "TestItemData",
  "start_time" : "2024-01-01",
  "end_time" : "2024-01-31",
  "limit" : 100
}
```
#### 响应示例
**状态码：200**
OK
```
{
  "values" : [ {
    "uri" : "8584a4a1b89b4d468a27a531c8ebabae",
    "BASEFIELDCHANGES" : "[{\"fieldName\":\"testCaseNumber\",\"oldValue\":\"\",\"newValue\":\"10010\",\"oldKey\":\"\",\"newKey\":\"\",\"baseChangeColumn\":true},{\"fieldName\":\"rank\",\"oldValue\":\"\",\"newValue\":\"L2\",\"oldKey\":\"\",\"newKey\":\"2\",\"baseChangeColumn\":true},{\"fieldName\":\"name\",\"oldValue\":\"\",\"newValue\":\"样例接口用例\",\"oldKey\":\"\",\"newKey\":\"\",\"baseChangeColumn\":true},{\"fieldName\":\"statusName\",\"oldValue\":\"\",\"newValue\":\"新建\",\"oldKey\":\"\",\"newKey\":\"0\",\"baseChangeColumn\":false}]",
    "tmssUpdateTime" : "2022-08-06 09:37:26"
  }, {
    "uri" : "d7ad5ca7108441868006d472922f6f20",
    "BASEFIELDCHANGES" : "[{\"fieldName\":\"name\",\"oldValue\":\"\",\"newValue\":\"样例接口用例\",\"oldKey\":\"\",\"newKey\":\"\",\"baseChangeColumn\":true},{\"fieldName\":\"statusName\",\"oldValue\":\"\",\"newValue\":\"新建\",\"oldKey\":\"\",\"newKey\":\"0\",\"baseChangeColumn\":false},{\"fieldName\":\"testCaseNumber\",\"oldValue\":\"\",\"newValue\":\"10010\",\"oldKey\":\"\",\"newKey\":\"\",\"baseChangeColumn\":true},{\"fieldName\":\"rank\",\"oldValue\":\"\",\"newValue\":\"L2\",\"oldKey\":\"\",\"newKey\":\"2\",\"baseChangeColumn\":true}]",
    "tmssUpdateTime" : "2022-08-06 09:37:26"
  } ]
}
```
**状态码：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 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-testman/ErrorCode.html)。
