Create

Create a weblink for a given file or folder.

Request

POST https://test-uni.cloudplan.biz/api/weblink/create

{
    "folder_id": "...",        // (string) folder to be linked, or when passing file_id this
                                  will be the folder where the file is saved.
    "file_id": "...",          // (string, optional when creating folder link)
    "file_name": "...",        // (string, optional if creating folder link) name of the file
    "pw": false,               // (bool, optional) generate a password for this link
                                  when set to false the link will not be password protected
                                  default is false
    "duration": 4838400,       // (integer, optional) default 4838400 seconds (8 weeks)
                                  the link will be automatically deleted after this time
    "max_downloads": 0         // (integer, optional) default 0 = unlimited - number of usages
    "right": "read"            // (string, optional) possible values: "read"/"write"/"delete"
    "emails": ["..."]          // (list of strings, optional)
    "notice": "..."            // (string, optional)
    "notify_supress": false    // (bool, optional) default false
    "notice_recipient": "..."  // (string, optional)
    "notify_email": ["..."]    // (list of strings, optional)
}

Reply

{
    "result": true/false,
    "reason": "..."      // (string, on failure) any error code (on failure)
    "link_id": "..."     // (string) id of the link
    "password": "..."    // (string) the generated password for this link (if "pw" was true)
}

Error Codes

ids_empty
folder_id_empty
file_name_empty
duration_must_be_positive
folder_not_found
user_has_no_access