A question about Nx API?
AnsweredDear,
Could you tell me how to solve some quesions?
1. How to delete or modify Event Rule?
2. How to add or modify User?
Best Regards,
Vespa
-
For users - you need ec2/saveUser method. Check the API documentation, there are special calculations requires to set a password.
The easiest way to use this method:
- create a user manually
- get the user object using ec2/getUsers
- use this object as a template when sending ec2/saveUser method. Just remove user id or generate new unique UUID to create new users
For event rules - you need ec2/getEventRules to get rules and method ec2/saveEventRule - this method is not documented, but it is simple: it needs the same data structure for a rule as getEventRules methods.
Please, try it and let us know if you need additional information
0 -
Evgeny Balashov, thanks for your help.
For event rules -
it is good for your method, but I want a API to delete event rules. When I delete camera list on web and I must delete event rules on Nx. So I need Nx API about delete event rules .
If I don't delete event rules, I always add event rules. Would you tell me how many event rules I can save.
0 -
I see. Please try /ec2/removeEventRule
it is a POST method with requires one parameter: id of the rule:
{"id":"..."}
0 -
OK,I will try.
Thank you for your kind assistance.
0 -
I had finish trying /ec2/removeEventRule.
But I can't delete EventRule on Nx.
I use /ec2/getUsers?extraFormatting, I can know "id"

I use /ec2/getEventRules?extraFormatting.
I can see EventRules is set.

And I try /ec2/removeEventRule.
one parameter:{"id":"{99cbc715-539b-4bfe-856f-799b45b69b1e}"}
I can't finish it.
0 -
The id you need for /ec2/removeEventRule is the rule's id, not user's.
In this case it is "{05ab43a3-c738-....}"
0 -
I try OK.
Thank you for your help.
0
Please sign in to leave a comment.
Comments
7 comments