Skip to main content
Question

download folder and sub folder by rest api

  • May 21, 2025
  • 2 replies
  • 54 views

Forum|alt.badge.img

Hi all

 

i'm a newbee to Box REST API.  Is it possible to download folder and all of its sub folder in 1 call ? 

if yes, is the download package compressed as a zip ?

what is the syntax?

 

thanks and regards

KP

2 replies

Forum|alt.badge.img

 We currently don't have an API that would let you download an entire folder in a single API call. You can get all the content of a folder in multiple API calls.

 

You would need to recursively call the Get Folder's Item endpoint to get the list of items in the folder. The process would be:
1. Call Get Folder's Items endpoint for the needed folder.

2. Call the Download File endpoint for each file returned in step 1.
3. For all folders returned from step 1, call the Get Folder's Items API for each of them and download the files in those folders.
4. Repeat this process until no more subfolders are returned.

 


Forum|alt.badge.img

In the main app for box.com I can check many files and click Download button, then a zip file will be downloaded, so when users do this, box.com follows this process?

 

There will be a future implementation for getting  a zip file via and endpoint? I Imagine that I could send a list of valid file_ids and as result I might get a zip with those files 🙂