TableListByZone
Get Table List under the Zone
Request address
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 request parameter description
| Parameter name | Data type | Description | Whether the field is required | Remarks |
|---|---|---|---|---|
| set_id | integer | Set id of a game zone | Yes | |
| app_id | integer | App id of a zone | Yes | |
| zone_id | integer | Zone id | Yes |
Return Syntax
Return Parameter Description
When the returned status code is not 200, it indicates that the addition was unsuccessful, and the returned data is error information
When the returned status code is 200, it means the transaction was successful, where success means the information of the zone that was successfully deleted, and failed means the information of the zone that failed to be deleted.
Request Example
Send A Request through the Curl Method
For the parameters in the command, please refer to the "Description of POST Request Parameters" on this page. For the method to obtain access-token, see: Get access-token
curl -H "Content-type: application/json" -X "GET" 'http://omsaddress/app/newoms.php/webservice/business/table-list-by-zone/%3Cset_id%3E/%3Capp_id%3E/%3Czone_id%3E?cmd=10006&ip-type=webservicerest&access-token=\
'
Return Example
Successful Return Example
Status of http request = 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"
}
]
Parameter Description of Successful Return | Parameter name | Data type | Description | | -------- | -------- | -------- | -------- | | set_id | Integer | set id of the game zone | | app_id | Integer | app id of the zone | | zone_id | Integer | game zone id | | table_name | string | table name | | fmt_type | string | table structure file type (file type for adding table)|
| shard_factors | string | split table key|
| table_type | string | table type, 0 indicates a generic table, 1 indicates a list table|
| table_maxnum | string | maximum number of records in a list table. This parameter is valid when the table type is list|
| key_fields | string | key field description of the table|
| value_fields | string | value field description of the table|
| dm_ratio | Integer | obsolete field, no need to pay attention|
| create_date | string | table creation time|
| modify_date | string | table modification time|
Failed Return Example
Status of http request != 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"
]
}