Download a File

GET/api/files/{source}/{id}/download

Streams the stored bytes as an attachment. The path is rebuilt from the stored row and the RISE file path settings - never from anything the caller sends - resolved with realpath() and refused unless it sits inside the configured files directory. Files held by Google Drive or a custom storage plugin have no local bytes and answer 409.

Headers

FieldTypeDescription
authtoken String Authentication token, generated from admin area

Parameters

FieldTypeDescription
source String Which file table the id belongs to: project or general
id Number File unique ID inside that table
curl -X GET "https://yoursite.com/api/files/source/123/download" \
  -H "authtoken: YOUR_API_TOKEN"

Error-Response:

HTTP/1.1 404 Not Found
{ "status": false, "messages": { "error": "No data were found" } }
MethodGET
Path/api/files/{source}/{id}/download
GroupFiles
Sincev1.0.0
Defined inRestApi/Controllers/FilesController.php