File Link API
Actions supported by the File Link API
Action: store
Requires folder admin permission
This action stores a file link with specified properties.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be store | store |
publicAccess | No | Defines if the link is public or not. | false |
linkValidTill | No | Defines how long a link can be used(dd MMM yyyy) | 04 AUG 2015 |
maxDownloads | No | Defines how many times a link can be used to download a file | 5 |
json | No | Defines if the response is in JSON format | 1 |
Example
https://powerfolder.example.com/getlink/VGhpcyBpcyBub3QgYSB2YWxpZCBGb2xkZXIgSUQ=/dir/dir2/text.txt?action=store&publicAccess=false&linkValidTill=04%20AUG%202014&maxDownloads=20
If json
was set to 1
:
{ "url" : "http://office.powerfolder.net:8081/getlink/fi6HLSxyYBfFuqpcXb98zSYR/" }
Action: remove
This action removes a file link
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be remove | remove |
json | No | Defines if the response is in JSON format | 1 |
Example
https://powerfolder.example.com/getlink/VGhpcyBpcyBub3QgYSB2YWxpZCBGb2xkZXIgSUQ=/dir/dir2/text.txt?action=remove
If json
was set to 1
:
{ "message" : "Removed file link fi6HLSxyYBfFuqpcXb98zSYR/ by admin @ 88.78.156.194" }
Action: invite
This action stores a file link with specified properties.
Parameter | Mandatory | Description | Example |
---|---|---|---|
action | Yes | Must always be store | invite |
invitee | Yes | The user that should be invited | user123 |
message | No | A message that will be sent to the invitee | Hey there, here's my file |
Example
https://powerfolder.example.com/getlink/VGhpcyBpcyBub3QgYSB2YWxpZCBGb2xkZXIgSUQ=/dir/dir2/text.txt?action=invite&invitee=powerfolder@example.com
If json
was set to 1
:
{ "message" : "The link was successfully sent" }
Action: getlink
Returns a download link for a stored link
Parameter | Mandatory | Description | Example |
---|---|---|---|
json | No | Defines if the response is in JSON format | 1 |
Example
https://powerfolder.example.com/getlink/VGhpcyBpcyBub3QgYSB2YWxpZCBGb2xkZXIgSUQ=/dir/dir2/text.txt
If json
was set to 1
:
{ "url" : "http://office.powerfolder.net:8081/getlink/fi6HLSxyYBfFuqpcXb98zSYR/" }