如何在VAPIX 3中启用/禁用操作规则?

时间:2014-03-25 08:27:24

标签: axis vapix

有人面对VAPIX 3 api吗?我需要为相机启用/禁用操作规则。从互联网上浏览一些api我还没有找到任何关于行动规则的具体信息,所以我从网络面板上嗅到了请求。在必要的操作上,它发送4个肥皂请求:

curl 'http://**.***.***.***:****/vapix/services?timestamp=1395407004744' 
-X POST -H 'Host: **.***.***.***:****' 
-H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0' 
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' 
-H 'Accept-Language: en-US,en;q=0.5' 
-H 'Accept-Encoding: gzip, deflate' 
-H 'SOAPAction: http://www.axis.com/vapix/ws/action1/RemoveActionRule' 
-H 'Content-Type: text/xml; charset=utf-8' 
-H 'Referer: http://**.***.***.***:****/operator/action_rule_setup.shtml?doAction=modify&ruleId=18&timestamp=1395406986842'


curl 'http://**.***.***.***:****/vapix/services?timestamp=1395407005154' 
-X POST -H 'Host: **.***.***.***:****' 
-H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0' 
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' 
-H 'Accept-Language: en-US,en;q=0.5' 
-H 'Accept-Encoding: gzip, deflate' 
-H 'SOAPAction: http://www.axis.com/vapix/ws/action1/RemoveActionConfiguration' 
-H 'Content-Type: text/xml; charset=utf-8' 
-H 'Referer: http://**.***.***.***:****/operator/action_rule_setup.shtml?doAction=modify&ruleId=18&timestamp=1395406986842'


curl 'http://**.***.***.***:****/vapix/services?timestamp=1395407005333' 
-X POST 
-H 'Host: **.***.***.***:****' 
-H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0' 
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' 
-H 'Accept-Language: en-US,en;q=0.5' 
-H 'Accept-Encoding: gzip, deflate' 
-H 'SOAPAction: http://www.axis.com/vapix/ws/action1/AddActionConfiguration' 
-H 'Content-Type: text/xml; charset=utf-8' 
-H 'Referer: http://**.***.***.***:****/operator/action_rule_setup.shtml?doAction=modify&ruleId=18&timestamp=1395406986842'


curl 'http://**.***.***.***:****/vapix/services?timestamp=1395407005575' 
-X POST 
-H 'Host: **.***.***.***:****' 
-H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:28.0) Gecko/20100101 Firefox/28.0' 
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8' 
-H 'Accept-Language: en-US,en;q=0.5' 
-H 'Accept-Encoding: gzip, deflate' 
-H 'SOAPAction: http://www.axis.com/vapix/ws/action1/AddActionRule' 
-H 'Content-Type: text/xml; charset=utf-8' 
-H 'Referer: http://**.***.***.***:****/operator/action_rule_setup.shtml?doAction=modify&ruleId=18&timestamp=1395406986842'

我真的需要删除/创建禁用/启用它的操作吗?

1 个答案:

答案 0 :(得分:0)

是的,您需要创建/重新创建操作规则,以启用或禁用它们。如果您查看从Web界面生成的SOAP操作,它实际上也是如此。

一种解决方法是将规则中的条件与虚拟(甚至非虚拟)输入相结合。输入是有状态的,可以使用EventService中的ChangeVirtualInputState方法切换。但是,您需要检查相机是否支持输入。