请求地址
/v2/webservice/table/table-list
请求方法
Post
请求参数说明
| 参数名称 | 类型 | 是否必填 | 说明 | 版本要求 | |
|---|---|---|---|---|---|
| app_id | number | 否 | 业务ID | ||
| table_name | string | string[] | 否 | 表名, 单个和多个都是模糊查询 | |
| is_fuzzy_table_name | boolean | 否 | 表名是精确查找还是模糊查找, 默认精确查找 | 1.15.0 | |
| zone_id | number | number[] | 否 | 区ID | |
| periodically_cleanup_status | 0 | 1 | 否 | 周期性清理 (1表示开启 0表示未开启) | |
| data_expire_status | 0 | 1 | 否 | 数据淘汰 (1表示开启 0表示未开启) | |
| slave_read_status | 0 | 1 | 否 | 读分流 (1表示开启 0表示未开启) | |
| syncdb_type | number | 否 | 过滤缓写开启的情况0: 未开启-1:开启1:开启/MYSQL3:开启/GCS4:开启/GLOBAL_INDEX5:开启/SO_FILE6:开启/KAFKA} |
注意 默认30条每页, 可以设置infinite=true返回全部数据
分页 https://iwiki.woa.com/p/4012353821#分页参数说明
排序 https://iwiki.woa.com/p/4012353821#分页参数说明
示例:查询区下的所有表
{
"app_id":4,
"zone_id": 1,
"infinite": true
}
示例:查询单个表
{
"app_id":4,
"zone_id": 1,
"table_name": "game_players"
}
返回参数data字段说明
| 参数名称 | 类型 | 说明 |
|---|---|---|
| list | 对象数组 | 表信息列表 |
| total | number | 总数 |
参数data.list字段说明
| 参数名称 | 类型 | 说明 |
|---|---|---|
| set_id | 集群ID | |
| set_name | 集群名称 | |
| app_id | 业务ID | |
| app_name | 业务名称 | |
| zone_id | 区ID | |
| zone_name | 区名称 | |
| table_name | 表名 | |
| key_fields | string | 表结构key字段, JSON格式的字符串 |
| value_fields | string | 表结构value字段, JSON格式的字符串 |
| xml | string | 表文件ID, 多个使用分号隔开 |
| create_date | 创建日期 | |
| read_only | 读写情况 | |
| engine_parameters | 引擎参数 | |
| compress | 是否开启压缩 | |
| fmt_type | 加表类型 | |
| slave_read_date | 读分流相关配置 | |
| slave_read_hour | 读分流相关配置 | |
| slave_read_level | 读分流相关配置 | |
| slave_read_ratio | 读分流相关配置 | |
| slave_read_retry | 读分流相关配置 | |
| idl_md5 | 表文件MD5 | |
| ext_idl_md5 | pb类型的表才有此字段 | |
| modify_date | 修改日期 | |
| dbcluster_info | 缓写、全局索引相关配置 | |
| status | number 0: 不可用, 1: 可用 | 表状态,(加表事务未完成,状态为0), |
| table_type | 0: generice 1 : list | 表类型 |
| table_maxnum | number | list表长度,当table_type为list的情况时有用 |
| data_expiration | 数据淘汰相关配置 | |
| syncdb_type | number | 缓写类型0: 未开启1:开启/MYSQL3:开启/GCS4:开启/GLOBAL_INDEX5:开启/SO_FILE6:开启/KAFKA |
| slave_read_status | 0 未开启, 1 开启 | 读分流是否开启 |
| data_expire_status | 0 未开启, 1 开启 | 数据淘汰是否开启 |
| periodically_cleanup_status | 0 未开启, 1 开启 | 周期性淘汰是否开启 |
成功返回
{
"code": 0,
"request_id": "1eb13f31-45fe-4e1f-ba36-72beba1cc186",
"data": {
"list": [
{
"slave_read_status": 1,
"data_expire_status": 0,
"periodically_cleanup_status": 0,
"set_id": 1,
"app_id": 5,
"zone_id": 1,
"table_name": "GenericTableDemo",
"fmt_type": "tdr",
"table_type": 0,
"table_maxnum": 0,
"status": 1,
"create_date": "2025-07-17T06:53:47.000Z",
"dm_ratio": 5,
"real_volume": 10,
"estimated_read_load": 1,
"estimated_write_load": 1,
"read_only": 0,
"compress": 1,
"syncdb_config": "",
"dbcluster_info": "",
"slave_read_date": -1,
"slave_read_hour": -1,
"slave_read_ratio": 50,
"slave_read_level": 1,
"data_expiration": "",
"data_protocol_type": "TBD",
"periodically_cleanup_table_config": "",
"syncdb_type": 0,
"write_ulog_mode": 0,
"modify_date": "2025-07-22T08:04:28.000Z",
"xml": "32466",
"memo": "omsv2 add table",
"task_id": 0,
"apply_id": 0,
"engine_parameters": "bnum=100000#xmsiz=60000000#xikmsiz=26000000#kapow=6#vapow=6#lnum=2",
"max_read_rate": 0,
"max_write_rate": 0,
"uid": 15594,
"key_fields": "{\"Num\":1,\"KeyField\":[{\"Name\":\"uin\",\"Type\":\"uint32\",\"MaxLen\":4}]}",
"value_fields": "{\"Num\":5,\"ValueField\":[{\"Name\":\"name\",\"Type\":\"string\",\"MaxLen\":1024,\"Default\":\"\"},{\"Name\":\"age\",\"Type\":\"uint32\",\"MaxLen\":4,\"Default\":\"\"},{\"Name\":\"score1\",\"Type\":\"float\",\"MaxLen\":4,\"Default\":\"\"},{\"Name\":\"score2\",\"Type\":\"uint32\",\"MaxLen\":4,\"Default\":\"\"},{\"Name\":\"score3\",\"Type\":\"double\",\"MaxLen\":8,\"Default\":\"\"}]}",
"sort_field_num": 0,
"sort_rule": 0,
"zone_name": "不删表和清表_TDR",
"app_name": "正式测试项目_project",
"set_name": "test_set"
}
],
"total": 5
}
}
失败返回
{
"request_id": "0e42d5d8-27f4-41f8-9966-ea61039355ee",
"code": 104,
"message": "项目不存在,app_id:500000",
"debug_message": {
"app_id": 500000
}
}