How to Send Data to Transportant

How to Send Data to Transportant

You can send the files mentioned in this section to Transportant in one of three ways:
  1. By uploading them manually using the dashboard
  2. By connecting to our SFTP server and sending the files
  3. By uploading the files through the HTTP endpoint

Manual Data Import

This is the quickest way to import files. This is usually used to test files before setting an automated process using HTTP or SFTP.
Follow these steps on the dashboard:
  1. Click on the import data Icon
  2. Next click on the blue + Icon
  3. Select either full import or update
  4. Select file to be imported
  5. Click upload file

SFTP Server

You can request an account created at our SFTP server located at data.transportant.com, port 2021. 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.
If you’d like to use this method, contact us at support@transportant.com for an username and password.

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.

Request Format

The request to the endpoints above must follow these criteria:
  1. Have a X-School-Token header with the provided authentication token
  2. Be a POST request
  3. Be a multipart/form-data request
  4. Have the file be uploaded as the file variable

Example

If your authentication token is ABCDEF, and the file to upload is students.csv, then an example curl call would be:
  1. curl -v --header "X-School-Token: ABCDEF" -F file=@students.csv https://api.transportant.com/api/import/update

Using curl on Your Computer

On Mac and Linux, curl is built in. On Windows, you can either add curl support or use the Invoke-WebRequest PowerShell module. Additionally, any scripting language that supports HTTP requests can be used.

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.
    • Related Articles

    • Getting Started With Data Import

      What data needs to be imported for Transportant to provide services Transportant needs to know information about the school bus fleet, the routes and stops it operates on. Additionally, parents and students may use Transportant’s Bus Compass mobile ...
    • Freeze a Route or Stop from Data Import Changes

      You might want to ensure that future data imports do not change a particular route or a stop. To do this, open the Routes page in the Route Management section of the dashboard. Click the desired route (or the route that contains the desired stop), ...
    • Attendant Replacement Guide

      Getting Started When Transportant staff recommends that you replace an attendant, this guide will help you through the process of removing your old one and installing a new one. You’ll need the following items: Masking tape and a marker, to label ...
    • Bring a Bus Online

      Doing It To bring a bus online, turn the bus's ignition key to the accessories position. It is not necessary to start the engine. Wait until the lights on the attendant come on, which should only take a few seconds. At this point you may remove the ...
    • Bus Lot Wireless Network Installation Guidelines

      The Transportant system requires a wireless network in the bus parking lot. This guide collects Transportant's experience assisting customers with building and troubleshooting those networks. Environmental Concerns In rare cases, other activity in ...