Is the Nx Cloud up? Visit our Status Page for the current health and performance of the Nx Cloud.

Status Page

SaveEventRule API

Answered

Comments

7 comments

  • Permanently deleted user

    full json from /ec2/getEventRules

    0
  • Permanently deleted user

    Hi Lechee Lai,

    Can you please describe what are you trying to achieve, what is the expected result, and how the actual result is different?

    0
  • Permanently deleted user

    I'm thinking this API should like manually press (+ADD)

    so I'm using /ec2/getEventRules with bookmark json as document say then using /ec2/saveEventRule API for another EventRule

    0
  • Permanently deleted user

    So, the situation is:

    1) You are trying to create a new rule based on the existing (copying)

    2) To do that you replace id inside the event object returned by getEventRules, and send it back to saveEventRule

    3) As a result, the new rule is not created, but the method still returns 200

     

    Is that correct?

    0
  • Permanently deleted user

    that's right :-)

    0
  • Andrey Terentyev
    • Network Optix team

    Hello Iechee,

    That looks strange.
    Please, allow me some time for investigation. I'll response later on.

    0
  • Permanently deleted user

    after remove this line it works Thanks for investigation

    +#not working for Nx
    +#payload = {'json_payload': data_json}

    - r = requests.post(IP+"/ec2/saveEventRule", headers=headers, data=payload, auth=authentication)
    + r = requests.post(IP+"/ec2/saveEventRule", headers=headers, data=data_json, auth=authentication)

    0

Please sign in to leave a comment.