Updated on 2025-10-24 GMT+08:00

Creating an Incident Ticket

Function

Create an incident ticket.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    coc:ticket:create

    Write

    -

    -

    -

    -

URI

POST /v1/external/incident/create

Request Parameters

Table 1 Request body parameters

Parameter

Mandatory

Type

Description

region

No

Array of strings

Region code. If a WarRoom is automatically created, this field is mandatory. Currently, only one region code is supported.

enterprise_project

No

Array of strings

Enterprise project ID. Currently, only one enterprise project ID is supported.

start_time

No

Long

Timestamp when a fault occurs.

current_cloud_service

No

Array of strings

Home application ID. Currently, only one ID is supported.

incident_level

Yes

String

Incident Level

For details, see [Event Level] (coc_api_04_03_001_006.xml) incident_level.

is_service_interrupt

Yes

String

Whether the service is interrupted. The value can be true or false.

incident_type

Yes

String

Incident type.

For details, see [Event Type] (coc_api_04_03_001_006.xml) incident_type.

incident_ownership

No

String

Ownership

For details, see [Event] (coc_api_04_03_001_006.xml) incident_ownership.

incident_title

Yes

String

Event title. The value contains a maximum of 200 characters.

incident_description

No

String

Event description. The value contains a maximum of 600 characters.

incident_source

Yes

String

Document Source

For details, see [Event Source] (coc_api_04_03_001_006.xml) incident_source.

incident_assignee

No

Array of strings

The owner, scheduling scenario, and scheduling role cannot be empty at the same time. Currently, only one owner, scheduling scenario, and scheduling role are supported.

assignee_scene

No

String

In the scheduling scenario, the owner and scheduling role cannot be empty at the same time.

assignee_role

No

String

The scheduling role, scheduling scenario, and owner cannot be empty at the same time.

creator

Yes

String

Ticket creator.

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

provider_code

String

Definition:

Service ID.

Value range:

N/A

Default value:

049

error_code

String

Definition:

Request response code.

Value range:

GOM.00000000~GOM.00009999999

Default value:

GOM.00000000

error_msg

String

Definition:

Response description for a request.

Value range:

N/A

data

CreateExternalIncidentResponseData object

ID of the created ticket.

Table 3 CreateExternalIncidentResponseData

Parameter

Type

Description

incident_num

String

Event ticket number.

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

provider_code

String

Definition:

Service ID.

Value range:

N/A

Default value:

049

error_code

String

Definition:

Request response code.

Value range:

GOM.00000000~GOM.00009999999

Default value:

GOM.00000000

error_msg

String

Definition:

Response description for a request.

Value range:

N/A

Example Requests

Create an incident ticket.

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 description",
  "incident_assignee" : [ "9605B67C741D4553887A3462771107D3" ],
  "incident_level" : "level_50",
  "assignee_role" : "",
  "incident_title" : "Incident title",
  "incident_source" : "incident_source_manual",
  "region" : [ "OCB_Cloud" ]
}

Example Responses

Status code: 200

Request succeeded.

For more status codes, see Status Codes.

{
  "error_code" : "GOM.00000000",
  "error_msg" : null,
  "provider_code" : 4,
  "data" : {
    "incident_num" : "IM202504221434480187641906"
  }
}

Status code: 400

The request failed to be processed due to bad syntax.

For more status codes, see Status Codes.

{
  "error_code" : "GOM.00007256",
  "error_msg" : "Invalid parameters",
  "provider_code" : 4,
  "data" : null
}

Status Codes

Status Code

Description

200

Request succeeded.

For more status codes, see Status Codes.

400

The request failed to be processed due to bad syntax.

For more status codes, see Status Codes.

Error Codes

See Error Codes.