Posted By

João Martins
Joined the Developer Advocates team in 2020, João works mostly with .NET application. He is a Civil Engineer graduate with experience in software development. You can count on him to help you with your AEC related topics.
17 Sep 2021
This sample demonstrates how to retrieve data of all the folders and files on a specific project to show on a table and export it as CSV.
On the typical workflow of a project, we might need to generate a list containing its files and folders, as it's helpful to track our project data over time and also generating dashboards (thanks Tadeh for explaining the scenario and reviewing the idea).
That's what this sample is about!
Here we'll cover a method for retrieving the data (folders and files) of your projects and generate a table with that.
Expanding this sample, you can filter, style, expand, and export these data as you need.
Retrieving folders and files from specific projects is not a big deal, and we do this on our basic sample from our tutorial.
The main difference here is that we don't expand our object tree further than the project level, and we can't count on any user input rather than the project and hub id.
From the selection of the project, we get the top folders, then the folders and files recursively.
When we retrieve this much content, we might step into a few issues such as rate limiting and connection timeout.
We have an amazing blog on that (refer here), and as this sample is based on .NET we're using hangfire for queueing.
Below you can see how we're improving our sample through a diagram:
With this workflow, we can show the data as it comes back from our server, and also have a status based on the number of extractions started/ended.
In the end, we can filter and export the data as a CSV to generate some dashboards, for instance.
Here’s a live demo:
You can follow me on Twitter: twitter.com/JooPaulodeOrne2