SyncRequest

SyncRequest returns if the client is allowed to sync, if the sync is required and what type of sync should be performed: FullSync or PathSync.

It also returns a SyncToken which must be used when starting the actual synchronization and SyncReport.

Authentication Methods


  1. With a username and password
  2. Using Kerberos
Input Parameter Type Description
Token* String Nmua of the user
FileServerName* String FileServer name
LocationID* String LocationID
Response Type Description
Success Boolean True on success, False on failure
CURL EXAMPLE
curl -v 'https://secure.nomadesk.com/storage/api.php?Task=SyncRequest&Token=e4gdbvt4eu13co44t2jvqeua41&FileserverName=nmsa000000000002&LocationID=Desktop'
RESPONSE

If SyncType is PathSync a path sync should be done with the list of local changes and the list of paths in the section.

<Response>
    <Status>1</Status>
    <Message></Message>
    <SyncAllowed>true</SyncAllowed>
    <SyncRequired>true</SyncRequired>
    <SyncType>PathSync</SyncType>
    <SyncToken>tsuCsIB9OQOX4TA2X82c6ZSiDk33fREtn</SyncToken>
    <Paths>
        <Path>test.txt</Path>
        <Path>folder/file.png</Path>
        <Path>folder/folder2/file.txt</Path>
    </Paths>
    <SyncInfo>
        <RemotePath>/data4/nmsa000104/</RemotePath>
        <STunnelHostname>stunnel.sstorage001.aventiv.com</STunnelHostname>
        <STunnelPort>8181</STunnelPort>
    </SyncInfo>
</Response>

If SyncRequired is false; there are no server side changes. However if SyncAllowed is true the client is still allowed to sync any local changes. and are absent.

<Response>
    <Status>1</Status>
    <Message></Message>
    <SyncAllowed>true</SyncAllowed>
    <SyncRequired>false</SyncRequired>
    <SyncToken>tsuCsIB9OQOX4TA2X82c6ZSiDk33fREtn</SyncToken>
    <SyncInfo>
        <RemotePath>/data4/nmsa000104/</RemotePath>
        <STunnelHostname>stunnel.sstorage001.aventiv.com</STunnelHostname>
        <STunnelPort>8181</STunnelPort>
    </SyncInfo>
</Response>

If SyncType is FullSync; there are many server side changes. is absent.

<Response>
  <Status>1</Status>
  <Message>Success</Message>
  <SyncAllowed>true</SyncAllowed>
  <SyncRequired>true</SyncRequired>
  <SyncType>FullSync</SyncType>
  <FullSyncReason>Too many paths where changed</FullSyncReason>
  <SyncToken>5c34a576-fd65-34e6-37c3-a7824d0e0808</SyncToken>
  <SyncInfo>
      <RemotePath>/data/681/34/14/nmsa000000000002/data/</RemotePath>
      <SynchronizerRemoteHostname>Cloud</SynchronizerRemoteHostname>
      <RootAlias>//Cloud/nmsa000000000002</RootAlias>
      <EnableSTunnelSNI>false</EnableSTunnelSNI>
      <STunnelHostname>apitest.office.aventiv.com</STunnelHostname>
      <STunnelPort>8181</STunnelPort>
  </SyncInfo>

TODO: add ConflictSync

If SyncAllowed is false; the client is not allowed to sync. Only and are returned. SyncRequired can then be used to indicate if the client is still update to date or not; if SyncRequired is false, and there are no local changes, the client is still up to date. If there are local or server side changes it is no longer up to date.

<Response>
    <Status>1</Status>
    <Message></Message>
    <SyncAllowed>false</SyncAllowed>
    <SyncRequired>true</SyncRequired>
</Response>