调用ListQualityRules根据分区表达式获取规则列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListQualityRules |
要执行的操作。 |
EntityId | Long | 是 | 1234 |
分区表达式的ID。 |
PageNumber | Integer | 是 | 1 |
页码。 |
PageSize | Integer | 是 | 20 |
每页显示的条数,默认为10条,最大100条。 |
ProjectName | String | 是 | autotest |
引擎或者数据源的名称。 |
RegionId | String | 是 | cn-shanghai |
地域ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Data | Struct |
获取的规则列表。 |
|
PageNumber | Integer | 1 |
页码。 |
PageSize | Integer | 20 |
每页显示的条数,默认为10条,最大100条。 |
Rules | Array of Rules |
规则的详情。 |
|
BlockType | Integer | 0 |
规则的强弱:0表示弱规则,1表示强规则。 |
CheckerId | Integer | 7 |
校验器ID。 |
Comment | String | 校验表规则 |
规则的描述信息。 |
CriticalThreshold | String | 40 |
红色告警。 |
EntityId | Integer | 1234 |
分区表达式的ID。 |
ExpectValue | String | 1000 |
期望值。 |
FixCheck | Boolean | true |
是否为强规则。 |
HistoryCriticalThreshold | String | history max:80%,history min:50% |
历史红色阈值。 |
HistoryWarningThreshold | String | history max:40%,history min:10% |
历史橙色阈值。 |
Id | Integer | 1234 |
规则的ID。 |
MatchExpression | String | dt=$[yyyymmdd] |
分区表达式。 |
MethodId | Integer | 21 |
采样方法的ID。 |
MethodName | String | count/table_count |
采样方法的名称。 |
OnDuty | String | 1912**** |
规则的责任人。 |
ProjectName | String | autotest |
引擎或者数据源的名称。 |
Property | String | id |
字段的名称。 |
PropertyKey | String | table_count |
用于数据质量前端规则联动,可以忽略。 |
RuleCheckerRelationId | Integer | 132323 |
规则详情的内部关联ID。 |
RuleType | Integer | 0 |
规则的类型:0表示系统创建、1表示用户创建、2表示项目级规则。 |
TableName | String | dual |
表的名称。 |
TemplateId | Integer | 7 |
模板ID。 |
TemplateName | String | sql任务表行数,1、7、30天波动检测 |
模板的名称。 |
Trend | String | abs |
趋势。 |
WarningThreshold | String | 10 |
橙色阈值。 |
TotalCount | Long | 400 |
返回数据总量。 |
ErrorCode | String | Invalid.Tenant.ConnectionNotExists |
错误码。 |
ErrorMessage | String | You have no permission. |
错误信息。 |
HttpStatusCode | Integer | 200 |
HTTP返回码。 |
RequestId | String | 38cbdef0-f6cf-49**** |
请求ID。 |
Success | Boolean | true |
调用是否成功。 |
示例
请求示例
http(s)://[Endpoint]/?Action=ListQualityRules
&EntityId=1234
&PageNumber=1
&PageSize=20
&ProjectName=autotest
&RegionId=cn-shanghai
&<公共请求参数>
正常返回示例
XML
格式
<RequestId>38cbdef0-f6cf-49****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>
<TotalCount>400</TotalCount>
<PageSize>20</PageSize>
<PageNumber>1</PageNumber>
<Rules>
<HistoryCriticalThreshold>history max:80%,history min:50%</HistoryCriticalThreshold>
<Comment>校验表规则</Comment>
<HistoryWarningThreshold>history max:40%,history min:10%</HistoryWarningThreshold>
<RuleCheckerRelationId>132323</RuleCheckerRelationId>
<CriticalThreshold>40</CriticalThreshold>
<ProjectName>autotest</ProjectName>
<ExpectValue>1000</ExpectValue>
<WarningThreshold>10</WarningThreshold>
<OnDuty>1912****</OnDuty>
<Trend>abs</Trend>
<RuleType>0</RuleType>
<CheckerId>7</CheckerId>
<MatchExpression>dt=$[yyyymmdd]</MatchExpression>
<EntityId>1234</EntityId>
<TableName>dual</TableName>
<MethodId>21</MethodId>
<FixCheck>true</FixCheck>
<BlockType>0</BlockType>
<TemplateName>sql任务表行数,1、7、30天波动检测</TemplateName>
<Id>1234</Id>
<MethodName>count/table_count</MethodName>
<Property>id</Property>
<TemplateId>7</TemplateId>
<PropertyKey>table_count</PropertyKey>
</Rules>
</Data>
<ErrorCode>401</ErrorCode>
<ErrorMessage>You have no permission.</ErrorMessage>
<Success>true</Success>
JSON
格式
{
"RequestId": "38cbdef0-f6cf-49****",
"HttpStatusCode": 200,
"Data": {
"TotalCount": 400,
"PageSize": 20,
"PageNumber": 1,
"Rules": {
"HistoryCriticalThreshold": "history max:80%,history min:50%",
"Comment": "校验表规则",
"HistoryWarningThreshold": "history max:40%,history min:10%",
"RuleCheckerRelationId": 132323,
"CriticalThreshold": 40,
"ProjectName": "autotest",
"ExpectValue": 1000,
"WarningThreshold": 10,
"OnDuty": "1912****",
"Trend": "abs",
"RuleType": 0,
"CheckerId": 7,
"MatchExpression": "dt=$[yyyymmdd]",
"EntityId": 1234,
"TableName": "dual",
"MethodId": 21,
"FixCheck": true,
"BlockType": 0,
"TemplateName": "sql任务表行数,1、7、30天波动检测",
"Id": 1234,
"MethodName": "count/table_count",
"Property": "id",
"TemplateId": 7,
"PropertyKey": "table_count"
}
},
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"ErrorMessage": "You have no permission.",
"Success": true
}
错误码
访问错误中心查看更多错误码。
在文档使用中是否遇到以下问题
更多建议
匿名提交