Alessandro Recano
Posts: 0
Joined: Sat Jun 28, 2014 3:00 pm

Retrieving a list of Devices registrated for push notifications.

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.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Retrieving a list of Devices registrated for push notifications.

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.

Alessandro Recano
Posts: 0
Joined: Sat Jun 28, 2014 3:00 pm

Retrieving a list of Devices registrated for push notifications.

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?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Retrieving a list of Devices registrated for push notifications.

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.

Alessandro Recano
Posts: 0
Joined: Sat Jun 28, 2014 3:00 pm

Retrieving a list of Devices registrated for push notifications.

Thank you!
This helped me a lot.

Regards

Vitaliy Radovanski
Posts: 0
Joined: Mon Aug 18, 2014 10:42 am

Retrieving a list of Devices registrated for push notifications.

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.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Retrieving a list of Devices registrated for push notifications.

Hello Vitaliy,

Thank you for this update!

Return to “Issues”