Description
Retrieves permissions a user has in the specified location.
URL
All responses are in JSON format by default, to specify an XML response add ".xml" to the end of the method name (in this case "user_permissions_location")
https://<yoursubdomain>.filetransfers.net/api/user_permissions_location
Restrictions
- Admins have full permissions to all locations and will return null values for each permission.
Parameters
Bold indicates required.
Parameter | Description |
---|---|
path | The location to check permissions for. |
api_key | Your API Key. |
timestamp | The current time in Unix timestamp format. |
signature | Please see "User Authentication" for more information. |
Sample Response
Unlike a file listing or a search in a specific location, a search across the entire site returns a set of permissions for each file/folder. Please use these to determine whether a user can perform an action on a result.
Successful response In JSON:
{"userPermissionsLocation":{ "admin":0, "uploadFiles":1, "batchUploadFiles":0, "downloadFiles":1, "batchDownloadFiles":0, "deleteFiles":0, "batchDeleteFiles":0, "moveCopyFiles":0, "batchMoveCopyFiles":0, "renameFiles":0, "createFolders":0, "sendFiles":0, "sendFilesNonUser":0, "userId":33486 } }
Successful response in XML:
<userPermissionsLocation> <admin>0</admin> <uploadFiles>1</uploadFiles> <batchUploadFiles>0</batchUploadFiles> <downloadFiles>1</downloadFiles> <batchDownloadFiles>0</batchDownloadFiles> <deleteFiles>0</deleteFiles> <batchDeleteFiles>0</batchDeleteFiles> <moveCopyFiles>0</moveCopyFiles> <batchMoveCopyFiles>0</batchMoveCopyFiles> <renameFiles>0</renameFiles> <createFolders>0</createFolders> <sendFiles>0</sendFiles> <sendFilesNonUser>0</sendFilesNonUser> <userId>33486</userId> </userPermissionsLocation>
Error response In JSON:
{"error":{"title":"User Does Not Exist","message":"Please contact your site administrator."}}
Error response In XML:
<error> <title>User Does Not Exist</title> <message>Please contact your site administrator.</message> </error>