Content Manager - Sharing
Public Files
Public files can be used for anonymous access to files decorated with SharingType.Public flag. Public files decorated with SharingType.AnyoneWithLink flag stored in tenant specific and non-tenant databases can be accessed using access token.
Access Token
Access token authenticates anonymous access to file(s) using impersonation into the tenant specific context.
- Token can define allowed access into specific db context
Privatefor tenant-specific dbPublicfor shared non-tenant dbAuto(default) for any of them
- Token expiration can be defined in range from zero to 24 hours
- Range of allowed files can be defined by file identifiers, folder identifiers or file paths
- expiration criteria
expiresOn,expiresInare mutually exclusive - expiration and atleast one range criterium
fileIds,folderIds,pathsmust be specified - multiple range criteria can be used at the same time, they are applied using OR / ANY operation
- expiration criteria
Access token examples
POST /api/v1/PublicFiles/AccessToken
Create access token to the specific file using relative timespan (24h = max)
{
"fileIds" : [ "<file-id>" ],
"expiresIn" : "1.00:00:00"
}
Create access token to any file in the specific folder using relative timespan (1h)
{
"allowedAccess" : "Public",
"folderIds" : [ "<folder-id>" ],
"expiresIn" : "01:00"
}
Create access token to files in the specified path using absolute datetime
{
"allowedAccess" : "Private",
"paths" : [ "<file-path>" ],
"expiresOn" : "2020-12-31T10:20:30Z"
}