So you are saying that within the context of an Organization you are executing this call and retrieve Alerts for ALL Things vs. filtered by Organization correct?
This is because this information is in a 'regular stream'. You'll need to create a wrapping service that filters the source to return the appropriate set based on a User's visible entities.
That's what I suspected...
So, in order to get the alert summary from unit organization, I need to call GetAlertSummary service on each thing and make a union of all results.
Or I can also use the AlertFunctions ressource and parse the result to test each row.
I don't know which way will be the more efficient. I think I'll take the first option as it allows me more flexibility, as I am also using hierarchy with networks, I'll be able to build alert list from a specific level.
Thanks Pai for your help.
Hi Fabien Serre,
In case you did not manage to solve the issue, I wanted to let know that Resources["AlertFunctions"].QueryAlertSummary() does filter the result based on the visibility permissions. In case that does not happen you definitely missed something when you configured the permissions.
Make sure you set the proper Organization on the thing (machine) visibility and also make sure the current user is part of that Organization.
The Alert Summery is not persisted in a regular stream so you cannot query it.