SaveEventRule API
Answered
any idea why Nx Client without build the Camera Rule API response is 200 OK
-

full json from /ec2/getEventRules
0 -
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 -

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 -
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 -
that's right :-)
0 -
Hello Iechee,
That looks strange.
Please, allow me some time for investigation. I'll response later on.0 -
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.
Comments
7 comments