Create system interface via sFTP

Introduction

Portbase offers various protocols to exchange messages between your internal system and the Port Community System (PCS). This article explains how to send and retrieve messages via the sFTP protocol.

An overview of the other protocols can be found here

Before you start

In this article, we assume that:

Managing the connection

Managing your AS2 and sFTP connections is done via the PCS service System Interfaces (EDIFACT/XML). You can find this in the Port Community System (PCS)

In the article managing sFTP system interface you can read how to do this.

screenshot-1-sftp-migratie-2 (2).png

Technical requirements

  • The Portbase sFTP services only accept push/pull. This means you are responsible for placing and retrieving files in the folders.
  • Messages in the folder cur (upload and download) are automatically deleted after 7 days.
  • The maximum file size is 4 MB.
  • The PCS sFTP server is accessible via sftp://messaging2.pcs.portbase.com. You can log in with the provided username and your SSH key pair, via port 22. You manage your connections with Portbase in the System Interfaces Portal, via PCS

Performance

For the best performance, we recommend using multiple parallel uploads and downloads (also known as channels or sessions) within a single connection. Our server supports a maximum of 10 parallel transfers per connection.

This method is faster than opening multiple separate connections without using parallel transfers.

Upload procedure

  1. Upload your file to the folder upload/tmp/.
  2. Once the upload is complete, move the file to upload/new/.
  3. After a short time, the PCS system picks up the file for distribution and processing and moves it to the folder upload/cur/. After 7 days, the file is automatically deleted.

Why this procedure?

Uploading to /tmp first and then moving to /new once the upload is complete prevents our system from picking up incomplete files. Using the /new folder confirms that a file is ready to be retrieved. Similarly, moving to the /cur folder is our confirmation that your file has been retrieved for distribution within Portbase.

Upload procedure via the sftp connection

Download procedure

  1. Check the folder download/new/ for new files.
  2. Download these files and move them to download/cur/ when you are done or delete them directly. After 7 days, the files in download/cur/ are automatically deleted.

Why this procedure?

Using the /new directory confirms that a file is ready to be retrieved and there is no risk of retrieving a partial upload. Moving the file to the /cur folder is your confirmation that the file has been retrieved for distribution/processing. The /tmp directory is used by Portbase for uploading (partial) files and is not intended for customer use.

 Download procedure via the sftp connection

Testing the connection

Check if you can connect from your sFTP client to the Portbase sFTP server and contact Portbase to check the connection from Portbase to your sFTP server.

If you have questions about your sFTP system interface with Portbase, please contact us via integration@portbase.com 

Related to

Was this article helpful?

0 out of 0 found this helpful