Skip to main content
Question

Get all the folder items through java SDK with offset, limit and sort by date

  • May 22, 2025
  • 2 replies
  • 44 views

Forum|alt.badge.img

I am trying to get all the folder items through java SDK. https://developer.box.com/reference/get-folders-id-items/

I want to specify the Offset, Limit and also sort the results by date. I see :

getChildren() – allows to sort the results and returns an iterable.

getChildrenRange() – allows to specify offset, Limit and returns a partial collection.

https://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFolder.html#getChildren-java.lang.String-com.box.sdk.BoxFolder.SortDirection-java.lang.String...-

Is there any function or straightforward way to combine the above two? I see this functionality in python sdk but not in java. 

https://box-python-sdk.readthedocs.io/en/latest/boxsdk.object.html#boxsdk.object.folder.Folder.get_items

 

2 replies

Forum|alt.badge.img

Hi Roshni,

We'll be adding this to the Java SDK, per your request, in January of next year! (SDK-1555)

I took a note to update this thread when it's available!

Thanks so much,

Patrick


Forum|alt.badge.img

Hi Roshni,

This has been released in v2.53.0 of the SDK.

https://github.com/box/box-java-sdk/releases/tag/v2.53.0

Thanks,

Patrick