Page 1 of 2
rest service sort option
Posted: Wed Jun 10, 2015 3:24 am
by sdanigo
Hi,
Made a rest servive with Api Express,
in my app, created in the request parameter (query) a sort parametr (named sort) whith value 'ordre' (without quote, which is a field of my database).
No effects.
Is there something wrong ?
Thanks
Sylvain
rest service sort option
Posted: Wed Jun 10, 2015 8:35 am
by Serhii Kulibaba
Hello Sylvain,
Unfortunately it is not clear enough. Could you please provide more details, screen shots would also help.
rest service sort option
Posted: Wed Jun 10, 2015 1:08 pm
by sdanigo
Hi,
some screen shots:
rest service sort option
Posted: Thu Jun 11, 2015 1:45 pm
by Serhii Kulibaba
Please send us more screenthots (servise's settings tab, test tab)
Also provide us with a public app link(http://devcenter.appery.io/documentat...) and steps to reproduce.
rest service sort option
Posted: Fri Jul 31, 2015 2:42 pm
by Andrew Main
I have a similar issue using API express. Link to my original post: https://getsatisfaction.com/apperyio/...
basically i've add &sort=created_at at the end of my REST url request, however nothing happens.
I have also tested it and I can get it to work correctly for imported database services, but I can not get it to work for API express services as the two images below show
Trying various different fields and with and without the '-' I was not able to get the results to change in any way with a sort parameter.
This one worked no problems
rest service sort option
Posted: Thu Aug 06, 2015 9:25 am
by Alena Prykhodko
Andrew,
For now sorting based on ID is only allowed.
We are planning to add such ability for custom fields, but can not say any time frames.
rest service sort option
Posted: Thu Aug 06, 2015 4:18 pm
by Andrew Main
Can i sort in reverse by IDs? So i can show the 100 most recent items?
rest service sort option
Posted: Sun Jan 31, 2016 1:54 am
by leven.steve
Has the sort and limit defaults changed?
I'm using query service with sort=xxx and it's only returning 100 records
rest service sort option
Posted: Sun Jan 31, 2016 3:26 am
by Alena Prykhodko
Hello,
Yes. There is a default limit parameter which equals 100. That means that only 100 records will be returned if other wasn’t specified. To avoid this limitation, use the limit parameter https://devcenter.appery.io/documenta... in the requests and specify your own value. Max value is 1500.
rest service sort option
Posted: Mon Feb 01, 2016 3:15 pm
by leven.steve
This code still returns only the first 100 items. Have I added the parameter correctly?
codevar requestData = {};
requestData = (function mapping3415($scope){
var requestData = {};
requestData.params = Apperyio.EntityAPI('DB_Rates_query_service.request.query', undefined, true);
Code: Select all
requestData.params.sort = "Name"
requestData.params.limit = 200;
return requestData;/code