更新时间:2025-07-04 GMT+08:00

告警转事件

功能介绍

告警转事件

调用方法

请参见如何调用API

URI

POST /v1/{project_id}/workspaces/{workspace_id}/soc/alerts/batch-order

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

项目id

workspace_id

String

工作空间id

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

用户Token。

通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)

content-type

String

内容类型

表3 请求Body参数

参数

是否必选

参数类型

描述

ids

Array of strings

转事件的告警id列表

incident_content

incident_content object

事件内容

表4 incident_content

参数

是否必选

参数类型

描述

title

String

事件名称

incident_type

incident_type object

事件类型

表5 incident_type

参数

是否必选

参数类型

描述

id

String

事件类型id

category

String

事件类型父类

incident_type

String

事件类型子类

响应参数

状态码:200

表6 响应Header参数

参数

参数类型

描述

X-request-id

String

请求ID,格式为:request_uuid-timestamp-hostname

表7 响应Body参数

参数

参数类型

描述

code

String

错误码

message

String

错误信息

data

BatchOperateAlertResult object

批量操作告警返回对象

表8 BatchOperateAlertResult

参数

参数类型

描述

error_ids

Array of strings

失败id

success_ids

Array of strings

成功id

状态码:400

表9 响应Header参数

参数

参数类型

描述

X-request-id

String

请求ID,格式为:request_uuid-timestamp-hostname

表10 响应Body参数

参数

参数类型

描述

code

String

错误码

message

String

错误描述

请求示例

将一条告警转为事件,告警ID为909494e3-558e-46b6-a9eb-07a8e18ca62f,事件ID为909494e3-558e-46b6-a9eb-07a8e18ca621,告警状态为已关闭,是否标记为证据为否。

{
  "ids" : [ "909494e3-558e-46b6-a9eb-07a8e18ca62f" ],
  "incident_content" : {
    "title" : "XXX",
    "incident_type" : {
      "id" : "909494e3-558e-46b6-a9eb-07a8e18ca62f",
      "category" : "DDoS攻击",
      "incident_type" : "DNS协议攻击"
    }
  }
}

响应示例

状态码:200

告警转事件返回body体

{
  "code" : "909494e3-558e-46b6-a9eb-07a8e18ca62f",
  "message" : "Error message",
  "data" : {
    "error_ids" : [ "909494e3-558e-46b6-a9eb-07a8e18ca62f" ],
    "success_ids" : [ "909494e3-558e-46b6-a9eb-07a8e18ca62f" ]
  }
}

状态码

状态码

描述

200

告警转事件返回body体

400

告警转事件错误返回body体

错误码

请参见错误码