有奖捉虫:办公协同&微信生态&物联网文档专题 HOT

1. 接口描述

接口请求域名: wedata.tencentcloudapi.com 。

提交规则组运行任务接口

默认接口请求频率限制:20次/秒。

推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数

参数名称 必选 类型 描述
Action String 公共参数,本接口取值:CommitRuleGroupTask。
Version String 公共参数,本接口取值:2021-08-20。
Region String 公共参数,详见产品支持的 地域列表
RuleGroupId Integer 规则组ID
示例值:123456
TriggerType Integer 触发类型 1.手动触发 2.调度事中触发 3.周期调度触发
示例值:1
ExecRuleConfig.N Array of RuleConfig 规则配置列表
示例值:[ { "ruleId": 13371, "conditionType": null, "condition": "2024-04-11 11:00:00", "targetCondition": null, "cycleStep": 3600 } ]
ExecConfig RuleExecConfig 执行配置
示例值:{ "engineType": "SPARK", "queueName": "aidp_rd", "executorGroupId": "20220803103215846318", "schedulingPlan": null, "pipelineTasks": [ { "taskId": "20230423104515974", "taskName": "ods_aipdata_prod_cdm_abnormal_emergency_crash_d_i_new", "workflowId": "08a0a978-f15d-11ec-abaa-08c0eb3c20e0" } ] }
ProjectId String 项目ID
示例值:123456
EngineType String 该规则运行的执行引擎,不传时会请求该数据源下默认的执行引擎
示例值:HIVE

3. 输出参数

参数名称 类型 描述
Data RuleGroupExecResult 规则组执行id
注意:此字段可能返回 null,表示取不到有效值。
示例值:{ "RuleGroupExecId": 1, "RuleGroupId": 1, "TriggerType": 1, "ExecTime": "1712804400000", "Status": 1, "AlarmRuleCount": 1, "TotalRuleCount": 1, "TableOwnerName": "zhangsan", "TableName": "dq", "TableId": "697ytfgquhewfa21we", "DatabaseId": "85rft7qie3vwukacdavk", "DatasourceId": "456789", "Permission": true, "ExecDetail": "2023-09-07 ~ 2099-12-31,每天07:00执行一次", "EngineType": "HIVE", "RuleExecResultVOList": [ { "RuleExecId": 1, "RuleGroupExecId": 1, "RuleGroupId": 1, "RuleId": 1, "RuleName": "规则", "RuleType": 1, "SourceObjectDataTypeName": "int", "SourceObjectValue": "age", "ConditionExpression": "pt=substring('${yyyyMMddHHmmss-1H}',1,10)", "ExecResultStatus": 1, "TriggerResult": "", "CompareResult": { "Items": [ { "FixResult": 1, "ResultValue": "0", "Values": [ { "ValueType": 1, "Value": "2" } ], "Operator": ">", "CompareType": 1, "ValueComputeType": 1 } ], "TotalRows": 1, "PassRows": 1, "TriggerRows": 1 }, "TemplateName": "模版", "QualityDim": 1, "TargetDBTableName": "targaetName", "TargetObjectValue": "value", "TargetObjectDataType": "1", "FieldConfig": { "WhereConfig": [ { "FieldKey": "param_1", "FieldValue": "id", "FieldDataType": "int" } ], "TableConfig": [ { "DatabaseId": "NW0VL_YYPESvi8w", "DatabaseName": "default", "TableId": "EHdPET2IKQ2KBhGw", "TableName": "dq_student", "TableKey": "table_1", "FieldConfig": [ { "FieldKey": "table_1.column_1", "FieldValue": "id", "FieldDataType": "int" } ] } ] }, "RelConditionExpr": "sourceTable.id=targetTable.id", "StartTime": "2023-10-01", "AlarmLevel": 1 } ] }
RequestId String 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。

4. 示例

示例1 提交规则组运行任务接口

提交规则组运行任务接口

输入示例

POST / HTTP/1.1
Host: wedata.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CommitRuleGroupTask
<公共请求参数>

{
    "RuleGroupId": 1,
    "TriggerType": 1,
    "ExecRuleConfig": [
        {
            "RuleId": 1,
            "ConditionType": 1,
            "Condition": "2024-04-11 11:00:00",
            "TargetCondition": "ct='${yyyy-mm-dd-1}'"
        }
    ],
    "ExecConfig": {
        "QueueName": "default",
        "ExecutorGroupId": "567890",
        "EngineType": "2"
    },
    "ProjectId": "456789",
    "EngineType": "HIVE"
}

输出示例

{
    "Response": {
        "Data": {
            "RuleGroupExecId": 1,
            "RuleGroupId": 1,
            "TriggerType": 1,
            "ExecTime": "1712804400000",
            "Status": 1,
            "AlarmRuleCount": 1,
            "TotalRuleCount": 1,
            "TableOwnerName": "zhangsan",
            "TableName": "dq",
            "TableId": "697ytfgquhewfa21we",
            "DatabaseId": "85rft7qie3svwukacdavk",
            "DatasourceId": "456789",
            "Permission": true,
            "ExecDetail": "2023-09-07 ~ 2099-12-31,每天07:00执行一次",
            "EngineType": "HIVE",
            "RuleExecResultVOList": [
                {
                    "RuleExecId": 1,
                    "RuleGroupExecId": 1,
                    "RuleGroupId": 1,
                    "RuleId": 1,
                    "RuleName": "规则",
                    "RuleType": 1,
                    "SourceObjectDataTypeName": "int",
                    "SourceObjectValue": "age",
                    "ConditionExpression": "pt=substring('${yyyyMMddHHmmss-1H}',1,10)",
                    "ExecResultStatus": 1,
                    "TriggerResult": "",
                    "CompareResult": {
                        "Items": [
                            {
                                "FixResult": 1,
                                "ResultValue": "0",
                                "Values": [
                                    {
                                        "ValueType": 1,
                                        "Value": "2"
                                    }
                                ],
                                "Operator": ">",
                                "CompareType": 1,
                                "ValueComputeType": 1
                            }
                        ],
                        "TotalRows": 1,
                        "PassRows": 1,
                        "TriggerRows": 1
                    },
                    "TemplateName": "模版",
                    "QualityDim": 1,
                    "TargetDBTableName": "targaetName",
                    "TargetObjectValue": "value",
                    "TargetObjectDataType": "1",
                    "FieldConfig": {
                        "WhereConfig": [
                            {
                                "FieldKey": "param_1",
                                "FieldValue": "id",
                                "FieldDataType": "int"
                            }
                        ],
                        "TableConfig": [
                            {
                                "DatabaseId": "NW0VL_YYPESvi8w",
                                "DatabaseName": "default",
                                "TableId": "EHdPET2IKQ2KBhGw",
                                "TableName": "dq_student",
                                "TableKey": "table_1",
                                "FieldConfig": [
                                    {
                                        "FieldKey": "table_1.column_1",
                                        "FieldValue": "id",
                                        "FieldDataType": "int"
                                    }
                                ]
                            }
                        ]
                    },
                    "RelConditionExpr": "sourceTable.id=targetTable.id",
                    "StartTime": "2023-10-01",
                    "AlarmLevel": 1
                }
            ]
        },
        "RequestId": "0ff4e8ae-ebea-4a41-8aa2-1f6bc4b68e69"
    }
}

5. 开发者资源

腾讯云 API 平台

腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。

API Inspector

用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。

SDK

云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。

命令行工具

6. 错误码

以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码

错误码 描述
FailedOperation 操作失败。