Only fetching 10 rows of data on Get Requests

Are you looking for help? Yes please!

This is a support forum for reporting issues related to Backendless services. Please note that due to our support policy we cannot provide you help with debugging your code, consulting in regards to any language or third-party library usage. For this kind of questions we recommend using more appropriate forums like Stack Overflow.

In order to suggest you a quality solution, we shall usually ask you to provide the details mentioned below first. Including them into your topic right away helps us to start investigating your issue much faster.

In case you have a suggestion or an idea, the details below are not always required, though still any additional background is welcome.

Backendless Version (3.x / 5.x, Online / Managed / Pro )

Client SDK (REST / Android / Objective-C / Swift / JS )

REST

Application ID

B53080A3-5A03-5214-FF71-78E1836E9E00

Expected Behavior

Please describe the expected behaviour of the issue, starting from the first action.

  1. I want to Get Data via get requests.
    2.All data in the table should be returned

Only 10 rows are returned, no matter the table, no matter the parameters, relations etc. I’m pretty sure it’s not anything I have done, this has only just started. I initially thought it was an AppGyver issue but it also happens in the Rest Console. All help is appreciated as it is an urgent matter, app goes live tomorrow.

Thank You

This is due to paging. The default page size is 10, but you can change it in the API request. See the documentation for more information:
https://backendless.com/docs/rest/data_data_paging.html

Ah that makes sense, thank you for such quick response!

I may run into a dilemma.

I need to count how many tickets are available, I was planning to simply fetch all the rows and SUM for the appropriate column.

This works, but what if there are more than 100 rows, how would you recommend I go about? I assume there is a more efficient way that I’m missing.

Thank You

Loading all objects in some cases is a bad idea. What if you have several million records in the database?

Anyway, here is a technique for handling it via an API service:

If you need to calculate counts, there may be a simpler way by using aggregate database functions:

Hope this helps.

Regards,
Mark

Ok thank you will take a look at both of those!

Appreciate the help and quick responses!