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

Querying Incident Tickets

Function

This API is used to query the incident object list.

Authorization

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

  • If you are using role- or policy-based authorization, refer to Permissions Policies and Supported Actions to obtain the permissions required.
  • If you are using identity policy-based authorization, the permission listed below is required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependent Action

    coc:ticket:list

    List

    -

    -

    -

    -

URI

POST /v2/incidents/list

Request Parameters

Table 1 Request body parameters

Parameter

Type

Mandatory

Description

page

Integer

No

Definition:

Pagination parameter of the API for querying the incident tickets, indicating the current page number. The preset value is used to query the data on the first page.

Constraints

N/A

Range:

1 to 1,000,000

Default Value:

1

per_page

Integer

No

Definition:

Pagination parameter of the API for querying the incident tickets, indicating the number of incidents queried on each page.

Constraints

N/A

Range:

1 to 200

Default value:

10

contain_all

Boolean

No

Definition:

Whether to return all data.

Constraints

N/A

Range:

true/false

Default value:

false

contain_total

Boolean

No

Definition:

Whether the query result contains the total number of incident tickets that can be queried under the current conditions.

Constraints

N/A

Range:

true/false

Default value:

true

contain_sub_ticket

Boolean

No

Definition:

Whether the query result contains sub-ticket information.

Constraints:

N/A

Range:

true/false

Default value:

true

string_filters

Array of ObjectFilterV2

No

Definition:

Filter for querying incident tickets.

Constraints

Maximum character length: 20

Range:

N/A

Default value:

N/A

sort_filter

ObjectFilterV2 object

No

Definition:

Filter for sorting incident tickets.

Constraints

Maximum character length: 10

Range:

N/A

Default value:

N/A

condition

String

No

Definition:

Expression. Complex expressions may contain parentheses (), ampersands (&), or vertical bars (|).

Example: (filterName1 & filterName2) | filterName3.

filterName*: obtained from string_filters ObjectFilter.name.

If this parameter is empty, the preset value of the condition in string_filters is AND.

Constraints

String

Range:

Length: 1 to 10,000 characters

Default value:

N/A

count_filters

Array of CountFilterV2

No

Definition:

Filter for counting the number of service tickets.

Constraints

Array length: 0 to 10 characters

Range:

N/A

Default value:

N/A

fields

Array of String

No

Definition:

Fields returned by the API.

Constraints:

Array length: 0 to 100

Range:

N/A

Default Value:

N/A

group_by_filter

ObjectFilterV2 object

No

Definition:

Group filter

Constraints

Array length: 0 to 20 characters

Range:

N/A

Default Value:

N/A

int_filters

Array of ObjectFilterV2

No

Definition:

Integer filter

Constraints

Array length: 0 to 20 characters

Range:

N/A

Default Value:

N/A

ticket_types

Array of String

No

Definition:

Type of the service ticket to be queried. The value is incident in the scenario where the incident list is obtained.

Constraints

Array length: 0 to 5 characters

Range:

N/A

Default Value:

N/A

Table 2 CountFilterV2 parameters

Parameter

Type

Mandatory

Description

name

String

No

Definition:

Filter name, which is used for the concatenation of condition expressions.

Constraints

String

Range:

0 to 255 characters

Default value:

N/A

filters

Array of ObjectFilterV2

No

Definition:

Statistics quantity filter.

Constraints

Array length: 0 to 10 characters

Range:

N/A

Default value:

N/A

Table 3 ObjectFilterV2 parameters

Parameter

Type

Mandatory

Description

name

String

No

Definition:

Filter name, which is used for the concatenation of condition expressions.

Constraints

String

Range:

0 to 255 characters

Default Value:

N/A

field

String

Yes

Definition:

Field key. For details about the value, see Table 5.

Constraints

String

Range:

0 to 255 characters

Default Value:

N/A

operator

String

Yes

Definition:

Operator. The value can be in/like/startwith/endwith/=/!=/>/<.

Constraints

String

Range:

0 to 20 characters

Default Value:

N/A

values

Arrays of String

Yes

Definition:

Values to be filtered. The values can be strings, timestamps, enumerations, and integers, which are transferred in character strings.

Constraints

Array length: 1 to 1,024 characters

Element length:

Minimum length: 0 character

Maximum length: 1,024 characters

Range:

N/A

Default Value:

N/A

group

String

No

Definition:

Group query information.

Constraints

String

Range:

0 to 255 characters

Default Value:

N/A

match_type

String

No

Definition:

Matching mode

Constraints

String

Range:

0 to 255 characters

Default Value:

N/A

priority_type

String

No

Definition:

Priority processing mode.

Constraints

String

Range:

0 to 255 characters

Default Value:

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Mandatory

Description

provider_code

String

No

Definition:

Service ID.

Range:

Minimum length: 0 character

Maximum length: 256 characters

Default Value:

049

error_code

String

No

Definition:

Request response code. The value ranges from 0000 to 9999. The value is 0 in normal cases.

Range:

Length: 0 to 256 characters

Default Value:

0

error_msg

String

No

Definition:

Response description for a request.

Range:

Character length: 0 to 256

Default Value:

N/A

data

ListIncidentsResponseBodyData object

No

Definition:

Search results.

Range:

N/A

Default Value:

N/A

Table 5 ListIncidentsResponseBodyData parameters

Parameter

Type

Mandatory

Description

total

Long

No

Definition:

Total number of the queried incident tickets.

Range:

Length: 1 to 9,999,999,999,999 characters

Default Value:

0

tickets

Arrays of

IncidentDataInfo

No

Definition:

Result data list.

Range:

Array length: 1 to 1,000 characters

Default Value:

N/A

count_results

Arrays of Long

No

Definition:

Number of service tickets.

Range:

Array length: 1 to 1,000 characters

Default Value:

N/A

Table 6 IncidentDataInfo parameters

Parameter

Type

Mandatory

Description

current_cloud_service_id

String

No

Definition:

Cloud service ID.

Range:

Length: 0 to 255 characters

Default Value:

N/A

level_id

String

No

Definition:

Incident level. For details, see Incident Level in the incident-related enumeration information.

Range:

Length: 0 to 255 characters

Default Value:

N/A

mtm_region

String

No

Definition:

Region.

Range:

Length: 0 to 255 characters

Default Value:

N/A

source_id

String

No

Definition:

Incident source. For details, see Incident Source in the incident-related enumerated information.

Range:

Length: 0 to 255 characters

Default Value:

N/A

forward_rule_id

String

No

Definition:

Forwarding rule.

Range:

Length: 0 to 255 characters

Default Value:

N/A

enterprise_project_id

String

No

Definition:

Enterprise project ID.

Range:

Length: 0 to 255 characters

Default Value:

N/A

mtm_type

String

No

Definition:

Incident type. For details, see Incident Type in the incident-related enumerated information.

Range:

Length: 0 to 255 characters

Default Value:

N/A

title

String

No

Definition:

Incident title.

Range:

Length: 0 to 255 characters

Default Value:

N/A

description

String

No

Definition:

Incident description.

Range:

Length: 0 to 255 characters

Default Value:

N/A

ticket_id

String

No

Definition:

Incident ticket No.

Range:

Length: 0 to 255 characters

Default Value:

N/A

is_service_interrupt

String

No

Definition:

Whether the service is interrupted.

Range:

true/false

Default Value:

N/A

work_flow_status

String

No

Definition:

Process status.

Range:

Length: 0 to 255 characters

Default Value:

N/A

phase

String

No

Definition:

Process phase.

Range:

Length: 0 to 255 characters

Default Value:

N/A

assignee

String

No

Definition:

Owner.

Range:

Length: 0 to 255 characters

Default Value:

N/A

creator

String

No

Definition:

Creator.

Range:

Length: 0 to 255 characters

Default Value:

N/A

operator

String

No

Definition:

Last operator.

Range:

Length: 0 to 255 characters

Default Value:

N/A

update_time

String

No

Definition:

Update time, which is a timestamp.

Range:

Length: 1 to 50 characters

Default Value:

N/A

create_time

String

No

Definition:

Creation time, which is a timestamp.

Range:

Length: 1 to 50 characters

Default Value:

N/A

start_time

String

No

Definition:

Fault start time, in timestamp format.

Range:

Length: 1 to 50 characters

Default Value:

N/A

handle_time

String

No

Definition:

Processing time, which is a timestamp.

Range:

Length: 1 to 50 characters

Default Value:

N/A

incident_ownership

String

No

Definition:

Incident ownership.

Range:

Length: 0 to 255 characters

Default Value:

N/A

enum_data_list

Arrays of TicketInfoEnumData

No

Definition:

Enumerated values.

Range:

Array length: 1 to 1,024 characters

Default Value:

N/A

Table 7 TicketInfoEnumData parameters

Parameter

Type

Mandatory

Description

prop_id

String

No

Definition:

Field identified by key.

Range:

Length: 0 to 255 characters

Default Value:

N/A

biz_id

String

No

Definition:

Enumerated key.

Range:

Length: 0 to 255 characters

Default Value:

N/A

name_zh

String

No

Definition:

Chinese name.

Range:

Length: 0 to 255 characters

Default Value:

N/A

name_en

String

No

Definition:

English name.

Range:

Length: 0 to 255 characters

Default Value:

N/A

Request Examples

Query the incident list.

POST https://{Endpoint}/v2/incidents/list

{
    "page": 1,
    "per_page": 10,
    "sort_filter": {
        "operator": "desc",
        "field": "create_time",
        "name": "create_time",
        "values": [
            "create_time"
        ]
    },
    "string_filters": [
        {
            "operator": "in",
            "field": "assignee",
            "name": "assignee_default",
            "values": [
                "653989085ba7487184d7cf219b8aa51e"
            ]
        },
        {
            "operator": "in",
            "field": "approver",
            "name": "approver_default",
            "values": [
                "653989085ba7487184d7cf219b8aa51e"
            ]
        },
        {
            "operator": "in",
            "field": "work_flow_status",
            "name": "work_flow_status_default",
            "values": [
                "incident_draft",
                "INCIDENT_STATUS_ACKNOWLEDGED",
                "INCIDENT_STATUS_REJECTED",
                "INCIDENT_STATUS_RESOLVED",
                "INCIDENT_STATUS_TRIGGERED",
                "pausing",
                "level_approving"
            ]
        },
        {
            "operator": "in",
            "field": "work_flow_status",
            "name": "work_flow_status_approve",
            "values": [
                "level_approving",
                "pause_approving"
            ]
        }
    ],
    "contain_total": true,
    "condition": "(work_flow_status_default & assignee_default) | (approver_default & work_flow_status_approve)"
}

Response Examples

Status code: 200

Request result is returned.

For more status codes, see Status Codes.

{
    "provider_code": "049",
    "error_code": "GOM.00000000",
    "error_msg": null,
    "data": {
        "total": 1161,
        "tickets": [
            {
                "current_cloud_service_id": "66431ed6ffed4e034ce18ff0",
                "level_id": "level_30",
                "mtm_region": "",
                "source_id": "incident_source_forwarding",
                "forward_rule_id": "1ccf2d2ae38b157ff103e84d710a9509",
                "enterprise_project_id": "0",
                "mtm_type": "inc_type_p_reliability_issues",
                "emergency_plan_type": "JOB",
                "emergency_plan_id": "RB20240527095644019f8019h",
                "emergency_plan_category": "COMMUNAL",
                "attachment": "",
                "title": "Cloud Eye contingency plan auto execution_Incident 06",
                "description": "Condit****inutes",
                "handle_time": 315,
                "is_service_interrupt": false,
                "ticket_id": "IM202504101040380143525888",
                "assignee": "653989085ba7487184d7cf219b8aa51e",
                "work_flow_status": "INCIDENT_STATUS_TRIGGERED",
                "phase": "phase_incident_create",
                "enum_data_list": [
                    {
                        "name_zh": "testApp1",
                        "name_en": "testApp1",
                        "biz_id": "66431ed6ffed4e034ce18ff0",
                        "prop_id": "current_cloud_service_id",
                        "model_id": "TicketInfo"
                    },
                    {
                        "name_zh": "Cloud Eye automatic response plan execution_incident 06",
                        "name_en": "Cloud Eye contingency plan auto execution_Incident 06",
                        "biz_id": "1ccf2d2ae38b157ff103e84d710a9509",
                        "prop_id": "forward_rule_id"
                    },
                    {
                        "name_zh": "P3",
                        "name_en": "P3",
                        "biz_id": "level_30",
                        "prop_id": "level_id"
                    },
                    {
                        "name_zh": "Not accepted",
                        "name_en": "TRIGGERED",
                        "biz_id": "INCIDENT_STATUS_TRIGGERED",
                        "prop_id": "work_flow_status"
                    },
                    {
                        "name_zh": "Performance/Reliability problem",
                        "name_en": "reliability issues",
                        "biz_id": "inc_type_p_reliability_issues",
                        "prop_id": "mtm_type"
                    },
                    {
                        "name_zh": "Transfer creation",
                        "name_en": "Transfer creation",
                        "biz_id": "incident_source_forwarding",
                        "prop_id": "source_id"
                    },
                    {
                        "name_zh": "COC-Script",
                        "name_en": "COC-Script",
                        "biz_id": "653989085ba7487184d7cf219b8aa51e",
                        "prop_id": "assignee"
                    }
                ],
                "update_time": 1744252838924,
                "create_time": 1744252838072
            }
        ]
    }
}

Status code: 400

The server failed to process the request.

For more status codes, see Status Codes.

{
  "error_code" : "GOM.00007256",
  "error_msg" : "Parameter error",
  "provider_code" : "049",
  "data" : null
}

Status Codes

Status Code

Description

200

Request result is returned.

For more status codes, see Status Codes.

400

The server failed to process the request.

For more status codes, see Status Codes.

Error Codes

For details, see Error Codes.