H3C绿洲平台开发,查看AP用户详情
1、激活 key 认证时,会获取一个 key,这个 key 就是通过云简网络网关访问接口的钥匙。
2、获取设备序列号:devSN
import requests
url = "https://lvzhouapi.h3c.com/device/onlineclients"
headers = {"apikey": "xxxxxxxx","Accept": "application/json","Content-Type": "application/json"}
data = {"findoption": {"ApName": "A-6F"},"sortoption": {"ApName": 1}}
skip_num=0
for i in range(0,1):
querystring = {"devSN":"xxxxxxxx","skipnum":str(skip_num),"limitnum":"1000",} #limitnum:查看数量
skip_num +=999
response = requests.get( url, headers=headers, params=querystring,json=data)
client_list = response.json().get("clientList")
if i ==0 :print('在线用户: ',client_list.get("count_total"))
for client_info in client_list.get("clientInfo"):
print('终端ip:', client_info.get('clientIP'),
'接入的ap: ', client_info.get('ApName'),)
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!