Help Center/ TaurusDB/ API Reference/ APIs (Recommended)/ Intelligent Diagnosis/ Querying Intelligently Killed Sessions
Updated on 2026-06-12 GMT+08:00

Querying Intelligently Killed Sessions

Function

This API is used to query intelligently killed sessions. Before calling this API:

Calling Method

For details, see Calling APIs.

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

    Dependency

    gaussdbformysql:instance:showIntelligentKillSession

    Read

    instance *

    • g:EnterpriseProjectId

    • g:ResourceTag/<tag-key>

    gaussdb:instance:showIntelligentKillSession

    -

URI

GET /v3/{project_id}/instances/{instance_id}/intelligent-kill-session/history

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

Constraints

N/A

Range

The value contains 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance.

To obtain this value, see Querying DB Instances.

Constraints

N/A

Range

The value contains 36 characters with a suffix of in07. Only letters and digits are allowed.

Default Value

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

node_id

Yes

String

Definition

Node ID, which uniquely identifies a node.

To obtain this value, see Querying Details of a DB Instance.

Constraints

N/A

Range

The value contains 36 characters with a suffix of no07. Only letters and digits are allowed.

Default Value

N/A

start_time

Yes

Long

Definition

Timestamp when the query starts.

Constraints

The value of start_time must be earlier than that of end_time.

Range

The value is a Unix timestamp in milliseconds and represents UTC time. When specifying the parameter, first convert the time from your local time zone to a UTC timestamp. For example, for a time in the Beijing time zone (UTC+08:00), subtract 8 hours to get the UTC timestamp.

Default Value

N/A

end_time

Yes

Long

Definition

Timestamp when the query ends.

Constraints

The value of end_time must be later than that of start_time.

Range

The value is a Unix timestamp in milliseconds and represents UTC time. When specifying the parameter, first convert the time from your local time zone to a UTC timestamp. For example, for a time in the Beijing time zone (UTC+08:00), subtract 8 hours to get the UTC timestamp.

Default Value

N/A

limit

No

String

Definition

Number of records returned by a query.

Constraints

The value must be an integer and cannot be a negative number.

Range

1–100

Default Value

100

offset

No

String

Definition

Index offset. The query starts from the next piece of data indexed by this parameter.

Constraints

The value must be an integer and cannot be a negative number.

Range

≥ 0

Default Value

0

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. To obtain this value, call the IAM API for obtaining a user token.

The value of X-Subject-Token in the response header is the token value.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Request language type.

Constraints

N/A

Range

  • en-us: English

  • zh-cn: Chinese

Default Value

en-us

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

intelligent_kill_session_histories

Array of IntelligentKillSessionHistory objects

Definition

List of intelligently killed sessions.

total_count

Integer

Definition

Total number of records.

Range

N/A

Table 5 IntelligentKillSessionHistory

Parameter

Type

Description

task_id

String

Definition

ID of the intelligent killing task.

Range

N/A

start_time

Long

Definition

Start time of the intelligent session killing.

Range

Timestamp (in seconds) when the intelligent session killing starts.

end_time

Long

Definition

End time of the intelligent session killing.

Range

Timestamp (in seconds) when the intelligent session killing ends.

download_link

String

Definition

Link for downloading the killing record.

Range

N/A

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Querying intelligently killed sessions

GET https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/17b6bbb64d2f4c14a83a88f19da8dcc8in07/intelligent-kill-session/history?node_id=d476fd181dad42cbb67e804953fb39ebno07&start_time=1774528515000&end_time=1775028515000&limit=10&offset=0

Example Response

Status code: 200

Success.

{
  "total_count" : 2,
  "intelligent_kill_session_histories" : [ {
    "task_id" : "1774873478588",
    "start_time" : 1774873540,
    "end_time" : 1774873540,
    "download_link" : "https://download_link_1"
  }, {
    "task_id" : "1774873605464",
    "start_time" : 1774873618,
    "end_time" : 1774873618,
    "download_link" : "https://download_link_2"
  } ]
}

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.