Share a file
Share a file. For example, share the file “IMG_0002.PNG”.
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>createShare</val>
  </att>
  <att id="param">
    <obj class="CreateShareParam">
      <att id="url">
        <val>file_to_share_path_&_name</val>
      </att>
      <att id="share">
        <obj class="ShareConfig">
          <att id="accessMode">
            <val>ReadOnly</val>
          </att>
          <att id="protectionLevel">
            <val>publicLink</val>
          </att>
          <att id="expiration">
            <val>2016-07-29T16:46:19+03:00</val>
          </att>
          <att id="invitee">
            <obj class="Collaborator">
              <att id="type">
                <val>external</val>
              </att>
            </obj>
          </att>
        </obj>
      </att>
    </obj>
  </att>
</obj>
Expected Response status
200 OK
The request body:
url – Mandatory: The file to share. For example, /ServicesPortal/webdav/myfiles/New/IMG_0002.PNG
accessMode – The access permissions for the file. Valid values: None, PreviewOnly, ReadOnly, ReadWrite
protectionLevel – The level of protection for the share. Valid values: publicLink, email, textMessage
expiration – The date and time when the share will end.
invitee – Who is invited to access the file. Valid values: localUser, adUser, localGroup, adGroup, external, administrator.