查询企业下组织的设备列表
功能介绍
查询企业下的组织的设备列表
URI
GET /v1/{user_id}/device-orgs/{device_org_id}/devices
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
device_org_id |
是 |
String |
设备组织ID:由数字组成,长度范围[1,25],根组织节点的值为0,可以从查询子级设备组织获取 |
|
user_id |
是 |
String |
用户ID:由数字组成,长度范围[15,25],获取方式参考获取user ID与下载AK/SK章节 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
access_protocol |
否 |
String |
接入协议:枚举类型,多个查询使用英文逗号分隔 枚举值: |
|
channel_resource_state |
否 |
String |
通道资源状态:枚举类型,多个查询使用英文逗号分隔 枚举值: |
|
ability |
否 |
String |
设备能力:枚举类型,仅支持单个能力集查询 枚举值: |
|
device_id |
否 |
String |
设备ID: 好望设备:大小写字母、数字组成,长度范围[8,32],可在设备外壳或者设备web页面上获取 国标设备:由数字组成,长度为20个字符长度,由客户自行设置,其中第11-13位,必须是以下之一132(IPC)、111(DVR)、118(NVR),用来区分设备类型 |
|
device_name |
否 |
String |
模糊查询字段:支持设备名称模糊匹配,由字符组成,支持数字、中文(一个汉字算两个字符)、英文、-、_、空格,长度范围[1,128] |
|
device_state |
否 |
String |
设备状态:枚举类型,多个查询使用英文逗号分隔 枚举值: |
|
device_system_state |
否 |
String |
设备系统状态:枚举类型,多个查询使用英文逗号分隔 枚举值: |
|
device_type |
否 |
String |
设备类型:枚举类型,多个查询使用英文逗号分隔 枚举值: |
|
direction |
否 |
String |
排序方向:枚举类型,默认降序,不区分大小写 枚举值: |
|
group_ids |
否 |
String |
所属分组ID列表:支持多个设备组织查询,使用英文逗号分隔 单个设备组织ID:由数字组成,长度范围[1,25](根组织节点的值为0) |
|
is_current_org |
否 |
String |
是否属于当前组织:枚举类型,不填就是查询全部组织 枚举值:
|
|
limit |
否 |
Integer |
限制条数:取值范围[0,1000],不填写时默认值为10 |
|
manufactures |
否 |
String |
厂商:支持多个厂商查询,使用英文逗号隔开 单个厂商:由中文(一个汉字算两个字符)、英文、数字 、特殊字符(_-空格)组成,长度范围[1,64] |
|
offset |
否 |
Integer |
偏移量页数:0为第一页,取值范围[0,2147483646],不填写时默认为0 |
|
sort_by |
否 |
String |
排序字段:枚举类型,默认按创建时间create_time排序 枚举值: |
|
user_order |
否 |
Integer |
排序字段:枚举类型,按用户数排序(当前无效) 枚举值:
|
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
Access-Token |
是 |
String |
用户认证AccessToken:从获取用户北向接口认证AccessToken中获取 |
响应参数
状态码: 200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
devices |
Array of InnerDeviceInfoMuti objects |
设备列表 |
|
total |
Integer |
查询条数 |
|
device_total |
Integer |
设备总数 |
|
admin_total |
Integer |
管理员总数 |
|
online_total |
Integer |
在线设备数 |
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
device_id |
String |
设备ID,设备唯一标识符 |
|
device_name |
String |
设备名称 |
|
device_state |
String |
设备状态 枚举值: |
|
device_type |
String |
设备类型 枚举值: |
|
device_system_state |
String |
设备系统冻结 枚举值: |
|
access_protocol |
String |
接入协议类型 枚举值: |
|
manufacture |
String |
生产厂家 |
|
device_ability |
String |
设备能力集:枚举类型,参考附录设备能力集,多个能力集用英文逗号分隔 |
|
channel_total |
Integer |
通道总数 |
|
channels |
Array of InnerChannelInfo objects |
通道信息 |
|
operator_total |
Integer |
该设备绑定的普通用户总数 |
|
model |
String |
设备型号 |
|
create_time |
String |
设备添加时间 |
|
update_time |
String |
设备更新时间,在设备重新上线后或者移动设备分组后会修改时间 |
|
device_org_name |
String |
设备组织名称 |
|
frimware |
String |
设备版本 |
|
channel_allocated_total |
Integer |
已分配通道总数 |
|
channel_online_count |
Integer |
在线通道总数 |
|
audio_input_cnt |
Integer |
音频输入通道个数 |
|
audio_output_cnt |
Integer |
音频输出通道个数 |
|
gb_access_state |
String |
国标设备未上线原因 枚举值
|
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
channel_resource_state |
Array of strings |
通道资源列表:一个通道可以存在多个套餐,枚举类型 枚举值: |
|
channel_state |
String |
通道状态:枚举类型 枚举值: |
|
channel_system_state |
String |
设备系统状态:枚举类型 枚举值: |
|
channel_id |
String |
通道ID |
|
channel_name |
String |
通道名称 |
|
channel_model |
String |
通道的设备型号 |
|
channel_mode |
String |
通道的设备型号,此字段已废弃,不推荐使用,建议使用channel_model字段代替 |
|
invalid_type |
String |
通道无效类型:枚举类型 枚举值: |
|
channel_ability |
String |
通道能力集 |
|
storage_card_status |
String |
SD卡状态 枚举类型:
|
|
mask_mode |
String |
隐私遮蔽开关状态 枚举类型:
|
请求示例
查询企业下组织的设备列表
GET /v1/2562572829***/device-orgs/1234567890***/devices
响应示例
状态码: 200
OK
{
"devices" : [ {
"device_id" : "952352LWXT***",
"device_name" : "好望设备",
"device_state" : "UNREGISTERED",
"device_type" : "IPC",
"device_system_state" : "NORMAL",
"access_protocol" : "HOLO",
"manufacture" : "HUAWEI",
"device_ability" : "ptz",
"channel_total" : "1",
"channels" : [ {
"channel_resource_state" : [ "MANAGEMENT_GRANT", "INDUSTRY_DATA_GRANT", "FULL_RECORD_GRANT", "EVENT_RECORD_CLOSED" ],
"channel_state" : "ONLINE",
"channel_system_state" : "NORMAL",
"channel_id" : "0",
"channel_name" : "好望通道",
"invalid_type" : "NORMAL"
} ],
"operator_total" : "0",
"create_time" : "2020-09-01 17:09:12",
"update_time" : "2020-12-30 09:30:31",
"device_org_name" : "好望设备组"
} ],
"total" : 1,
"device_total" : 1,
"admin_total" : 0,
"online_total" : 0
}
状态码
请参见状态码
错误码
请参见错误码