Help Center/ TaurusDB/ API Reference/ APIs (Recommended)/ Traffic Management/ Terminating User Session Threads on a Node
Updated on 2025-04-25 GMT+08:00

Terminating User Session Threads on a Node

Function

This API is used to terminate specified user session threads on a TaurusDB node, excluding any internal session threads passed in. Before calling this API:

URI

DELETE /v3/{project_id}/instances/{instance_id}/nodes/{node_id}/processes

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Explanation:

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

Constraints:

None

Value range:

The value can contain 32 characters. Only letters and digits are allowed.

Default value:

None

instance_id

Yes

String

Explanation:

Instance ID, which uniquely identifies an instance.

Constraints:

None

Value range:

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

Default value:

None

node_id

Yes

String

Explanation:

Node ID, which uniquely identifies a node.

Constraints:

None

Value range:

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

Default value:

None

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Explanation:

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:

None

Value range:

None

Default value:

None

X-Language

No

String

Explanation:

Request language type.

Constraints:

None

Value range:

  • en-us

  • zh-cn

Default value:

en-us

Content-Type

Yes

String

Explanation:

Request body content type.

Constraints:

None

Value range:

application/json

Default value:

None

Table 3 Request body parameter

Parameter

Mandatory

Type

Description

processes

Yes

Array of longs

Explanation:

IDs of user session threads to be terminated.

To obtain this value, call the API for querying user session threads on a node or run the show processlist command.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

processes_killed

Array of longs

Explanation:

IDs of terminated user session threads.

processes_not_found

Array of longs

Explanation:

IDs of user session threads that were not found.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Terminating specified user session threads on a TaurusDB node

DELETE https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/a23fb62bd61e4e9e9636fd2225f395bein07/nodes/18663926eacb443d98dc20f8620f28f2no07/processes

{
  "processes" : [ 2075425, 2075426 ]
}

Example Response

Status code: 200

Success.

{
  "processes_killed" : [ 2075425, 2075426 ],
  "processes_not_found" : [ ]
}

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.