TdrDefinition

Check the Table Defined by the Specified xml/tdr/proto File

Check whether the specified xml/tdr file meets the tdr specification, and return the collection of tables defined in the file.

Request address

POST
http://OmsAddress/app/newoms.php/webservice/tdr/definition?cmd=10001&ip-type=webservicerest&attachment_id=4,5&access-token=AccessTokenVal&app_id=2

// The attachment_id=4,5 and app_id=2 in the sample need to be modified to the user's own file ID and app ID

GET parameter description in url

Field name Data type Description Whether it is required Remarks
attachment_id string The ids of the files to be checked are spliced with commas ",". The file id can be got from the "Upload xml/tdr File Defining Table Structure", or from the [Add from Uploaded Files] on the tcaplus oms Add Tables or Modify Tables page Yes
app_id number App ID Yes

Return Syntax

Return Parameter Description

Field name Data type Description Remarks
meta string Table Name
meta_check string Table name check OK
generic_check Boolean Whether the current table can be added as a generic table
generic_error string Description of why the current table cannot be added as a generic table
list_check Boolean Whether the current table can be added as a list table
list_error string Description of why the current table cannot be added as a list table
check_count_with_refer Boolean Check whether Count and Refer are defined The proto file does not return this parameter when adding a table to the PB table
value_field_num integer Number of value fields in the current table
table_type_info json Definition information of customattr2 related attributes such as current table type attributes

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" http://omsaddress/app/newoms.php/webservice/tdr/definition?cmd=10001&ip-type=webservicerest&attachment_id=AttachmentID&access-token=\

Return Example

Successful Return Example

Status of http request = 200

{
    "ActionAvartarInfo": {
        "generic_check": true,
        "list_check": true,
        "meta": "ActionAvartarInfo",
        "meta_check": true,
        "check_count_with_refer": true,
        "generic_error": "There is no Primaykey in meta:'ActionAvartarInfo', maybe it is a pure struct.",
        "list_error": "There is no Primaykey in meta:'ActionAvartarInfo', maybe it is a pure struct.",
        "value_field_num": 2,
        "table_type_info":{"TableType":"1","ListNum":"1023","SortFieldNum":"1","SortRule":"1","DataProtocolType":"TBD","error":false,"old_table_define":false}
    },
    "ActivityCfg": {
        "generic_check": true,
        "list_check": false,
        "meta": "ActivityCfg",
        "meta_check": true,
        "check_count_with_refer": true,
        "list_error": "list-type-table isn't allowed to configure index field! table:'ActivityCfg'",
        "value_field_num": 18,
        "table_type_info":{"error":false,"old_table_define":true}
    }
}

Failed Return Example

Status of http request != 200

[
    "The path of the element is incorrect and cannot correctly match elements in the meta"
]
{
    "source_ip": "ip:10.29.89.51 not in whitelist"
}

results matching ""

    No results matching ""