Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12

This API is available from version 9.0 or above of PowerFolder server.

Using the File link API you can create links to files.

Please read the main article about the API to understand how it works.

Using the File Link API

The service is available at the URI: /getlink

Example

https://powerfolder.example.com/getlink/<folderID>

The <folderID> has to be Base64 encoded.

Overview

Actions supported by the File Link API

Action: store

Requires folder admin permission 


This action stores a file link with specified properties.

ParameterMandatoryDescriptionExample
actionYesMust always be storestore
publicAccessNoDefines if the link is public or not.
false
linkValidTillNoDefines how long a link can be used(dd MMM yyyy)04 AUG 2015
maxDownloadsNo

Defines how many times a link can be used to download a file

5
jsonNoDefines if the response is in JSON format1

 

Example

https://powerfolder.example.com/getlink/VGhpcyBpcyBub3QgYSB2YWxpZCBGb2xkZXIgSUQ=/dir/dir2/text.txt?action=store&publicAccess=false&linkValidTill=04%20AUG%202014&maxDownloads=20

Return value
{
	"url" : "http://office.powerfolder.net:8081/getlink/fi6HLSxyYBfFuqpcXb98zSYR/"
}

 

Action: remove

This action removes a file link

ParameterMandatoryDescriptionExample
actionYesMust always be removeremove


Example

https://powerfolder.example.com/getlink/VGhpcyBpcyBub3QgYSB2YWxpZCBGb2xkZXIgSUQ=/dir/dir2/text.txt?action=remove

Action: invite

This action stores a file link with specified properties.

ParameterMandatoryDescriptionExample
actionYesMust always be storeinvite
inviteeYesThe user that should be invited
user123
messageNoA message that will be sent to the inviteeHey there, here's my file

 

Example

https://powerfolder.example.com/getlink/VGhpcyBpcyBub3QgYSB2YWxpZCBGb2xkZXIgSUQ=/dir/dir2/text.txt?action=invite

Returns a download link for a stored link

ParameterMandatoryDescriptionExample
jsonNoDefines if the response is in JSON format1

 

Example

https://powerfolder.example.com/getlink/VGhpcyBpcyBub3QgYSB2YWxpZCBGb2xkZXIgSUQ=/dir/dir2/text.txt

  • No labels