设备详情查询

接口说明

查询设备详细信息

接口配套版本信息

智能物联综合管理平台iConnection Center V5.0.6及以上版本

接口版本

1.0.0

接口URL

/evo-apigw/evo-brm/1.0.0/device/{deviceCode}

请求Method

GET

数据提交格式

application/json

请求参数

参数名必选类型说明
deviceCodetruestring设备编码

请求参数示例

/evo-apigw/evo-brm/1.0.0/device/100001

返回参数

名称类型说明
successboolean接口返回是否成功
codestring错误码:0-为无错误,非0-为具体错误码
errMsgstring错误消息
dataobject返回数据对象
+deviceNamestring设备名称
+deviceCodestring设备编码
+deviceSnstring设备唯一标识码
+deviceCategoryint设备大类
+deviceTypeint设备小类
+deviceManufacturerstring厂商类型
+deviceModelstring设备型号
+deviceIpstring设备ip
+devicePortint设备端口 取值范围:0 ~ 65535
+ownerCodestring设备所属组织
+loginTypestring添加方式
+loginNamestring登录名称
+loginPasswordstring登录密码
+registServerCodestring主动注册服务器编码
+registProxyPortint主动注册代理端口
+registDeviceCodestring主动注册设备编码
+memostring设备描述
+isOnlineint在线状态
+mapIdlong光栅图
+gpsXstring经度
+gpsYstring纬度
+subSystemstring设备所属子系统
+devExtobject设备扩展属性 自定义json数据
+createTimelong创建时间(13位时间戳),即设备添加到平台的时间
+onlineUpdateTimestring设备在线状态更新时间(yyyy-MM-dd HH:mm:ss),设备由在线变为离线或者离线变为在线都会进行更新
+unitsarray单元信息
++unitTypeint单元类型
++unitSeqint单元序号
++sortint排序码
++memostring单元描述
++capabilitystring能力集
++unitExtobject单元扩展信息
++channelsarray单元通道信息
+++channelCodestring通道编码
+++channelNamestring通道名称
+++channelSeqint通道序号
+++channelSnstring通道唯一标识码
+++channelTypestring通道类型
+++capabilitystring通道能力集,详细说明请参考通道能力级说明
+++cameraTypestring摄像头类型,视频通道会返回该字段
+++accessint是否已接入:0-未接入, 1-接入
+++gpsXstring经度
+++gpsYstring纬度
+++gpsZstringZ轴
+++memostring通道描述
+++statint状态 :0-不启用, 1-启用
+++chExtobject通道扩展属性 自定义

返回参数示例(成功)

 {
     "success": true,
     "data": {
         "deviceName": "框架测试设备o4",
         "deviceCode": "1000200",
         "deviceCategory": 1,
         "deviceType": 1,
         "deviceManufacturer": "1",
         "deviceIp": "1.2.33.44",
         "devicePort": 37777,
         "ownerCode": "001",
         "orgName": "根节点",
         "loginType": "1",
         "loginName": "admin",
         "loginPassword": "6FC65CD2C15C913C7BDF9A44416581D71A453CE5DA9A08A7C1E0275C02FD8A82",
         "isPwdChange": false,
         "isOnline": 1,
         "onlineUpdateTime": "1990-01-01 00:00:00.000",
         "onlineUpdateVersion": 0,
         "offlineReason": "999999",
         "isVirtual": 0,
         "registServerCode": "video#local",
         "deviceSn": "",
         "deviceModel": "N5",
         "memo": "",
         "devExt": {},
         "units": [
             {
                 "unitType": 1,
                 "unitSeq": 0,
                 "unitExt": {},
                 "channels": [
                     {
                         "channelName": "框架测试设备o4_视频通道_0",
                         "channelSeq": 0,
                         "ownerCode": "001",
                         "channelCode": "1000200$1$0$0",
                         "stat": 1,
                         "isOnline": 1,
                         "onlineUpdateTime": "1990-01-01 00:00:00.000",
                         "onlineUpdateVersion": 0,
                         "chExt": {},
                         "isVirtual": 0,
                         "updateTime": 1660950013000,
                         "createTime": 1660950013000,
                         "treeSort": 21000200111010
                     }
                 ]
             }
         ],
         "updateTime": 1660950013000,
         "createTime": 1660950013000,
         "treeSort": 21000200
     },
     "code": "0",
     "errMsg": ""
 }

返回参数示例(失败)

{
    "success": false,
    "data": {},
    "code": "28****",
    "errMsg": ""
}
设备分页查询

接口说明

分页查询设备信息 请求说明(必看) : 设备大类和设备小类不能同时作为查询条件,会优先根据设备大类查询,如果设备大类传入参数为空,则根据设备小类查询,设备小类的格式是 大类_小类

接口配套版本信息

智能物联综合管理平台iConnection Center V5.0.6及以上版本

接口版本

1.2.0

接口URL

/evo-apigw/evo-brm/1.2.0/device/subsystem/page

请求Method

POST

数据提交格式

application/json

请求参数

参数名必选类型说明
pageNumfalseint当前页, 默认1
pageSizefalseint每页记录数, 默认10
ownerCodesfalsearray设备所属组织编码集合
showChildNodeDatafalseint是否包含子节点设备
categorysfalsearray设备大类
typesfalsearray设备小类,设备小类的格式是:大类_小类,categorys与types同时存在,此字段无效
deviceCodesfalseList设备编码列表 最大支持500
deviceSnsfalseList设备标识码列表 最大支持500
deviceIpsfalseList设备地址 最大支持500
isOnlinefalseInteger在线状态
syncVirtualDatafalseInteger0:获取非虚拟设备 1 只获取虚拟设备

请求参数示例

{
    "pageNum": 1,
    "pageSize": 10,
    "ownerCodes": [
        "001001",
        "002001"
    ],
    "showChildNodeData": 1,
    "unitTypes": [
        1,
        2
    ],
    "categorys": [
        1,
        3
    ],
    "types": [
        "1_2",
        "2_3"
    ],
    "deviceCodes": [
        "1000010",
        "1000009",
        "1000008"
    ],
    "deviceSns": [
        "1",
        "2",
        "3"
    ],
    "deviceIps": [
        "1.1.1.110",
        "10.33.66.6"
    ],
    "isOnline": 0,
    "syncVirtualData": 0
}

返回参数

名称类型说明
successboolean接口返回是否成功
codestring错误码:0-为无错误,非0-为具体错误码
errMsgstring错误消息
dataPageVO分页数据

PageVO

名称类型说明
currentPageint当前页码
totalPageint总页数
pageSizeint每页记录数
totalRowsint总数
pageDataList<DeviceInfoVO>数据列表

DeviceInfoVO

名称类型说明
deviceCodeString设备编码
deviceNameString设备名称
deviceSnString设备唯一标识码
deviceCategoryint设备大类
deviceTypeString设备小类
deviceManufacturerString厂商类型
deviceIpString设备IP
devicePortint设备端口
ownerCodestring设备所属组织编码
isOnlineint在线状态
offlineReasonstring设备离线原因
subSystemstring设备所属子系统
devExtobject设备扩展属性,自定义json数据
+unitsList<UnitVO>单元信息

UnitVO

名称类型说明
unitTypeint单元类型
unitSeqint单元序号
sortint排序码
capabilitystring能力集
unitExtobject单元扩展信息
channelsList<ChannelVO>单元通道信息

ChannelVO

名称类型说明
channelCodestring通道编码
channelNamestring通道名称
channelSeqint通道序号
channelSnstring通道唯一标识码
channelTypestring通道类型
capabilitystring通道能力集,详细说明请参考通道能力级说明
cameraTypestring摄像头类型,视频通道会返回该字段
accessint是否已接入:0-未接入,1-接入
gpsXstring经度
gpsYstring纬度
gpsZstringZ轴
isOnlineint设备在线状态
memostring通道描述
statint状态 :0-不启用,1-启用
chExtobject通道扩展属性 自定义

返回参数示例(成功)

{
  "success": true,
  "code": "0",
  "errMsg": "成功",
  "data": {
    "pageData": [
      {
        "deviceCode": "1000014",
        "deviceName": "编码器12323",
        "deviceSn": "deviceSn124323233",
		"deviceManufacturer": "1",
        "deviceCategory": 1,
        "deviceType": "1",
        "deviceIp": "10.3.3.6",
        "devicePort": 37777,
		"ownerCode":"001",
		"isOnline":"1",
		"offlineReason":"网络异常",
		"subSystem":"evo-subsystem",
		"units":[
			{
				"unitType":1,
				"unitSeq":1,
				"capability":"10101010",
				"memo":"视频单元",
				"unitExt":"单元扩展信息",
				"channels":[
					{
					"channelName": "channelName1",//通道名称
					"channelSeq": 0,//通道序号
					"channelCode":"100001$1$0$0",//通道编码
					"channelSn": "sn123456",//通道标识码
					"channelType": "1",//通道类型
					"cameraType": "1",//摄像头类型 1 枪机 2 球机 3 半球 5 本地采集输入
					"capability": "1111111111111111111",//通道能力集
					"gpsX": "15.3",//经度
					"gpsY": "19.3",//纬度
					"gpsZ": "150.3",//Z轴
					"ownerCode" : "001",
					"isOnline":1,//通道状态
					"domainId": "1",//域
					"memo": "channelMemo",//通道描述
					"stat": 1,//状态 0 不启用 1 启用
					"chExt":{}//通道扩展属性,自定义
				  }
				]
			},
			{
				"unitType":1,
				"unitSeq":1,
				"capability":"10101010",
				"memo":"视频单元",
				"unitExt":"单元扩展信息"
			}
		]
      }
    ],
    "currentPage": 1,
    "totalPage": 1,
    "pageSize": 5,
    "totalRows": 1
  }
} 

返回参数示例(失败)

{
    "success": false,
    "data": {},
    "code": "28****",
    "errMsg": ""
}
设备树查询

接口说明

查询设备树

接口配套版本信息

智能物联综合管理平台iConnection Center V5.0.6及以上版本

接口版本

1.0.0

接口URL

/evo-apigw/evo-brm/1.0.0/tree

请求Method

POST

数据提交格式

application/json

请求参数

参数名必选类型说明
idfalseString上级节点编码(组织编码/设备编码) ,层级查询时将返回参数中的id作为上级节点编码请求;基础组织根节点是001,逻辑组织默认根节点调用户详情接口获取defaultOrgCode字段
typefalseString组织/设备树展示的节点类型(具体说明见下文type参数说明) ,type第一个分号的数据参考用户详情接口获取defaultOrgCode字段,入参为鉴权认证的用户id;
基础组织示例:001;;1
逻辑组织示例:L01;;1
busiTypefalseint业务类型:1-基本组织,2-逻辑组织。默认值1,基础组织 ;逻辑组织编码是L打头
checkLogicRootOrgNodeFlagfalseboolean查询逻辑组织根组织标识,默认true ,逻辑组织查询时使用 等价于基本组织组织编码传空的情况,其它情况请将将参数设置为false,逻辑组织时推荐false
channelBelongfalseint通道归属于组织还是归属于设备 1:归属于设备 0:归属于组织 默认0(注意,该参数只在type值为”001;1;”这种类型(最后一个分号后面不指定通道类型)时生效,这种传参是组织、设备、通道都展示的,默认是将通道放在组织下面;若传参是”001;1;1”同样是展示组织、设备、通道,但是通道是归属于设备的,这个时候该参数不会生效)
actfalsestring操作类型,没有默认为根据上级节点查询下级节点;如果为search,表示按节点名称模糊搜索
checkStattrueint上级组织/设备节点是否有权限,查询下级节点时该值取上级节点中checkStat属性值;推荐送1
searchKeyfalsestringact=search时模糊搜索的关键字
chCapabilityfalsearray通道能力集,取值为: "单元类型1_通道能力集,单元类型2_通道能力集", 如: ["1_0000000001000000","2_0000000000000001110"]
devCapabilityfalsearray设备能力集,取值为: "设备大类1_通道能力集,设备大类2_通道能力集", 如: ["1_0000000001000000","2_0000000000000001110"]
checkNodesfalsearray初始化加载树时需要勾选的节点id列表
showCascadeNodefalseint是否展示级联节点,默认是1
showVirtualNodefalseint是否展示虚拟设备、通道,默认0
showEmptyOrgNodefalseint是否展示出没有通道或设备的组织节点,默认0
statfalseint设备通道状态 -1:查询全部 0:查询关闭 1:查询已经开启 默认:1
参数说明

type参数说明

type 参数格式: "组织节点类型;设备节点类型;通道单元类型"

组织节点类型

为树结构中根组织节点编码,为用户详情接口的defaultOrgCode字段,入参为鉴权认证的用户id; 基础组织根节点是001,不调接口也可获取,逻辑组织是L打头,如L01,建议调接口获取;

type固定不变,只需通过改变id获取相应层级数据;

设备类型

1,2 表示展示设备分类为1和2的设备

00 表示不展示设备节点

00_1,00_2 表示不展示设备节点,但设备分类为1和2的设备下的通道有权限展示,具体是否展示通道及那些种类的通道还需要根据通道单元类型判断

通道单元类型

1 表示可以展示单元类型为1的通道,即编码通道

1,2 表示可以展示单元类型为1和2的通道,及编码通道和解码通道

基础组织示例说明

视频通道(设备作为节点展示):type=001;;1,较为通用写法

视频通道(设备不作为节点展示):type=001;00;1,较为通用写法

编码器下视频通道(设备不作为节点展示):type=001;00_1;1

编码器与门禁设备下视频通道(设备作为节点展示):type=001;1,8;1

编码器与门禁设备下视频通道(设备不作为节点展示):type=001;00_1,00_8;1

门禁通道(设备作为节点展示):type=001;;7

门禁通道(设备不作为节点展示):type=001;00;7

道闸通道(设备作为节点展示):type=001;;14

道闸通道(设备不作为节点展示):type=001;00;14

逻辑组织示例说明

视频通道(设备作为节点展示):type=L01;;1,较为通用写法

视频通道(设备不作为节点展示):type=L01;00;1,较为通用写法

编码器下视频通道(设备不作为节点展示):type=L01;00_1;1

编码器与门禁设备下视频通道(设备作为节点展示):type=L01;1,8;1

编码器与门禁设备下视频通道(设备不作为节点展示):type=L01;00_1,00_8;1

门禁通道(设备作为节点展示):type=L01;;7

门禁通道(设备不作为节点展示):type=L01;00;7

道闸通道(设备作为节点展示):type=L01;;14

道闸通道(设备不作为节点展示):type=L01;00;14

基础组织调用说明

将设备树查询接口返回的id作为下一层级展示接口请求的入参,循环调用; 设置主要参数有id、type、checkStat,其中type、checkStat为固定值,checkStat=1,type按照参数说明送;

查询所有通道可递归调用设备树查询接口或者调用设备通道分页查询接口;

以下以视频通道查询为例

首次请求

第一次请求查询根节点id=001下

请求参数

{
  "type":"001;;1",
  "id":"001",
  "checkStat":"1"
}

返回参数

{
    "success": true,
    "data": {
        "value": [
            {
                "id": "001001",
                "name": "上甲板",
                "path": "",
                "pId": "001",
                "type": "org_base",
                "isParent": true,
                "iconType": "/bResource/static/image/treeIcons/org_org_base",
                "checkStat": 1,
                "sort": 1,
                "isCheck": false,
                "nodeType": "org",
                "deviceVisible": 1,
                "hasMoreNode": false,
                "forbidBindUser": 0,
                "orgExt": {
                    "orgCode": "001001",
                    "orgSn": "002",
                    "orgType": null,
                    "busiType": 1,
                    "repeatAddFlag": 1,
                    "treeName": null
                }
            },
            {
                "id": "001002",
                "name": "下甲板",
                "path": "",
                "pId": "001",
                "type": "org_base",
                "isParent": true,
                "iconType": "/bResource/static/image/treeIcons/org_org_base",
                "checkStat": 1,
                "sort": 2,
                "isCheck": false,
                "nodeType": "org",
                "deviceVisible": 1,
                "hasMoreNode": false,
                "forbidBindUser": 0,
                "orgExt": {
                    "orgCode": "001002",
                    "orgSn": "003",
                    "orgType": null,
                    "busiType": 1,
                    "repeatAddFlag": 1,
                    "treeName": null
                }
            },
            {
                "id": "001061",
                "name": "内部测试勿动",
                "path": "",
                "pId": "001",
                "type": "org_city",
                "isParent": true,
                "iconType": "/bResource/static/image/treeIcons/org_org_city",
                "checkStat": 1,
                "sort": 63,
                "isCheck": false,
                "nodeType": "org",
                "deviceVisible": 1,
                "hasMoreNode": false,
                "forbidBindUser": 0,
                "orgExt": {
                    "orgCode": "001061",
                    "orgSn": "",
                    "orgType": null,
                    "busiType": 1,
                    "repeatAddFlag": 1,
                    "treeName": null
                }
            }
        ]
    },
    "code": "0",
    "errMsg": ""
}

历次请求根据id=001061(组织编码为001061,nodeType=org)查询

请求参数

{
  "type":"001;;1",
  "id":"001061",
  "checkStat":"1"
}

返回参数

{
    "success": true,
    "data": {
        "value": [
            {
                "id": "1001337",
                "name": "10.35.237.71",
                "path": "",
                "pId": "001061",
                "type": "0010102",
                "isParent": true,
                "iconType": "/admin/static/image/treeIcons/dev_1_2",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "admin",
                "deviceCategory": 1,
                "deviceType": 2,
                "deviceModel": "4",
                "isOnline": 0,
                "unitTypes": "1",
                "capability": "",
                "registServerCode": "video#local",
                "deviceIp": "10.35.237.71",
                "deviceCode": "1001337"
            },
            {
                "id": "1001338",
                "name": "20.2.32.124",
                "path": "",
                "pId": "001061",
                "type": "0010102",
                "isParent": true,
                "iconType": "/admin/static/image/treeIcons/dev_1_2",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "admin",
                "deviceCategory": 1,
                "deviceType": 2,
                "deviceModel": "4",
                "isOnline": 0,
                "unitTypes": "1",
                "capability": "",
                "registServerCode": "video#local",
                "deviceIp": "20.2.32.124",
                "deviceCode": "1001338"
            },
            {
                "id": "1003209",
                "name": "171.5.45.3",
                "path": "",
                "pId": "001061",
                "type": "0010134",
                "isParent": true,
                "iconType": "/admin/static/image/treeIcons/dev_1_34",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "admin",
                "deviceCategory": 1,
                "deviceType": 34,
                "deviceModel": "4",
                "isOnline": 1,
                "unitTypes": "1",
                "capability": "",
                "registServerCode": "video#local",
                "deviceIp": "171.5.45.3",
                "deviceCode": "1003209"
            },
            {
                "id": "1003526",
                "name": "10.55.106.69",
                "path": "",
                "pId": "001061",
                "type": "0010143",
                "isParent": true,
                "iconType": "/admin/static/image/treeIcons/dev_1_43",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "admin",
                "deviceCategory": 1,
                "deviceType": 43,
                "deviceModel": "4",
                "isOnline": 1,
                "unitTypes": "1,3,4",
                "capability": "",
                "registServerCode": "video#local",
                "deviceIp": "10.55.106.69",
                "deviceCode": "1003526"
            },
            {
                "id": "1003527",
                "name": "10.55.37.19",
                "path": "",
                "pId": "001061",
                "type": "0010143",
                "isParent": true,
                "iconType": "/admin/static/image/treeIcons/dev_1_43",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "admin",
                "deviceCategory": 1,
                "deviceType": 43,
                "deviceModel": "4",
                "isOnline": 1,
                "unitTypes": "1,3,4",
                "capability": "",
                "registServerCode": "video#local",
                "deviceIp": "10.55.37.19",
                "deviceCode": "1003527"
            },
            {
                "id": "1003540",
                "name": "10.55.36.208",
                "path": "",
                "pId": "001061",
                "type": "0010102",
                "isParent": true,
                "iconType": "/admin/static/image/treeIcons/dev_1_2",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "admin",
                "deviceCategory": 1,
                "deviceType": 2,
                "deviceModel": "4",
                "isOnline": 0,
                "unitTypes": "1",
                "capability": "",
                "registServerCode": "video#local",
                "deviceIp": "10.55.36.208",
                "deviceCode": "1003540"
            },
            {
                "id": "1003541",
                "name": "10.55.40.80",
                "path": "",
                "pId": "001061",
                "type": "0010102",
                "isParent": true,
                "iconType": "/admin/static/image/treeIcons/dev_1_2",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "admin",
                "deviceCategory": 1,
                "deviceType": 2,
                "deviceModel": "4",
                "isOnline": 0,
                "unitTypes": "1,3,4",
                "capability": "",
                "registServerCode": "video#local",
                "deviceIp": "10.55.40.80",
                "deviceCode": "1003541"
            },
            {
                "id": "1003547",
                "name": "10.55.37.10",
                "path": "",
                "pId": "001061",
                "type": "0010816",
                "isParent": true,
                "iconType": "/card/static/image/treeIcons/dev_8_16",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "evo-accesscontrol",
                "deviceCategory": 8,
                "deviceType": 16,
                "deviceModel": "人脸门禁",
                "isOnline": 1,
                "unitTypes": "1,7",
                "capability": "7_000011$",
                "deviceIp": "10.55.37.10",
                "deviceCode": "1003547"
            },
            {
                "id": "1003574",
                "name": "10.55.36.1581",
                "path": "",
                "pId": "001061",
                "type": "0010102",
                "isParent": true,
                "iconType": "/admin/static/image/treeIcons/dev_1_2",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "admin",
                "deviceCategory": 1,
                "deviceType": 2,
                "deviceModel": "4",
                "isOnline": 1,
                "unitTypes": "1,3,4",
                "capability": "",
                "registServerCode": "video#local",
                "deviceIp": "10.55.36.158",
                "deviceCode": "1003574"
            }
        ]
    },
    "code": "0",
    "errMsg": ""
}

根据id=1003574(设备编码为1003574,nodeType=dev)查询设备下通道

查到通道节点结束:nodeType=ch

请求参数

{
  "type":"001;;1",
  "id":"1003574",
  "checkStat":"1"
}

返回参数

{
    "success": true,
    "data": {
        "value": [
            {
                "id": "1003574$1$0$0",
                "name": "camera1",
                "path": "",
                "pId": "1003574",
                "type": "001010201",
                "isParent": false,
                "iconType": "/admin/static/image/treeIcons/ch_1_2",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "ch",
                "isVirtual": 0,
                "hasMoreNode": false,
                "deviceCategory": 1,
                "deviceType": 2,
                "deviceModel": "4",
                "capability": "",
                "channelType": "1",
                "ownerCode": "001061",
                "cameraType": "2",
                "unitType": 1,
                "deviceCode": "1003574",
                "isOnline": 1,
                "channelSeq": 0,
                "registServerCode": "video#local",
                "channelCode": "1003574$1$0$0",
                "stat": 1
            }
        ]
    },
    "code": "0",
    "errMsg": ""
}
逻辑组织调用说明

将设备树查询接口返回的id作为下一层级展示接口请求的入参,循环调用;

设置主要参数有id、type、checkStat,其中type、checkStat为固定值,checkStat=1,type按照参数说明送;

查询所有通道可递归调用设备树查询接口或者调用设备通道分页查询接口;

以下以视频通道查询为例

首次请求

id与[组织节点类型],即type第一个分号之前数据内容,调用户详情接口获取defaultOrgCode,入参为鉴权认证的用户id;

假如获取defaultOrgCode=L02,则id=L01,type=L02;;1,层级获取只需改变id即可,type固定L02;;1

请求参数

{
  "type":"L02;;1",
  "id":"L02",
  "checkStat":"1",
  "checkLogicRootOrgNodeFlag":false,
  "channelBelong":1,
  "busiType":"2"
}

返回参数

{
    "success": true,
    "data": {
        "value": [
            {
                "id": "N16",
                "name": "171.5.45.3",
                "path": "",
                "pId": "L02",
                "type": "L020134",
                "isParent": true,
                "iconType": "/admin/static/image/treeIcons/dev_1_34",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "admin",
                "deviceCategory": 1,
                "deviceType": 34,
                "deviceModel": "4",
                "isOnline": 1,
                "unitTypes": "1",
                "capability": "",
                "registServerCode": "video#local",
                "deviceCode": "1000002"
            },
            {
                "id": "N14",
                "name": "10.55.36.158",
                "path": "",
                "pId": "L02",
                "type": "L020102",
                "isParent": true,
                "iconType": "/admin/static/image/treeIcons/dev_1_2",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "admin",
                "deviceCategory": 1,
                "deviceType": 2,
                "deviceModel": "4",
                "isOnline": 1,
                "unitTypes": "1",
                "capability": "",
                "registServerCode": "video#local",
                "deviceCode": "1000004"
            },
            {
                "id": "N3",
                "name": "10.55.37.19",
                "path": "",
                "pId": "L02",
                "type": "L020143",
                "isParent": true,
                "iconType": "/admin/static/image/treeIcons/dev_1_43",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "admin",
                "deviceCategory": 1,
                "deviceType": 43,
                "deviceModel": "4",
                "isOnline": 1,
                "unitTypes": "1",
                "capability": "",
                "registServerCode": "video#local",
                "deviceCode": "1000005"
            }
        ]
    },
    "code": "0",
    "errMsg": ""
}

历次请求

id选择首次返回的N16作为节点请求

请求参数

{
  "type":"L02;;1",
  "id":"N16",
  "checkStat":"1",
  "checkLogicRootOrgNodeFlag":false,
  "channelBelong":1,
  "busiType":"2"
}

返回参数

{
    "success": true,
    "data": {
        "value": [
            {
                "id": "N17",
                "name": "171.5.45.3_视频通道_1",
                "path": "",
                "pId": "N16",
                "type": "L02013401",
                "isParent": false,
                "iconType": "/admin/static/image/treeIcons/ch_1_2",
                "checkStat": 1,
                "sort": 1,
                "isCheck": false,
                "nodeType": "ch",
                "isVirtual": 0,
                "hasMoreNode": false,
                "deviceCategory": 1,
                "deviceType": 34,
                "deviceModel": "4",
                "capability": "",
                "channelType": "1",
                "ownerCode": "L02",
                "cameraType": "2",
                "unitType": 1,
                "deviceCode": "1000002",
                "isOnline": 1,
                "channelSeq": 0,
                "registServerCode": "video#local",
                "channelCode": "1000002$1$0$0",
                "stat": 1
            }
        ]
    },
    "code": "0",
    "errMsg": ""
}
常用调用示例

查询根节点id=001下组织,不查询设备与通道

{
  "type":"001",
  "id":"001",
  "checkStat":"1"
}

查询节点id=001001编码器设备,不查通道

{
  "type":"001;1",
  "id":"001001",
  "checkStat":"1"
}

查询节点id=001001编码器设备与视频通道,设备作为节点展示

请求参数

{
  "type":"001;1;1",
  "id":"001001",
  "checkStat":"1"
}

返回参数

{
    "success": true,
    "data": {
        "value": [
            {
                "id": "1001337",
                "name": "10.35.237.71",
                "path": "",
                "pId": "001061",
                "type": "0010102",
                "isParent": true,
                "iconType": "/admin/static/image/treeIcons/dev_1_2",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "admin",
                "deviceCategory": 1,
                "deviceType": 2,
                "deviceModel": "4",
                "isOnline": 0,
                "unitTypes": "1",
                "capability": "",
                "registServerCode": "video#local",
                "deviceIp": "10.35.237.71",
                "deviceCode": "1001337"
            },
            {
                "id": "1001338",
                "name": "20.2.32.124",
                "path": "",
                "pId": "001061",
                "type": "0010102",
                "isParent": true,
                "iconType": "/admin/static/image/treeIcons/dev_1_2",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "dev",
                "isVirtual": 0,
                "hasMoreNode": false,
                "subSystem": "admin",
                "deviceCategory": 1,
                "deviceType": 2,
                "deviceModel": "4",
                "isOnline": 0,
                "unitTypes": "1",
                "capability": "",
                "registServerCode": "video#local",
                "deviceIp": "20.2.32.124",
                "deviceCode": "1001338"
            }
        ]
    },
    "code": "0",
    "errMsg": ""
}

查询节点id=001001视频通道,设备不作为节点展示

请求参数

{
  "type":"001;00;1",
  "id":"001001",
  "checkStat":"1"
}

返回参数

{
    "success": true,
    "data": {
        "value": [
            {
                "id": "1001337$1$0$0",
                "name": "通道1",
                "path": "",
                "pId": "001061",
                "type": "001010201",
                "isParent": false,
                "iconType": "/admin/static/image/treeIcons/ch_1_1",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "ch",
                "isVirtual": 0,
                "hasMoreNode": false,
                "deviceCategory": 1,
                "deviceType": 2,
                "deviceModel": "4",
                "capability": "",
                "channelType": "1",
                "ownerCode": "001061",
                "cameraType": "1",
                "unitType": 1,
                "deviceCode": "1001337",
                "isOnline": 0,
                "channelSeq": 0,
                "registServerCode": "video#local",
                "channelCode": "1001337$1$0$0",
                "stat": 1
            },
            {
                "id": "1001338$1$0$0",
                "name": "可见光",
                "path": "",
                "pId": "001061",
                "type": "001010201",
                "isParent": false,
                "iconType": "/admin/static/image/treeIcons/ch_1_1",
                "checkStat": 1,
                "isCheck": false,
                "nodeType": "ch",
                "isVirtual": 0,
                "hasMoreNode": false,
                "deviceCategory": 1,
                "deviceType": 2,
                "deviceModel": "4",
                "capability": "00000000001000000000000000000000",
                "channelType": "1",
                "ownerCode": "001061",
                "cameraType": "1",
                "unitType": 1,
                "deviceCode": "1001338",
                "isOnline": 0,
                "channelSeq": 0,
                "registServerCode": "video#local",
                "channelCode": "1001338$1$0$0",
                "stat": 1
            }
        ]
    },
    "code": "0",
    "errMsg": ""
}

搜索节点id=001001设备树

请求参数

{
  "type":"001;1,5,21;1",
  "act":"search",
  "searchKey":"tj1868292507103"
}

返回参数

名称类型说明
successboolean接口返回是否成功
codestring错误码:0-为无错误,非0-为具体错误码
errMsgstring错误消息
dataValueVO数据

ValueVO

名称类型说明
valueList<TreeItemVO>数据列表

TreeItemVO

名称类型说明
idString节点ID ,作为下一次设备树查询接口入参的关键字段
nameString节点名称 或设备名称 或通道名称
pIdString上级节点ID
typeString节点类型,预留后期出现多棵树场景(组织节点取值为:根组织编码,如001;设备节点取值为:根组织编码+两位设备分类(不足两位前面补0)+两位设备类型(不足两位前面补0)); 设备节点取值为:根组织编码+设备分类(两位,不足两位前面补0)+设备类型(两位,不足两位前面补0)+通道所属单元类型(两位,不足两位前面补0),如:001010601
nodeTypeString设备树节点类型
iconTypeString节点图标(组织节点图标为:org-树根节点编码,如基础组织树中组织节点图标为 org-001;设备节点图标:dev-设备分类-设备类型-设备型号;通道节点图标:ch-单元类型-通道类型(channelType)-摄像头类型(cameraType)) ,设备型号、通道类型、摄像头类型中如果没有,默认为0,节点图标显示按照需要设定展示图标
isParentboolean是否存在子节点
isCheckboolean是否勾选
deviceCategoryint设备大类
deviceModelstring设备型号(设备节点/通道节点属性)
deviceTypeint设备小类
deviceCodestring所属设备编码(通道节点属性)
unitTypeint通道单元类型(通道节点属性)
ownerCodestring所属组织(设备节点/通道节点属性)
cameraTypestring摄像头类型(通道节点属性)
capabilitystring通道能力集,详细说明请参考通道能力级说明
snstring组织序列号
isVirtualint是否虚拟设备(null的话代表否)
channelTypestring通道类型
channelCodestring通道编号
statint通道状态 0:关闭 1:开启

返回参数示例(成功)

{
  "success": true,
  "data": {
    "value": [
      {
        "id": "001",
        "name": "根节点",
        "pId": "root",
        "type": "001",
        "isParent": true,
        "iconType": "org-001",
        "checkStat": 1,
        "sort": 1,
        "isCheck": false,
        "nodeType": "org"
      },
      {
        "id": "001001",
        "name": "二级组织A",
        "pId": "001",
        "type": "001",
        "isParent": false,
        "iconType": "org-001",
        "checkStat": 1,
        "sort": 1,
        "isCheck": false,
        "nodeType": "org",
		"sn":"AKkwlklwQ"
      },
      {
        "id": "001002",
        "name": "二级组织B",
        "pId": "001",
        "type": "001",
        "isParent": true,
        "iconType": "org-001",
        "checkStat": 1,
        "sort": 2,
        "isCheck": false,
        "nodeType": "org",
		"sn":"AKkwlkDASlwQ"
      },
      {
        "id": "001003",
        "name": "二级组织C",
        "pId": "001",
        "type": "001",
        "isParent": true,
        "iconType": "org-001",
        "checkStat": 1,
        "sort": 3,
        "isCheck": false,
        "nodeType": "org",
		"sn":"AKkwasdlklwQ"
      },
      {
        "id": "001004",
        "name": "二级组织D",
        "pId": "001",
        "type": "001",
        "isParent": true,
        "iconType": "org-001",
        "checkStat": 1,
        "sort": 4,
        "isCheck": false,
        "nodeType": "org",
		"sn":"AKkwlkldasdawQ"
      },
      {
        "id": "1000010$1$0$0",
        "name": "222_视频通道_1",
        "pId": "001",
        "type": "001010601",
        "isParent": false,
        "iconType": "ch-1-1-2",
        "isCheck": false,
        "nodeType": "ch",
        "deviceCategory": 1,
        "deviceType": 6,
        "deviceModel": "4",
        "channelType": "1",
        "ownerCode": "001",
        "cameraType": "2",
        "unitType": 1,
        "deviceCode": "1000010"
      },
      {
        "id": "1000009$1$0$1",
        "name": "fdfdsfds_视频通道_2",
        "pId": "001",
        "type": "001010101",
        "isParent": false,
        "iconType": "ch-1-1-2",
        "isCheck": false,
        "nodeType": "ch",
        "deviceCategory": 1,
        "deviceType": 1,
        "deviceModel": "4",
        "channelType": "1",
        "ownerCode": "001",
        "cameraType": "2",
        "unitType": 1,
        "deviceCode": "1000009"
      },
      {
        "id": "1000011$1$0$0",
        "name": "231_视频通道_1",
        "pId": "001",
        "type": "001010101",
        "isParent": false,
        "iconType": "ch-1-1-2",
        "isCheck": false,
        "nodeType": "ch",
        "deviceCategory": 1,
        "deviceType": 1,
        "deviceModel": "4",
        "channelType": "1",
        "ownerCode": "001",
        "cameraType": "2",
        "unitType": 1,
        "deviceCode": "1000011"
      },
      {
        "id": "1000009$1$0$0",
        "name": "fdfdsfds_视频通道_1",
        "pId": "001",
        "type": "001010101",
        "isParent": false,
        "iconType": "ch-1-1-2",
        "isCheck": false,
        "nodeType": "ch",
        "deviceCategory": 1,
        "deviceType": 1,
        "deviceModel": "4",
        "channelType": "1",
        "ownerCode": "001",
        "cameraType": "2",
        "unitType": 1,
        "deviceCode": "1000009"
      },
      {
        "id": "1000008$1$0$0",
        "name": "test_视频通道_1",
        "pId": "001",
        "type": "001010101",
        "isParent": false,
        "iconType": "ch-1-1-2",
        "isCheck": false,
        "nodeType": "ch",
        "deviceCategory": 1,
        "deviceType": 1,
        "deviceModel": "4",
        "channelType": "1",
        "ownerCode": "001",
        "cameraType": "2",
        "unitType": 1,
        "deviceCode": "1000008"
      }
    ]
  },
  "code": "0",
  "errMsg": ""
}

返回参数示例(失败)

{
    "success": false,
    "data": {},
    "code": "28****",
    "errMsg": ""
}
设备通道分页查询

接口说明

分页查询设备通道信息

接口配套版本信息

智能物联综合管理平台iConnection Center V5.0.6及以上版本

接口版本

1.2.0

接口URL

/evo-apigw/evo-brm/1.2.0/device/channel/subsystem/page

请求Method

POST

数据提交格式

application/json

请求参数

参数名必选类型说明
pageNumfalseint当前页, 默认1
pageSizefalseint每页记录数, 默认10
sortfalsestring排序属性 支持排序属性:id、updateTime、ownerCode、deviceCode、channelCode、unitType、channelType、cameraType、channelSn
sortTypefalsestring排序方式 :ASC-升序, DESC-降序(默认)
ownerCodefalseString所属组织编码
deviceCodeListfalseList设备编码列表
channelCodeListfalseList通道编码列表
unitTypeListfalseList单元类型列表
channelTypeListfalseList通道类型列表
isOnlinefalseInteger在线状态
accessfalseInteger是否已经接入
isVirtualfalseInteger是否是虚拟通道
statfalseInteger启用状态, 查询全部 0:查询关闭 1:查询已经开启 默认:1
includeSubOwnerCodeFlagfalseboolean是否包含子节点,默认false,不展示下级通道

请求参数示例

{
    "pageNum": 1,
    "pageSize": 10,
    "sortType": "ASC",
    "sort": "channelSn",
    "ownerCode":"001e25001001",
    "deviceCodeList":["1009816@425","1001707@425"],
    "channelCodeList":["1009816@425$1$0$0","1001707@425$1$0$0"],
    "unitTypeList":[1],
    "channelTypeList":["1"],
    "isOnline":null,
    "access":null,
    "isVirtual":0,
    "stat":1,
    "includeSubOwnerCodeFlag":true
    
}

返回参数

名称类型说明
successboolean接口返回是否成功
codestring错误码:0-为无错误,非0-为具体错误码
errMsgstring错误消息
dataPageVO分页数据

PageVO

名称类型说明
currentPageint当前页码
totalPageint总页数
pageSizeint每页记录数
totalRowsint总数
pageDataList<ChannelInfoVO>数据列表

ChannelInfoVO

名称类型说明
idLong自增ID
deviceCodeString设备编码
unitTypeInteger单元类型
unitSeqInteger单元序号
channelSeqInteger通道序号
channelCodeString通道编码
channelSnString通道标识码
channelNameString通道名称
channelTypeString通道类型
cameraTypeString摄像头类型
ownerCodeString所属组织编码
gpsXString经度
gpsYString纬度
gpsZStringz轴
mapIdLong光栅图ID
domainIdLong域ID
memoString描述
isOnlineInteger设备通道在线状态
statInteger状态 0:关闭 1:开启
capabilityString通道能力集,详细说明请参考通道能力级说明
accessInteger是否已经接入 :1-已接入, 0-未接入
capabilityString通道能力集,详细说明请参考通道能力级说明
chExtString通道详情扩展信息,json体
isVirtualString是否是虚拟通道

返回参数示例(成功)

{
    "success": true,
    "data": {
        "pageData": [
            {
                "id": 1086,
                "deviceCode": "1009816@425",
                "unitType": 1,
                "unitSeq": 0,
                "channelSeq": 0,
                "channelCode": "1009816@425$1$0$0",
                "channelSn": "1",
                "channelName": "IPC",
                "channelType": "1",
                "cameraType": "1",
                "ownerCode": "001e25001001",
                "gpsX": "1",
                "gpsY": "1",
                "gpsZ": "1",
                "mapId": 1,
                "domainId": 425,
                "memo": "1",
                "isOnline": 0,
                "stat": 1,
                "capability": "00000000000000000000000000000100",
                "access": 1,
                "chExt": "{}",
                "isVirtual": 0
            }
        ],
        "currentPage": 1,
        "totalPage": 2,
        "pageSize": 1,
        "totalRows": 2
    },
    "code": "0",
    "errMsg": ""
}

返回参数示例(失败)

{
    "success": false,
    "data": {},
    "code": "28****",
    "errMsg": ""
}
设备全量数据同步

接口说明

全量同步设备数据

接口配套版本信息

智能物联综合管理平台iConnection Center V5.0.6及以上版本

接口版本

1.2.0

接口URL

/evo-apigw/evo-brm/1.2.0/device/list-page

请求Method

POST

数据提交格式

application/json

请求参数

参数名必选类型说明
pageNumtrueint当前页
pageSizetrueint每页记录数
deviceExtendConditionListfalseList<DeviceExtendCondition>扩展订阅条件
maxRangeIdtruelong同步边界值
syncCascadeDatafalseint是否同步级联设备数据
syncVirtualDatafalseint是否同步虚拟设备数据

DeviceExtendCondition

参数名必选类型说明
unitTypesfalsearray单元类型,多个。和categorys或types过滤结果取交集
categorysfalsearray设备大类,当存在types字段的时候,和types过滤结果取并集,再和unitTypes过滤结果取交集
typesfalsearray设备小类,当存在categorys字段的时候,和categorys过滤结果取并集,再和unitTypes过滤结果取交集

请求参数示例

{
    "pageNum": 1,
    "pageSize": 10,
    "deviceExtendConditionList": [
        {
            "unitTypes": [
                1
            ],
            "categorys": [
                1,
                3
            ],
            "types": [
                "1_2",
                "2_3"
            ]
        }
    ],
    "syncCascadeData": 0,
    "syncVirtualData": 0,
    "maxRangeId": 100000
}

返回参数

名称类型说明
successboolean接口返回是否成功
codestring错误码:0-为无错误,非0-为具体错误码
errMsgstring错误消息
dataPageVO分页数据

PageVO

名称类型说明
currentPageint当前页码
totalPageint总页数
pageSizeint每页记录数
totalRowsint总数
pageDataList<DeviceInfoVO>数据列表

DeviceInfoVO

名称类型说明
deviceCodeString设备编码
deviceNameString设备名称
deviceSnString设备唯一标识码
deviceCategoryint设备大类
deviceTypeint设备小类
deviceManufacturerString厂商类型
deviceModelString设备型号
deviceIpString设备IP
devicePortint设备端口
ownerCodestring设备所属组织编码
isOnlineint设备在线状态
offlineReasonstring设备离线原因
subSystemstring设备所属子系统
devExtobject设备扩展属性,自定义json数据 ,具体参考附录->设备扩展信息->设备扩展协议
unitsList<UnitVO>单元信息

UnitVO

名称类型说明
unitTypeint单元类型
unitSeqint单元序号
sortint排序码
memostring单元描述
capabilitystring能力集
unitExtobject单元扩展信息
channelsList<ChannelVO>单元通道信息

ChannelVO

名称类型说明
channelCodestring通道编码
channelNamestring通道名称
channelSeqint通道序号
channelSnstring通道唯一标识码
channelTypestring通道类型
capabilitystring通道能力集,详细说明请参考通道能力级说明
cameraTypestring摄像头类型,视频通道会返回该字段
accessint是否已接入
gpsXstring经度
gpsYstring纬度
gpsZstringZ轴
memostring通道描述
isOnlineint通道在线状态
statint是否启用
chExtobject通道扩展属性 自定义,具体参考附录->设备扩展信息->通道扩展协议

返回参数示例(成功)

{
  "success": true,
  "code": "0",
  "errMsg": "成功",
  "data": {
    "pageData": [
      {
        "deviceCode": "1000014",
        "deviceName": "编码器12323",
        "deviceSn": "deviceSn124323233",
		"deviceManufacturer": "1",
        "deviceCategory": 1,
        "deviceType": "1",
        "deviceModel": "1",
        "deviceIp": "10.3.3.6",
        "devicePort": 37777,
		"ownerCode":"001",
		"isOnline":"1",
		"offlineReason":"网络异常",
		"subSystem":"evo-subsystem",
		"units":[
			{
				"unitType":1,
				"unitSeq":1,
				"capability":"10101010",
				"memo":"视频单元",
				"unitExt":"单元扩展信息",
				"channels":[
					{
					"channelName": "channelName1",//通道名称
					"channelSeq": 0,//通道序号
					"channelCode":"100001$1$0$0",//通道编码
					"channelSn": "sn123456",//通道标识码
					"channelType": "1",//通道类型
					"cameraType": "1",//摄像头类型 1 枪机 2 球机 3 半球 5 本地采集输入
					"capability": "1111111111111111111",//通道能力集
					"gpsX": "15.3",//经度
					"gpsY": "19.3",//纬度
					"gpsZ": "150.3",//Z轴
					"ownerCode" : "001",
					"isOnline":1,//通道状态
					"domainId": "1",//域
					"memo": "channelMemo",//通道描述
					"stat": 1,//状态 0 不启用 1 启用
					"chExt":{}//通道扩展属性,自定义
				  }
				]
			},
			{
				"unitType":1,
				"unitSeq":1,
				"capability":"10101010",
				"memo":"视频单元",
				"unitExt":"单元扩展信息"
			}
		]
      }
    ],
    "currentPage": 1,
    "totalPage": 1,
    "pageSize": 5,
    "totalRows": 1
  }
} 

返回参数示例(失败)

{
    "success": false,
    "data": {},
    "code": "28****",
    "errMsg": ""
}