Querying Historical Service Tickets
Function
This API is used to obtain the historical records of incident tickets or issue tickets. The types of service tickets are distinguished by ticket_type. For an incident ticket, the value is incident. For an issue ticket, the value is issues_mgmt. This API requires the ticket ID to be queried, which is configured through the request parameter string_filters. For details, see the request parameter description and example.
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:getOperationHistories
List
-
-
-
-
URI
POST /v1/external/{ticket_type}/list-histories
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
ticket_type |
Yes |
String |
Definition: Type of the service ticket to be queried. The value is incident for an incident ticket and issues_mgmt for an issue ticket. Constraints: N/A Value range: The value can be:
Default value: N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
string_filters |
No |
Array of ObjectFilter objects |
Definition: Search criteria of a character string. You can search for a specific ticket based on the criteria. Constraints: Array length: 0 to 20 Value range: N/A Default value: N/A |
|
sort_filter |
No |
ObjectFilter object |
Definition: Sorting condition of the searched historical records. The records can be sorted by the creation time of the operation records. Constraints: N/A Value range: N/A Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
operator |
No |
String |
Definition: Operators include in, like, desc, startwith, endwith, =, !=, >, <, and more. Constraints: When you query a ticket ID, the operator is equal to, indicating that a specific ticket is searched for. When the query result is sorted, the operator is desc. Minimum length: 0 Maximum length: 20 Value range: N/A Default value: N/A |
|
field |
No |
String |
Definition: Name of the field to be operated. Constraints: When a ticket is queried, the field name is ticket_id. When the query result is sorted and filtered based on the creation time, the field name is start_time. Minimum length: 0 Maximum length: 255 Value range: N/A Default value: N/A |
|
name |
No |
String |
Definition: Name of the condition to be operated. Constraints: When a ticket is queried, the condition name is ticket_id. When the query result is sorted and filtered based on the creation time, the condition name is start_time. Minimum length: 0 Maximum length: 255 Value range: N/A Default value: N/A |
|
values |
No |
Array of objects |
Definition: Condition value that must be met when a field is operated. Constraints: When a ticket is queried, the condition value is the ticket ID. When the query result is sorted and filtered based on the creation time, the condition value is start_time. Array length: 0 to 1024 Value range: N/A Default value: N/A |
Response Parameters
Status code: 200
|
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 |
data object |
Definition: Data returned after a successful request. Value range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
total |
Long |
Definition: Total number of operation records. Value range: N/A |
|
info |
Array of TicketHistoryInfo objects |
Definition: Details about an operation record. Value range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
action_id |
String |
Definition: Operation ID. Value range: N/A |
|
action |
String |
Definition: Information about the current action. Value range: N/A |
|
sub_action |
String |
Definition: Sub-action of the current operation. Value range: N/A |
|
operator |
String |
Definition: Employee ID of the current operator. Value range: N/A |
|
comment |
String |
Definition: Comment information of the current operation. Comment information is added when the operation is approved or rejected. Value range: N/A |
|
id |
String |
Definition: Primary key ID of an operation record. Value range: N/A |
|
ticket_id |
String |
Definition: Ticket ID, which is the unique ID of a ticket stored in the database. Value range: N/A |
|
start_time |
Long |
Definition: Start time of the current operation. The value is a 13-digit timestamp. Value range: N/A |
|
stop_time |
Long |
Definition: End time of the current operation. The value is a 13-digit timestamp. Value range: N/A |
|
target_type |
String |
Definition: Object type. Value range: N/A |
|
target_value |
String |
Definition: Object value. Value range: N/A |
|
is_deteted |
Boolean |
Definition: Whether the current operation record has been deleted. Value range: N/A |
|
update_time |
Long |
Definition: Update time. Value range: N/A |
|
action_name_zh |
String |
Definition: Chinese name of the current action. Value range: N/A |
|
action_name_en |
String |
Definition: English name of the current action. Value range: N/A |
|
action_template_zh |
String |
Definition: Chinese template of the current operation action. When the ticket is escalated or de-escalated, this field stores the escalation or de-escalation details. Value range: N/A |
|
action_template_en |
String |
Definition: English template of the current operation action. When the service ticket is escalated or de-escalated, this field stores the escalation or de-escalation details. Value range: N/A |
|
status |
String |
Definition: Status of the ticket corresponding to the current operation. Value range: N/A |
|
final_sub_action |
String |
Definition: Final sub-action. Value range: N/A |
|
enum_data_list |
Array of EnumDataInfo objects |
Definition: Enumerated data. The operator information is stored in the enumerated value. The enumerated value of match_type is reference__base_config.User, storing the information about the current operator. name_zh indicates the user name, and biz_id indicates the ID of the current operator. Value range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
is_deleted |
Boolean |
Definition: Whether the current enumerated value has been deleted. Value range: N/A |
|
match_type |
String |
Definition: Matching type. Currently, match_type is set to reference__base_config.User, and name_zh indicates the name of the current operator. Value range: N/A |
|
ticket_id |
String |
Definition: Service ticket number. Value range: N/A |
|
real_ticket_id |
String |
Definition: Actual ticket number. Value range: N/A |
|
name_zh |
String |
Definition: Chinese name of the enumerated value. Value range: N/A |
|
name_en |
String |
Definition: English name of the enumerated value. Value range: N/A |
|
user_name |
String |
Definition: Operator name. Value range: N/A |
|
biz_id |
String |
Definition: Unique ID of an enumerated value. When match_type is set to reference__base_config.User, the value of biz_id is the unique ID of the operator. Value range: N/A |
|
prop_id |
String |
Definition: Type corresponding to the current enumerated value. The operator is the operator. Value range: N/A |
|
model_id |
String |
Definition: Model ID corresponding to different applications in the background. The value in the historical record is TicketHistoryInfo. Value range: N/A |
Status code: 400
|
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
-
Query the operation records of incident ticket IM202505122006320125400123 and sort the records in descending order.
POST https://{Endpoint}/v1/external/incident/list-histories { "string_filters" : [ { "operator" : "=", "field" : "ticket_id", "name" : "ticket_id", "values" : [ "IM202505122006320125400123" ] } ], "sort_filter" : { "operator" : "desc", "field" : "start_time", "name" : "start_time", "values" : [ "start_time" ] } } -
Query the operation records of issue ticket ISU20250328114738010447096 and sort the records in descending order.
POST https://{Endpoint}/v1/external/issues_mgmt/list-histories { "string_filters" : [ { "operator" : "=", "field" : "ticket_id", "name" : "ticket_id", "values" : [ "ISU20250328114738010447096" ] } ], "sort_filter" : { "operator" : "desc", "field" : "start_time", "name" : "start_time", "values" : [ "start_time" ] } }
Example Responses
Status code: 200
Request succeeded.
For more status codes, see Status Codes.
{
"example1" : {
"error_code" : "GOM.00000000",
"error_msg" : null,
"provider_code" : "049",
"data" : {
"total" : 4,
"info" : [ {
"action_id" : "main",
"action" : "incident_confirm",
"sub_action" : "success",
"operator" : "4bb5b07fce7c42859e943103a7234bae",
"comment" : "ok",
"id" : "fb9c0d40f18effe4d2fc2a6493a635d5",
"ticket_id" : "3e051d66-5fa3-4149-8fb4-2c482b0021d6",
"start_time" : 1749546452867,
"is_deteted" : false,
"action_name_zh" : "Verify that the incident has been resolved.",
"action_name_en" : "Verify that the incident has been resolved.",
"status" : "INCIDENT_STATUS_COMPLETED",
"final_sub_action" : "success",
"enum_data_list" : [ {
"is_deleted" : false,
"match_type" : "reference__base_config.User",
"ticket_id" : "3e051d66-5fa3-4149-8fb4-2c482b0021d6",
"real_ticket_id" : "IM202506101705560177472084",
"name_zh" : "coc_platform_apitest",
"name_en" : "coc_platform_apitest",
"user_name" : "coc_platform_apitest",
"biz_id" : "4bb5b07fce7c42859e943103a7234bae",
"prop_id" : "operator",
"model_id" : "TicketHistoryInfo"
} ]
}, {
"action_id" : "main",
"action" : "incident_confirm",
"sub_action" : "create",
"operator" : "4bb5b07fce7c42859e943103a7234bae",
"id" : "05a3bbd05d592abc8230cd01396af4a7",
"ticket_id" : "3e051d66-5fa3-4149-8fb4-2c482b0021d6",
"start_time" : 1749546447093,
"stop_time" : 1749546452867,
"is_deteted" : false,
"action_name_zh" : "Handle an incident ticket.",
"action_name_en" : "Handling an Event",
"status" : "INCIDENT_STATUS_RESOLVED",
"final_sub_action" : "success",
"enum_data_list" : [ {
"is_deleted" : false,
"match_type" : "reference__base_config.User",
"ticket_id" : "3e051d66-5fa3-4149-8fb4-2c482b0021d6",
"real_ticket_id" : "IM202506101705560177472084",
"name_zh" : "coc_platform_apitest",
"name_en" : "coc_platform_apitest",
"user_name" : "coc_platform_apitest",
"biz_id" : "4bb5b07fce7c42859e943103a7234bae",
"prop_id" : "operator",
"model_id" : "TicketHistoryInfo"
} ]
}, {
"action_id" : "main",
"action" : "incident_accept",
"sub_action" : "success",
"operator" : "4bb5b07fce7c42859e943103a7234bae",
"id" : "3e3cb689c6bd3a1d5f9851bdc8291571",
"ticket_id" : "3e051d66-5fa3-4149-8fb4-2c482b0021d6",
"start_time" : 1749546361818,
"stop_time" : 1749546447093,
"is_deteted" : false,
"action_name_zh" : "Accept an incident ticket.",
"action_name_en" : "Handling an incident",
"status" : "INCIDENT_STATUS_ACKNOWLEDGED",
"final_sub_action" : "success",
"enum_data_list" : [ {
"is_deleted" : false,
"match_type" : "reference__base_config.User",
"ticket_id" : "3e051d66-5fa3-4149-8fb4-2c482b0021d6",
"real_ticket_id" : "IM202506101705560177472084",
"name_zh" : "coc_platform_apitest",
"name_en" : "coc_platform_apitest",
"user_name" : "coc_platform_apitest",
"biz_id" : "4bb5b07fce7c42859e943103a7234bae",
"prop_id" : "operator",
"model_id" : "TicketHistoryInfo"
} ]
}, {
"action_id" : "main",
"action" : "create_incident",
"sub_action" : "success",
"operator" : "4bb5b07fce7c42859e943103a7234bae",
"id" : "68b38efc90600ae3d4a107c9a2898b29",
"ticket_id" : "3e051d66-5fa3-4149-8fb4-2c482b0021d6",
"start_time" : 1749546356953,
"stop_time" : 1749546361818,
"is_deteted" : false,
"action_name_zh" : "Create an incident ticket.",
"action_name_en" : "create incident",
"status" : "INCIDENT_STATUS_TRIGGERED",
"final_sub_action" : "success",
"enum_data_list" : [ {
"is_deleted" : false,
"match_type" : "reference__base_config.User",
"ticket_id" : "3e051d66-5fa3-4149-8fb4-2c482b0021d6",
"real_ticket_id" : "IM202506101705560177472084",
"name_zh" : "coc_platform_apitest",
"name_en" : "coc_platform_apitest",
"user_name" : "coc_platform_apitest",
"biz_id" : "4bb5b07fce7c42859e943103a7234bae",
"prop_id" : "operator",
"model_id" : "TicketHistoryInfo"
} ]
} ]
}
},
"example2" : {
"error_code" : "GOM.00000000",
"error_msg" : null,
"provider_code" : 4,
"data" : {
"total" : 4,
"info" : [ {
"history_kind" : "issues_mgmt_history_type_1000",
"action_id" : "main",
"action" : "gocm_issues_verifying",
"sub_action" : "success",
"operator" : "4bb5b07fce7c42859e943103a7234bae",
"comment" : "ok",
"id" : "cffe457c428f6b853a8e75c03f859168",
"ticket_id" : "e59ea369-8fbd-4876-b37d-92b2ae50b5b3",
"start_time" : 1749546975156,
"is_deteted" : false,
"action_name_zh" : "Issue verified",
"action_name_en" : "The problem passes the verification.",
"status" : "issues_work_flow_status_12000",
"final_sub_action" : "success",
"enum_data_list" : [ {
"is_deleted" : false,
"match_type" : "enum",
"ticket_id" : "e59ea369-8fbd-4876-b37d-92b2ae50b5b3",
"real_ticket_id" : "ISU20250610171554014510592",
"name_zh" : "Main process",
"name_en" : "Main Process",
"biz_id" : "issues_mgmt_history_type_1000",
"prop_id" : "history_kind",
"model_id" : "TicketHistoryInfo"
}, {
"is_deleted" : false,
"match_type" : "reference__base_config.User",
"ticket_id" : "e59ea369-8fbd-4876-b37d-92b2ae50b5b3",
"real_ticket_id" : "ISU20250610171554014510592",
"name_zh" : "coc_platform_apitest",
"name_en" : "coc_platform_apitest",
"user_name" : "coc_platform_apitest",
"biz_id" : "4bb5b07fce7c42859e943103a7234bae",
"prop_id" : "operator",
"model_id" : "TicketHistoryInfo"
} ]
}, {
"history_kind" : "issues_mgmt_history_type_1000",
"action_id" : "main",
"action" : "gocm_issues_submit_issues_solutions",
"sub_action" : "success",
"operator" : "4bb5b07fce7c42859e943103a7234bae",
"id" : "4c13b2c7b09daf7034740462059e53bc",
"ticket_id" : "e59ea369-8fbd-4876-b37d-92b2ae50b5b3",
"start_time" : 1749546967462,
"stop_time" : 1749546975156,
"is_deteted" : false,
"action_name_zh" : "Submit the issue for a solution.",
"action_name_en" : "Submit issues to solutions",
"status" : "issues_work_flow_status_5000",
"final_sub_action" : "success",
"enum_data_list" : [ {
"is_deleted" : false,
"match_type" : "enum",
"ticket_id" : "e59ea369-8fbd-4876-b37d-92b2ae50b5b3",
"real_ticket_id" : "ISU20250610171554014510592",
"name_zh" : "Main process",
"name_en" : "Main Process",
"biz_id" : "issues_mgmt_history_type_1000",
"prop_id" : "history_kind",
"model_id" : "TicketHistoryInfo"
}, {
"is_deleted" : false,
"match_type" : "reference__base_config.User",
"ticket_id" : "e59ea369-8fbd-4876-b37d-92b2ae50b5b3",
"real_ticket_id" : "ISU20250610171554014510592",
"name_zh" : "coc_platform_apitest",
"name_en" : "coc_platform_apitest",
"user_name" : "coc_platform_apitest",
"biz_id" : "4bb5b07fce7c42859e943103a7234bae",
"prop_id" : "operator",
"model_id" : "TicketHistoryInfo"
} ]
}, {
"history_kind" : "issues_mgmt_history_type_1000",
"action_id" : "main",
"action" : "gocm_issues_accepte",
"sub_action" : "success",
"operator" : "4bb5b07fce7c42859e943103a7234bae",
"id" : "f47c48bdd0a85dd8ec2a620cdb998e48",
"ticket_id" : "e59ea369-8fbd-4876-b37d-92b2ae50b5b3",
"start_time" : 1749546958026,
"stop_time" : 1749546967462,
"is_deteted" : false,
"action_name_zh" : "Accept the ticket.",
"action_name_en" : "Accepted",
"status" : "issues_work_flow_status_2000",
"final_sub_action" : "success",
"enum_data_list" : [ {
"is_deleted" : false,
"match_type" : "enum",
"ticket_id" : "e59ea369-8fbd-4876-b37d-92b2ae50b5b3",
"real_ticket_id" : "ISU20250610171554014510592",
"name_zh" : "Main process",
"name_en" : "Main Process",
"biz_id" : "issues_mgmt_history_type_1000",
"prop_id" : "history_kind",
"model_id" : "TicketHistoryInfo"
}, {
"is_deleted" : false,
"match_type" : "reference__base_config.User",
"ticket_id" : "e59ea369-8fbd-4876-b37d-92b2ae50b5b3",
"real_ticket_id" : "ISU20250610171554014510592",
"name_zh" : "coc_platform_apitest",
"name_en" : "coc_platform_apitest",
"user_name" : "coc_platform_apitest",
"biz_id" : "4bb5b07fce7c42859e943103a7234bae",
"prop_id" : "operator",
"model_id" : "TicketHistoryInfo"
} ]
}, {
"history_kind" : "issues_mgmt_history_type_1000",
"action_id" : "main",
"action" : "submit_issues_mgmt",
"sub_action" : "success",
"operator" : "4bb5b07fce7c42859e943103a7234bae",
"id" : "123836321d74aecd6b6a60e730c08473",
"ticket_id" : "e59ea369-8fbd-4876-b37d-92b2ae50b5b3",
"start_time" : 1749546954608,
"stop_time" : 1749546958026,
"is_deteted" : false,
"action_name_zh" : "Create an issue ticket.",
"action_name_en" : "Create a trouble ticket",
"status" : "issues_work_flow_status_1000",
"final_sub_action" : "success",
"enum_data_list" : [ {
"is_deleted" : false,
"match_type" : "enum",
"ticket_id" : "e59ea369-8fbd-4876-b37d-92b2ae50b5b3",
"real_ticket_id" : "ISU20250610171554014510592",
"name_zh" : "Main process",
"name_en" : "Main Process",
"biz_id" : "issues_mgmt_history_type_1000",
"prop_id" : "history_kind",
"model_id" : "TicketHistoryInfo"
}, {
"is_deleted" : false,
"match_type" : "reference__base_config.User",
"ticket_id" : "e59ea369-8fbd-4876-b37d-92b2ae50b5b3",
"real_ticket_id" : "ISU20250610171554014510592",
"name_zh" : "coc_platform_apitest",
"name_en" : "coc_platform_apitest",
"user_name" : "coc_platform_apitest",
"biz_id" : "4bb5b07fce7c42859e943103a7234bae",
"prop_id" : "operator",
"model_id" : "TicketHistoryInfo"
} ]
} ]
}
}
}
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot