请求地址
/v2/webservice/apply/check-create-table-index
请求方法
Post
请求参数说明
| 参数名称 | 类型 | 是否必填 | 说明 | |
|---|---|---|---|---|
| apply_list | object数组 | 是 | 单据ID和审核配置 | |
| speed_rule_conf_data | object数组 | 否 | data同步速度 | |
| binglog_sync_speed_data | object数组 | 否 | binlog同步速度 | |
| alloc_mode | enum, 0 | 1 | 否 | 机器分配模式( 0: 自动, 1: 手动) ,默认0 |
| audit_memo | string | 否 | 审批备注 | |
| tcapdb_node_ip | string | 否 | 手动选择机器时需要填 |
apply_list数组元素字段说明
| 参数名称 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| apply_id | ApplyObject | 是 | |
| shard_num | number | 否 | 分片数 |
speed_rule_conf_data和binglog_sync_speed_data数组元素字段说明
| 参数名称 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| start_hour | number | 是 | 开始 小时 范围(0-23) |
| end_hour | number | 是 | 结束 小时 范围(0-23) |
| max_speed | number | 是 | 必须为整数,有效范围-1, 0,或[100,1000000] |
示例
{
"apply_list": [
{
"apply_id": 16385,
"shard_num": 4
},
{
"apply_id": 16384,
"shard_num": 4
}
],
"speed_rule_conf_data": [
{
"start_hour": 1,
"end_hour": 7,
"max_speed": 20000
},
{
"start_hour": 7,
"end_hour": 1,
"max_speed": 20000
}
],
"binglog_sync_speed_data": [
{
"start_hour": 1,
"end_hour": 7,
"max_speed": 20000
},
{
"start_hour": 7,
"end_hour": 1,
"max_speed": 20000
}
]
}
返回参数说明
data数组元素
| 参数名称 | 类型 | 说明 |
|---|---|---|
| result | enum -1= 失败, 0 = 成功 | 审核结果 |
| apply_id | number | 单据ID |
| task_id | number | 成功时的任务ID |
成功返回
[
{
"apply_id": 77918,
"apply_type_text": "表索引",
"zone_id": "1",
"app_id": 5,
"table_name": "GenericTableDemo",
"table_type": 0,
"apply_type": 14,
"task_id": 171854,
"result": 0,
"msg": "审核成功, 请查看生成的任务"
}
]
失败返回
{
"code": 0,
"request_id": "8deced61-b162-4341-8760-d0f81073a0c4",
"data": [
{
"apply_id": 16384,
"apply_type_text": "表索引",
"zone_id": "14209",
"app_id": 4,
"table_name": "CorpsTable",
"table_type": 0,
"apply_type": 14,
"result": -1,
"msg": "提交任务失败:AddTransaction failed. ret:-10000. reasone: the value field name: id repeated in the request, or it not exist in table value fields"
},
{
"apply_id": 16385,
"apply_type_text": "表索引",
"zone_id": "14209",
"app_id": 4,
"table_name": "CustomTable",
"table_type": 0,
"apply_type": 14,
"result": -1,
"msg": "提交任务失败:AddTransaction failed. ret:-10000. reasone: the value field name: key repeated in the request, or it not exist in table value fields"
}
]
}