调用DescribeUserOnlineClientStatistics查询指定智能接入网关APP实例下指定用户的在线连接统计数。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | DescribeUserOnlineClientStatistics |
系统规定参数。取值:DescribeUserOnlineClientStatistics。 |
RegionId | String | 是 | cn-shanghai |
智能接入网关APP实例所在的地域。 |
SmartAGId | String | 是 | sag-sfjg***** |
智能接入网关APP实例ID。 |
UserNames.N | String | 是 | doctest |
用户名。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
UserStatistics | Array of Statistics |
指定用户在线连接信息。 |
|
Statistics | |||
OnlineCount | String | 2 |
在线连接数。 |
UserName | String | doctest |
用户名。 |
RequestId | String | 14846A6A-2192-4F6A-B272-B8BD68EBC89B |
请求ID。 |
示例
请求示例
http(s)://[Endpoint]/?Action=DescribeUserOnlineClientStatistics
&RegionId=cn-shanghai
&SmartAGId=sag-sfjg*****
&UserNames=["doctest"]
&公共请求参数
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<?xml version="1.0" encoding="UTF-8" ?>
<DescribeUserOnlineClientStatisticsResponse>
<RequestId>14846A6A-2192-4F6A-B272-B8BD68EBC89B</RequestId>
<UserStatistics>
<Statistics>
<UserName>doctest</UserName>
<OnlineCount>0</OnlineCount>
</Statistics>
</UserStatistics>
</DescribeUserOnlineClientStatisticsResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "14846A6A-2192-4F6A-B272-B8BD68EBC89B",
"UserStatistics" : {
"Statistics" : [ {
"UserName" : "doctest",
"OnlineCount" : 0
} ]
}
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | ClientUser.NameEmpty | You must specify UserName. | 用户名不能为空。 |
400 | ClientUser.NameInvalid | The specified UserName is invalid. | 用户名格式非法。 |
400 | SAG.InstanceIdEmpty | You must specify the SAG instance ID. | 智能接入网关实例ID为空。 |
400 | SAG.InstanceNoFound | The specified SAG instance does not exist. | 智能接入网关实例不存在。 |
访问错误中心查看更多错误码。