Downloading assets programmatically
Use /get_link API instead of /download API
For downloading asset content, the /get_link
endpoint is the highly recommended and architecturally superior method. It provides significantly better performance and reliability compared to the /download
endpoint, especially at scale or during peak traffic times, it allows global delivery optimizations and is secure as the download URL expiry can be set and API Key is not needed for download.
The process is a simple two-step flow:
-
Make a
GET
request to the/get_link
endpoint for a specific asset. -
Receive a secure URL in the JSON response and use this URL to download the file directly.
Why You Should Use /get_link
While it may seem like two steps, this workflow is intentionally designed for resilience and speed.
- Isolates API from heavy lifting: Our core API servers are optimized for high-speed metadata transactions (creating assets, search, etc.). Streaming large files via the
/download
endpoint is resource-intensive and is intentionally throttled during high traffic to protect the platform's overall stability. The/get_link
method completely avoids this bottleneck. - Leverages scalable cloud storage: The generated URL points directly to the asset in a massively scalable cloud object storage service. These systems are designed for high-throughput, resilient file delivery across the globe, which is far more efficient than proxying the download through an application server.
- Superior performance: The total time for the two-request process is consistently lower than a single
/download
request, especially for larger files.- The first call (
/get_link
) is an extremely fast metadata call. - The second call (downloading from the URL) is a direct, high-speed transfer from a dedicated file-serving network.
- The first call (
In summary, using the /get_link
workflow is the industry best practice and the most robust and scalable way to download files from the FileSpin platform.
Updated about 18 hours ago