调用UpdateQualityRule更新规则。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | UpdateQualityRule |
要执行的操作。 |
Id | Long | 是 | 1234 |
规则ID。 |
ProjectName | String | 是 | autotest |
引擎或者数据源的名称。 |
BlockType | Integer | 否 | 0 |
规则的强弱。0弱规则,1强规则 |
EntityId | Long | 否 | 123 |
分区表达式的ID。 |
Comment | String | 否 | 校验表行数 |
规则的描述信息。 |
Checker | Integer | 否 | 9 |
校验器。 |
ExpectValue | String | 否 | 300 |
期望值。范围varchar(255) |
Trend | String | 否 | up |
趋势。up上升,down 下降, abs绝对值 |
MethodName | String | 否 | table_count |
采集方法。 |
Operator | String | 否 | > |
比较符。 |
Property | String | 否 | id |
字段的名称。 |
PropertyType | String | 否 | bigint |
字段的类型。 |
RuleType | Integer | 否 | 0 |
规则的类型。0 系统定义 1 自定义 2 项目级规则 |
WhereCondition | String | 否 | dt=$[yyyymmdd] |
过滤条件或者自定义SQL。 |
CriticalThreshold | String | 否 | 10 |
红色阈值。范围varchar(255) |
WarningThreshold | String | 否 | 5 |
橙色阈值。范围varchar(255) |
TemplateId | Integer | 否 | 7 |
模板ID。 |
RegionId | String | 否 | cn-shanghai |
地域ID。 |
RuleName | String | 否 | 校验表行数规则 |
规则的名称。 |
PredictType | Integer | 否 | 0 |
动态阈值类型的标识。0是统计分析规则,2是动态阈值规则 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Data | Boolean | true |
更新规则是否成功。 |
ErrorCode | String | 0 |
错误码。 |
ErrorMessage | String | You have no permission. |
错误信息。 |
HttpStatusCode | Integer | 200 |
HTTP返回码。 |
RequestId | String | 576b9457-2cf5-4**** |
请求ID。 |
Success | Boolean | true |
调用是否成功。 |
示例
请求示例
http(s)://[Endpoint]/?Action=UpdateQualityRule
&Id=1234
&ProjectName=autotest
&<公共请求参数>
正常返回示例
XML
格式
<RequestId>576b9457-2cf5-4****</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<Data>true</Data>
<ErrorCode>0</ErrorCode>
<ErrorMessage>You have no permission.</ErrorMessage>
<Success>true</Success>
JSON
格式
{
"RequestId": "576b9457-2cf5-4****",
"HttpStatusCode": 200,
"Data": true,
"ErrorCode": 0,
"ErrorMessage": "You have no permission.",
"Success": true
}
错误码
访问错误中心查看更多错误码。