Page 1 of 1

fetching push notifications

Posted: Tue Aug 05, 2014 4:09 pm
by Daniele Viola

Hello,

I need some advice to fetch and save sent notifications to my local database.

Actually, I can fetch push notifications using the following command:

curl -X GET \
-H "Content-Type: application/json" \
-H "X-Appery-Database-Id: xxxxxxxxxxxxxxxxxxxxx" \
-H "X-Appery-Session-Token:xxx-xxxx-xxxxx-xxxx-xxx"
https://api.appery.io/rest/1/appconso...

but I'm not able to retrieve notifications by schedule date. Is there a specific parameter to fetch notifications by date?

Thanks
Daniele


fetching push notifications

Posted: Tue Aug 05, 2014 5:22 pm
by Evgene Karachevtsev

Hello Daniele,

You should get a push-message immediately after the occurrence of the time for which it was postponed. To do this, you do not need to add any code http://devcenter.appery.io/tutorials/...


fetching push notifications

Posted: Wed Aug 06, 2014 7:56 am
by Daniele Viola

Sorry, my post is not very clear. For local database I mean a database like MySql. I need to keep a copy of sent push notification on my own server.

Thanks
Daniele


fetching push notifications

Posted: Wed Aug 06, 2014 12:34 pm
by Maryna Brodina

Hello!

When you do GET request on prehttps://api.appery.io/rest/1/appconsole//push/msg/pre you retrieve list of all pushes for appId, every push has status and schedule.

Could you clarify what are you trying to get?


fetching push notifications

Posted: Wed Aug 06, 2014 1:11 pm
by Daniele Viola

Hello,

thanks for your reply.

How can I filter push by date when I call this service?

Suppose there are 2 push notifications: one scheduled on 3th April and one scheduled on 4th April.
How can I fetch only the one on 3th April? What are the parameters I need to send to the service
to fetch the notifications?

Please, could you show me an example using CURL?

Thanks
Daniele


fetching push notifications

Posted: Thu Aug 07, 2014 10:43 am
by Maryna Brodina

Hello!

This service won't accept any parameters. You would need to retrieve all information, then filter it using JS.