Beryl Cong
Beryl Cong

Reputation: 11

Box Folders and Files

Trying to export folders inside Box account - including files in each folder. Need a list of all files with destination URLs. Has anyone done this before? Thanks!

Upvotes: 1

Views: 789

Answers (1)

Murtza Manzur
Murtza Manzur

Reputation: 1214

There is currently no API that would directly give you all the files or folders within a Box user's account in one API call. But you can get all files and folders belonging to a user in multiple API calls.

You would need to recursively call the Get Folder's Item API to get this data. The process would be:

  1. Call Get Folder's Items to get a user's root folders and files by specifying folder id = 0.
  2. For all folders returned from step 1, call the Get Folder's Items API for each of them.
  3. Repeat this process of calling the Get Folder's Items API until you returned no more subfolders.

Upvotes: 1

Related Questions