Add Permission

Summary Adds a user with a certain access type to the list of shared folder permissions
Request https://www.digitalbucket.net/api/rest/addpermission.axd?folderid=64&username=user1@domain1.com&accesstype=view
Method POST
Parameters folderid (id of the folder you want to add permission to), username (Id of the user you want to assign permission to), accesstype (level of access this user has to the shared folder. This can be View or Full Control)

Success

<Success>
  <Code>43</Code>
  <Message>Permission added to '[foldername]' folder successfully.</Message>
</Success>

Error

<Error>
  <Code>-401</Code>
  <Message>This folder does not exist or you don't have enough permission to access it.</Message>
</Error>
<Error>
  <Code>-405</Code>
  <Message>This folder is not shared and you cannot add permissions to it.</Message>
</Error>
<Error>
  <Code>-406</Code>
  <Message>Only owner of the folder can add permission to it.</Message>
</Error>
<Error>
  <Code>-407</Code>
  <Message>You cannot add owner to the permission list.</Message>
</Error>
<Error>
  <Code>-408</Code>
  <Message>[username] does not exist.</Message>
</Error>
<Error>
  <Code>-409</Code>
  <Message>you can not add [username].</Message>
</Error>

- For other errors refer to the list of Common Errors.