Operation

Topics that cover typical operational tasks in Syncplify AFT!

Understanding what Syncplify AFT! is

True Managed File Transfer (MFT) requires the interoperation of 2 parts:

While Syncplify Server! has been well established on the market as one of the overall best SFTP/FTPS servers for several years, we just recently released its MFT counterpart: Syncplify AFT!

The video here below shows the main features found in Syncplify AFT! and is a good general overview of the product itself.

Forgot your AFT! admin password? Here's what to do

AFT! supports multiple administrative profiles, so the best thing to do when an administrator forgot their password is simply to log in with a different admin profile, and reset the password of the admin who has forgotten it.

But what if you only had 1 admin profile, and you forgot its password? How to regain access to AFT! in that case? No worries, here's a little trick that can get you back in your AFT! instance without losing any of your scripts and/or configuration.

First of all, locate your AFT!'s configuration data directory.

image.png

In that directory there is a file named init (no extension). Now simply delete that file named init.

Once you have deleted the init file, launch your browser again, and try to connect to your AFT!'s web UI. You'll notice that you will be asked to create a brand new administrative profile when you do so.

image.png

That's it. Create a new admin profile, and you'll be right back into your AFT! web UI.

 

How to start AFT! jobs via REST API but using the command-line

As of version 3.0, Syncplify.me AFT! has added the capability to start jobs via the START command-line switch and parameters. To be clear, unlike the RUN command (which executes a script from file in the context of whatever shell you invoked it) the START command will actually call a REST API for you to start the job within the context of the Syncplify.me AFT! system service.

First of all, you need to make sure you meet the prerequisites, which is basically only one: you need to create an API Key from inside AFT!'s web interface, and make sure such API Key can be used from the IP address you'll be calling it from. Here's an example API Key that will work when invoked from 127.0.0.1 (localhost):

image.png

Once you have the API Key, you can use it to invoke the START command via command-line.

Here's the simplest example, using only the API Key and the ID of the script you want to run:

.\aft.exe start -s "p3fEoexohdHj6SXrvuT8H8" -a "xiM2ruBm2QZkhTSN6BPd9BqmxVEBVbrgNYVMkNQb6hfj"

Once you have the API Key, you can use it to invoke the START command via command-line.

Here's a complete example, which also explicitly adds the optional HOST and PARAMETERS command-line payload:

.\aft.exe start -s "p3fEoexohdHj6SXrvuT8H8" -a "xiM2ruBm2QZkhTSN6BPd9BqmxVEBVbrgNYVMkNQb6hfj" --params "[{\`"name\`":\`"character\`",\`"value\`":\`"goofy\`"}]" --host "127.0.0.1:44399"

Both of these examples assume you're invoking them from PowerShell... please keep in mind that other shells (like cmd.exe or Unix/Linux shells) may have different string "escaping" mechanisms and notations.

Alternative (lower-level) way to start a script via PowerShell and REST API

With Syncplify AFT! you have quite a few different ways to run and/or start the execution of your secure file transfer jobs. One such way is via REST API. But how to invoke such REST API via PowerShell in an easy way? Here's an example script for you:

$Header = @{
    "X-API-Key" = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
 
$Body = @{
    jobType = "SCRIPT"
    scriptId = "xxxxxxxxxxxxxxxxxxxxxx"
}
 
$Parameters = @{
    Method      = "POST"
    Uri         = "https://127.0.0.1:44399/v1/jobs"
    Headers     = $Header
    ContentType = "application/json"
    Body        = ($Body | ConvertTo-Json)
}
 
Invoke-RestMethod @Parameters -SkipCertificateCheck

All you need to do is substitute the censored (xxxxxx...) API Key and Script ID with your own values, and that's it, it'll work just fine.