KB Article #177568

Create a Transfer SIte using RESTful API

Problem

Creating a Basic SecureTransport Transfer Site using cURL to access the RESTful API.

Resolution

You can use the following POST to create a new transfer site

    # curl -X POST -k -u Admin:Pass -H "Content-Type: application/json" -d "{ "sites" : [ { "name" : "TS_Name", "account" : "AccountName", "host" : "RemoteHost", "protocol" : "PROTOCOL", "port" : "RemotePort", "username" : "RemoteUserName", "usePassword" : "true", "password" : "RemotePassword", "issecure" : "false", "upload.folder" : "UploadFolder", "download.folder" : "DownloadFolder", "download.pattern" : "Pattern" } ] }" https://HostName:AdminPort/api/v1.2/sites
        

    Replace the following:

    • Admin = Replace with actual administrator name
    • Pass = Replace with actual administrator password
    • TS_Name= Replace with the name of the new Transfer Site
    • AccountName = Replace with an actual account name
    • RemoteHost = Replace with the actual FQDN or IP of the remote host
    • Protocol = Replace with the desired protocol; example: ftp, ssh, http
    • RemotePort = Replace with the remote service port
    • RemoteUserName = Replace with the User Name provided by the remote partner
    • RemotePassword = Replace with the Password provided by the remote partner
    • UploadFolder = Replace with remote upload folder; example: /push
    • DownloadFolder = Replace with remote download folder; example: /get
    • Pattern = Replace with the download pattern; example: *.txt
    • HostName = use localhost or hostname/IP of a remote SecureTransport server
    • AdminPort = Service port for the Admin, 444 by default

    Additional parameters (change if required):

    • usePassword = Defines whether to use password or certificate based authentication; possible values: true/false
    • issecure = Defines whether to use secure or plain-text connection; possible values: true/false

Additional Information

To view the RESTful documentation, open this link with a web browser: https://HostName:AdminPort/api/v1.2/docs/index.htm...