Page 1 of 1

How to send collection data from appery db to another server like amazon or other

Posted: Tue Jan 06, 2015 11:03 am
by dev7281480

I want to take backup of every activity of my app to the appery database and that data also store in my another server database. Is there any example example or tutorial to build my logic.....


How to send collection data from appery db to another server like amazon or other

Posted: Tue Jan 06, 2015 11:08 am
by dev7281480

I am trying it to write script on my server and try to call to apperyio server code script which is written bellow
is this correct way............

http://devcenter.appery.io/documentat...


How to send collection data from appery db to another server like amazon or other

Posted: Wed Jan 07, 2015 3:30 am
by Yurii Orishchuk

Hi dev,

Yes you can implement needed server script. Which collect needed data from Appery.io DB and send it to your 3rd party web service.

Regards.


How to send collection data from appery db to another server like amazon or other

Posted: Wed Jan 07, 2015 5:51 am
by dev7281480

Thanks Yurii.......


How to send collection data from appery db to another server like amazon or other

Posted: Wed Jan 07, 2015 9:08 am
by dev7281480

I want to all data from database collection but problem is that using this

//
result = {};
result.retrievedObject = Collection.retrieveObject(DB_id, collectionName, id, null);
response.success(result);
//

I just get data of perticular object only,

I want all object data in response............


How to send collection data from appery db to another server like amazon or other

Posted: Wed Jan 07, 2015 11:20 pm
by Yurii Orishchuk

Hi Dev,

It's not good idea to get all items at once. Cause of there could be a lot of items.

I can suggest you to use some "frames" of data to return.

Also here is code that you need to use:

pre

//
result = {};
//result.retrievedObject = Collection.retrieveObject(DB_id, collectionName, id, null);

var params = {};
params.criteria = {};

result.retrievedObject = Collection.query(DB_id, collectionName, params);
response.success(result);
//

/pre

Please read more about "query" method here: http://devcenter.appery.io/documentat...

Regards.