Skip to main content
Question

Is is possible to sort by created_at

  • May 22, 2025
  • 4 replies
  • 45 views

Forum|alt.badge.img

I have a one question about sorting by Box api

Is it possible to sort by created_at??

From my investigation, box api doesn't release function to sort by created_at, but it releases to sort by modification_at

Or should I set to id to sort parameter for created date??

 

4 replies

Forum|alt.badge.img

You should be able to sort by any of the fields identified in the query parameter description. Are you seeing an error? What endpoint are you using?

Thanks, 

Alex, Box Developer Advocate


Forum|alt.badge.img

395005653353

Thank you for your help

> You should be able to sort by any of the fields that are returned in the response. Are you seeing an error? What endpoint are you using?

 I used https://{{api.box.com}}/2.0/folders/:folder_id/items

You mean, response will be sort by created_at even though this api??

I could see that response will be sorted by modificted_by when I set date in sort request parameter

Could you tell me the set how to sort by created_at if this api has abitity to sort by created_at??


Forum|alt.badge.img

I see what you mean! Yes. You can input `date` but cannot clarify what date type to use. Hmm. Let me reach out to someone internally and get back to you! 


Forum|alt.badge.img

395005653353

Thank you for you quick message. I'll wait your survey

Anyway, from my viewpoint, It seems that id might be generated in order of created_at

Is it correct?? If this so, I'll use id instead of date for sort parameter