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

Obtaining the Historical Incidents

Function

This API is used to query the incident operation history.

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:getOperationHistories

    List

    -

    -

    -

    -

URI

POST /v2/incidents/{incident_id}/histories

Table 1 Request path parameters

Parameter

Type

Mandatory

Description

incident_id

String

Yes

Definition:

Incident ticket No.

Constraints

String

Range:

Length: 1 to 50 characters

Default Value:

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Type

Mandatory

Description

count_filters

Array of CountFilterV2

No

Definition:

Filter for counting the number of service tickets.

Constraints

Array length: 0 to 10

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

Range:

N/A

Default Value:

N/A

int_filters

Array of ObjectFilterV2

No

Definition:

Integer filter

Constraints

Array length: 0 to 20

Range:

N/A

Default Value:

N/A

string_filters

Array of ObjectFilterV2

No

Definition:

Condition filter.

Constraints

Array length: 0 to 20

Range:

N/A

Default Value:

N/A

sort_filter

ObjectFilterV2 object

No

Definition:

Sorting filter.

Constraints

Array length: 0 to 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

Table 3 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

Default value:

N/A

filters

Array of ObjectFilterV2

No

Definition:

Statistics quantity filter.

Constraints:

Array length: 0 to 10

Range:

N/A

Default value:

N/A

Table 4 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 5 Response body parameters

Parameter

Type

Mandatory

Description

provider_code

String

No

Definition:

Service ID. The fixed value is 049.

Range:

Length: 0 to 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:

Length: 0 to 256 characters

Default Value:

N/A

data

CocListHistoryResponseDataV2 object

No

Definition:

Interface response details.

Range:

N/A

Default Value:

N/A

Table 6 CocListHistoryResponseDataV2 parameters

Parameter

Type

Mandatory

Description

total

Long

No

Definition:

Total operation records of incident tickets returned by the API.

Range:

1-9999999999999

Default Value:

N/A

info

Arrays of CocTicketHistoryBaseInfo

No

Definition:

History information.

Range:

Array length: 0 to 1,024 characters

Default Value:

N/A

Table 7 CocTicketHistoryBaseInfo parameters

Parameter

Type

Mandatory

Description

action

String

No

Definition:

Action operation type.

Range:

Length: 0 to 255 characters

Default Value:

N/A

action_name_zh

String

No

Definition:

Action name (Chinese).

Range:

Length: 0 to 255 characters

Default Value:

N/A

action_name_en

String

No

Definition:

Action name (English).

Range:

Length: 0 to 255 characters

Default Value:

N/A

operator

String

No

Definition:

Operator ID.

Range:

Length: 0 to 255 characters

Default Value:

N/A

status

String

No

Definition:

Current status.

Range:

Length: 0 to 255 characters

Default Value:

N/A

start_time

String

No

Definition:

Start time of an operation.

Range:

Length: 0 to 1,000 characters

Default Value:

N/A

stop_time

String

No

Definition:

End time of an operation.

Range:

Length: 0 to 1,000 characters

Default Value:

N/A

comment

String

No

Definition:

Remarks.

Range:

Length: 0 to 255 characters

Default Value:

N/A

enum_data_list

Arrays of TicketInfoEnumData

No

Definition:

Enumerated values.

Range:

Array length: 0 to 1,024 characters

Default Value:

N/A

Table 8 TicketInfoEnumData parameters

Parameter

Type

Mandatory

Description

prop_id

String

No

Definition:

Field 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

Obtain the incident operation history.

POST https://{Endpoint}/v2/incidents/{incident_id}/histories

{
    "sort_filter": {
        "operator": "desc",
        "field": "start_time",
        "name": "start_time",
        "values": [
            "start_time"
        ]
    }
}

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": 3,
        "info": [
            {
                "action": "incident_accept",
                "operator": "653989085ba7487184d7cf219b8aa51e",
                "start_time": 1744285427529,
                "action_name_zh": "Accepted incident",
                "action_name_en": "Handling an incident",
                "status": "INCIDENT_STATUS_ACKNOWLEDGED",
                "enum_data_list": [
                    {
                        "name_zh": "COC-Script",
                        "name_en": "COC-Script",
                        "biz_id": "653989085ba7487184d7cf219b8aa51e",
                        "prop_id": "operator"
                    }
                ]
            },
            {
                "action_id": "main",
                "comment": "Create project f****elling. ",
                "start_time": 1744252838982,
                "stop_time": 1744285427529,
                "action_name_zh": "Contingency Plan Auto Execution Failure",
                "action_name_en": "Contingency Plan Auto Execution Failure",
                "status": "INCIDENT_STATUS_TRIGGERED",
                "enum_data_list": [

                ]
            },
            {
                "action": "create_incident",
                "start_time": 1744252838667,
                "stop_time": 1744252838982,
                "action_name_zh": "Creating an incident ticket",
                "action_name_en": "create incident",
                "status": "INCIDENT_STATUS_TRIGGERED",
                "enum_data_list": [

                ]
            }
        ]
    }
}

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.