Backendless Support
 
Answered

Page single with single step retrieval

Hello

I am using the REST api and I am trying to the single step retrieval with page size

https://api.backendless.com/xx/yy/data/Users/zzz?loadRelations=Documents&pageSize=100

but it loads only 10 related objects. I read in the support group that the page size does not apply to this syntax (although documentation hints at that so that may require updating)

My question is, if I want to load the parent info and 100 related document. Is the only way to do it over 2 queries?

Thanks

Leave a Comment

Comments (3)

photo
1

Hi again,

By design you can't load more then 10 related objects in one call. So yes, you're right, you'll need to execute 2 API calls in order to achieve that. First will get a parent and then use load relations API to get required children.

Best Reagrds

photo
1

Hi Anton,

Well I hope this behaviour changes in the future, Otherwise there is no point of single step retrieval if you get more than 10 related objects (if you can't set page size or do paging). This is very important thing to note in the documentation I suggest. In addition you might want to fix the documentation that says as this is not true according to your answer above

fae4dbd8c8643873e4648ae5bfefe8e1

photo
1

The screenshot you provided states exactly the same as what Anton said: you should use a different API endpoint to load related objects to the already fetched object. If you follow that "Relation Paging API" link you should see that the URL is different.

photo