Updated on 2026-01-08 GMT+08:00

Killing Sessions of an Instance Node

Description

This API is used to kill sessions of an instance node.

Restrictions

  • Community Edition 4.0, 4.2, and 4.4 instances are supported.
  • Inactive sessions cannot be terminated.

URI

  • URI format

    POST https://{Endpoint}/v3/{project_id}/nodes/{node_id}/session

Table 1 Path parameters

Name

Type

IN

Mandatory

Description

project_id

string

path

Yes

Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID.

node_id

string

path

Yes

Node ID.

  • Select the mongos node in a cluster instance.
  • Select the primary or secondary node in a replica set instance.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token

Table 3 Request body parameters

Parameter

Type

Mandatory

Description

sessions

Array of strings

Yes

The IDs of sessions to be terminated.

For details, see the session ID returned in Table 5.

  • Request example
    { 
      "sessions" : [ "34631", "34703" ] 
    }

Response Parameters

{}

Status Code

For details, see Status Code.

Error Code

For details, see Error Code.