API Development

An Integration Use Case for SecureTransport + Syncplicity

I have been trying out some use cases to illustrate the value of SecureTransport and Syncplicity working together. I thought it would be helpful to share a step-by-step guide.

Use case

Human to System: End-user synchronizes his local directory on his desktop to a Syncplicity folder. Files get uploaded in Syncplicity. SecureTransport pulls the files from Syncplicity and sends those files to a backend server over a secure protocol such as SFTP.

Prerequisites

You need a Syncplicity admin account to create this use case. You may want to get an admin account with a demo email address, so that your original Syncplicity account will remain intact. For both accounts, you can navigate to https://my.syncplicity.com and enter your email address.

Set up the user account in Syncplicity

Now, once you have an admin account, add another account for which you want to test the ad-hoc use case. Let’s add another account, krishsyncp@dispostable.com. Now, you have to set the proper privileges for krishsyncp@dispostable.com so that the user calls the Syncplicity API.

Perform the following steps:

  • Login to Syncplicity account as admin
  • Click on “User Accounts” under Admin
  • Click on the test user (krishsyncp@dispostable.com )
  • Go to the Privileges section and click on the Modify link
  • Select “Access content on behalf of managed users through API.” and click Save

Access content on behalf of managed users through API

Notes:

  • If you need an email account for a user setup in Syncplicity, visit dispostable.com, you can easily create an email and check email, etc. for testing. It is really cool!
  • A Syncplicity admin can’t change its own privileges, but it can change others. That’s why you can’t test using the admin’s account. You need to add another account in Syncplicity to test.

Set up the user to make a Syncplicity API call

Perform the following steps:

  • Visit Syncplicity Developers | API Documentation page and log in to your developer account with the test account
  • Create an app
  • Once you create an app, you will have App Key & App Secret associated with your app

Notes:

  • For this Use Case, your Syncplicity admin account should be an enterprise-grade trial account. In a regular trial account, you don’t have access to the Syncplicity developer portal.

Set up SecureTranport

Now, you are ready with all the Syncplicity setup. The rest of the work is in SecureTransport.

  • Login to SecureTransport
  • Create a user account
  • Go to transfer sites, create a site named as “Syncplicity-TS”
    • Choose “Syncplicity” as the transfer protocol
    • Copy the “App Key” & “App Secret” from the developer app (Syncplicity Developers) and provide here
    • Copy the “Application Token” from the test user account krishsyncp@dispostable.com
    • Provide the user email, download and upload folder as below
      Provide the user email, download and upload folder
  • Create another transfer site as below for the file delivery location
  • Create a route rule “Send To Backend” which will deliver the file to the transfer site created in the above step
    Secure Transport Syncplicity
  • In the final step, create an application to retrieve files from the “Syncplicity-TS” automatically every 1 min and execute the route rule “Send to Backend” as below
    Create an application to retrieve files

Test the use case

  • Open your Syncplicity desktop app. If you already linked your computer to Syncplicity, you have to unlink and link to a directory “SyncplicityDemo” as you mentioned in the “Syncplicity-TS” transfer site
  • Create two folders “Pickup” and “Delivery”
  • Place a test file (e.g. Payment Details.txt) in the “Pickup” folder
  • Wait for the file to be synced in Syncplicity
  • Go to “File Tracking” in SecureTransport. You will see two entries like below as SecureTransport automatically pulled the file from Syncplicity and delivered to the backend
  • You can verify the file delivery in the “Upload folder” location of the target server

Notes:

  • If you don’t see any activity in “File Tracking”, look for the server logs. You might see “Authentication has failed”. like below.
    This error happens when your server is not authenticated to the proxy to connect to the Internet. Remember you are making an outbound Syncplicity API call. To authenticate to proxy, login to SecureTransport server, run the script axway-proxy-authentication.sh” under /root/scripts” and authenticate to the proxy using your axway loginid and password.

Now what?

You might be wondering when this use case will be used? What business problem does it solve?

Well, suppose an organization provisions only SFTP for users to upload/download files, and there are less technical users (NOTE: Even some technical people do want to connect to FileZilla or WinSCP to send files. To be honest, it is not the most convenient way to send files.). Then, this approach is much easier for them to send the files to SecureTransport. They simply need to place the files in the Syncplicity folder in their system. Syncplicity will sync the folder and SecureTransport will pick up the files and deliver the files in the destination system. Simple!