Download files
The response of the get file API request contains a download url when a file is successfully uploaded, which can be used to download the file.
By default, download urls are valid for 60 minutes. The validity period can be customized by setting the urlDuration query parameter. The url duration may be between five minutes(5m) and seven days(7d).
Prerequisites
Section titled “Prerequisites”- A file should be created. To know more about uploading a file refer here
Direct Download
Section titled “Direct Download”Request
Section titled “Request”- Use the
download=truequery parameter to download a file directly. This will redirect to the file download URL allowing direct file access.
GET {baseUrl}/spaces/{spaceId}/files/{fileId}?download=true- Or by file path:
GET {baseUrl}/spaces/{spaceId}/files?path={filePath}&download=trueResponse
Section titled “Response”There will be no data in the body of the response when downloading a file.
Get Download URL
Section titled “Get Download URL”Request
Section titled “Request”- Get the download URL for an existing file (by file ID):
GET {baseUrl}/spaces/{spaceId}/files/{fileId}?urlDuration=5m&complete=true-
HEADER:
- Authorization:
Bearer {tid token}
- Authorization:
Response
Section titled “Response”-
Use the download URL to access the file:
GET {DOWNLOAD URL}—OR—
Use a browser to go to the download URL.
Limitations
Section titled “Limitations”- The overall size limit of a file download is 50 GB. To download larger files use ranged GET requests.
For more information on files, see Upload a file.