Updated on 2025-12-29 GMT+08:00

Querying Sessions

Function

This API is used to query sessions.

URI

POST /v2/{project_id}/instances/{instance_id}/clients

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. For details, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID. It can be viewed on the instance details page on the DCS console.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

node_id

Yes

String

Definition

Node ID.

Constraints

N/A

Range

N/A

Default Value

N/A

clean_cache

No

Boolean

Definition

Whether to re-query and save the session list.

Constraints

N/A

Range

  • true: Yes

  • false: No

Default Value

false

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

job_id

String

Definition

ID of the task for querying the session list.

Range

N/A

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

error_code

String

Error code.

error_ext_msg

String

Error message details.

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

error_code

String

Error code.

error_ext_msg

String

Error message details.

Status code: 403

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

error_code

String

Error code.

error_ext_msg

String

Error message details.

Status code: 404

Table 7 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

error_code

String

Error code.

error_ext_msg

String

Error message details.

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_msg

String

Error message.

error_code

String

Error code.

error_ext_msg

String

Error message details.

Example Requests

POST https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/clients

{
  "node_id" : "8f7ee181-88e2-49b7-a4bf-81f18f93a135",
  "clean_cache" : true
}

Example Responses

Status code: 200

Successful

{
  "job_id" : "8abf6e1e824e204401824e3e621b0042"
}

Status code: 400

Invalid request.

{
  "error_code" : "DCS.4957",
  "error_msg" : "This operation is not allowed when the task is in the current state."
}

Status Codes

Status Code

Description

200

Successful

400

Invalid request.

401

Invalid authentication information.

403

Access denied.

404

The requested resource could not be found.

500

Internal service error.

Error Codes

See Error Codes.