TableDeleting
Apply for Deleting Tables
Request address
POST
http://OmsAddress/app/newoms.php/webservice/business/table/deleting?cmd=10005&ip-type=webservicerest&access-token=AccessTokenVal
POST request parameter description
| Parameter name | Data type | Description | Whether the field is required | Remarks |
|---|---|---|---|---|
| app_id | integer | app id of the table to be deleted | Yes | |
| zone_id | integer | game zone id of the table to be deleted | Yes | |
| table_name | string | name of the table to be deleted | Yes | |
| auto_approve | Integer (0 or 1) | Whether to automatically approve the table-deleting application (the set where the table is located allows automatic approval of the table-deleting application) | No, the default is not auto-approval | |
| auto_exec_trans | Integer (0 or 1) | Whether to generate a table-deleting transaction after automatically approving the table-deleting application (the set where the table is located allows automatic execution of the table-deleting transaction, and auto_exec_trans=1 is valid only when auto_approve=1) | No, the default is not auto-execution | |
| attention_man | string | Separated by semicolon ";" and the maximum length of the field is 200,Interested people can perform this document task | No |
Data Parameters
Use json format to represent the record related information. The following is an example:
{
"app_id": 2,
"zone_id": 3,
"table_name": "test_table_generic_modify",
"auto_approve": 0,
"auto_exec_trans": 0
}
Return Syntax
Return Parameter Description
| Parameter name | Data type | Description | Remarks |
|---|---|---|---|
| apply | json | ret: indicates whether the application is successful. 0 indicates success; others indicate failure. msg: indicates the error message when ret is not equal to 0. info: indicates the form information for a successful deletion application, where uid represents the form id, which is required when approving the application | |
| check | json | ret: indicates whether the approval is successful. 0 indicates success; others indicate failure. msg: indicates the error message when ret is not equal to 0. info: where trans_id indicates the generated transaction to delete the table, set_id indicates the set where the transaction is located (the set where the table is located) |
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 "POST" -d '{
"app_id": 2,
"zone_id": 3,
"table_name": "test_table_generic_modify",
"auto_approve": 0,
"auto_exec_trans": 0
}' http://omsaddress/app/newoms.php/webservice/business/table/deleting?cmd=10005&ip-type=webservicerest&access-token=\
Return Example
Successful Return Example
Status of http request = 200
{
"apply": {
"ret": 0,
"msg": "success to apply delete table",
"info": {
"app_id": 2,
"app_name": "t_app",
"set_id": 126,
"zone_list": "3",
"table_name": "test_table_generic_modify",
"table_type": 0,
"estimated_write_load": 0,
"estimated_read_load": 0,
"type": "xml",
"table_maxnum": 0,
"write_time": "2017-03-02 22:10:55",
"apply_type": 1,
"key_avarage_record_size": 1,
"value_avarage_record_size": 1,
"compress": 0,
"active_record_num": "0",
"total_record_num": "3",
"memo": "",
"tdr": "-1",
"pcu": 1,
"relationship_chain_interval": 60,
"relationship_chain_count": 1,
"index_count": 1,
"read_index_interval": 60,
"read_index_count": 1,
"read_interval": 60,
"write_interval": 60,
"calc_resource_type": 2,
"dm_ratio": 5,
"user": "tcaplus",
"job_id": "43",
"id": 116
}
}
}
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"
}
{
"apply": {
"ret": -1,
"msg": "table_name: have applied for another table operation app:2 zone:3 table_name:test_table_generic_modify apply id:116 apply type:1 error type:1",
"info": null
}
}