Skip to main content
Question

How to use the Box API to order by date and size

  • May 21, 2025
  • 5 replies
  • 29 views

Forum|alt.badge.img

Hi all,

The forums mention that we can sort by name, size and date in the browser.

But how can I do that using the Box API to retrieve the list of files in a particular order.

I don't see anything in the API documentation.

 

I can see that this GET request works and I get the list ordered by name:

https://api.box.com/2.0/folders/0/items?fields=name,created_at,size&order=name

but this doesn't:

https://api.box.com/2.0/folders/0/items?fields=name,created_at,size&order=size OR

https://api.box.com/2.0/folders/0/items?fields=name,created_at,size&order=created_at

 

Also, are there any other fields by which I can sort the files? Will this functionality be added soon?

 

Thanks,

Mugdha

5 replies

Forum|alt.badge.img

I have the same question!!


Forum|alt.badge.img

  We currently don't support sorting results from the Search endpoint. Unfortunately, I don't have a timeline for when this will be supported in the API.


Forum|alt.badge.img

Hi , any update on this? We needed to sort by recent upload / updated files as well when search. Thanks.


Forum|alt.badge.img

Seems like a pretty rudimentary function. Date just gives you the most recently edited file, while ID is a useless query param. Make this happen! 


Forum|alt.badge.img

Team,

Has this functionality been implemented? The users normally prefers to see the latest file in the top of the list. It is really crazy that the functionality can't be build even after 5 years