调用DescribeUserOnlineClientStatistics查询指定智能接入网关APP实例下指定用户的在线连接统计数。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 否 | DescribeUserOnlineClientStatistics |
要执行的操作。 取值:DescribeUserOnlineClientStatistics。 |
RegionId | String | 是 | cn-shanghai |
智能接入网关APP实例所在的地域。 |
UserNames.N | RepeatList | 是 | doctest |
用户名列表,多个用户用“,”隔开,最多可同时查询50个用户信息。 |
SmartAGId | String | 否 | sag-sfjg***** |
智能接入网关APP实例ID。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 14846A6A-2192-4F6A-B272-B8BD68EBC89B |
请求ID。 |
UserStatistics | Array |
指定用户在线连接信息。 |
|
UserName | String | doctest |
用户名。 |
OnlineCount | String | 2 |
在线连接数。 |
示例
请求示例
http(s)://[Endpoint]/?Action=DescribeUserOnlineClientStatistics
&RegionId=cn-shanghai
&UserNames.1=doctest
&<公共请求参数>
正常返回示例
XML
格式
<DescribeUserOnlineClientStatisticsResponse>
<RequestId>14846A6A-2192-4F6A-B272-B8BD68EBC89B</RequestId>
<UserStatistics>
<Statistics>
<UserName>doctest</UserName>
<OnlineCount>0</OnlineCount>
</Statistics>
</UserStatistics>
</DescribeUserOnlineClientStatisticsResponse>
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. | 智能网关实例不存在。 |
访问错误中心查看更多错误码。