获取设备列表
调用说明
- 请求参数
参数 | 类型 | 说明 | 备注 |
---|---|---|---|
fun | 字符串 | /device/get | 请求功能名 |
id | 字符串 | 设备唯一ID | 获取指定设备,多个设备用逗号隔开。无此参数可获取所有 |
- httpGet请求示例
获取所有设备列表
curl --request GET \
--url 'http://192.168.9.9:9911/api/device/get'
获取指定设备
curl --request GET \
--url 'http://192.168.9.9:9911/api/device/get?id=9A:97:4E:C9:54:71,5C:1D:D9:ED:D9:52'
- httpPost请求示例
获取所有设备列表
curl --request POST \
--url http://192.168.9.9:9911/api \
--header 'content-type: multipart/form-data' \
--form fun=/device/get
获取指定设备
curl --request POST \
--url http://192.168.9.9:9911/api \
--header 'content-type: multipart/form-data' \
--form fun=/device/get \
--form id=9A:97:4E:C9:54:71,5C:1D:D9:ED:D9:52
- httpPost json请求示例【websocket也可发送同样json请求】
获取所有设备列表
curl --request POST \
--url http://192.168.9.9:9911/api \
--header 'Content-Type: application/json' \
--data '{
"fun": "/device/get",
"data": {
}
}'
获取指定设备
curl --request POST \
--url http://192.168.9.9:9911/api \
--header 'Content-Type: application/json' \
--data '{
"fun": "/device/get",
"data": {
"id": "9A:97:4E:C9:54:71,5C:1D:D9:ED:D9:52"
}
}'
响应结果
{
"data": {
"list": [
{
"air_handle": 121092144,
"air_pid": 10952,
"rotate": 0,
"state": 0,
"imgw": 750,
"imgh": 1334,
"gid": 0,
"air_ratio": 0,
"air_fps": 0,
"air_refresh": 0,
"air_img_fps": 0,
"air_audio": 0,
"name": "",
"srv_name": "`iMouseXP-7827",
"width": "375",
"height": "667",
"ip": "192.168.9.118",
"mac": "00:E0:99:D9:92:82",
"user_name": "iPhone",
"version": "15.7.3",
"model": "iPhone8,1",
"deviceid": "48:3B:38:CD:02:F0",
"device_name": "iPhone 6s",
"location": "",
"location_crc": "B0DBD800",
"vid": "720D",
"pid": "6E22",
"uid": "6E2224BD",
"gname": "未分组",
"uver": "4.4"
}
],
"code": 0,
"id": "",
"message": "成功"
},
"status": 200,
"message": "成功",
"msgid": 0,
"fun": "\/device\/get"
}
- 响应data数据字段说明
list数组记录了获取到的设备。
字段 | 说明 | 备注 |
---|---|---|
rotate | 屏幕角度 | 0竖屏,1横屏 |
state | 设备状态 | 0不在线,非0在线 |
gid | 分组id | - |
name | 自定义名 | - |
srv_name | 当前连接投屏名 | - |
width | 屏幕宽 | 物理大小 |
height | 屏幕高 | 物理大小 |
ip | 设备自身ip地址 | - |
mac | 设备自身mac地址 | - |
user_name | 用户名称 | 手机关于里面设置的名称 |
version | 系统版本 | - |
model | 内部型号 | - |
deviceid | 设备唯一id | - |
device_name | 设备名称 | - |
location | 鼠标参数 | - |
location_crc | 鼠标参数crc | 指向鼠标参数库里面参数的crc |
vid | im硬件vid | - |
pid | im硬件pid | - |
uid | im硬件id | - |
gname | 分组名称 | - |
imgw | 实际图片宽 | - |
imgh | 实际图片高 | - |
air_ratio | 投屏分辨率 | 0使用全局设置 |
air_refresh | 投屏刷新率 | 0使用全局设置 |
air_fps | 投屏帧率 | 0使用全局设置 |
air_img_fps | 投屏图像转换帧率 | 0使用全局设置 |
air_audio | 投屏声音状态 | 0使用全局设置 |
uver | 硬件版本 | - |