On Wed, Feb 1, 2017 at 3:49 PM, tomf67 <taram67@gmail.com> wrote:
Greetings,

i have for my work the following need : i want to send a push notification
to one user specified by its alias, but i need to know before or while
sending if the alias is registered in aerogear (as i might then decide to
use another channel of communication)

I didn't find an adequate way to do this, the only way seems to use the API
https://SERVER:PORT/CONTEXT/rest/applications/variantID/installations/ and
specifiy the search parameter, but as the implementation uses many "like" it
seems not performant enough to be done systematically.

Is this doable in Aerogear ?


There isn't a specific API for searching for installations by variant and alias.  (Matzew can double check me on this if I am wrong).  

Your options are 
   1) Give it a shot and see if it is too slow.  If you can live with the performance then there really isn't any need to do anything.
   2) Implement the exact query you want in an external application and work with that.  I'm not sure what the caching situation in UPS is so that may make this not ideal.  
   3) Fork UPS and Implement the query inside of UPS.  Bonus points, send us a PR back.
   4) File a JIRA and we'll work on it.

How many variants are you expecting to have and how often will you run this query?  

Also, I'm curious, why do you want to know is an alias is registered?  There may be another/better workaround for your use case I haven't thought of.

 
Regards,

Tom



--
View this message in context: http://aerogear-users.1116366.n5.nabble.com/detect-if-an-installation-exists-for-a-specified-alias-tp1053.html
Sent from the aerogear-users mailing list archive at Nabble.com.
_______________________________________________
Aerogear-users mailing list
Aerogear-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/aerogear-users