创建事件单
功能介绍
创建事件单。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
POST /v1/external/incident/create
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
region |
否 |
Array of strings |
区域Code,如果自动拉起WarRoom则为必填,现在只支持1个。 最小长度:0 最大长度:255 数组长度:0 - 1 |
enterprise_project |
否 |
Array of strings |
企业项目ID,现在只支持1个。 最小长度:0 最大长度:255 数组长度:0 - 1 |
start_time |
否 |
Long |
故障发生时间戳。 最小值:1 最大值:9999999999999 |
current_cloud_service |
否 |
Array of strings |
归属应用ID,现在只支持1个。 最小长度:0 最大长度:255 数组长度:0 - 1 |
incident_level |
是 |
String |
事件级别 参考:枚举事件级别incident_level 最小长度:0 最大长度:255 |
is_service_interrupt |
是 |
String |
业务是否中断,取值:true/false。 最小长度:0 最大长度:10 |
incident_type |
是 |
String |
事件类别 参考:枚举事件类别incident_type 最小长度:0 最大长度:255 |
incident_ownership |
否 |
String |
事件归属 参考:枚举事件归属incident_ownership 最小长度:0 最大长度:255 |
incident_title |
是 |
String |
事件标题,最大长度:200。 最小长度:0 最大长度:200 |
incident_description |
否 |
String |
事件描述,最大长度:600。 最小长度:0 最大长度:600 |
incident_source |
是 |
String |
单据来源 参考:枚举事件来源incident_source 最小长度:0 最大长度:255 |
incident_assignee |
否 |
Array of strings |
责任人,排班场景和排班角色不能同时为空,现在只支持1个。 最小长度:0 最大长度:255 数组长度:0 - 100 |
assignee_scene |
否 |
String |
排班场景,责任人和排班角色不能同时为空。 最小长度:0 最大长度:255 |
assignee_role |
否 |
String |
排班角色,排班场景和责任人不能同时为空。 最小长度:0 最大长度:255 |
creator |
是 |
String |
创单人。 最小长度:0 最大长度:255 |
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
provider_code |
String |
服务标识。 缺省值:049 最小长度:3 最大长度:100000000 |
error_code |
String |
请求响应代码,范围:GOM.00000000~GOM.00009999999,正常时取值:GOM.00000000。 缺省值:GOM.00000000 最小长度:1 最大长度:15 |
error_msg |
String |
请求响应描述。 最小长度:0 最大长度:100000000 |
data |
创建的工单Id。 |
状态码:400
参数 |
参数类型 |
描述 |
---|---|---|
provider_code |
String |
服务标识。 缺省值:049 最小长度:3 最大长度:100000000 |
error_code |
String |
请求响应代码,范围:GOM.00000000~GOM.00009999999,正常时取值:GOM.00000000。 缺省值:GOM.00000000 最小长度:1 最大长度:15 |
error_msg |
String |
请求响应描述。 最小长度:0 最大长度:100000000 |
请求示例
创建事件单。
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" : [ "***_Cloud" ] }
响应示例
状态码:200
请求成功。
更多状态码请参考状态码。
{ "error_code" : "GOM.00000000", "error_msg" : null, "provider_code" : "049", "data" : { "incident_num" : "IM202504221434480187641906" } }
状态码:400
服务器未能处理请求。
更多状态码请参考状态码。
{ "error_code" : "GOM.00007256", "error_msg" : "参数错误", "provider_code" : "049", "data" : null }
错误码
请参见错误码。