根据基线ID获取基线配置。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| BaselineId |
integer |
是 |
基线的 ID,可以通过 ListBaselines 获取。 |
123456 |
| ProjectId |
integer |
是 |
基线所监控的项目空间 ID,可从 ListBaselines 获取。 |
10000 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
OpenApiResultModel |
||
| Data |
object |
返回值。 |
|
| AlertEnabled |
boolean |
是否开启告警。
|
true |
| AlertMarginThreshold |
integer |
预警余量,单位为分钟。 |
60 |
| AlertSettings |
array<object> |
告警设置。 |
|
|
array<object> |
基线的告警配置。 |
||
| AlertInterval |
integer |
事件告警间隔,单位为秒。 |
900 |
| AlertMaximum |
integer |
事件告警最大次数。 |
1 |
| AlertMethods |
array |
告警方式列表 |
|
|
string |
告警方式。取值如下:
|
|
|
| AlertRecipient |
string |
告警接收人详情。
|
123123 |
| AlertRecipientType |
string |
告警接收人类型。
|
OWNER |
| AlertType |
string |
告警类型
|
BASELINE |
| BaselineAlertEnabled |
boolean |
基线告警开关,基线特有配置。
|
false |
| DingRobots |
array<object> |
钉钉机器人列表。 |
|
|
object |
钉钉机器人配置。 |
||
| AtAll |
boolean |
是否 @所有人。 |
true |
| WebUrl |
string |
钉钉机器人地址。 |
https://oapi.dingtalk.com/robot/send?access_token=xxx |
| SilenceEndTime |
string |
静默结束时间,格式为 HH:mm:ss 。 |
00:00:00 |
| SilenceStartTime |
string |
静默开始时间,格式为 HH:mm:ss 。 |
00:00:00 |
| TopicSlowConfig |
object |
事件变慢告警的阈值配置 |
|
| MinOver |
integer |
最小变慢阈值,单位为秒,取值范围为 300~18000 |
3600 |
| OverFactor |
number |
基于任务历史平均运行耗时计算变慢阈值的比例,取值范围为 0.1~2 |
0.2 |
| TopicTypes |
array |
事件告警类型列表,事件特有配置。 |
|
|
string |
事件告警类型。
|
SLOW |
|
| Webhooks |
array |
webhook 列表。 |
|
|
string |
企业微信或飞书机器人的 webhook 地址,多个 webhook 地址之间使用英文逗号(,)分隔。alertMethods 中需要包含 WEBHOOKS 告警方式。仅 DataWorks 企业版支持。 可用地域:华东 2(上海)、西南 1(成都)、华北 3(张家口)、华北 2(北京)、华东 1(杭州)、华南 1(深圳)、中国(香港)、欧洲中部 1(法兰克福)、亚太东南 1(新加坡)。 |
https://open.feishu.cn/open-apis/bot/v2/hook/xxx |
|
| BaselineId |
integer |
基线的 id。 |
1001 |
| BaselineName |
string |
基线名。 |
Test baseline |
| BaselineType |
string |
基线类型。
|
DAILY |
| Enabled |
boolean |
是否开启基线。 |
true |
| NodeIds |
array |
基线上游节点列表。 |
|
|
integer |
节点 ID。 |
700003**** |
|
| OverTimeSettings |
array<object> |
基线承诺时间设置。 |
|
|
object |
监控周期。 |
||
| Cycle |
integer |
承诺时间对应的周期,天基线是 1,小时基线可以配置最多 24 个周期。 |
1 |
| Time |
string |
承诺时间,hh:mm 格式,hh 的取值范围为[0,47],mm 的取值范围为[0,59]。 |
00:00 |
| Owner |
string |
责任人。 |
9527952**** |
| Priority |
integer |
基线的优先级,取值集合为{1,3,5,7,8}。 |
1 |
| ProjectId |
integer |
项目 id。 |
10000 |
| ErrorCode |
string |
错误码。 |
1031203110005 |
| ErrorMessage |
string |
错误信息。 |
The specified parameters are invalid |
| HttpStatusCode |
integer |
HTTP 返回码。 |
200 |
| RequestId |
string |
请求 ID。 |
ecb967ec-c137-48a5-860**** |
| Success |
boolean |
请求是否成功,true - 成功,false - 失败。 |
true |
示例
正常返回示例
JSON格式
{
"Data": {
"AlertEnabled": true,
"AlertMarginThreshold": 60,
"AlertSettings": [
{
"AlertInterval": 900,
"AlertMaximum": 1,
"AlertMethods": [
"MAIL"
],
"AlertRecipient": "123123",
"AlertRecipientType": "OWNER",
"AlertType": "BASELINE",
"BaselineAlertEnabled": false,
"DingRobots": [
{
"AtAll": true,
"WebUrl": "https://oapi.dingtalk.com/robot/send?access_token=xxx"
}
],
"SilenceEndTime": "00:00:00",
"SilenceStartTime": "00:00:00",
"TopicSlowConfig": {
"MinOver": 3600,
"OverFactor": 0.2
},
"TopicTypes": [
"SLOW"
],
"Webhooks": [
"https://open.feishu.cn/open-apis/bot/v2/hook/xxx"
]
}
],
"BaselineId": 1001,
"BaselineName": "Test baseline",
"BaselineType": "DAILY",
"Enabled": true,
"NodeIds": [
0
],
"OverTimeSettings": [
{
"Cycle": 1,
"Time": "00:00"
}
],
"Owner": "9527952****",
"Priority": 1,
"ProjectId": 10000
},
"ErrorCode": "1031203110005",
"ErrorMessage": "The specified parameters are invalid",
"HttpStatusCode": 200,
"RequestId": "ecb967ec-c137-48a5-860****",
"Success": true
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。