CreateDataQualityAlertRule

Updated at:

Creates a data quality monitoring alert rule in a specified workspace.

Operation description

You must purchase DataWorks Basic Edition or higher to use this operation.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

ProjectId

integer

Yes

The project ID.

10001

Condition

string

Yes

The alert condition for the data quality monitoring alert rule.

results.any { r -> r.status == 'fail' && r.rule.severity == 'High' }

Target

object

Yes

The monitoring target for the data quality alert rule.

Type

string

Yes

The type of the monitored object. Only DataQualityScan is supported.

DataQualityScan

Ids

array

Yes

The ID of the data quality scan to be monitored. Specify exactly one ID. You can use the PageInfo.DataQualityScans[].Id value returned by ListDataQualityScans.

integer

Yes

The ID of the monitoring target.

113646

Notification

object

Yes

The list of alert channels.

Channels

array

Yes

The notification channels. You can combine email and SMS. Otherwise, specify only one channel.

string

Yes

The alert channel.

  • Dingding

  • Weixin

  • Mail

  • Sms

  • Phone

  • Webhook

  • Feishu

Valid values:

  • Dingding :

    DingTalk.

  • Mail :

    Email.

  • Weixin :

    WeCom.

  • Feishu :

    Feishu.

  • Phone :

    Phone.

  • Sms :

    SMS.

  • Webhook :

    Webhook

Sms

Receivers

array<object>

Yes

The list of alert recipients. Specify exactly one recipient.

object

Yes

The alert recipient.

Extension

string

No

The additional configuration for the alert recipient. When ReceiverType is DingdingUrl, you can set this parameter to {"atAll":true} to mention all members.

{"atAll":true}

ReceiverType

string

Yes

The type of the alert recipient.

  • AliUid

  • WebhookUrl

  • DingdingUrl

  • WeixinUrl

  • FeishuUrl

  • TaskOwner

  • DataQualityScanOwner

  • ShiftSchedule

Valid values:

  • ShiftSchedule :

    Shift schedule.

  • WebhookUrl :

    Webhook URL.

  • FeishuUrl :

    Feishu webhook URL.

  • TaskOwner :

    Task owner.

  • DingdingUrl :

    DingTalk webhook URL.

  • WeixinUrl :

    WeCom webhook URL.

  • DataQualityScanOwner :

    Data quality scan owner.

  • AliUid :

    Alibaba Cloud account UID.

TaskOwner

ReceiverValues

array

No

The value of the alert recipient.

string

No

The value of the alert recipient.

  • If ReceiverType is AliUid, specify the Alibaba Cloud account UID.

  • If ReceiverType is ShiftSchedule, specify the shift schedule ID.

  • If ReceiverType is WebhookUrl, DingdingUrl, FeishuUrl, or WeixinUrl, specify the corresponding URL.

https://oapi.dingtalk.com/robot/send?access_token=a30bae7******

Response elements

Element

Type

Description

Example

object

The response.

RequestId

string

The request ID.

0bc14115***159376359

Id

integer

The ID of the created data quality monitoring alert rule.

1010543619

Examples

Success response

JSON format

{
  "RequestId": "0bc14115***159376359",
  "Id": 1010543619
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.