From 366c867c373a4328588bdb02fb3e61f362409953 Mon Sep 17 00:00:00 2001
From: liuxiaolong <liuxiaolong@aiotlink.com>
Date: 星期二, 14 十二月 2021 15:30:12 +0800
Subject: [PATCH] GetAllCamerasAndGroupsByDevID ret nil []DomainUnit
---
测试rest.txt | 109 +++++++++++++++++++++++++++++++++++-------------------
1 files changed, 70 insertions(+), 39 deletions(-)
diff --git "a/\346\265\213\350\257\225rest.txt" "b/\346\265\213\350\257\225rest.txt"
index 50ec16e..e4a9c1b 100644
--- "a/\346\265\213\350\257\225rest.txt"
+++ "b/\346\265\213\350\257\225rest.txt"
@@ -6,7 +6,7 @@
一、数据配置管理协议:
1、设置服务器信息:POST
- http://192.168.12.112:8060/vssconfig/set_platform_server?gbsvrid=32000000002000000001&gbsvrport=7060&gbsvrname=国标服务&rtspsvrport=7554
+ http://192.168.3.23:8060/vssconfig/set_platform_server?gbsvrid=32000000002000000001&gbsvrport=7060&gbsvrname=国标服务&rtspsvrport=7554
HTTP Method: GET
返回结果:
@@ -16,13 +16,13 @@
}
2、获取服务器信息:GET
- http://192.168.12.112:8060/vssconfig/get_platform_server
+ http://192.168.3.23:8060/vssconfig/get_platform_server
返回结果:
{
"errcode":0,
"errdesc":"OK",
"name":"本级国标平台",
- "ipaddr":"192.168.12.112",
+ "ipaddr":"192.168.3.23",
"httpserverport":8060,
"publicid":"11000000002000000001",
"gbserverport":7060,
@@ -33,7 +33,7 @@
3.设置上级平台信息:POST
更新或则增加上级平台信息
- http://192.168.12.112:8060/vssconfig/set_upper_platform_server/update
+ http://192.168.3.23:8060/vssconfig/set_upper_platform_server/update
HTTP Method: POST
Body:
@@ -45,7 +45,7 @@
}
删除上级平台信息
- http://192.168.12.112:8060/vssconfig/set_upper_platform_server/delete
+ http://192.168.3.23:8060/vssconfig/set_upper_platform_server/delete
HTTP Method: POST
Body:
@@ -57,7 +57,7 @@
}
4.获取上级平台信息:GET
- http://192.168.12.112:8060/vssconfig/get_upper_platform_server/1
+ http://192.168.3.23:8060/vssconfig/get_upper_platform_server/1
返回结果:
{
@@ -69,7 +69,7 @@
}
5.获取所有设备信息:GET
- http://192.168.12.112:8060/vssconfig/get_all_device/1
+ http://192.168.3.23:8060/vssconfig/get_all_device/1
返回结果:
{
@@ -83,7 +83,7 @@
6.设备管理(一般用于删除设备):POST
删除设备:
- http://192.168.12.112:8060/vssconfig/set_device/delete
+ http://192.168.3.23:8060/vssconfig/set_device/delete
HTTP Method: POST
@@ -108,7 +108,7 @@
}
7.获取设备的所有通道资源信息:GET
- http://192.168.12.112:8060/vssconfig/get_all_channel/11010000002000000001/all/1
+ http://192.168.3.23:8060/vssconfig/get_all_channel/11010000002000000001/all/1
返回结果:
{
@@ -116,14 +116,14 @@
[
{"restype":2,"publicid":"11010000002150000004","name":"28181推送角色","alive":1,"corp":"","model":"","owner":"","civilcode":"","address":"","devpubid":"11010000002000000001","parentid":"11010000002000000001","ip":"","port":0,"longitude":0.0,"latitude":0.0,"ptztype":0,"streamtype":0,"realrtspurl":""},
{"restype":2,"publicid":"11010000002160000009","name":"网关接入摄像机组","alive":1,"corp":"","model":"","owner":"","civilcode":"","address":"","devpubid":"11010000002000000001","parentid":"11010000002150000004","ip":"","port":0,"longitude":0.0,"latitude":0.0,"ptztype":0,"streamtype":0,"realrtspurl":""},
- {"restype":1,"publicid":"11010000001310000004","name":"rtsp_69_1","alive":1,"corp":"51","model":"rtsplib_ipc","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":104.08116,"latitude":30.68946,"ptztype":3,"streamtype":0,"realrtspurl":"rtsp://192.168.12.112:7554/DevAor=11010000001310000004"},
- {"restype":1,"publicid":"11010000001310000029","name":"成都分公司","alive":1,"corp":"8","model":"hikes_ipc","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":0.0,"latitude":0.0,"ptztype":1,"streamtype":0,"realrtspurl":"rtsp://192.168.12.112:7554/DevAor=11010000001310000029"},
- {"restype":1,"publicid":"11010000001310000030","name":"大华测试摄像机179-1","alive":1,"corp":"1","model":"dahua_IPC","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":0.0,"latitude":0.0,"ptztype":1,"streamtype":0,"realrtspurl":"rtsp://192.168.12.112:7554/DevAor=11010000001310000030"}
+ {"restype":1,"publicid":"11010000001310000004","name":"rtsp_69_1","alive":1,"corp":"51","model":"rtsplib_ipc","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":104.08116,"latitude":30.68946,"ptztype":3,"streamtype":0,"realrtspurl":"rtsp://192.168.3.23:7554/DevAor=11010000001310000004"},
+ {"restype":1,"publicid":"11010000001310000029","name":"成都分公司","alive":1,"corp":"8","model":"hikes_ipc","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":0.0,"latitude":0.0,"ptztype":1,"streamtype":0,"realrtspurl":"rtsp://192.168.3.23:7554/DevAor=11010000001310000029"},
+ {"restype":1,"publicid":"11010000001310000030","name":"大华测试摄像机179-1","alive":1,"corp":"1","model":"dahua_IPC","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":0.0,"latitude":0.0,"ptztype":1,"streamtype":0,"realrtspurl":"rtsp://192.168.3.23:7554/DevAor=11010000001310000030"}
]
}
8.获取设备下的一级资源信息:GET (根据父节点查找)
- http://192.168.12.112:8060/vssconfig/get_all_channel/11010000002000000001/node/1
+ http://192.168.3.23:8060/vssconfig/get_all_channel/11010000002000000001/node/1
返回结果:
{
@@ -135,51 +135,82 @@
9.获取平台的所有通道资源信息 (不包含资源组) ----> 如果只接入IPC设备, 建议采用该接口获取资源信息
- http://192.168.12.112:8060/vssconfig/get_platform_all_channel/1
+ http://192.168.3.23:8060/vssconfig/get_platform_all_channel/1
返回结果:
{
"errcode": 0 ,"errdesc": "OK" ,"totalsize": 3 ,"onepagesize": 100 ,"totalpage": 1 ,"pageno": 1, "count":3,"data":
[
- {"restype":1,"publicid":"11010000001310000004","name":"rtsp_69_1","alive":1,"corp":"51","model":"rtsplib_ipc","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":104.08116,"latitude":30.68946,"ptztype":3,"streamtype":0,"realrtspurl":"rtsp://192.168.12.112:7554/DevAor=11010000001310000004"},
- {"restype":1,"publicid":"11010000001310000029","name":"成都分公司","alive":1,"corp":"8","model":"hikes_ipc","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":0.0,"latitude":0.0,"ptztype":1,"streamtype":0,"realrtspurl":"rtsp://192.168.12.112:7554/DevAor=11010000001310000029"},
- {"restype":1,"publicid":"11010000001310000030","name":"大华测试摄像机179-1","alive":1,"corp":"1","model":"dahua_IPC","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":0.0,"latitude":0.0,"ptztype":1,"streamtype":0,"realrtspurl":"rtsp://192.168.12.112:7554/DevAor=11010000001310000030"}
+ {"restype":1,"publicid":"11010000001310000004","name":"rtsp_69_1","alive":1,"corp":"51","model":"rtsplib_ipc","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":104.08116,"latitude":30.68946,"ptztype":3,"streamtype":0,"realrtspurl":"rtsp://192.168.3.23:7554/DevAor=11010000001310000004"},
+ {"restype":1,"publicid":"11010000001310000029","name":"成都分公司","alive":1,"corp":"8","model":"hikes_ipc","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":0.0,"latitude":0.0,"ptztype":1,"streamtype":0,"realrtspurl":"rtsp://192.168.3.23:7554/DevAor=11010000001310000029"},
+ {"restype":1,"publicid":"11010000001310000030","name":"大华测试摄像机179-1","alive":1,"corp":"1","model":"dahua_IPC","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":0.0,"latitude":0.0,"ptztype":1,"streamtype":0,"realrtspurl":"rtsp://192.168.3.23:7554/DevAor=11010000001310000030"}
]
}
+
+10.获取设备的行政区域 (设备是平台才会去获取行政区域-中间三位编码为200)
+ http://192.168.3.23:8060/vssconfig/get_all_domainunit
+ 返回结果:
+ {
+ "errcode":0,"errdesc":"OK","count":10,"data":
+ [
+ {"restype":2,"publicid":"11","name":"北京","devpubid":"11010000002000000001","parentid":"11000000002000000001","totalnum":16,"onlinenum":7},
+ {"restype":2,"publicid":"1101","name":"市区","devpubid":"11010000002000000001","parentid":"11","totalnum":15,"onlinenum":6},
+ {"restype":2,"publicid":"110101","name":"朝阳","devpubid":"11010000002000000001","parentid":"1101","totalnum":0,"onlinenum":0},
+ {"restype":2,"publicid":"11010109","name":"派出所09","devpubid":"11010000002000000001","parentid":"110101","totalnum":0,"onlinenum":0},
+ {"restype":2,"publicid":"110105","name":"东城","devpubid":"11010000002000000001","parentid":"1101","totalnum":0,"onlinenum":0},
+ {"restype":2,"publicid":"110112","name":"通州","devpubid":"11010000002000000001","parentid":"1101","totalnum":9,"onlinenum":4},
+ {"restype":2,"publicid":"11011201","name":"派出所1","devpubid":"11010000002000000001","parentid":"110112","totalnum":0,"onlinenum":0},
+ {"restype":2,"publicid":"1102","name":"11","devpubid":"11010000002000000001","parentid":"11","totalnum":0,"onlinenum":0},
+ {"restype":2,"publicid":"110233","name":"33","devpubid":"11010000002000000001","parentid":"1102","totalnum":0,"onlinenum":0},
+ {"restype":2,"publicid":"110255","name":"33","devpubid":"11010000002000000001","parentid":"1102","totalnum":0,"onlinenum":0}
+ ]
+ }
+
+11. 获取行政区域的通道信息
+ http://192.168.3.23:8060/vssconfig/get_domainunit_channel/1101/1
+ 返回结果:
+ {
+ "errcode": 0 ,"errdesc": "OK" ,"totalsize": 3 ,"onepagesize": 100 ,"totalpage": 1 ,"pageno": 1, "count":3,"data":
+ [
+ {"restype":1,"publicid":"11010000001310000004","name":"rtsp_69_1","alive":0,"corp":"51","model":"rtsplib_ipc","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":104.08116,"latitude":30.68946,"ptztype":3,"streamtype":0,"realrtspurl":"rtsp://192.168.3.23:7554/DevAor=11010000001310000004"},
+ {"restype":1,"publicid":"11010000001310000029","name":"成都分公司-","alive":1,"corp":"8","model":"hikes_ipc","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":0.0,"latitude":0.0,"ptztype":1,"streamtype":0,"realrtspurl":"rtsp://192.168.3.23:7554/DevAor=11010000001310000029"},
+ {"restype":1,"publicid":"11010000001310000030","name":"大华测试摄像机79-1","alive":1,"corp":"1","model":"dahua_IPC","owner":"11010000002000000001","civilcode":"1101","address":"","devpubid":"11010000002000000001","parentid":"11010000002160000009","ip":"","port":0,"longitude":0.0,"latitude":0.0,"ptztype":1,"streamtype":0,"realrtspurl":"rtsp://192.168.3.23:7554/DevAor=11010000001310000030"}
+ ]
+ }
操作相关接口:
1.PTZ控制
- 向上: http://192.168.12.112:8060/vss/ptz/up/100/11000000001325000001
+ 向上: http://192.168.3.23:8060/vss/ptz/up/100/11000000001325000001
- 向下: http://192.168.12.112:8060/vss/ptz/down/100/11000000001325000001
+ 向下: http://192.168.3.23:8060/vss/ptz/down/100/11000000001325000001
- 向左: http://192.168.12.112:8060/vss/ptz/left/100/11000000001325000001
+ 向左: http://192.168.3.23:8060/vss/ptz/left/100/11000000001325000001
- 向右: http://192.168.12.112:8060/vss/ptz/right/100/11000000001325000001
+ 向右: http://192.168.3.23:8060/vss/ptz/right/100/11000000001325000001
- 左上: http://192.168.12.112:8060/vss/ptz/leftup/100/11000000001325000001
+ 左上: http://192.168.3.23:8060/vss/ptz/leftup/100/11000000001325000001
- 左下: http://192.168.12.112:8060/vss/ptz/leftdown/100/11000000001325000001
+ 左下: http://192.168.3.23:8060/vss/ptz/leftdown/100/11000000001325000001
- 右上: http://192.168.12.112:8060/vss/ptz/rightup/100/11000000001325000001
+ 右上: http://192.168.3.23:8060/vss/ptz/rightup/100/11000000001325000001
- 右下: http://192.168.12.112:8060/vss/ptz/rightdown/100/11000000001325000001
+ 右下: http://192.168.3.23:8060/vss/ptz/rightdown/100/11000000001325000001
- 镜头近: http://192.168.12.112:8060/vss/ptz/zoomin/100/11000000001325000001
- 镜头远: http://192.168.12.112:8060/vss/ptz/zoomout/100/11000000001325000001
+ 镜头近: http://192.168.3.23:8060/vss/ptz/zoomin/100/11000000001325000001
+ 镜头远: http://192.168.3.23:8060/vss/ptz/zoomout/100/11000000001325000001
- 焦距远: http://192.168.12.112:8060/vss/ptz/focusfar/100/11000000001325000001
- 焦距近: http://192.168.12.112:8060/vss/ptz/focusnear/100/11000000001325000001
+ 焦距远: http://192.168.3.23:8060/vss/ptz/focusfar/100/11000000001325000001
+ 焦距近: http://192.168.3.23:8060/vss/ptz/focusnear/100/11000000001325000001
- 设置预置位:http://192.168.12.112:8060/vss/ptz/setpos/100/11000000001325000001
- 调预置位: http://192.168.12.112:8060/vss/ptz/callpos/100/11000000001325000001
+ 设置预置位:http://192.168.3.23:8060/vss/ptz/setpos/100/11000000001325000001
+ 调预置位: http://192.168.3.23:8060/vss/ptz/callpos/100/11000000001325000001
- 停止: http://192.168.12.112:8060/vss/ptz/stop/0/11000000001325000001
+ 停止: http://192.168.3.23:8060/vss/ptz/stop/0/11000000001325000001
2.录像查询
- http://192.168.12.112:8060/vss/history_search/2018-08-30T00:00:00/2018-08-30T02:00:00/11000000001325000001
+ http://192.168.3.23:8060/vss/history_search/2018-08-30T00:00:00/2018-08-30T02:00:00/11000000001325000001
返回结果:
{
@@ -207,8 +238,8 @@
3.设备控制
- 手动录像开启:http://192.168.12.112:8060/vss/device_ctrl/record/11000000001325000001/start
- 手动录像停止: http://192.168.12.112:8060/vss/device_ctrl/record/11000000001325000001/stop
+ 手动录像开启:http://192.168.3.23:8060/vss/device_ctrl/record/11000000001325000001/start
+ 手动录像停止: http://192.168.3.23:8060/vss/device_ctrl/record/11000000001325000001/stop
返回结果:
{
@@ -225,7 +256,7 @@
"errcode": (数字) 返回值,0表示成功,其他见错误码
"imageurl": (字符串) 图片的url地址
请求:
- URL: http://192.168.12.112:8060/vss/get_image/11000000001320020001/1
+ URL: http://192.168.3.23:8060/vss/get_image/11000000001320020001/1
HTTP Method: GET
@@ -235,7 +266,7 @@
"errcode":0,
"errdesc":"OK",
"imagetime":"2019-03-04T11:44:16",
- "imageurl":"http://192.168.12.112:8088/image/11000000001320020001.jpg"
+ "imageurl":"http://192.168.3.23:8088/image/11000000001320020001.jpg"
}
5. 重新获取资源目录
@@ -243,7 +274,7 @@
"devpubid": (字符串) 设备20位编号
请求:
- URL: http://192.168.12.112:8060/vss/get_catalog/11010000002000000001
+ URL: http://192.168.3.23:8060/vss/get_catalog/11010000002000000001
HTTP Method: GET
@@ -256,7 +287,7 @@
二、报警通知
视频服务器作为httpclient
- URL: http://192.168.12.112:8060/vssalarm
+ URL: http://192.168.3.23:8060/vssalarm
HTTP Method: POST
--
Gitblit v1.8.0