Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

GET method returns up to 100 records only

Hi,

How can I use limit along with where ?

I tried something like this:

prehttps://api.appery.io/rest/1/db/collections/Outlet_Details?limit=1500?where={"userId":"1234"}/pre

But it did not work.

Ihor Didevych
Posts: 0
Joined: Wed Nov 19, 2014 7:55 pm

GET method returns up to 100 records only

Hi Hawk,

You should fill your setting for service instead of making a call from javascript
1) Setting link and method
http://gyazo.com/0fae549c272cde81e481...
2) Setting parameters
http://gyazo.com/d794af2fec56ead37744...

Now you can test it in the test tab of this service
http://gyazo.com/5a0871113156fea9e1f7...

Each time when you are not sure in the result of the service, please do not use it on the page, test all cases in test tab first

Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

GET method returns up to 100 records only

Hi Ihor,

I tried to test the following:
Get method to return all records was created before certain timestamp (I used $lt).
The reason I'm using (_createdAt), is I need to get all _id's for all records created in this collection in order to delete ( as far as I understand, in order to clear a collection I must delete all records one by one using their id). So I'm using (createdAt) to get all records _id's to be able later to delete them .

But now I'm stuck at using it with (where & limit) parameters correctly, as what ever date value I'm using it does not return any record.

Besides, even I manage to test here correctly, I still cannot find a way add BOTH parameters (limit & where) to my URL request as I indicated in my previous post

Image

Many thanks,

Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

GET method returns up to 100 records only

Hi Ihor,

I managed to run the query correctly

Image

1) But now how to use both parameters in the URL (where & limit)?
2) The problem of maximum value is still 1500. That is, if I send GET request to get maximum 1500 _id's and then delete them, I will have to send it again to get the next 1500 _id's and delete them. The problem is, I'm not aware how many records are there. They are increasing over time and I cannot guess how many time I need to send GET request. How Appery approaches such a case ?

Thanks,

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

GET method returns up to 100 records only

Hello Hawk,

[quote:]How Appery approaches such a case[/quote]
We suggest to send a GET request after each deletion to find out how much entities there are left

Manabendra Gogoi
Posts: 0
Joined: Sun Jan 18, 2015 2:59 pm

GET method returns up to 100 records only

Hi Yurii,

Does it mean that I have to create 67 service requests to populate 100000 rows? I mean if I can set limit to a max of only 1500, it would take about 67 service requests to populate 100000 rows. Is there anyway that it can be achieved easily in Javascript? The tutorial on pagination doesn't help in explaining for so many rows.

Please help!

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

GET method returns up to 100 records only

Hi Manabendra,

pre

Does it mean that I have to create 67 service requests to populate 100000 rows?

/pre

Yes. It's not good to transfer a lot of data by single request to device.
Also you can use service code where you will get all needed amount of data and return it.

Regards.

Hawk
Posts: 0
Joined: Mon Aug 04, 2014 11:23 am

GET method returns up to 100 records only

{""name"":""sort""

Return to “Issues”