This is a migrated thread and some comments may be shown as answers.

Target multiple devices w/ RESTful API

3 Answers 71 Views
Push Notifications
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 11 Apr 2016, 10:28 PM

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

3 Answers, 1 is accepted

Sort by
0
Anton Dobrev
Telerik team
answered on 13 Apr 2016, 03:56 PM
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.
 
0
David
Top achievements
Rank 1
answered on 13 Apr 2016, 04:26 PM

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.

0
Anton Dobrev
Telerik team
answered on 15 Apr 2016, 01:08 PM
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.
 
Tags
Push Notifications
Asked by
David
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
David
Top achievements
Rank 1
Share this question
or