Data Table JSON. Not retrieving all entries.

Hi I have a high score table. My app/php requests the table in full and this is displayed by the app.
Oddly the JSON that is retrieved seems to be capped at 10 entries. How could this be? Is there a max length to the JSON that Backendless can send back? Is this maybe a limitation of the free version? I haven’t written any code which limits the number of retrieved objects from the table.
Thanks

EDIT: Additionally I tried doing the same GET in the Backendless REST console and even there it only returned 10 of of the 12 entries that are in my leaderboard table.

I noticed that the ‘Page Size’ in the REST console directly affects how many nodes within the JSON get reported. It tells me that the max page size is 100 (which seems to reflect the limit of only 10 entries). Is there a way to completely uncap this? 10 High Score entries doesnt sound like much data to retraive.

When using offset I need to use offset of 10 to retrieve the next page. It seems very odd that a page size of 100 is only returning 10 entries but an offset of 10 is moving to the next page. Can someone clarify what’s going on exactly?

I want to retrieve ALL the objects on the table no matter how big it is.

Hi,

The cloud version of Backendless sets a limit of 100 objects per data retrieval request. Why is done? All requests are processed by servers shared between thousands of apps. If your app has a data table with millions of records and you retrieve all of them in a single shot, then your app is taking the server time in a way unfair for other apps.

To retrieve all data objects, you need to make several requests using Backendless paging (the doc describes it in detail).

The cap does not exist in the Backendless Pro version of the product, since in that case the product runs on your servers and you can use it any way you prefer.

Regards,
Mark

Okay understood, but I’m wondering why it only retrieves 10 entries to my high score table when I have the cap at max (100). This is true even if for example I just fetch the top scores, only 10 are retrieved (not 100).

Hi, Simon.
Could you show the REST request that you use to retrive records from your table?

Something like this:

https://api.backendless.com/6FB0797D-AFB7-3B57-FFAB-XXXXXXXXXX/E9F61682-XXXX-77CD-XXXX-89023DED4B00/data/Leaderboard_Game01?props=score

returns 10 entries …


[
	{
		"score": null,
		"___class": "Leaderboard_Game01",
		"__meta": "{\"relationRemovalIds\":{},\"selectedProperties\":[\"score\",\"___class\",\"objectId\"],\"relatedObjects\":{}}"
	},
	{
		"score": 55555,
		"___class": "Leaderboard_Game01",
		"__meta": "{\"relationRemovalIds\":{},\"selectedProperties\":[\"score\",\"___class\",\"objectId\"],\"relatedObjects\":{}}"
	},
	{
		"score": 235544,
		"___class": "Leaderboard_Game01",
		"__meta": "{\"relationRemovalIds\":{},\"selectedProperties\":[\"score\",\"___class\",\"objectId\"],\"relatedObjects\":{}}"
	},
	{
		"score": 2344,
		"___class": "Leaderboard_Game01",
		"__meta": "{\"relationRemovalIds\":{},\"selectedProperties\":[\"score\",\"___class\",\"objectId\"],\"relatedObjects\":{}}"
	},
	{
		"score": 0,
		"___class": "Leaderboard_Game01",
		"__meta": "{\"relationRemovalIds\":{},\"selectedProperties\":[\"score\",\"___class\",\"objectId\"],\"relatedObjects\":{}}"
	},
	{
		"score": 666667,
		"___class": "Leaderboard_Game01",
		"__meta": "{\"relationRemovalIds\":{},\"selectedProperties\":[\"score\",\"___class\",\"objectId\"],\"relatedObjects\":{}}"
	},
	{
		"score": null,
		"___class": "Leaderboard_Game01",
		"__meta": "{\"relationRemovalIds\":{},\"selectedProperties\":[\"score\",\"___class\",\"objectId\"],\"relatedObjects\":{}}"
	},
	{
		"score": 234,
		"___class": "Leaderboard_Game01",
		"__meta": "{\"relationRemovalIds\":{},\"selectedProperties\":[\"score\",\"___class\",\"objectId\"],\"relatedObjects\":{}}"
	},
	{
		"score": null,
		"___class": "Leaderboard_Game01",
		"__meta": "{\"relationRemovalIds\":{},\"selectedProperties\":[\"score\",\"___class\",\"objectId\"],\"relatedObjects\":{}}"
	},
	{
		"score": null,
		"___class": "Leaderboard_Game01",
		"__meta": "{\"relationRemovalIds\":{},\"selectedProperties\":[\"score\",\"___class\",\"objectId\"],\"relatedObjects\":{}}"
	}
]

Please see the documentation here: https://backendless.com/docs/rest/doc.html#data_data_paging (notice the pageSize query parameter)

Thanks, but this query is set to 100 but it is really only returning 10 along with lots of other information that I dont’ need. (class, metadata etc) How can I get 100 scoreboard entries?

Does your request include the pageSize parameter?

This request was actually put through the REST console where the default page size is 100.

The default value does not automatically apply. Click on that field and type in 100, that should help.