/api/v1/files/downloadDownload one stored file.
Download one stored file.
Streams the file bytes instead of returning a URL. The response is the
file itself, not a JSON envelope. Content-Type is the type recorded at
upload, and Content-Disposition is attachment with the original file
name, so a file uploaded as contract.docx downloads under that name.
Pass the file's storage key in key: the filePath value of a file or
photo field on a record. The key must belong to a record the credential
can see. A key that does not exist and a key you may not read both answer
404.
Query parameters:
key(required) — the storage key of the file.
Errors (JSON):
400—keyis missing, or it is not a valid storage key.404—File not found.
Response 200 headers:
Content-Type: application/pdf
Content-Disposition: attachment; filename="contract.pdf"; filename*=UTF-8''contract.pdf
Send request
Use the documented inputs to call this endpoint directly.
Parameters
Values are applied to the request and the example on the right.
Responses
Successful response
{
"options": "string",
"stream": "string",
"logger": "string",
"handleError": "string",
"logError": "string",
"getStream": "string",
"getHeaders": "string",
"errorHandler": "string",
"setErrorHandler": "string",
"errorLogger": "string",
"setErrorLogger": "string"
}Bad request
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Unauthorized
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Internal server error
{
"status": 1,
"message": "string",
"code": "string",
"data": {}
}The HTTP status code of the response.
What went wrong. Several validation messages are joined with ", ".
A stable, machine-readable reason. Only some errors set it.
Extra detail about the error. Only some errors set it.
Powered by heyo-docs