Creates a baseline. If you want to use the alerting feature for a created baseline, call the UpdateBaseline operation.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes CreateBaseline

The operation that you want to perform. Set the value to CreateBaseline.

BaselineName String Yes BaselineName

The name of the baseline.

ProjectId Long Yes 10000

The DataWorks workspace ID. You can log on to the DataWorks console and go to the Workspace page to view the ID.

Owner String Yes 1000000000001

The ID of the Alibaba Cloud account used by the baseline owner.

Priority Integer Yes 1,3,5,7,8

The priority of the baseline. Valid values: 1, 3, 5, 7, and 8.

NodeIds String No 210001233239,210001236482

The ancestor nodes of nodes in the baseline.

OvertimeSettings.N.Cycle Integer No 1

The cycle that corresponds to the committed completion time. For a day-level baseline, set this parameter to 1. For an hour-level baseline, set this parameter to a value that is no more than 24.

OvertimeSettings.N.Time String No 00:00

The committed completion time. Specify the time in the hh:mm format. Valid values of hh: 0 to 47. Valid values of mm: 0 to 59.

AlertMarginThreshold Integer No 30

The alert margin threshold of the baseline. Unit: minutes.

BaselineType String Yes DAILY

The type of the baseline. Valid values: DAILY and HOURLY. The value DAILY indicates that the baseline is a day-level baseline. The value HOURLY indicates that the baseline is an hour-level baseline.

Response parameters

Parameter Type Example Description
Success Boolean true

Indicates whether the request was successful. Valid values:

  • true
  • false
ErrorCode String 401

The error code.

ErrorMessage String The specified parameters are invalid.

The error message.

HttpStatusCode Integer 200

The HTTP status code.

Data Long 100003

The baseline ID.

RequestId String F05080B0-CCE6-5D22-B284-34A51C5D4E28

The request ID.

Examples

Sample requests

http(s)://[Endpoint]/?Action=CreateBaseline
&BaselineName=BaselineName
&ProjectId=10000
&Owner=1000000000001
&NodeIds=210001233239,210001236482
&OvertimeSettings=[{"Cycle":1,"Time":"00:00"}]
&AlertMarginThreshold=30
&BaselineType=DAILY
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<CreateBaselineResponse>
    <Success>true</Success>
    <ErrorCode>401</ErrorCode>
    <ErrorMessage>The specified parameters are invalid.</ErrorMessage>
    <HttpStatusCode>200</HttpStatusCode>
    <Data>100003</Data>
    <RequestId>F05080B0-CCE6-5D22-B284-34A51C5D4E28</RequestId>
</CreateBaselineResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Success" : true,
  "ErrorCode" : "401",
  "ErrorMessage" : "The specified parameters are invalid.",
  "HttpStatusCode" : 200,
  "Data" : 100003,
  "RequestId" : "F05080B0-CCE6-5D22-B284-34A51C5D4E28"
}

Error codes

For a list of error codes, see Service error codes.