API Documentation

Content Migration Guide

Setup Procedure

  1. Provision a Global Administrator as the migration administrator and change their “Access only own content through API” privilege to “Access content on behalf of managed users through API” on the Manage User page. Then obtain this administrator’s application token from their account page.
  2. Use the Syncplicity Developer Portal to create an app.
  3. Use the app key, app secret and migration administrator’s application token to call the Syncplicity OAuth service to obtain a user bearer token. For details, see the Developer Portal Getting Started Guide (online) and provided sample code.
  4. Use the curl command to create a migration “device” in the migration administrator’s account and save a copy of the migration device’s ID and machine token.

curl -X POST https://api.syncplicity.com/provisioning/machines.svc/ -H 'AppKey: <clientId>' -H 'Authorization: Bearer <access token>' -H 'Accept: application/json' -H 'Content-Type: application/json' -d '[{"Name": "API-migration","SystemName": "Windows","SystemVersion": "9.9.9","ClientVersion": "9.9.9"}]'

  1. Use a Firefox browser to retrieve the StorageVault Authentication storage token.
    1. Turn on the Firefox developer network analysis tool by pressing the F12 key.
    2. Use Firefox to navigate to this URL after replacing the example values with real ones:

              https://<storage_endpoint_url>/v2/auth?machine_id=<machine_device_id>&scheme=syncpsso253751160://

  1. You will be re-directed to your company’s identity provider single sign-on (SSO) page for authentication.
  2. After authentication, the browser will be re-directed to

              https://<storage_endpoint_url>/v2/auth/acs

  1. Nothing will display on the browser screen – use the Firefox developer network tool to extract the value of the ‘Location’ HTTP response header.

  2. Use a URL decoder to decode the storage token (the part after ‘syncpsso253751160://token/’). Note that the storage token starts with ‘SSOUser’ and this is part of the token.

Programming Flow

For details, see the Developer Portal Getting Started Guide (online) and provided sample code.

  1. Use the app key, app secret and migration administrator’s application token to call the Syncplicity OAuth service to obtain a user bearer token.
  2. Use the app key, app secret and migration administrator’s machine token to call the Syncplicity OAuth service to obtain a machine bearer token.
  3. For each target migration user, call the User Service to obtain the user’s GUID.
  4. For each target migration user, call the Storage Endpoint service to obtain the user's default StorageVault.
  5. There are two methods for migrating a user’s content:
    1. Migrate the content into the migration administrator’s account but store it in the target migration user’s default StorageVault. Then when the migration is complete, transfer ownership of the syncpoints from the migration administrator to the target migration user. This approach has the advantage that the user will not receive the migrated content until the migration is complete.
    2. Use the “As-User” HTTP header (the Administrator making the API calls must have been assigned the corresponding privilege via the Syncplicity admin console) and perform the migration directly on-behalf-of the target migration user. This approach should be used for incremental migrations. If used for an initial migration, it has the disadvantage of the user receiving the migrated content during the migration process instead of when the process is complete.
  6. For each target migration user, use either method 5a or 5b, and iterate through:
    1. Create a syncpoint on the user’s default StorageVault.
    2. Recursively create subfolders and upload files in each folder, including the root folder.
  7. If using method 5a, when all of a target migration user’s content has been migrated:
    1. Change the ownership of each of the user’s syncpoints to the target migration user.
    2. Remove the migration administrator as a participant (sharee) on each of the user’s syncpoints.
    3. For shared folders (syncpoints), add the appropriate groups and/or individual users as sharees.
  8. If performing an incremental migration of content that has been updated on the source system, use method 5b.