TableModify

Apply for Modifying Tables

Request address

POST
http://OmsAddress/app/newoms.php/webservice/business/table/modify?cmd=10003&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 modified Yes
zone_id integer game zone id of the table to be modified Yes
table_name string name of the table to be modified Yes
auto_approve Integer (0 or 1) Whether to automatically approve the table-modifying application (the set where the table is located allows automatic approval of the table-modifying application) No, the default is not auto-approval
auto_exec_trans Integer (0 or 1) Whether to generate a table-modifying transaction after automatically approving the table-modifying application (the set where the table is located allows automatic execution of the table-modifying transaction, and auto_exec_trans=1 is valid only when auto_approve=1) No, the default is not auto-execution
attach_id Array id list of the file that defines the modified table structure, got from the interface "3.4.1 Upload xml/tdr File Defining Table Structure" Yes
table_params json Parameter of the table to be modified. At present, only the maximum number of elements in a list table can be modified No
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": "",
    "auto_exec_trans": "",
    "attach_id": [
        99
    ]
}

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 modification application, where uid represents the form id, which is required when approving the application for modifying tables
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 modify the table, set_id indicates the set where the transaction is located (the set where the table is located) When the request parameter specifies automatic approval of the form (auto_approve=1), the returned message contains the check field message
exec json ret: indicates whether the transaction starts to be executed. 0 indicates that the transaction starts to be executed, others indicate failure. msg: indicates the error message when ret is not equal to 0 When the request parameter specifies automatic approval of the form (auto_approve=1, auto_exec_trans), the returned message contains the exec field message

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": "",
    "auto_exec_trans": "",
    "attach_id": [
        99
    ]
}' http://omsaddress/app/newoms.php/webservice/business/table/modify?cmd=10003&ip-type=webservicerest&access-token=\

Return Example

Successful Return Example

When the Status of the http request is 200, the returned information only needs to pay attention to whether the ret is 0 (0 is successful), get the id (application form id) in the info mesage, and check whether the app_id、zone_list、table_name are matched. Other fields do not need to be paid attention to.

{
    "apply": {
        "ret": 0,
        "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 21:34:08",
            "apply_type": 3,
            "key_avarage_record_size": 1,
            "value_avarage_record_size": 1,
            "compress": 0,
            "active_record_num": "0",
            "total_record_num": "3",
            "memo": "",
            "tdr": "99",
            "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,
            "user": "tcaplus",
            "job_id": "42",
            "dm_ratio": 5,
            "id": 109
        },
        "msg": ""
    }
}

results matching ""

    No results matching ""