Introduction
The Aerostudies API is designed to be able to allow third-parties to fully manage or access all parts of our LMS as easily as possible. Synchronizing data between our application and yours is also made easier with the option to receive callback events for most of the important events that occur within our application.
Overview
There are multiple different components of the API which reflect the different aspects of how users would generally interact with our system. The components are logically organized for the most part, and each one deals with general administration of that area as well as managing how that part pertains to users as well.
All components generally have a set of functions (endpoints) that allow you to manage the higher level aspects of the data objects that are relevant for that component. These are general CRUD type operations, though each CRUD action is mapped to a specific endpoint (update/create/delete) and all utilize POST, instead of segregating the functionality into different request types.
When sending data to an endpoint you should always expect some sort of return data. The data returned may be as simple as a boolean true/false, or an entire data structure, especially in the cases of creation/updating data objects. Most, if not all, component actions will have example return data shown in the API so you know what to expect at the very least.
Authentication
Our API currently only supports OAuth 2.0 and specifically only the authorization code workflow.
Please see this guide for implementing OAuth with our system: Aerostudies OAuth API Guide
Error Codes
Component actions will always return either an error or success code to let you know of errors. Errors are also descriptive where it’s appropriate and possible. We do not however, send different error codes for different error types; We instead try to use verbose errors when you encounter them.
Rate Limit
We do rate limit requests, however it’s very unlikely you would need to work around that. Our application is not a high request type of environment, so if you are having issues with this please contact us.
Synchronizing User Id’s
It’s important to synchronize user id’s between systems in order to be able to effectively utilize callback’s and pull relevant user data. One of the easiest methods of doing this is to utilize our auth redirect workflow. You simply direct the user in question to an auth link with specific query paramaters added to that link and after they are successfully authorized, our system will pass back their user id so that you save that to identify this user through the API in the future.
An example URL you would use:
In this example, we have setup the “redirect” query paramater to a base 64 encoded version of the url we want to send the user to after they’ve successfully authenticated on Ascent. For the purposes of this example, the redirect url (https://www.mywebapp.com/users/syncId) would send the user back to our web app at a location that would save the returned user id. We need to also set the “sendUserIdOnRedirect” so that the Ascent system knows to not only redirect the user, but also append the Ascent User id onto the redirect url. In this example, after successful authentication Ascent will redirect the user to the following url:
https://www.mywebapp.com/users/syncId&systemUserId=38495
The important part being the added “systemUserId” query parameter which signifies that the user that just signed in is recognized by this id in the Ascent system. At this point you would save that Ascent system user id in your application and do whatever suits your workflow.
Automatically signing in users to the Ascent system
In order to provide a “seamless” integration to the Ascent system you will likely not want your users to need to re-authenticate every time they need to use the Ascent system. In this case you can utilize the OTP (One Time Password) functionality of the Ascent API to generate a temporary OTP to sign them in without any effort.
The appropriate Ascent API endpoint is: /users/generateOtp
With this, you are only required to send the userId or email of the user you want to sign in and it will generate a valid OTP for that specific user which you can then place as a link/button on your web application for the user to sign in with. As long as the OTP is valid (Has not expired, not malformed) the user will be signed in to the Ascent system.
Building on the OTP functionality you can also send redirect and/or sendUserIdOnRedirect parameters to that endpoint to redirect the user after signing in with the OTP and to get the userId back, which could be utilized as an alternative method to synchronize user id’s.
Competency 8
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | {{userID}} | User id to assign competency to |
competencyId | 323 | Competency id |
dueDate | 2010-01-01 | Date that competency is due |
dueDateNotification | 1 | Send a due date notification email (0 = false, 1 = true) |
NotificationSetting[student][notify] | 1 | Send due date notification to student (0 = false, 1 = true) |
NotificationSetting[student][period] | 10 | The number of (days/weeks/months) that this assignment will be due in |
NotificationSetting[student][periodType] | W | Determines the due date interval (D = Day, W = Week, M = Month, Y = Year) |
NotificationSetting[student][repeatDays] | 10 | Repeat the due date reminder every specified number of days |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
name | BE20 Pilot proficiency | Competency name |
CompetencyRequirement[0][objectId] | 54531 | Competency requirement object id |
CompetencyRequirement[0][type] | 0 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[1][objectId] | 48670 | Competency requirement object id |
CompetencyRequirement[1][type] | 0 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[2][objectId] | 1608 | Competency requirement object id |
CompetencyRequirement[2][type] | 1 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[3][objectId] | 1609 | Competency requirement object id |
CompetencyRequirement[3][type] | 1 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[4][objectId] | 375 | Competency requirement object id |
CompetencyRequirement[4][type] | 2 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[5][objectId] | 302 | Competency requirement object id |
CompetencyRequirement[5][type] | 2 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[6][objectId] | 635 | Competency requirement object id |
CompetencyRequirement[6][type] | 3 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[7][objectId] | 358 | Competency requirement object id |
CompetencyRequirement[7][type] | 3 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
id | 174 | Competency to delete |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | {{userID}} | User id to list assigned competencies for |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
id | 323 | Competency id to update |
name | BE20 Pilot proficiency – 2020 | Competency name |
CompetencyRequirement[0][objectId] | 54531 | Competency requirement object id |
CompetencyRequirement[0][type] | 0 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[1][objectId] | 48671 | Competency requirement object id |
CompetencyRequirement[1][type] | 0 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[2][objectId] | 1608 | Competency requirement object id |
CompetencyRequirement[2][type] | 1 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[3][objectId] | 1609 | Competency requirement object id |
CompetencyRequirement[3][type] | 1 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[4][objectId] | 375 | Competency requirement object id |
CompetencyRequirement[4][type] | 2 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[5][objectId] | 302 | Competency requirement object id |
CompetencyRequirement[5][type] | 2 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[6][objectId] | 635 | Competency requirement object id |
CompetencyRequirement[6][type] | 3 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
CompetencyRequirement[7][objectId] | 358 | Competency requirement object id |
CompetencyRequirement[7][type] | 3 | Competency requirement type (0 = module, 1 = curriculum, 2 = olte, 3 = document) |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | {{userID}} | User id to update competency assignment for |
id | 441 | Competency assignment id |
dueDate | 2010-01-01 | Date that competency is due |
dueDateNotification | 1 | Send a due date notification email (0 = false, 1 = true) |
notes | test123 | Extraneous notes that may be applicable to this competency assignment |
NotificationSetting[student][notify] | 1 | Send due date notification to student (0 = false, 1 = true) |
NotificationSetting[student][period] | 20 | The number of (days/weeks/months) that this assignment will be due in |
NotificationSetting[student][periodType] | M | Determines the due date interval (D = Day, W = Week, M = Month, Y = Year) |
NotificationSetting[student][repeatDays] | 20 | Repeat the due date reminder every specified number of days |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
id | 441 | Competency assignment id |
Document 8
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userID | {{userID}} | User id to assign document to |
documentID | 1638 | Document id to assign to user |
expires | 1 | Sets whether this document expires or not (0 = false, 1 = true) |
files[] | Document specific to this olte assignment | |
files[] | Document specific to this olte assignment |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
document_name | Pilot license | Document name |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
documentID | 1638 | Document id to delete |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userID | {{userID}} | User id to list assigned documents for |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
documentID | 1638 | Document id |
document_name | Pilot License (All pilots) | Document name |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userID | {{userID}} | User id that has document assignment |
courseID | 20335 | Document assignment id to update |
notes | added notes | Any notes that may be relevant to this assignment |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
courseID | 20335 | Document assignment id to withdraw from student |
Express 8
Express API calls are only meant for those who use our application for managing and using express modules. Express modules are generally used for one-off training events, or where tracking training for students is not critical. Students that are enrolled in express modules are not tracked as users within our application and instead, their data only lives with the specific express module that was assigned to them.
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
Student[firstName] | some | Students first name |
Student[lastName] | guy | Students last name |
Student[email] | Students email | |
Module[id] | 62936 | Express module id to assign |
Module[sendCertificate] | false | Send a module certificate after completion (false/true) |
Module[onCompleteRedirectUri] | https://www.ourcompany.com/api/moduleComplete/userid=1234 | Redirect student to specified URL on completion |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
token | {{sampleToken}} | Express token |
access_token | {{access_token}} | OAuth access token |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
token | {{sampleToken}} | Express token |
access_token | {{access_token}} | OAuth access token |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
token | {{sampleToken}} | |
access_token | {{access_token}} |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
token | {{sampleToken}} | Express token |
access_token | {{access_token}} | OAuth access token |
Headers
Key | Value | Description |
---|---|---|
Auth-Id | Qk0jmg8kC9MieGz8td8HZ3H4bpKzpU0f | |
Auth-Key | R2ea5tZxWBokqgALPR89DLJ9m9916A5d | |
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth acces token |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
token | {{sampleToken}} | |
access_token | {{access_token}} |
Groups 10
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
groupID | 8935 | Student group id to assign managers to |
managerIds[0] | 67461 | Manager user id to assign |
managerIds[1] | 18924 | Manager user id to assign |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
groupID | 8935 | Student group id to assign students to |
studentIds[0] | 18924 | Student user id to assign |
Create Group | POST {{apiUrl}}/groups/create
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
group_name | Air traffic controllers | Student group name |
Delete Group | POST {{apiUrl}}/groups/delete
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
groupID | 8935 | Student group id to delete |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
groupID | 1055 | Student group id you want to see list of managers for |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
groupID | 1055 | Student group id which you want list of students for |
Update Group | POST {{apiUrl}}/groups/update
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
groupID | 8935 | Student group id to update |
group_name | Air Traffic Controllers (YVR) | Student group name |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
groupID | 8935 | Student group id to withdraw managers from |
managerIds[0] | 18924 | Manager user id to withdraw |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
groupID | 8935 | Student group id to withdraw students from |
studentIds[0] | 18924 | Student user id to withdraw |
Learning Center 1
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
Modules 3
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
course_name | API Test Module | Module name |
customData | {test: “random data”} | Custom data you can set, up to 4kb in text format (Can put JSON/XML here, or whatever is useful to you) |
author_userID | {{userID}} | User id which is manually set as the author of this module (Integer id) |
image | Logo image for the module, shows up in student, training developer and registrar module listings | |
cert_logo | A custom logo to use for the module certificate specific to this module | |
background_image | A global background image to show on all pages throughout the module |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
courseID | 54531 | Module Id which will have its schedule changed |
expires | 1 | Flag that determines whether the module expires or not (0 = false, 1 = true) |
expiration_period | 1 | The number of (days/weeks/months) for expiry |
expiration_period_type | D | Determines the expiry interval (D = Day, W = Week, M = Month, Y = Year) |
expiration_notify_status | 1 | Send out expiration notification emails (0 = false, 1 = true) |
show_expiration_on_certificate | 1 | Show expiration date on module certificate (0 = false, 1 = true) |
valid_period_type | 1 | How valid period is calculated relative to expiry date (0 = on expiry date, 1 = last day of expiry calendar month, 2 = first day of month following expiry, 3 = relative custom date) |
valid_period_length | The number of (days/weeks/months) for validity (Only used when valid_period_type = 3) | |
valid_period_interval | Determines the validity interval (D = Day, W = Week, M = Month, Y = Year) (Only used when valid_period_type = 3) | |
valid_period_after | 1 | Whether to calculate validity before or after relative to expiry date (0 = before, 1 = after) (Only used when valid_period_type = 3) |
auto_assign_courseID | 54531 | The module id to assign when this module is about to expire and re-assign a new module in its place (Even if that’s the same module id) |
auto_assign_date_period | 1 | The number of (days/weeks/months) for auto assignment |
auto_assign_date_type | W | Determines the auto assignment interval (D = Day, W = Week, M = Month, Y = Year) |
assignment_notify_student | 1 | Notify the student on auto assignment (0 = false, 1 = true) |
assignment_notify_manager | 1 | Notify the manager on auto assignment (0 = false, 1 = true) |
assignment_notify_registrar | 1 | Notify the registrar on auto assignment (0 = false, 1 = true) |
assignment_notify_custom | , | Notify custom email addresses on auto assignment (comma separated list) |
recurrent_type | 1 | Determines how newly assigned module’s due date is calculated (0 = relative date from expiry, 1 = last day of expiry month) |
auto_assign_due_date_period | 1 | The number of (days/weeks/months) for due date calculation (Only used when recurrent_type = 0) |
auto_assign_due_date_type | D | Determines the due date interval (D = Day, W = Week, M = Month, Y = Year) (Only used when recurrent_type = 0) |
auto_assign_due_date_period_type | 1 | Whether to calculate due date before or after relative to expiry date (0 = before, 1 = after) (Only used when recurrent_type = 0) |
auto_assign_retain_month | 1 | Retains the expiry date if student finishes it within the validity period |
notifyArDueDate | 1 | Notify student when newly auto assigned module is becoming due |
OAuth 4
This section pertains to the methods used for registering and authorizing your application as an OAuth client.
Query
Key | Value | Description |
---|---|---|
client_id | {{client_id}} | OAuth client id |
redirect_uri | {{redirect_uri}} | Redirect url used for registering |
Refresh Token | POST {{url}}/oauth/token
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
grant_type | refresh_token | Should always be “refresh_token” |
refresh_token | {{refresh_token}} | The refresh token you received when your system was approved for access |
client_id | {{client_id}} | Your client id |
client_secret | {{client_secret}} | Your client secret |
Body
Key | Value | Description |
---|---|---|
apiId | {{apiId}} | API id generated within Ascent, shared by admin user |
companyName | Mr Nuts | Your company’s name. Will be shown to admin user when authorizing access |
applicationName | Testey checker | Your company’s application name. Will be shown to admin user when authorizing access |
redirect_uri | http://dev.aerostudies.com/utilities/cb2 | Your URI for receiving OAuth and other API calls |
callbackEnabled | true | Whether or not to receive callbacks from our system (true/false) |
Token | POST {{url}}/oauth/token
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
grant_type | authorization_code | This should always be “authorization_code” |
code | {{code}} | Code sent to your redirect_uri when admin user approves OAuth access |
client_id | {{client_id}} | Your client id |
client_secret | {{client_secret}} | Your client secret |
OLTE 8
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userID | {{userID}} | User id to assign olte to |
courseNameID | 2853 | Olte id to assign |
expires | 1 | Sets whether this olte expires or not (0 = false, 1 = true) |
files[] | Document specific to this olte assignment | |
files[] | Document specific to this olte assignment |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
course_name | First Aid 2020 | Olte name |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
courseNameID | 2853 | Olte id to delete |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userID | {{userID}} | User id to list assigned olte’s for |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
courseNameID | 2853 | Olte id to update |
course_name | First Aid 2021 | Olte name |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userID | {{userID}} | User id to assign olte to |
courseID | 43822 | The olte assignment id |
notes | added notes | Any notes that may be relevant to this assignment |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
courseID | 43822 | Olte assignment id to withdraw |
System Callbacks 7
The system callbacks are all designed to hit an endpoint that you have configured to receive API events from our application.
Whenever a captured event happens within our application, it will trigger our API to send off a request to the “callbackUri” you initially registered when setting up the OAuth access. Every event will hit that URL, and will be structured in the following way universally at a minimum level:
{
"Action": {
"type": "someType",
"method": "anAction"
},
"Data": {
// Data is structured depending on the event
}
}
The Action object is internally used as an organizational hierarchy, where the type dictates the general “area” or controller, and the method is the specific event within that area. As an example, for “Training” (action type), there are different individual events such as “assigned” or “updated” where each of these events is a method and will dictate how/when you update or respond to data in your app.
Callbacks are initiated through both user actions and when API calls modify data.
Note: The example responses provided below are shown so that you can visualize the data and associated data structures that will be sent.
Tokens 3
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
Student | 5 | Number of student roles requested |
Training Developer | 0 | Number of training developer roles requested |
Safety Manager | 0 | Number of safety manager roles requested |
Registrar | 0 | Number of registrar roles requested. Note: Registrar is admin and requests for a large number of these tokens will likely be rejected |
Manager | 0 | Number of manager roles requested |
Instructor | 0 | Number of instructor roles requested |
Coach | 0 | Number of coach roles requested |
Communications | 0 | Number of communications roles requested |
Demo Module | 0 | Number of demo modules requested |
Module | 10 | Number of module tokens requested |
poNumber | 1234 | A PO number (If applicable). (Limit: 128 characters) |
comments | Refer to INV # 58372 | Any applicable comments you wish to add to the token order request. (Limit: 255 characters) |
Training 10
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | 18924 | User id to archive training for |
archives[0][courseID] | 26438 | Module id to archive |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | 26331 | User id to assign training to |
assignments[0][courseID] | 24631 | Module id to assign |
assignments[0][due_date] | 2020-05-06 | Date when this module is due |
assignments[0][course_available_date] | 2020-04-05 | Date when this module is available to start (Will not show up in training until this date) |
assignments[0][send_due_date_reminder] | 1 | Send a due date reminder email notification (0 = false, 1 = true) |
assignments[0][dueDateNotification][student][notify] | 1 | Send student the due date reminder notification (0 = false, 1 = true) |
assignments[0][dueDateNotification][student][period] | 10 | The number of (days/weeks/months) before due date to start sending notifications |
assignments[0][dueDateNotification][student][periodType] | W | Determines the reminder interval (D = Day, W = Week, M = Month, Y = Year) |
assignments[0][dueDateNotification][student][repeatDays] | 10 | Sets how often this reminder will repeat an email notification from its relative start date, in days (eg. every 10 days) |
assignments[0][onCompleteRedirectUri] | https://www.ourcompany.com/api/moduleComplete/userid=1234 | Redirect student to specified URL on completion |
assignments[0][customId] | module#1038586 | Set a custom id for this assignment (up to 2kb) |
assignments[0][customData] | {course: module#1038586, ourSystemUserId: asbasf-18365} | Set custom data (up to 4kb) for this assignment |
notificationOptions[notifyStudent] | 1 | Send student email notification of this training assignment (0 = false, 1 = true) |
assignments[1][courseID] | 26438 | Module id to assign |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
moduleId | 55384 | The module Id you want to generate exam certificates for |
userId | {{userID}} | The user id that is assigned the module |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
token | {{sampleToken}} | Express token |
access_token | {{access_token}} | OAuth access token |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | {{userID}} | User Id you want to get a module certificate for |
moduleId | 48393 | The training module Id |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
moduleId | 48393 | The training module Id |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | {{userID}} | User id you want to get training progress for |
moduleId | 25338 | Module id of the assignment you want to get progress for |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | 18924 | User id to update training for |
assignments[0][courseID] | 24631 | Module id to update |
assignments[0][due_date] | 2020-05-09 | Date when this module is due |
assignments[0][course_available_date] | 2020-04-05 | Date when this module is available to start (Will not show up in training until this date) |
assignments[0][send_due_date_reminder] | 1 | Send a due date reminder email notification (0 = false, 1 = true) |
assignments[0][dueDateNotification][student][notify] | 0 | Send student the due date reminder notification (0 = false, 1 = true) |
assignments[0][dueDateNotification][student][period] | 20 | The number of (days/weeks/months) before due date to start sending notifications |
assignments[0][dueDateNotification][student][periodType] | D | Determines the reminder interval (D = Day, W = Week, M = Month, Y = Year) |
assignments[0][dueDateNotification][student][repeatDays] | 10 | Sets how often this reminder will repeat an email notification from its relative start date, in days (eg. every 10 days) |
assignments[1][courseID] | 26438 | Module id to update |
assignments[1][due_date] | 2020-02-20 | Date when this module is due |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | {{userID}} | User id to withdraw module from |
withdraws[0][courseID] | 24631 | Module id to withdraw |
Users 12
Archive User | POST {{apiUrl}}/users/archive
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | 78312 | User Id to archive |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | 78312 | User Id to assign groups to |
Groups[0] | 1046 | Group id to assign |
Groups[1] | 1048 | Group id to assign |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | 78312 | User Id to asign roles to |
Roles[0] | student | Role to assign as string |
Roles[1] | training developer | Role to assign as string |
Create User | POST {{apiUrl}}/users/create
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
User[email] | Email address | |
User[ref_lib_access] | 1 | Allow user to access reference library (0 = false, 1 = true) |
User[media_lib_access] | 1 | Allow user to access media library (0 = false, 1 = true) |
User[badgeID] | badge | Secondary Bagde ID. Used for tracking staff by company ID |
User[suspend] | 0 | Toggles whether a user is suspended or not (0 = false, 1 = true) |
User[suspendNotifications] | 0 | Suspend notifications to a suspended user (0 = false, 1 = true) |
User[suspendReason] | Reason for a suspension (optional) | |
User[shareCalendar] | 0 | Allows a user to access their calendar publicly. Useful for syncing system calendar events to a mobile phone (0 = false, 1 = true) |
User[adminManager] | 0 | If user has manager role, allow them to administer users with restricted priveleges |
User[customId] | 24459 | Custom Id field you can use to track a user instead of using our system generated id |
User[customData] | Custom data you can set, up to 4kb in text format (Can put JSON/XML here, or whatever is useful to you) | |
User[password] | 7509246aB | Password |
UserProfile[first_name] | John | First Name |
UserProfile[last_name] | Smith | Last Name |
Delete User | POST {{apiUrl}}/users/delete
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | 78312 | User id to delete |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | 38576 | User Id we want to generate an OTP for |
redirect | http://dev.aerostudies.com?cat=meow&dog=ruff | A url to redirect to after successful sign in using OTP |
sendUserIdOnRedirect | true | Set to “true” if you would like the system to append a “systemUserId” query parameter to your redirect url. It will contain the user ID of the signed in user |
onErrorRedirectUrl | http://dev.aerostudies.com/oops | A url to redirect to if using the OTP failed in case of timeout, already used, locked out, expired, or system error. Will have an “errorMsg” query parameter added with the specific error message |
Get User | POST {{apiUrl}}/users/get
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | 78312 | User Id we want to retrieve information about |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
Suspend | POST {{apiUrl}}/users/suspend
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | 78312 | User Id we want to suspend |
suspend | 1 | Flag to set whether user is suspended or not (0 = false, 1 = true) |
suspendReason | cheerios | The reason for the suspension (Eg. Maternity leave, seasonal, etc). |
suspendNotifications | 0 | Whether or not to suspend email notifications while user is suspended (0 = false, 1 = true) |
Update User | POST {{apiUrl}}/users/update
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
User[email] | Email address | |
User[username] | jsmithiscool | Username |
User[ref_lib_access] | 1 | Allow user to access reference library (0 = false, 1 = true) |
User[media_lib_access] | 1 | Allow user to access media library (0 = false, 1 = true) |
User[badgeID] | 128453 | Secondary Bagde ID. Used for tracking staff by company ID |
User[suspend] | 0 | Toggles whether a user is suspended or not (0 = false, 1 = true) |
User[suspendNotifications] | 0 | Suspend notifications to a suspended user (0 = false, 1 = true) |
User[suspendReason] | Reason for a suspension (optional) | |
User[shareCalendar] | 0 | Allows a user to access their calendar publicly. Useful for syncing system calendar events to a mobile phone (0 = false, 1 = true) |
User[adminManager] | 0 | If user has manager role, allow them to administer users with restricted priveleges |
User[customId] | Custom Id field you can use to track a user instead of using our system generated id | |
User[customData] | Custom data you can set, up to 4kb in text format (Can put JSON/XML here, or whatever is useful to you) | |
User[userID] | 78312 | System generated unique user id |
UserProfile[first_name] | John | First Name |
UserProfile[last_name] | Smith | Last Name |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | 78312 | User id to withdraw groups from |
Groups[0] | 1048 | Group id to withdraw |
Groups[1] | 1046 | Group id to withdraw |
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
Body
Key | Value | Description |
---|---|---|
access_token | {{access_token}} | OAuth access token |
userId | 78312 | User id to withdraw roles from |
Roles[0] | student | Role as string to withdraw from user |
Roles[1] | training developer | Role as string to withdraw from user |