1. 接口描述
接口请求域名: wedata.tencentcloudapi.com 。
【过滤条件】 {模板名称Name,查询使用Keyword进行模糊匹配} {模板类型type,1.系统模板 2.自定义模板} {质量检测维度QualityDims, 1.准确性 2.唯一性 3.完整性 4.一致性 5.及时性 6.有效性} 【排序字段】 { 引用数排序类型CitationOrderType,根据引用数量排序 ASC DESC}
默认接口请求频率限制:20次/秒。
推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
| 参数名称 | 必选 | 类型 | 描述 |
|---|---|---|---|
| Action | 是 | String | 公共参数,本接口取值:ListQualityRuleTemplates。 |
| Version | 是 | String | 公共参数,本接口取值:2025-08-06。 |
| Region | 是 | String | 公共参数,详见产品支持的 地域列表。 |
| ProjectId | 是 | String | 工作空间ID 示例值:30234213412 |
| PageNumber | 否 | Integer | 当前页,默认1 示例值:1 |
| PageSize | 否 | Integer | 每页记录数,默认10 示例值:10 |
| OrderFields.N | 否 | Array of OrderField | 通用排序, 支持的排序字段: CitationCount - 按引用数量排序 UpdateTime - 按更新时间排序 排序方向: 1 - 升序(ASC) 2 - 降序(DESC) |
| Filters.N | 否 | Array of Filter | 通用过滤条件 1. Id 描述:模板ID。 取值:模板的唯一标识 2. Keyword 描述:关键字搜索,支持模板名称模糊搜索。 取值:字符串 3. Type 描述:模板类型。 取值:1 - 系统模板;2 - 自定义模板;支持多个值(OR关系) 4. QualityDim 描述:质量检测维度。 取值:1 - 准确性;2 - 唯一性;3 - 完整性;4 - 一致性;5 - 及时性;6 - 有效性;支持多个值(OR关系) 5. SourceObjectType 描述:规则适用的源数据对象类型。 取值:1 - 常量;2 - 离线表级;3 - 离线字段级;4 - 库级;支持多个值(OR关系) 6. SourceEngineTypes 描述:模板适用的源数据引擎类型。 取值:1 - MySQL;2 - Hive;4 - Spark;8 - Livy;16 - DLC;32 - Gbase;64 - TCHouse-P;128 - Doris;256 - TCHouse-D;512 - EMR_StarRocks;1024 - TCHouse-X;支持多个值(OR关系) |
3. 输出参数
| 参数名称 | 类型 | 描述 |
|---|---|---|
| Data | QualityRuleTemplatePage | 结果 |
| RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
4. 示例
示例1 分页查询规则模版
分页查询规则模版
输入示例
POST / HTTP/1.1
Host: wedata.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ListQualityRuleTemplates
<公共请求参数>
{
"PageNumber": 1,
"PageSize": 10,
"ProjectId": "1464962169590902784"
}
输出示例
{
"Response": {
"Data": {
"Items": [
{
"CitationCount": 0,
"CompareType": 1,
"DatasourceTypes": [
2,
3
],
"Description": "A common metric in machine learning used to monitor the shift in the distribution of a feature or model score over time.",
"MultiSourceFlag": false,
"Name": "Population Stability Index (PSI)",
"QualityDim": 1,
"ResolvedSqlExpression": {
"ParamExpressions": null,
"SystemTemplateExpressions": [
"BASELINE_TABLE",
"FEATURE_COLUMN",
"BASELINE_DB"
],
"TableExpressions": null
},
"RuleTemplateId": 6514,
"SourceContent": null,
"SourceEngineTypes": [
2,
4,
16
],
"SourceObjectDataType": 3,
"SourceObjectType": 2,
"SqlExpression": null,
"SubQualityDim": 0,
"Type": 1,
"UpdateTime": null,
"UserId": 1,
"UserIdStr": null,
"UserName": null,
"WhereFlag": false
},
{
"CitationCount": 0,
"CompareType": 1,
"DatasourceTypes": [
2,
3
],
"Description": "measures the minimum \"work\" required to transform one distribution into another. less sensitive to sharp changes in distribution shapes.",
"MultiSourceFlag": false,
"Name": "wasserstein distance",
"QualityDim": 1,
"ResolvedSqlExpression": {
"ParamExpressions": null,
"SystemTemplateExpressions": [
"BASELINE_TABLE",
"FEATURE_COLUMN",
"BASELINE_DB"
],
"TableExpressions": null
},
"RuleTemplateId": 6513,
"SourceContent": null,
"SourceEngineTypes": [
2,
4,
16
],
"SourceObjectDataType": 3,
"SourceObjectType": 2,
"SqlExpression": null,
"SubQualityDim": 0,
"Type": 1,
"UpdateTime": null,
"UserId": 1,
"UserIdStr": null,
"UserName": null,
"WhereFlag": false
},
{
"CitationCount": 0,
"CompareType": 1,
"DatasourceTypes": [
2,
3
],
"Description": "a symmetric and bounded measure of the similarity between two probability distributions, based on kl divergence. range is [0, 1].",
"MultiSourceFlag": false,
"Name": "jensen-shannon divergence",
"QualityDim": 1,
"ResolvedSqlExpression": {
"ParamExpressions": null,
"SystemTemplateExpressions": [
"BASELINE_TABLE",
"FEATURE_COLUMN",
"BASELINE_DB"
],
"TableExpressions": null
},
"RuleTemplateId": 6512,
"SourceContent": null,
"SourceEngineTypes": [
2,
4,
16
],
"SourceObjectDataType": 3,
"SourceObjectType": 2,
"SqlExpression": null,
"SubQualityDim": 0,
"Type": 1,
"UpdateTime": null,
"UserId": 1,
"UserIdStr": null,
"UserName": null,
"WhereFlag": false
},
{
"CitationCount": 0,
"CompareType": 1,
"DatasourceTypes": [
2,
3
],
"Description": "measures the maximum absolute difference between the two probability distributions at any point.",
"MultiSourceFlag": false,
"Name": "l-infinity distance",
"QualityDim": 1,
"ResolvedSqlExpression": {
"ParamExpressions": null,
"SystemTemplateExpressions": [
"BASELINE_TABLE",
"FEATURE_COLUMN",
"BASELINE_DB"
],
"TableExpressions": null
},
"RuleTemplateId": 6511,
"SourceContent": null,
"SourceEngineTypes": [
2,
4,
16
],
"SourceObjectDataType": 3,
"SourceObjectType": 2,
"SqlExpression": null,
"SubQualityDim": 0,
"Type": 1,
"UpdateTime": null,
"UserId": 1,
"UserIdStr": null,
"UserName": null,
"WhereFlag": false
},
{
"CitationCount": 0,
"CompareType": 1,
"DatasourceTypes": [
2,
3
],
"Description": "measures the largest possible difference between the probabilities that two distributions can assign to the same event.",
"MultiSourceFlag": false,
"Name": "total variation distance",
"QualityDim": 1,
"ResolvedSqlExpression": {
"ParamExpressions": null,
"SystemTemplateExpressions": [
"BASELINE_TABLE",
"FEATURE_COLUMN",
"BASELINE_DB"
],
"TableExpressions": null
},
"RuleTemplateId": 6510,
"SourceContent": null,
"SourceEngineTypes": [
2,
4,
16
],
"SourceObjectDataType": 3,
"SourceObjectType": 2,
"SqlExpression": null,
"SubQualityDim": 0,
"Type": 1,
"UpdateTime": null,
"UserId": 1,
"UserIdStr": null,
"UserName": null,
"WhereFlag": false
},
{
"CitationCount": 0,
"CompareType": 1,
"DatasourceTypes": [
2,
3
],
"Description": "used to test if two one-dimensional continuous probability distributions differ significantly.",
"MultiSourceFlag": false,
"Name": "kolmogorov-smirnov test (ks test)",
"QualityDim": 1,
"ResolvedSqlExpression": {
"ParamExpressions": null,
"SystemTemplateExpressions": [
"BASELINE_TABLE",
"FEATURE_COLUMN",
"BASELINE_DB"
],
"TableExpressions": null
},
"RuleTemplateId": 6509,
"SourceContent": null,
"SourceEngineTypes": [
2,
4,
16
],
"SourceObjectDataType": 3,
"SourceObjectType": 2,
"SqlExpression": null,
"SubQualityDim": 0,
"Type": 1,
"UpdateTime": null,
"UserId": 1,
"UserIdStr": null,
"UserName": null,
"WhereFlag": false
},
{
"CitationCount": 0,
"CompareType": 1,
"DatasourceTypes": [
2,
3
],
"Description": "used to test if there is a significant difference between two categorical distributions.",
"MultiSourceFlag": false,
"Name": "chi-squared test",
"QualityDim": 1,
"ResolvedSqlExpression": {
"ParamExpressions": null,
"SystemTemplateExpressions": [
"BASELINE_TABLE",
"FEATURE_COLUMN",
"BASELINE_DB"
],
"TableExpressions": null
},
"RuleTemplateId": 6508,
"SourceContent": null,
"SourceEngineTypes": [
2,
4,
16
],
"SourceObjectDataType": 3,
"SourceObjectType": 2,
"SqlExpression": null,
"SubQualityDim": 0,
"Type": 1,
"UpdateTime": null,
"UserId": 1,
"UserIdStr": null,
"UserName": null,
"WhereFlag": false
},
{
"CitationCount": 0,
"CompareType": 7,
"DatasourceTypes": [
2,
3
],
"Description": "requires that the probability of receiving a positive outcome is equal across different groups.",
"MultiSourceFlag": false,
"Name": "statistical parity",
"QualityDim": 1,
"ResolvedSqlExpression": {
"ParamExpressions": null,
"SystemTemplateExpressions": [
"PROTECTION_VALUE",
"COMPARISON_COLUMN",
"PREDICTION_COLUMN",
"POSITIVE_VALUE"
],
"TableExpressions": null
},
"RuleTemplateId": 6507,
"SourceContent": null,
"SourceEngineTypes": [
2,
4,
16
],
"SourceObjectDataType": 3,
"SourceObjectType": 2,
"SqlExpression": null,
"SubQualityDim": 0,
"Type": 1,
"UpdateTime": null,
"UserId": 1,
"UserIdStr": null,
"UserName": null,
"WhereFlag": false
},
{
"CitationCount": 0,
"CompareType": 7,
"DatasourceTypes": [
2,
3
],
"Description": "requires that the true positive rate (recall) is equal across different groups.",
"MultiSourceFlag": false,
"Name": "equal opportunity",
"QualityDim": 1,
"ResolvedSqlExpression": {
"ParamExpressions": null,
"SystemTemplateExpressions": [
"PROTECTION_VALUE",
"COMPARISON_COLUMN",
"PREDICTION_COLUMN",
"LABEL_COLUMN",
"POSITIVE_VALUE"
],
"TableExpressions": null
},
"RuleTemplateId": 6506,
"SourceContent": null,
"SourceEngineTypes": [
2,
4,
16
],
"SourceObjectDataType": 3,
"SourceObjectType": 2,
"SqlExpression": null,
"SubQualityDim": 0,
"Type": 1,
"UpdateTime": null,
"UserId": 1,
"UserIdStr": null,
"UserName": null,
"WhereFlag": false
},
{
"CitationCount": 0,
"CompareType": 7,
"DatasourceTypes": [
2,
3
],
"Description": "requires that the false positive rate (fpr) is equal across different groups.",
"MultiSourceFlag": false,
"Name": "predictive equality",
"QualityDim": 1,
"ResolvedSqlExpression": {
"ParamExpressions": null,
"SystemTemplateExpressions": [
"PROTECTION_VALUE",
"COMPARISON_COLUMN",
"PREDICTION_COLUMN",
"LABEL_COLUMN",
"POSITIVE_VALUE"
],
"TableExpressions": null
},
"RuleTemplateId": 6505,
"SourceContent": null,
"SourceEngineTypes": [
2,
4,
16
],
"SourceObjectDataType": 3,
"SourceObjectType": 2,
"SqlExpression": null,
"SubQualityDim": null,
"Type": 1,
"UpdateTime": null,
"UserId": 1,
"UserIdStr": null,
"UserName": null,
"WhereFlag": false
}
],
"TotalCount": 180
},
"RequestId": "40900661-28b4-4126-8023-0d4247a5194d"
}
}
5. 开发者资源
腾讯云 API 平台
腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。
API Inspector
用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。
SDK
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
- Tencent Cloud SDK 3.0 for Python: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for Java: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for PHP: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for Go: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for Node.js: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for .NET: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for C++: CNB, GitHub, Gitee
- Tencent Cloud SDK 3.0 for Ruby: CNB, GitHub, Gitee
命令行工具
6. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
| 错误码 | 描述 |
|---|---|
| FailedOperation | 操作失败。 |
| InvalidParameter.InvalidFilterParameter | 查询过滤条件参数错误。 |
| UnauthorizedOperation.UserNotInProject | 用户不是当前项目成员。 |