Setting Up Use From a Mobile Device > Set share permissions
Set share permissions
Share permissions are set on files and folders with the ServicesPortal/api API.
Delete a file. For example, delete the file “IMG_0002.PNG” under “My Files”.
API
ServicesPortal/api
URI
http://portal_url/ServicesPortal/api where portal_url is the URL of the team portal.
HTTP Method
POST
Request Content-Type
application/xml
Request body example
<obj >
  <att id="name">
    <val>shareResource</val>
  </att>
  <att id="param">
    <obj class="ShareResourceParam">
      <att id="url">
        <val>/ServicesPortal/webdav/folder</val>
      </att>
      <att id="shouldSync">
        <val>true</val>
      </att>
      <att id="enableSyncWinNtExtendedAttributes">
        <val>false</val>
      </att>
      <att id="allowReshare">
        <val>true</val>
      </att>
      <att id="teamProject">
        <val>false</val>
      </att>
      <att id="shares">
        <list>
          <obj class="ShareConfig">
            <att id="accessMode">
              <val>ReadOnly</val>
            </att>
 
            <att id="expiration">
              <val>date</val>
            </att>
            <att id="protectionLevel"/>
            <att id="phoneNumber"/>
            <att id="invitee">
              <obj class="Collaborator">
                <att id="email">
                  <val>email</val>
                </att>
                <att id="firstName">
                  <val>first_name</val>
                </att>
                <att id="frequentlyUsed">
                  <val>false</val>
                </att>
                <att id="lastName">
                  <val>last_name</val>
                </att>
                <att id="name">
                  <val>name</val>
                </att>
                <att id="type">
                  <val>user</val>
                </att>
                <att id="userAvatarName">
                  <val>avatar</val>
                </att>
                <att id="fullName">
                  <val>full_name</val>
                </att>
                <att id="avatar">
                  <obj >
                    <att id="initials">
                      <val>name_initials</val>
                    </att>
                    <att id="url">
                      <val>url(&apos;/ServicesPortal/avatar/getUserAtar/avatar&apos;)</val>
                     </att>
                     <att id="href">
                       <val>/ServicesPortal/avatar/getUserAtar/avatar</val>
                     </att>
 
                   </obj>
                 </att>
               </obj>
             </att>
          </obj>
        </list>
      </att>
    </obj>
  </att>
</obj>
Expected Response status
200 OK
The request body:
ShareResourceParam/url – Mandatory: The URL to the folder on which to set share permissions.
shouldSync – Mandatory: True syncs shared files and false does not sync shared files.
enableSyncWinNtExtendedAttributes – True or False. Whether to enable Windows extended attributes or not.
allowReshare – Mandatory: True or False. The default is true, that users with share permissions can share the file with others.
teamProject – Mandatory: True or False. Whether this file or folder to share is a team project or not.
accessMode – Mandatory: The access permissions for the folder. Valid values: None, PreviewOnly, ReadOnly, ReadWrite
expiration – The date and time when the share will end.
protectionLevel – The level of protection for the share. Valid values: publicLink, email, textMessage
phoneNumber – The telephone number.
invitee – Mandatory: Who is invited to access the folder.
invitee/email – The email of the user to share the file or folder.
invitee/frequentlyUsed – True or False.
invitee/lastName – The last name of the user to share the file or folder.
invitee/name – The name of the user to share the file or folder.
invitee/type – The type of user. Valid values: localUser, adUser, localGroup, adGroup, external, administrator.
invitee/userAvatarName – The avatar to use for the user to share the file or folder.
invitee/fullname – The full name of the user to share the file or folder.
invitee/avatar/initials – The initials for the avatar.
invitee/avatar/url – The avatar URL.
invitee/avatar/href – The href link.