How to test EventRule by HTTP API
AnsweredHello everyone
I create EventRule by /ec2/saveEventRule, and it's success.
I want to test the eventrule by http request for working.
Is there to test action in API?
Nx Witness Version: 4.1.0.32405
Thanks
-
Hello Jhen,
could you please show me created event rule and request that you used to create it?
Not all events types can be triggered via HTTP API, so I'm going to need more info about what you're trying to implement. What kind of user scenario are you trying to solve?
0 -
In addition to what Anton requested, I can add that we plan the Event Rules engine refactoring in some of the upcoming releases. And "Test" will be added in UI, and, I hope, in API. So you'd call, e.g., /testEventRule with rule id and it will work as the event section of the rule was triggered, you'll be able to see the reaction (action section of the rule).
0 -
Tagir Gadelshin That's what I need.
I create cameraDisconnectEvent by HTTP API, the actionType is execHttpRequestAction.
I want a HTTP API that can test EventRule, verify that my service can successfully receive it because I can't disconnect the camera in deployment environment.
So, I can't use the API in the version 4.1.0.32405, it will be released in the future?
0 -
So, I can't use the API in the version 4.1.0.32405, it will be released in the future?
Yes, this feature is in development and will be available in future releases.
I want a HTTP API that can test EventRule, verify that my service can successfully receive it because I can't disconnect the camera in deployment environment.
Instead of using real camera from production, you can use Test Camera tool to emulate camera disconnected event. Start testcamera tool, add emulated camera to your server, create rule for it and then just stop testcamera process.
0 -
Thanks!
I will try it next week.
0
Please sign in to leave a comment.
Comments
5 comments