【TcaplusDB知识库】如何查询zone下的表的信息
请求地址
GET http://OmsAddress/app/newoms.php/webservice/business/table-list-by-zone/<set_id>/<app_id>/<zone_id>?cmd=10006&ip-type=webservicerest&access-token=AccessTokenVal
GET请求参数说明
返回语法
返回参数说明
- 返回状态码不为200时,表示添加zone失败,返回数据为错误信息
- 返回状态码为200,表示事务成功,其中表示修改删除成功的zone的信息、failed表示删除失败的zone的信息
请求示例
通过 curl 方法发起请求
命令中的红色部分是需要用户自行填写的参数,请参阅
curl -H "Content-type: application/json" -X "GET" <access-token>
返回示例
成功返回示例
http请求的Status=200
[
{
"set_id": 1,
"app_id": 2,
"zone_id": 3,
"table_name": "test_table",
"fmt_type": "tdr",
"shard_factors": "TimeKey",
"table_type": 0,
"table_maxnum": 0,
"key_fields": "{"Num":2,"KeyField":[{"Name":"TimeKey","Type":"uint32","MaxLen":4},{"Name":"GameSvrID","Type":"int32","MaxLen":4}]}",
"value_fields": "{"Num":4,"ValueField":[{"Name":"GameAppID","Type":"string","MaxLen":64,"Default":""},{"Name":"OnlineCntIOS","Type":"uint32","MaxLen":4,"Default":"0"},{"Name":"OnlineCntAndroid","Type":"uint32","MaxLen":4,"Default":"0"},{"Name":"strstr","Type":"string","MaxLen":4096,"Default":""}]}",
"dm_ratio": 5,
"create_date": "2021-06-25 10:38:55",
"modify_date": "0000-00-00 00:00:00"
}
]
错误返回
http请求的Status!=200
{
"name": "Unauthorized",
"message": "You are requesting with an invalid credential.",
"code": 0,
"status": 401,
"type": "yii\web UnauthorizedHttpException"
}
{
"app_id": [
"ip(10.29.89.53) not in whitelist to get table list (cmd:10006) of set_id:126 app_id:3"
]
}
TcaplusDB是腾讯出品的分布式NoSQL数据库,存储和调度的代码完全自研。具备缓存+落地融合架构、PB级存储、毫秒级时延、无损水平扩展和复杂数据结构等特性。同时具备丰富的生态、便捷的迁移、极低的运维成本和五个九高可用等特点。客户覆盖游戏、互联网、政务、金融、制造和物联网等领域。
