API: Create web links on files and folders

Target URL /api.php/files/weblink/
Required scope weblink
HTTP Method GET/POST
Output format JSON

Request Parameters Reference

Parameter Type Description
path string The FileRun path of the target file/folder.
singleDownload boolean Returns a link which is valid for a single download. This does not affect web links the user might have previously created on the file/folder.
temporary boolean Returns a link which is valid for 15 minutes. This does not affect web links the user might have previously created on the file/folder.
password string
expiry datetime MySQL datetime format (Y-m-d H:i:s)
download_limit integer
allow_uploads boolean Valid for folders. Enables a file request.
allow_downloads boolean Valid for folders. Enables a file request with ability of downloading existing files.
force_save bool Prompts the browser to save the file instead of opening it.
show_comments boolean
show_comments_names boolean
show_metadata boolean
notify boolean
download_terms string
require_login boolean Only logged in FileRun users will be able to access the link.

Example reply:

 1{
 2    "success": true,
 3    "error": false,
 4    "data": {
 5        "status": "created", //can also return "existing"
 6        "url": "http:\/\/www.yoursite.com\/filerun\/wl\/?id=CtmsT8IWoen3JDZIVbxvR3SH45gvvvxs",
 7        "isdir": false //or true if you are linking a folder
 8    }
 9}