Getting Started

It's important that you read through this document before getting started. The information below applies to all of our api's and explains the core concepts used to interact with them.

There are 3 API's you can use to access/manipulate your data: Core API, Scheduling API and the Training API. You can explore these API's and their related endpoints in the API Reference section.

Authentication

You must have a valid API key to authenticate to our APIs. You can obtain your keys by logging into Flight Schedule Pro and navigating to the "API Access" tab in the Settings section. Your user account must have the "Can Manage Company Settings" permission to access and generate API keys. Your company is also required to have a valid API subscription before you can generate API Keys.

Once you have a key, you authenticate by including the following header with each request:
x-subscription-key : {api_key}
It should look something like this:
x-subscription-key : 1cd8e927-3740-49d5-88a1-d8c33ed5bd75
API keys provide full access to the data at your organization. You should protect it just like you would protect your password. Flight Schedule Pro does not support client-side usage of our API's or using API keys in mobile apps. The potential security risk of key exposure is to high for these types of usage.

HTTP Methods

Flight Schedule Pro API's support the following HTTP methods:
GET
Use the GET method to retrieve data. For example, you would use the GET method to retrieve data about a specific aircraft or a list of aircraft.
POST
Use the POST method to create new resources. For example, you would use the POST method to create a new aircraft or maintenance item.
PUT
Use the PUT method to modify resources. For example, you would use the PUT method to update an aircraft resource.
DELETE
Use the DELETE method to delete resources. For example, you would use the DELETE method to delete an aircraft or user from the system.
PATCH
Use the PATCH method to make partial resource updates. For example, you would use the PATCH method to modify a specific property associated with an aircraft and leave all the other data the same.

Parameters

You'll use 4 types of parameters when making and consuming requests: URL, query string, request body and response body parameters. Each request will have it's own set of parameters as outlined in the API Reference. We'll discuss common parameters and how to use them below:
URL parameters
You'll be required to supply parameters when building the URL for your requests. These are refered to as URL parameters. Each request will require specific parameters as outlined in the API Reference. You'll see placeholders for the specific parameters required for each request. Here's an example:
/operators/{operatorId}/aircraft/{aircraftId}
In the above URL, there are 2 required parameters, operatorId and aircraftId. You'll need to replace these placeholders with real data from your Flight Schedule Pro account. After you do this, the above URL should look like this:
/operators/45587/aircraft/c804ad93-d8c6-41f8-9180-86f85b180fb1
Query string parameters
Query string parameters are used for filtering, pagination, sorting and creating partial responses. You append query string parameters to the end of your URLs. Start your parameters with a '?' character and separate them using '&' characters.
/operators/45587/aircraft/d8c6-41f8-9180-86f85b180fb1?para=1234&secpar;=3433
Filtering
Some resources can be filtered. For example, you can return a list of aircraft that have flown less than 1000 total hours. To do this, you would make the following request:
/operators/45587/aircraft?totalHours=lt:1000
The API Reference will list out supported filters for each endpoint.
Pagination
You can use pagination to reduce the number of results that are returned when making requests that return arrays. We use 'limit' and 'offset' query string parameters for pagination. Limit is used to specify how many items should be returned. Offset is used to specify where in the list you want to start returning results. The following URL uses pagination:
/operators/45587/aircraft?limit=100&offset;=2
The API Reference will tell you if pagination is supported for a given endpoint and what the default values are if supported.
Partial responses
Some endpoints allow you specify what data you want returned in the response. This is helpful when the resource you are requesting has a large response but you only need a subset of the data returned in the response. We use the 'fields' query string to specify what data should be returned in the response. The 'fields' query string should contain a comma separated list of fields you want returned. The following URL returns a partial response:
/operators/45587/aircraft?fields=name,tailnumber
The API Reference will tell you if partial responses are supported for a given endpoint and what the default values are if supported.
Sorting
Some endpoints allow you to sort the items returned in the response. We use the 'sortBy' query string to specify how array items should be sorted. The 'sortBy' query string should contain the field name you want to sort by. The following URL returns a sorted response:
/operators/45587/flights?sortBy=startTime
The API Reference will tell you if sorting is supported for a given endpoint and what the default and available values are.
Request body parameters
You may be required to supply request body parameters when making POST, PUT and PATCH calls. These parameters must be in JSON format. The API Reference outlines which parameters are available and required for each endpoint. Here's a example POST request body for creating a new aircraft:
{
"name" : "Piper Warrior III",
"type" : "ASEL",
"tailNumber" : "N92555"
}

Throttling

You're allowed to make 60 api calls every 60 seconds. If you go over that you'll get a 429 error code. If you get throttled you'll have to wait until you've made less than 60 calls in a 60 second period before the throttle will be lifted.

Support

If you have any questions please fill out a support request.