Skip to main content
Question

How to get a file using file name?

  • May 22, 2025
  • 1 reply
  • 5 views

Forum|alt.badge.img

We would like to get individual files from a folder using file name, not file id. How is this possible?

1 reply

Forum|alt.badge.img

Hi ,

 

The get files endpoint will always expect an ID, but you can use the search endpoint to surface files by name. There are a few parameters that may be set to accomplish this:

  • ancestor_folder_ids - tells search which folders you want to search within.
  • type - this can be set to file to limit the responses to not include folders / web links.

Just be aware that when a new file is uploaded into Box it takes approximately 5-10min for it to be indexed in the search results. 

 

Hope that helps,

Jon