Querying Logical Sessions (a V3 API)
Function
This API is used to obtain logical sessions of a DDM instance.
Constraints
None
URI
- URL format
GET /v3/{project_id}/instances/{instance_id}/logical-processes?offset={offset}&limit={limit}
- Parameter description
Table 1 URI parameters Parameter
Mandatory
Type
Description
project_id
Yes
String
Project ID of a tenant in a region
To obtain this value, see Obtaining a Project ID.
instance_id
Yes
String
DDM instance ID
Table 2 Query parameters Parameter
Mandatory
Type
Description
offset
No
Integer
Index offset.
The query starts from the next piece of data indexed by this parameter. The value is 0 by default.
The value must be a non-negative number.
limit
No
Integer
Maximum records to be queried.
Value range: 1 to 128.
If the parameter value is not specified, 10 records are obtained by default.
keyword
No
String
Keyword filtered by the session result. It is a fuzzy match field and can contain a maximum of 255 characters.
Request
- URI example
GET https://{endpoint}/v3/{project_id}/instances/{instance_id}/logical-processes?offset=0&limit=10
Response
- Normal response
Table 3 Response body parameters Parameter
Type
Description
total_count
Integer
Total records.
logical_processes
Array of Table 4 objects
Logical session list of a DDM instance.
Table 4 logicalProcessesInfo Parameter
Type
Description
id
String
Logical session ID.
user
String
Current user.
host
String
IP address and port number.
db
String
Database name.
command
String
Connection status. Generally, the value can be sleep, query, or connect.
time
String
Duration of a connection, in seconds.
state
String
Status of the SQL statement being executed.
info
String
SQL statement that is being executed.
- Normal response example
{ "logical_processes": [ { "id": "4564224", "user": "drdsagent", "host": "127.0.0.1:54486", "db": "None", "command": "Query", "time": "0", "state": "starting", "info": "show processlist" } ], "total_count": 1 }
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, 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