Folder Content Export
This scenario demonstrates how to export the contents of a folder as a zip file in the Circularo platform. Folder export functionality allows you to download multiple documents at once, preserving the folder structure and document metadata. Key features:- Export entire folder contents as a single zip file
- Preserve folder structure in the exported archive
- Download multiple documents in a single operation
- Efficiently archive and share document collections
Prerequisites
Before exporting folder contents, you need:- A valid authentication token (see the “Authentication & Security” section for details)
- The folder ID of the folder you want to export
- Appropriate permissions to access the folder and its contents
- Sufficient network bandwidth to download potentially large zip files
Folder export is particularly useful for archiving projects, sharing document collections, or creating offline backups of important document sets.
Step 1 - Export folder contents as a zip file
This endpoint exports the contents of a folder as a zip file. The export includes all documents within the specified folder, preserving the folder structure and document metadata.- The exporterName parameter specifies the type of export to perform
- The documentIds array contains the folder ID to export
- The response is the binary content of the zip file containing all folder documents
- For folders with many documents, the export may be processed as a background job
The folder export includes all documents the user has access to within the specified folder. Documents that the user cannot access will not be included in the export.
- The response contains the binary content of the zip file
- The zip file includes all documents within the specified folder
- The folder structure is preserved in the zip file
- Document metadata is included in the export
Folder Export Summary
You have successfully learned how to export folder contents as a zip file in the Circularo system.Key Concepts
- Folder Export: Download all documents within a folder as a single zip file
- Background Processing: Large exports are handled asynchronously to prevent timeouts
- Folder Structure: The hierarchical organization of documents is preserved in the export
- Bulk Download: Efficient retrieval of multiple documents in a single operation
Background Processing for Large Folders
When exporting folders with a large number of documents, the system may process the export as a background job:- Instead of returning the zip file directly, the response will include a jobId property
- The system creates a corresponding entry in the user’s backgroundJobs array
- You need to periodically check the user data and look for the job with item.id === jobId
- Monitor the job’s status property until it becomes “success”
- Once complete, the job will contain a fileHash property
- Use this file hash with the standard file download endpoint to retrieve the zip file
Example Implementation
See our OpenAPI documentation to learn about the full set of API endpoints and parameters.
Please use proper exception handling and function decomposition in your own code. The code is provided for illustrative purposes only and is not intended for production use.