TableTruncateCheck
Check the Application for Truncating Tables
Request address
POST
http://OmsAddress/app/newoms.php/webservice/business/table/truncate/check?cmd=10004&ip-type=IpTypeVal&access-token=AccessTokenVal
POST request parameter description
| Parameter name | Data type | Description | Whether the field is required | Remarks |
|---|---|---|---|---|
| uid | integer | id of the application form for truncating tables | Yes | |
| auto_exec_trans | Integer (0 or 1) | Whether to generate a table-truncating transaction after approving the table-truncating application (the set where the table is located allows automatic execution of the table-truncating transactions) | No, the default is not auto-execution |
Data Parameters
Use json format to represent the record related information. The following is an example:
{
"uid": 113
}
Return Syntax
Return Parameter Description
When the returned status code is not 200, it means that the check was unsuccessful, and the returned data is the check failure information
When the returned status code is 200, it means that the check was successful, and the data structure returned is as follows:
| Field name | Data type | Description | Remarks |
|---|---|---|---|
| trans_id | integer | id of the generated corresponding transaction | |
| set_id | integer | Set of the transaction |
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 '{
"uid": 113
}' http://omsaddress/app/newoms.php/webservice/business/table/truncate/check?cmd=10004&ip-type=IpTypeVal&access-token=\
Return Example
Successful Return Example
Status of http request = 200
{
"set_id": 126,
"trans_id": 408
}
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"
}
{
"source_ip": "ip:10.29.89.51 not in whitelist"
}
[
"Failed to create transaction: duplicated transaction as transaction id:408"
]