All Products
Search
Document Center

DataWorks:GetBaseline

Last Updated:Nov 21, 2024

Queries the information about a baseline based on its ID.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
The current API does not require request parameters

Response parameters

ParameterTypeDescriptionExample
object

OpenApiResultModel

Dataobject

The data returned.

OverTimeSettingsarray<object>
OverTimeSettingobject
Cycleinteger

The cycle that corresponds to the committed completion time. For a day-level baseline, the value of this parameter is 1. For an hour-level baseline, the value of this parameter cannot exceed 24.

1
Timestring

The committed completion time in the hh:mm format. Valid values of hh: [0,47]. Valid values of mm: [0,59].

00:00
AlertSettingsarray<object>

The alert settings.

AlertSettingobject
AlertTypestring

The type of the alert. Valid values:

  • BASELINE: indicates a baseline alert.
  • TOPIC: indicates an event alert.
BASELINE
AlertMethodsarray

The alert notification methods.

AlertMethodstring

The alert notification method. Valid values:

  • MAIL
  • SMS
  • PHONE
  • DINGROBOTS
  • WEBHOOKS
MAIL
SilenceStartTimestring

The beginning of the time range for silence. The time is in the HH:mm:ss format.

00:00:00
SilenceEndTimestring

The end of the time range for silence. The time is in the HH:mm:ss format.

00:00:00
AlertIntervalinteger

The interval at which an event alert notification is sent. Unit: seconds.

900
AlertMaximuminteger

The maximum number of times an event alert notification is sent.

1
DingRobotsarray<object>

The DingTalk chatbots.

DingRobotobject
WebUrlstring

The webhook URL of the DingTalk chatbot.

https://oapi.dingtalk.com/robot/send?access_token=xxx
AtAllboolean

Indicates whether all members were reminded by using the at sign (@).

true
Webhooksarray

The webhook URLs.

Webhookstring

The webhook URL of the WeCom or Lark chatbot. If multiple webhook URLs are involved, the webhook URLs are separated by commas (,). The value of AlertMethods must include WEBHOOKS. Only DataWorks Enterprise Edition supports this parameter.

The webhook URL-based alerting feature is supported in the following regions: China (Shanghai), China (Chengdu), China (Zhangjiakou), China (Beijing), China (Hangzhou), China (Shenzhen), China (Hong Kong), Germany (Frankfurt), and Singapore.

https://open.feishu.cn/open-apis/bot/v2/hook/xxx
TopicTypesarray

The types of event alerts, which are event-specific configurations.

TopicTypestring

The type of the event alert. Valid values:

  • SLOW
  • ERROR
SLOW
BaselineAlertEnabledboolean

Indicates whether the baseline alerting feature is enabled. The feature is specific to baselines. Valid values:

  • true
  • false
false
AlertRecipientTypestring

The type of the alert recipient. Valid values:

  • OWNER: indicates the node owner.
  • OTHER: indicates specified personnel.
  • SHIFT_SCHEDULE: indicates personnel in a shift schedule.
OWNER
AlertRecipientstring

The details of the alert recipient.

  • If the value of AlertRecipientType is OWNER, this parameter is left empty.
  • If the value of AlertRecipientType is SHIFT_SCHEDULE, the value of this parameter is the ID of a shift schedule.
  • If the value of AlertRecipientType is OTHER, the value of this parameter is the UIDs of specified personnel. Multiple UIDs are separated by commas (,).
123123

Examples

Sample success responses

JSONformat

{
  "Success": true,
  "ErrorCode": "1031203110005",
  "ErrorMessage": "The specified parameters are invalid",
  "HttpStatusCode": 200,
  "Data": {
    "BaselineId": 1001,
    "BaselineName": "",
    "ProjectId": 10000,
    "Owner": "9527952****",
    "Priority": 1,
    "BaselineType": "DAILY",
    "OverTimeSettings": [
      {
        "Cycle": 1,
        "Time": "00:00"
      }
    ],
    "Enabled": true,
    "NodeIds": [
      700003559814
    ],
    "AlertEnabled": true,
    "AlertMarginThreshold": 60,
    "AlertSettings": [
      {
        "AlertType": "BASELINE",
        "AlertMethods": [
          "MAIL"
        ],
        "SilenceStartTime": "00:00:00",
        "SilenceEndTime": "00:00:00",
        "AlertInterval": 900,
        "AlertMaximum": 1,
        "DingRobots": [
          {
            "WebUrl": "https://oapi.dingtalk.com/robot/send?access_token=xxx",
            "AtAll": true
          }
        ],
        "Webhooks": [
          "https://open.feishu.cn/open-apis/bot/v2/hook/xxx"
        ],
        "TopicTypes": [
          "SLOW"
        ],
        "BaselineAlertEnabled": false,
        "AlertRecipientType": "OWNER",
        "AlertRecipient": "123123"
      }
    ]
  },
  "RequestId": "ecb967ec-c137-48a5-860****"
}

Error codes

For a list of error codes, visit the Service error codes.