工单操作
功能介绍
变更单审批、撤销以及问题单的所有操作均通过此接口完成。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
POST /v1/{ticket_type}/actions
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
ticket_type |
是 |
String |
参数解释: 需要操作的工单类型,如需对变更单进行审批或者撤销传值change,如需对问题单进行操作传值issues_mgmt。 约束限制: 字符串 1 - 255字符 取值范围: 枚举值:
默认取值: 不涉及 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
user_id |
否 |
String |
参数解释: 执行当前操作的用户ID,该字段可不传递,用户信息已通过认证信息中获取。 约束限制: 字符串 1 - 255字符 取值范围: 不涉及 默认取值: 不涉及 |
ticket_id |
否 |
String |
参数解释: 需要操作的工单单号。 约束限制: 字符串 1 - 255字符 取值范围: 不涉及 默认取值: 不涉及 |
task_id |
否 |
String |
参数解释: 当前进行的操作对应的任务ID。 约束限制: 字符串 1 - 255字符 取值范围: 不涉及 默认取值: 不涉及 |
action |
否 |
String |
参数解释: 需要执行操作的动作信息。 约束限制: 字符串 1 - 255字符 取值范围: 枚举值
默认取值: 不涉及 |
params |
否 |
Object |
参数解释: 执行该操作具体的动作信息,以Json对象的方式进行传参,用于对当前执行动作的信息补充,无固定参数限制,具体不同操作需要传递的Json形式可参考请求示例。 约束限制: Json对象的Key最多1024个 取值范围: 不涉及 默认取值: 不涉及 |
响应参数
状态码:200
参数 |
参数类型 |
描述 |
---|---|---|
provider_code |
String |
参数解释: 服务标识。 取值范围: 不涉及 默认取值: 049 |
error_code |
String |
参数解释: 请求响应代码。 取值范围: GOM.00000000~GOM.00009999999 默认取值: GOM.00000000 |
error_msg |
String |
参数解释: 请求响应描述。 取值范围: 不涉及 |
状态码:400
参数 |
参数类型 |
描述 |
---|---|---|
provider_code |
String |
参数解释: 服务标识。 取值范围: 不涉及 默认取值: 049 |
error_code |
String |
参数解释: 请求响应代码。 取值范围: GOM.00000000~GOM.00009999999 默认取值: GOM.00000000 |
error_msg |
String |
参数解释: 请求响应描述。 取值范围: 不涉及 |
请求示例
-
问题单受理。
POST https://{Endpoint}/v1/issues_mgmt/actions { "ticket_id" : "ISU20250704160617014971439", "task_id" : "19410458913044643854408", "action" : "gocm_issues_accepte", "params" : { } }
-
问题单升降级。
POST https://{Endpoint}/v1/issues_mgmt/actions { "ticket_id" : "ISU20250704160617014971439", "task_id" : "19410463279482880024408", "action" : "ugrading_and_downgrading", "params" : { "up_down_updated_level" : "issues_level_3000", "up_down_grade_reason_comment" : "升降级说明信息。", "level" : "issues_level_4000" } }
-
问题单挂起。
POST https://{Endpoint}/v1/issues_mgmt/actions { "ticket_id" : "ISU20250704160617014971439", "task_id" : "19410468838026199064408", "action" : "being_handled_initiate_suspend", "params" : { "estimated_recovery_time" : 1751703023000, "suspend_description" : "test" } }
-
问题单挂起审批通过。
POST https://{Endpoint}/v1/issues_mgmt/actions { "ticket_id" : "ISU20250704161412012423624", "task_id" : "19410479307889786894408", "action" : "agreed", "params" : { "conclusion" : true, "approve_note" : "ok" } }
-
问题单恢复挂起。
POST https://{Endpoint}/v1/issues_mgmt/actions { "ticket_id" : "ISU20250704160617014971439", "task_id" : "19410469440202424334408", "action" : "suspend_resume", "params" : { } }
-
问题单转发责任人。
POST https://{Endpoint}/v1/issues_mgmt/actions { "ticket_id" : "ISU20250704160617014971439", "task_id" : "19410470423766712334408", "action" : "gocm_issues_handling_forwarding", "params" : { "explain" : "test", "forwarding_assigne" : "0ca5c3ca8d664abc832f6126a2d554d4", "virtual_schedule_type" : "issues_mgmt_virtual_schedule_type_2000" } }
-
问题单驳回。
POST https://{Endpoint}/v1/issues_mgmt/actions { "ticket_id" : "ISU20250704161237013947643", "task_id" : "19410474849428520974408", "action" : "gocm_issues_unaccepted_reject", "params" : { "unaccepted_rejection_description" : "驳回" } }
-
问题单撤销。
POST https://{Endpoint}/v1/issues_mgmt/actions { "ticket_id" : "ISU20250704161237013947643", "task_id" : "19410475647101255694408", "action" : "gocm_issues_undo_create", "params" : { "revocation_reason" : "cancel reason." } }
-
问题单提交解决方案无需变更。
POST https://{Endpoint}/v1/issues_mgmt/actions { "ticket_id" : "ISU20250704161412012423624", "task_id" : "19410480590801551384408", "action" : "submitting_question", "params" : { "root_cause_cloud_service" : "653f911cfab10c5b1dd33c3a", "is_common_issue" : false, "issue_version" : "", "regions" : "xxx", "root_cause_type" : "issues_root_cause_type_1000", "root_cause_comment" : "root cause.", "solution" : "solution", "is_need_change" : false, "sub_tickets" : [ { "affected_region" : "xxx", "target_type" : "regions", "target_value" : "xxx" } ] } }
-
变更单撤销。
POST https://{Endpoint}/v1/change/actions { "ticket_id" : "CM202507071541550199864932", "task_id" : "19421269243965276188310", "action" : "cancel_process_action", "params" : { "comment" : "reason for cancel" } }
-
变更单审批驳回。
POST https://{Endpoint}/v1/change/actions { "ticket_id" : "CM202504241549510199912413", "task_id" : "19153128494392852491549", "action" : "rejected", "params" : { "comment" : "审批驳回" } }
-
问题单审批通过。
POST https://{Endpoint}/v1/change/actions { "ticket_id" : "CM202505261606470132568015", "task_id" : "19269128923875287077915", "action" : "agreed", "params" : { "comment" : "审批通过" } }
响应示例
状态码:200
请求成功。
更多状态码请参考状态码。
{ "error_code" : "GOM.00000000", "error_msg" : null, "provider_code" : "049" }
状态码:400
服务器未能处理请求。
更多状态码请参考状态码。
{ "error_code" : "GOM.00007256", "error_msg" : "参数错误", "provider_code" : "049", "data" : null }
错误码
请参见错误码。