0

有人面对VAPIX 3api吗?我需要启用/禁用相机的操作规则。从互联网上翻阅一些 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'

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

4

1 回答 1

0

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

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

于 2014-06-25T07:51:37.983 回答