Page 1 of 1

Retrieving a list of Devices registrated for push notifications.

Posted: Mon Sep 22, 2014 1:39 pm
by Alessandro Recano

Hi everyone. Is there a way to get a list of Devices with cURL? I tried to retrieve rows in a collection I created before and it works, but when I try to retrieve a list of devices (registrated for push notifications) it doesn't work.


Retrieving a list of Devices registrated for push notifications.

Posted: Mon Sep 22, 2014 3:59 pm
by Kateryna Grynko

Dear Alessandro,

You can do this only with X-Appery-Master-Key.

Do a GET request to code{database_url}/collections/_devices/code and specify

codeX-Appery-Database-Id/code and codeX-Appery-Master-Key/code.

As you need to use X-Appery-Master-Key it's better to do it via server code.


Retrieving a list of Devices registrated for push notifications.

Posted: Mon Sep 22, 2014 6:14 pm
by Alessandro Recano

Hi Kateryna, thanks for the reply; I tried your solution but it still doesn't work.

I used both

https://appery.io/database/53a97544e4...

and

https://api.appery.io/rest/1/db/colle...

with no good results.
I put in the request header X-Appery-Database-Id and X-Appery-Master-Key.

Where am I wrong?


Retrieving a list of Devices registrated for push notifications.

Posted: Tue Sep 23, 2014 12:01 am
by Yurii Orishchuk

Hi Alessandro,

Here is ready solution for you:

1 Create REST service. Call it "getDevices".

2 Open this service.

3 Navigate to "Settings" tab and populate it with folowing settings: http://prntscr.com/4pevbj/direct

pre

URL - {database_url}/collections/_devices
Settings - your DB settings.

/pre

4 Open request tab. Navigate to "header" section. And add two parameters: http://prntscr.com/4pewf3/direct

pre

X-Appery-Database-Id - {database_id}

X-Appery-Master-Key - your DB master key

/pre

5 Navigate to "Test" tab and click "test".

6 You will get following result: http://prntscr.com/4pex55/direct

That's all.

Regards.


Retrieving a list of Devices registrated for push notifications.

Posted: Tue Sep 23, 2014 7:45 am
by Alessandro Recano

Thank you!
This helped me a lot.

Regards


Retrieving a list of Devices registrated for push notifications.

Posted: Wed Sep 24, 2014 10:00 am
by Vitaliy Radovanski

I'd like to add that when adding a push notifcation to an app I use QuickBlox and must admit that it's one of the most convinient free third-party services I've ever used. Hope that helps.


Retrieving a list of Devices registrated for push notifications.

Posted: Wed Sep 24, 2014 10:04 am
by Evgene Karachevtsev

Hello Vitaliy,

Thank you for this update!