tencent cloud

Feedback

DescribeRulesByPage

Last updated: 2024-06-21 15:11:41

1. API Description

Domain name for API request: wedata.tencentcloudapi.com.

Paginated Query of Quality Rules

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeRulesByPage.
Version Yes String Common Params. The value used for this API: 2021-08-20.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
PageNumber No Integer Pagination Index
PageSize No Integer Page size
Filters.N No Array of Filter Filter criteria
OrderFields.N No Array of OrderField Sort Fields
ProjectId No String Project ID

3. Output Parameters

Parameter Name Type Description
Data RulePage Rule Quality List
Note: This field may return null, indicating that no valid value can be obtained.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Paginated Query of Quality Rules

Input Example

POST / HTTP/1.1
Host: wedata.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeRulesByPage
<Common Request Parameters>{
    "PageNumber": 1,
    "PageSize": 1,
    "Filters": [
        {
            "Name": "tableId",
            "Values": [
                "79tugiojbfvdesc"
            ]
        }
    ],
    "OrderFields": [
        {
            "Name": "id",
            "Direction": "asc"
        }
    ],
    "ProjectId": "5346789087654"
}

Output Example

{
    "Response": {
        "Data": {
            "TotalCount": 1,
            "Items": [
                {
                    "RuleId": 1,
                    "RuleGroupId": 1,
                    "TableId": "79tyugihbksda",
                    "Name": "Regulations",
                    "Type": 1,
                    "RuleTemplateId": 1,
                    "RuleTemplateContent": "cont",
                    "QualityDim": 1,
                    "SourceObjectType": 1,
                    "SourceObjectDataType": 1,
                    "SourceObjectDataTypeName": "string",
                    "SourceObjectValue": "1",
                    "ConditionType": 1,
                    "ConditionExpression": ">",
                    "CustomSql": "abc",
                    "CompareRule": {
                        "Items": [
                            {
                                "CompareType": 1,
                                "Operator": ">",
                                "ValueComputeType": 1,
                                "ValueList": [
                                    {
                                        "ValueType": 1,
                                        "Value": "1"
                                    }
                                ]
                            }
                        ],
                        "CycleStep": 1,
                        "ComputeExpression": "expr"
                    },
                    "AlarmLevel": 1,
                    "Description": "Description",
                    "Operator": "zhangsan",
                    "TargetDatabaseId": "70afsdfaasyighb",
                    "TargetDatabaseName": "dbName",
                    "TargetTableId": "8y9uhojt79u",
                    "TargetTableName": "test",
                    "TargetConditionExpr": "0",
                    "RelConditionExpr": "sourceTable.id = targetTable.id",
                    "FieldConfig": {
                        "WhereConfig": [
                            {
                                "FieldKey": "name",
                                "FieldValue": "zhangsan",
                                "FieldDataType": "string"
                            }
                        ],
                        "TableConfig": [
                            {
                                "DatabaseId": "7p9gyuih78tgy",
                                "DatabaseName": "dbTest",
                                "TableId": "7t8ygihb670ygo",
                                "TableName": "test",
                                "TableKey": "asdfsdf",
                                "FieldConfig": [
                                    {
                                        "FieldKey": "id",
                                        "FieldValue": "12",
                                        "FieldDataType": "int"
                                    }
                                ]
                            }
                        ]
                    },
                    "MultiSourceFlag": true,
                    "WhereFlag": true,
                    "TemplateSql": "select1",
                    "SubQualityDim": 1,
                    "TargetObjectType": 1,
                    "TargetObjectDataType": 1,
                    "TargetObjectDataTypeName": "int",
                    "TargetObjectValue": "1",
                    "SourceEngineTypes": [
                        1
                    ],
                    "TableName": "test",
                    "TableOwnerName": "zhangsan",
                    "ExecStrategy": {
                        "RuleGroupId": 1,
                        "MonitorType": 1,
                        "ExecQueue": "test",
                        "ExecutorGroupId": "6578987685",
                        "ExecutorGroupName": "name",
                        "Tasks": [
                            {
                                "TaskId": "576890867",
                                "TaskName": "Task Name",
                                "WorkflowId": "79tyughib87yu9"
                            }
                        ],
                        "StartTime": "2023-10-01",
                        "EndTime": "2023-10-01",
                        "CycleType": "D",
                        "DelayTime": 1,
                        "CycleStep": 1,
                        "TaskAction": "abc",
                        "ExecEngineType": "HIVE",
                        "ExecPlan": "2024-04-07 00:00:00 ~ 2099-12-31 23:59:59, execute every 10 minutes",
                        "RuleId": 1,
                        "RuleName": "Rule 1"
                    },
                    "Subscription": {
                        "RuleGroupId": 1,
                        "Receivers": [
                            {
                                "ReceiverUserId": 1,
                                "ReceiverName": "zhangsan"
                            }
                        ],
                        "SubscribeType": [
                            1
                        ],
                        "WebHooks": [
                            {
                                "HookType": "1",
                                "HookAddress": "http://www.test.com"
                            }
                        ],
                        "RuleId": 1,
                        "RuleName": "Rule 1"
                    },
                    "CreateTime": "2023-10-01",
                    "DatasourceId": 1,
                    "DatabaseId": "ssddyhhjj-daskk",
                    "MonitorStatus": 0,
                    "TriggerCondition": "Fixed value less than 2"
                }
            ]
        },
        "RequestId": "0ff4e8ab68e69"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation Failure.
InvalidParameter.InvalidFilterParameter Incorrect Query Filter Parameter.
UnauthorizedOperation.UserNotInProject User is not a member of the current project.