API event rules permissions
AnsweredI'm trying to programatically turn on/off mobile push notifications for specific cameras
A couple of related queries
1. Would it be possible to create a user with limited permissions to use the API - at the moment I get permission denied when trying to saveEventRule for any user other than an administrator
2. I'm running 4.1 beta and the iOS beta, and turning off push notifications appears to be only possible for all cameras - can this be selectable per camera from the mobile app ?
-
Official comment
Hi @...,
- No, the administrator and owner are the ones that can use such API calls.
- No and a little bit yes.
Let me explain the No;
With the mobile app you only can enable or disable push notifications.
But now the yes;
You can create a rule per camera or multiple cameras that disables and enables the rule via a Soft Trigger. These soft triggers can be assigned per user or to multiple or to a customer user role.
So as an Event you select Soft Trigger and as Action you select Do HTTP Event and use the appropriate API call (/ec2/saveEventRule).
Probably not the most elegant solution for your request, but at least a solution for now.
-
Thanks Norman
Is there a way to create a toggle button ?
At the moment, I can create a rule on and a rule off button, but I can't tell the status of the rule from the mobile app...
0 -
Hi @...,
Currently, you can't create a toggle button, The suggestion is reasonable though.
Please submit the request to our New Feature Ideas section. In this way our product team will be aware of the need for such feature, and they can take it into consideration for future releases.0 -
Hi @...
Can you elaborate a bit, why would you like to turn off notifications from the specific camera? Is this some temporary suppression scenario because of rain or smth like that?
Personally, I don't like the idea of configuring this on the mobile client side.. It would mean that we should support a whole bunch of filtering on the client-side (servers, cameras, probably event types..). That will mean, that even if you have some rule that sends a notification, it might not appear in the app because of those filters and it can confuse people. It's not that difficult from a development perspective, but it sounds like an overdesign
We at Nx try to stick to simple-UX solutions and it's our strategic approach
Although implementing a temporary suppression might be useful, I agree. I'll think about what we can do0 -
Tagir Gadelshin my specific use case is a camera facing a high use door.
I'd like push notifications when someone approaches, but I'd also like to easily be able to turn these off when I'm aware the door is being used (eg after a delivery and multiple entry/exits to bring deliveries in).
It's then easy to forget whether I have turned notifications back on. With the existing solution of separate on/off soft trigger buttons, there's also no feedback as to whether the server has actually processed the command.
There is a workaround to create a toggle, but it's an awful lot of work...
0
Please sign in to leave a comment.
Comments
5 comments