Target multiple devices w/ RESTful API

4 posts, 0 answers
  1. David
    David avatar
    30 posts
    Member since:
    Sep 2010

    Posted 11 Apr Link to this post

    I'm planning to use the RESTful API to send push notifications to multiple devices using an advanced filter - as described in the "Building Advanced Filters" section of http://docs.telerik.com/platform/backend-services/rest/push-notifications/send-and-target/push-target

    For example: "Filter": "{\"$or\":[{\"Id\":\"device id 1\"},{\"Id\":\"device id 2\"}]}"

    My question is: What is the maximum number that I can target in this way? Will this work with 50 devices? 500 devices? 5,000 devices? 50,000 devices? Or if targeting in this way is not workable, what is the suggested method?

    Btw: Targeting by channel subscribers won't work for me. I need to target specific users based on their ever changing status.

     

    Thanks,

    David

  2. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 13 Apr Link to this post

    Hello David,

    You can target the recipient devices with any of the supported filtering options. Technically speaking, the filter will perform a query on the devices list and subsequently the server constructs a notification payload for the devices that fall under the audience filter - it is no different that the filtering functionality for any other content type.

    This said you can perform the filtering operation (as invoked by the push notification Filter expression) on the devices in your Devices type.

    Let me know if this answers your question.

    Regards,
    Anton Dobrev
    Telerik
     
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
     
  3. David
    David avatar
    30 posts
    Member since:
    Sep 2010

    Posted 13 Apr in reply to Anton Dobrev Link to this post

    Thanks for the reply.

    I guess my concern is if I use the following filter but include a list of, let's say, 5,000 devices in the array, that could be problematic - due to the size of the request.

    "Filter": "{\"$or\":[{\"Id\":\"device id 1\"}...............................{\"Id\":\"device id 5000\"}]}"

    Does that concern make sense?

    Thanks.

  4. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 15 Apr Link to this post

    Hello David,

    The request size even with 5000 devices in the array should be below the request payload limit imposed on the server (4 MB).

    Let us know should you have further questions or considerations.

    Regards,
    Anton Dobrev
    Telerik
     
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
     
Back to Top