创建事件单 - CreateCocIncident
功能介绍
创建事件单。
URI
POST /v1/external/incident/create
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
region |
否 |
Array of strings |
区域Code,如果自动拉起WarRoom则为必填,现在只支持1个。 |
|
enterprise_project |
否 |
Array of strings |
企业项目ID,现在只支持1个。 |
|
start_time |
否 |
Long |
故障发生时间戳。 |
|
current_cloud_service |
否 |
Array of strings |
归属应用ID,现在只支持1个。 |
|
incident_level |
是 |
String |
事件级别 参考:枚举 事件级别 incident_level |
|
is_service_interrupt |
是 |
String |
业务是否中断,取值:true/false。 |
|
incident_type |
是 |
String |
事件类别 参考:枚举 事件类别 incident_type |
|
incident_ownership |
否 |
String |
事件归属 参考:枚举 事件归属 incident_ownership |
|
incident_title |
是 |
String |
事件标题,最大长度:200。 |
|
incident_description |
否 |
String |
事件描述,最大长度:600。 |
|
incident_source |
是 |
String |
单据来源 参考:枚举 事件来源 incident_source |
|
incident_assignee |
否 |
Array of strings |
责任人,排班场景和排班角色不能同时为空,现在只支持1个。 |
|
assignee_scene |
否 |
String |
排班场景,责任人和排班角色不能同时为空。 |
|
assignee_role |
否 |
String |
排班角色,排班场景和责任人不能同时为空。 |
|
creator |
是 |
String |
创单人。 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
provider_code |
String |
参数解释: 服务标识。 取值范围: 不涉及 默认取值: 049 |
|
error_code |
String |
参数解释: 请求响应代码。 取值范围: GOM.00000000~GOM.00009999999 默认取值: GOM.00000000 |
|
error_msg |
String |
参数解释: 请求响应描述。 取值范围: 不涉及 |
|
data |
创建的工单Id。 |
状态码:400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
provider_code |
String |
参数解释: 服务标识。 取值范围: 不涉及 默认取值: 049 |
|
error_code |
String |
参数解释: 请求响应代码。 取值范围: GOM.00000000~GOM.00009999999 默认取值: GOM.00000000 |
|
error_msg |
String |
参数解释: 请求响应描述。 取值范围: 不涉及 |
请求示例
创建事件单。
https://{Endpoint}/v1/external/incident/create
{
"incident_type" : "inc_type_p_security_issues",
"creator" : "9605B67C741D4553887A3462771107D3",
"current_cloud_service" : [ "app001" ],
"assignee_scene" : "",
"is_service_interrupt" : true,
"enterprise_project" : [ "0" ],
"incident_description" : "事件描述",
"incident_assignee" : [ "9605B67C741D4553887A3462771107D3" ],
"incident_level" : "level_50",
"assignee_role" : "",
"incident_title" : "事件标题",
"incident_source" : "incident_source_manual",
"region" : [ "OCB_Cloud" ]
}
响应示例
状态码:200
请求成功。
更多状态码请参考状态码。
{
"error_code" : "GOM.00000000",
"error_msg" : null,
"provider_code" : 4,
"data" : {
"incident_num" : "IM202504221434480187641906"
}
}
状态码:400
服务器未能处理请求。
更多状态码请参考状态码。
{
"error_code" : "GOM.00007256",
"error_msg" : "参数错误",
"provider_code" : 4,
"data" : null
}
错误码
请参见错误码。