查询登录信息
功能介绍
该接口用于查询登录信息。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v2/{project_id}/connections/desktops
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
start_time |
否 |
String |
查询的起始时间。指定该参数后,返回的结果为此时间之后的所有登录记录。时间格式如:“2016-08-20T21:11Z”。终止时间不为空时,起始时间为必填参数。 |
|
end_time |
否 |
String |
查询的终止时间。指定该参数后,返回的结果为此时间之前的所有登录记录。时间格式如:“2016-08-20T21:11Z”。起始时间不为空时,终止时间为必填参数。 |
|
user_name |
否 |
String |
登录桌面的用户名。 |
|
computer_name |
否 |
String |
计算机名(操作系统信息中可见)。 |
|
terminal_type |
否 |
String |
登录桌面的终端系统类型,当前支持:WI(云桌面客户端)。 |
|
offset |
否 |
Integer |
用于分页查询,查询的起始记录序号,从0开始。 |
|
limit |
否 |
Integer |
用于分页查询,返回登录记录数量限制,取值范围0-1000。如果不指定,默认为20。 |
|
min_network_rtt |
否 |
Integer |
查询端到端时延的最小值。 |
|
max_network_rtt |
否 |
Integer |
查询端到端时延的最大值。 |
|
enterprise_project_id |
否 |
String |
企业项目ID。 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
Content-Type |
是 |
String |
发送的实体的MIME类型,如:application/json。 |
|
X-Auth-Token |
否 |
String |
用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
total_count |
Integer |
用户登录记录总数。 |
|
records |
Array of Record objects |
用户登录记录。 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
tenantId |
String |
租户id,不对外展示。 |
|
sid |
String |
桌面sid。 |
|
transaction_id |
String |
事务id。 |
|
computer_name |
String |
计算机名。 |
|
user_name |
String |
用户名。 |
|
terminal_mac |
String |
终端MAC地址。 |
|
terminal_name |
String |
终端名称。 |
|
terminal_ip |
String |
终端IP。 |
|
client_version |
String |
AccessClient版本。 |
|
terminal_type |
String |
终端系统类型。 |
|
agent_version |
String |
AccessAgent版本。 |
|
desktop_ip |
String |
桌面IP。 |
|
connection_start_time |
String |
开始连接时间。 |
|
connection_setup_time |
String |
建立连接时间。 |
|
connection_end_time |
String |
结束连接时间。 |
|
is_reconnect |
Boolean |
是否重连。 |
|
connection_failure_reason |
String |
连接失败原因。 |
|
network_rtt |
Integer |
网络时延ms。 |
|
e2e_rtt |
Integer |
端到端时延 ms。 |
|
source_ip |
String |
客户端源ip |
|
public_ip |
String |
客户端出网IP |
|
enterprise_project_id |
String |
企业项目ID。 |
状态码:400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
错误描述。 |
状态码:401
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
错误描述。 |
状态码:403
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
错误描述。 |
状态码:404
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
错误描述。 |
状态码:405
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
错误描述。 |
状态码:500
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
错误描述。 |
状态码:503
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码。 |
|
error_msg |
String |
错误描述。 |
请求示例
GET /v2/0e69423d4400f4a82f67c0059a1e4cc8/connections/desktops?offset=258
响应示例
状态码:200
查询登录信息响应。
{
"total_count" : 4,
"records" : [ {
"computer_name" : "JY011",
"user_name" : "jy01@local.com",
"terminal_mac" : "00-ac-9c-c7-9a-df",
"terminal_name" : "DESKTOP-EG0P3TR",
"terminal_ip" : "8.5.60.58",
"client_version" : "1.8.00005",
"terminal_type" : "Windows 10",
"agent_version" : "1.8.00005.10546",
"desktop_ip" : "172.16.148.250",
"connection_start_time" : "2020-04-24T03:02:47Z",
"connection_setup_time" : "2020-04-24T03:02:49Z",
"connection_end_time" : "2020-04-24T03:36:43Z",
"is_reconnect" : false,
"public_ip" : "0.0.0.0"
}, {
"computer_name" : "JY011",
"user_name" : "jy01@local.com",
"terminal_mac" : "00-ac-9c-c7-9a-df",
"terminal_name" : "DESKTOP-EG0P3TR",
"terminal_ip" : "8.5.60.58",
"client_version" : "1.8.00005",
"terminal_type" : "Windows 10",
"agent_version" : "1.8.00005.10546",
"desktop_ip" : "172.16.148.250",
"connection_start_time" : "2020-04-23T08:58:02Z",
"connection_setup_time" : "2020-04-23T08:58:05Z",
"connection_end_time" : "2020-04-23T22:45:00Z",
"is_reconnect" : false,
"public_ip" : "0.0.0.0"
} ]
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
查询登录信息响应。 |
|
400 |
由于包含语法错误,当前请求无法被服务器理解。 |
|
401 |
鉴权失败。 |
|
403 |
没有操作权限。 |
|
404 |
找不到资源。 |
|
405 |
请求中指定的方法不被允许。 |
|
500 |
服务内部错误,具体返回错误码请参见错误码说明。 |
|
503 |
服务不可用。 |
错误码
请参见错误码。