You can send the files mentioned in this section to Transportant in one of three ways:
- By uploading them manually using the dashboard
- By connecting to our SFTP server and sending the files
- By uploading the files through the HTTP endpoint
Manual data import
This is the quickest way to import files. One common use of this is to test files before setting up an
automated process using HTTP or SFTP. To perform a manual data import, follow these steps:
- From the main page of the dashboard, find the Administrative Tools section. There, click on Data Import. The Data Import page will open.
- Near the top right corner, click on Import Actions. A context menu will open.
- Click on Create Import.
- Select either full import or update.
- Select file to be imported.
- Click on Start Data Import.
SFTP server
You can request an account created at our SFTP server located at data.transportant.com,
port 22. You can then use an SFTP client of your choice to send the files.
This server will always consume all the files once the connection is closed. This means that
every time you connect, you won’t see any old files. The import process will begin as soon as
the connection is terminated.
Every SFTP client is different so we are unable to provide step by step instructions on their use. However one of our customers passes on the tip that he needed to close the SFTP window in his client after uploading the file.
HTTP endpoint
Transportant provides an HTTP endpoint where you can upload files to be imported into our
system. It can be easily automated using the command line or any major scripting language.
Files are imported by executing POST requests against the endpoints below while providing an
authentication token. Once a file is uploaded, it will be imported into the system within 24 hours.
Status and errors for each import should be monitored in the dashboard’s
Data Import section.
Endpoints
Full dump
Call this endpoint to completely replace information in the database. For example: if a
students.csv file is uploaded via full dump, then all previous students will be removed and the ones in
the file will be inserted.
Update
Call this endpoint to update information in the database. For example: if a students.csv
file is uploaded via update, then the existing students will be updated with information from that file.
Nothing will be removed.
The request to the endpoints above must follow these criteria:
- Have a X-School-Token header with the provided authentication token
- Be a POST request
- Be a multipart/form-data request
- Have the file be uploaded as the file variable
Example
If your authentication token is ABCDEF, and the file you wish to upload is students.csv, then an
example curl call would be:
Using curl on your computer
Authentication token
Transportant staff will provide you with an authentication token to be used on the
requests. Keep the token private, as it gives permission for anyone that has it to import
data into your school.
Import frequency
For HTTP and SFTP imports, the system will automatically trigger the import as soon as files
are received. Therefore, it is up to the customer to set up automated nightly jobs that ensure
that those files are sent to our servers.
Blackout periods
Imports (both via SFTP and HTTP) will not be processed if sent during those hours:
- From 6 AM to 9 AM CST
- From 2 PM to 6 PM CST
Note that those times are in CST, so they will need to be converted to your timezone.
The blackout periods are needed to avoid excessive database load during peak usage hours.