接口功能介绍
分页查询数据库会话。
接口约束
无
URI
GET /v2/operation/processlists
路径参数
无
Query参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
prodInstId | 是 | String | 产品实例id,涉及实例的接口一律使用产品实例id | cb236d462b924ef7bfba5ecf1d61de2b | |
rdsProdInstId | 否 | String | rds产品实例id,涉及实例的接口一律使用产品实例id | 5485 | |
type | 否 | String | 库类型(master或slave),默认master,若填非slave,则默认都是master | master | |
pageNow | 否 | Integer | 当前页,若为空或小于1,默认是1 | 1 | |
pageSize | 否 | Integer | 页大小,若为空或小于1,默认是10 | 10 | |
info | 否 | String | 关键字,模糊匹配 | dbproxy |
请求参数
请求头header参数
无
请求体body参数
无
响应参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
code | 是 | String | 返回码 取值范围:0表示成功,1表示失败 | 0 | |
message | 是 | String | 结果描述 | success | |
result | 否 | Array of Objects | 返回对象,列表,若无该字段或该字段为null或者空列表,都代表返回对象为空。 | result |
表 result
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 | |
---|---|---|---|---|---|---|
id | 是 | Integer | 会话id | 1 | ||
user | 是 | String | 用户名 | peng | ||
host | 是 | String | 客户端 | 192.168.128.1:58042 | ||
db | 否 | String | 数据库 | gitest1111 | ||
command | 是 | String | 命令 | select (10); | ||
time | 是 | Long | 持续时间 | 1222 | ||
state | 否 | String | 状态 | executing | ||
dataHostId | 是 | String | 内部datahostid | /dbproxy_cluster/dbproxy_cluster_0000000005/shardings/data_host/data_host_0000000209 | ||
ip | 是 | String | 数据库实例IP | 192.168.128.128 | ||
port | 是 | String | 数据库实例端口 | 3309 | ||
canKill | 是 | Boolean | 是否允许kill | true | ||
type | 是 | String | 库类型 | master |
请求示例
请求头header
无
请求体body
无
响应示例
{
"code": 0,
"message": "success",
"result": [
{
"id": 7,
"user": "dbproxy_9210a",
"host": "192.168.128.1:58042",
"db": "gitest1111_2",
"command": "Sleep",
"time": 2933,
"state": "",
"dataHostId": "/dbproxy_cluster/dbproxy_cluster_0000000005/shardings/data_host/data_host_0000000209",
"ip": "192.168.128.128",
"port": "3309",
"canKill": true,
"type": "master"
},
{
"id": 14,
"user": "dbproxy_9210a",
"host": "192.168.128.1:58067",
"db": "gitest1111_3",
"command": "Sleep",
"time": 2933,
"state": "",
"dataHostId": "/dbproxy_cluster/dbproxy_cluster_0000000005/shardings/data_host/data_host_0000000209",
"ip": "192.168.128.128",
"port": "3309",
"canKill": true,
"type": "master"
},
{
"id": 10,
"user": "dbproxy_9210a",
"host": "192.168.128.1:58059",
"db": "gitest_1",
"command": "Sleep",
"time": 2933,
"state": "",
"dataHostId": "/dbproxy_cluster/dbproxy_cluster_0000000005/shardings/data_host/data_host_0000000209",
"ip": "192.168.128.128",
"port": "3309",
"canKill": true,
"type": "master"
}
]
}
状态码
请参考 状态码说明。