Updated on 2024-10-11 GMT+08:00

Configuring alert config

Function

Configuring alert config

URI

POST /v2/{project_id}/warnalert/alertconfig/update

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

poject id

Minimum: 32

Maximum: 64

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

token

Minimum: 32

Maximum: 2097152

Content-Type

Yes

String

Content-Type

Default: application/json;charset=utf8

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

display_name

Yes

String

display name of alert config

topic_urn

Yes

String

topic urn

warn_config

Yes

WarnConfig object

Alarm configuration information.

Table 4 WarnConfig

Parameter

Mandatory

Type

Description

antiDDoS

Yes

Boolean

DDoS attack

back_doors

No

Boolean

Web page backdoor

bruce_force

No

Boolean

Brute force cracking (system login, FTP, database)

high_privilege

No

Boolean

The database process permission is too high.

remote_login

No

Boolean

Remote login reminder

send_frequency

No

Integer

Value range:

  • 0: once a day
  • 1: once a half an hour

This parameter is mandatory for HIDs.

waf

No

Boolean

Reserved field.

weak_password

No

Boolean

Weak password (system, database)

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Internal error code

error_msg

String

Internal error description

Example Requests

{
  "display_name" : "",
  "topic_urn" : "8",
  "warn_config" : {
    "antiDDoS" : false,
    "back_doors" : false,
    "bruce_force" : false,
    "high_privilege" : false,
    "remote_login" : false,
    "send_frequency" : 10,
    "waf" : false,
    "weak_password" : false
  }
}

Example Responses

Status code: 200

OK

{
  "error_code" : "10000000",
  "error_msg" : "Ok",
  "task_id" : ""
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.