Get all Box Ids of files in all subdirectories of a parent folder in Box API

188 Views Asked by At

What is the most efficient way of getting all Box Ids for every file in all subdirectories of a parent folder in Box API using the .net core SDK?

1

There are 1 best solutions below

4
rb-devrel-box On

Unfortunately Box API does not expose an end point that lists all files and folder for. user or an enterprise.

The most used workaround for this is to recursively list the items starting from the root folder, which id is always 0.

This comes with its own set of challenges. For example for large Box users with millions of files and folders, you may hit the rate limits of the API (1000 requests/minute).

Also depending of how the content sharing is structured you may need to user a service account impersonating the users and cycle through these, or use the enterprise scope, which must be activated by request.