/api/device/list-with-catalog
按照分组结构获取设备列表
需要设备组查看权限
接口原型
协议 |
HTTP/HTTPS GET |
URL |
ip[:port]/api/device/list-with-catalog |
数据格式 |
响应消息:Content-Type: application/json |
请求URL参数
参数 |
描述 |
catalogs |
可选参数,逗号形式分割的组ID,如不指定,则返回所有分组 |
count |
返回的分组的最大数量 |
start |
返回的分组的起始序号 |
dev-count |
返回的设备的最大数量 |
dev-start |
返回的设备的起始序号 |
排序规则:
- 首先将在线的排最前面
- 在线/不在线 的设备中,再将申请时间/批准时间最新的排最前面
- 上一条规则中,如果时间相同,再将序列号小的排前面
请求Cookies
名称 |
描述 |
mwcloud-sid |
用于标识当前登录的字符串 |
mwcloud-uid |
当前登录用户名 |
请求示例
请求待审核的设备列表:
GET /api/device/list-with-catalog?count=10 HTTP/1.1
Accept: application/json, text/plain, */*
Cookie: mwcloud-sid=OCXWUMGEYPGIAWWOETYXPNMVHDZIAZJP; mwcloud-uid=Admin;
响应参数
参数 |
描述 |
Content-Type |
取值为:'application/json; charset=UTF-8' |
Response Body
参数 |
描述 |
result |
返回码 |
total |
分组总数 |
list |
返回的组列表 |
设备组
参数 |
描述 |
id |
组ID。 |
name |
组名称。 |
list |
设备列表 |
响应示例
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"list": [
{
"group-mask": 1,
"id": 30011,
"is-inherit": 0,
"list": [
{
"apply-date": 1685348793609,
"catalog-id": 30011,
"config": null,
"dev-type": 2564,
"dev-warns": 0,
"dir": 512,
"firmware-ver": "1.1.945",
"group-mask": 11,
"hardware-ver": "Z",
"id": 10004,
"is-favorite": 4,
"is-inherit": 0,
"is-upload-file": 0,
"module": 4,
"module-name": "NDI to HDMI",
"name": "Channel-1-OUT",
"online-date": 0,
"owner-o": "testaaa",
"owner-o-d": 100002,
"private-id": 997059098,
"pro-feature": {
"ndi-audio-bit-count": 16,
"ndi-audio-channels": 6,
"ndi-audio-sample-rate": 48000,
"ndi-connected": true,
"ndi-name": "10",
"ndi-video-field-rate": 24.0,
"ndi-video-height": 1080,
"ndi-video-scan": "progressive",
"ndi-video-width": 1920
},
"product-id": 1040,
"push-key": "[MGDEV]-Z410221102011-59264e98",
"reg-state": 101,
"sn": "Z410221102011",
"status": {
"cur-status": 0,
"eth": "10.10.10.193",
"firmware-ver": "1.1.945",
"hardware-ver": "Z",
"is-online": true,
"module-name": "NDI to HDMI",
"name": "Channel-1-OUT",
"rndis": "192.168.66.1",
"up-time": 85641,
"upgrade-status": {
"percent": 0,
"ret": 0,
"step": 0
},
"wifi": ""
},
"type": 513,
"upload-file-pos": 0,
"usr-mask": 18,
"warns": 0
}
],
"name": "dds",
"total": 3,
"usr-mask": 0
},
{
"group-mask": 1,
"id": 30009,
"is-inherit": 1,
"list": [
{
"apply-date": 1687923494490,
"catalog-id": 30009,
"config": null,
"dev-type": 2564,
"dev-warns": 0,
"dir": 512,
"firmware-ver": "1.1.916",
"group-mask": 1,
"hardware-ver": "Z",
"id": 10001,
"is-favorite": 0,
"is-inherit": 1,
"is-upload-file": 0,
"module": 4,
"module-name": "NDI to HDMI",
"name": "Pro Convert",
"online-date": 0,
"owner-o": "Channel-1",
"owner-o-d": 100051,
"private-id": 365273358,
"pro-feature": {
"ndi-audio-bit-count": 0,
"ndi-audio-channels": 0,
"ndi-audio-sample-rate": 0,
"ndi-connected": false,
"ndi-name": "",
"ndi-video-field-rate": 0.0,
"ndi-video-height": 0,
"ndi-video-scan": "",
"ndi-video-width": 0
},
"product-id": 1040,
"push-key": "[MGDEV]-Z410221102013-0f615f1c",
"reg-state": 101,
"sn": "Z410221102013",
"status": {
"cur-status": 0,
"eth": "",
"firmware-ver": "1.1.916",
"hardware-ver": "Z",
"is-online": false,
"module-name": "NDI to HDMI",
"name": "Pro Convert",
"rndis": "",
"up-time": 0,
"upgrade-status": {
"percent": 0,
"ret": 0,
"step": 0
},
"wifi": ""
},
"type": 513,
"upload-file-pos": 0,
"usr-mask": 0,
"warns": 0
}
],
"name": " 6666s ",
"total": 1,
"usr-mask": 0
},
{
"group-mask": 1,
"id": 30008,
"is-inherit": 1,
"list": [
{
"apply-date": 1680746411260,
"catalog-id": 30008,
"config": null,
"dev-type": 3330,
"dev-warns": 0,
"dir": 256,
"firmware-ver": "2.2.81",
"group-mask": 1,
"hardware-ver": "B",
"id": 40,
"is-favorite": 0,
"is-inherit": 1,
"is-upload-file": 0,
"module": 2,
"module-name": "Ultra Encode AIO",
"name": "Ultra Encode B313221116072",
"online-date": 0,
"private-id": 630485446,
"pro-feature": {
"input": ""
},
"product-id": 787,
"push-key": "[MGDEV]-B313221116072-68bc5ca4",
"reg-state": 101,
"sn": "B313221116072",
"status": {
"cur-status": 0,
"eth": "",
"firmware-ver": "2.2.81",
"hardware-ver": "B",
"is-online": false,
"module-name": "Ultra Encode AIO",
"name": "Ultra Encode B313221116072",
"rndis": "",
"up-time": 0,
"upgrade-status": {
"percent": 0,
"ret": 0,
"step": 0
},
"wifi": ""
},
"type": 257,
"upload-file-pos": 0,
"usr-mask": 0,
"warns": 0
}
],
"name": "是是是时",
"total": 1,
"usr-mask": 0
}
],
"result": 0,
"total": 33
}