chenshijun
2019-10-11 d51c66acbfdcadc5119ed5389e219c56dedec13f
²âÊÔrest.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