It is possible to create or modify event rules with the /ec2/saveEventRule API POST-request.
This method requires explicit JSON with many obligatory attributes attached as a payload. The best way to get it is to call GET /ec2/getEventRules first and take necessary json from there.
To modify the existing rules user needs to modify existing JSON objects keeping "id" attribute untouched.
To add new rules user needs to send JSON object specifying:
- new generated "id" attribute, it will create "event rule" resource. Nx Witness Server uses special unique identifiers for "id" fields. New valid ones might be generated here.
- all the rest attributes including nested JSON objects should be specified according to analogous ones from the server reply to /ec2/getEventRules request.
More details could be found in the Nx Server API documentation.