A question about Nx API?




  • Avatar
    Evgeny Balashov

    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:

    1. create a user manually
    2. get the user object using ec2/getUsers
    3. 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

  • Avatar
    Vespa Yang

    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.

  • Avatar
    Evgeny Balashov

    I see. Please try /ec2/removeEventRule

    it is a POST method with requires one parameter: id of the rule:


  • Avatar
    Vespa Yang

    OK,I will try.

    Thank you for your kind assistance.

  • Avatar
    Vespa Yang

    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.

  • Avatar
    Evgeny Balashov

    The id you need for /ec2/removeEventRule is the rule's id, not user's.

    In this case it is "{05ab43a3-c738-....}"

  • Avatar
    Vespa Yang

    I try OK.

    Thank you for your help.

Please sign in to leave a comment.