How to get a file using file name?
We would like to get individual files from a folder using file name, not file id. How is this possible?
-
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
Please sign in to leave a comment.
Comments
1 comment