Important Notice: Click here to find out more information regarding the impacts of COVID-19.

Get Started.

This tutorial shows you how to request training data, register for a ValeLearning API access token, then use the token to query the API for a user’s profile or a full course export. When you complete the tutorial you will have a basic understanding of how to perform basic queries with the API.

Before you start Register with L&D Verifying your account Getting a user training profile Getting a course export CSV exports Request Limits Course reference list

Before you start

You will need:

Register with L&D

Before your Client ID and Access Tokens are issued, we need to verify the legitimacy of your application. Please fill out the following form to request a developer account. Developer accounts contain your unique Client ID and Access Tokens.

Verifying your account credentials

Before you can query the API, you need to verify your account. Start by constructing an authorization window URL below, replacing {CLIENT_ID} with your Client ID and {ACCESS_TOKEN} with your Client Access Token.

https://api.valelearning.ca/auth?
client_id={CLIENT_ID}
&client_secret={ACCESS_TOKEN}
&scope=validate_token
&response_type=json

If the credentials inputted above are valid, you will recieve the following JSONP response. Once recieved, you can start to perform basic queries with the API.

{"Success":"Account Validated. Your CLIENT_ID and ACCESS_TOKEN are valid."}

Basic API Queries.

Getting a user training profile

You can query the API to recieve a users full profile in a JSONP response. Start by constructing an authorization window URL below. In addition to your account credentials, you will need to replace {ID} with the users Vale Identification. Vale ID's come in many shapes and sizes such as:

Since responses are formatted in JSONP, all queries require a callback. We suggest that you always make callbacks unique, preventing information from being cached by your device. Replace {CALL} with your unique numerical callback.

https://api.valelearning.ca/auth?
client_id={CLIENT_ID}
&client_secret={ACCESS_TOKEN}
&scope=user_profile
&value={ID}
&response_type=json
&callback={CALL}

If the user exists, their profile will be exported in a JSON response with your callback superseding the object. In the example below, our callback was 123.

123 ({
"id": 12345,
"FirstName": "Sheev",
"LastName": "Palpatine",
"ValeID": "54321",
"Type": "N",
"RecordUpdated": "2020-05-07",
...
})

The ValeLearning.ca database contains thousands of contractor and employee records. Each course is identified by a unique ID number. A full course reference list of Course ID numbers can be found at the bottom of this tutorial. To understand the JSON stucture better, we have included Course ID 57 (Long Harbour: Permit User for Contractors Orientation) as an example below.

123 ({
"id": 12345,
"FirstName": "Sheev",
"LastName": "Palpatine",
"ValeID": "54321",
"Type": "N",
"RecordUpdated": "2020-05-07",
"ID57": "PASS",
"ID57-CompletedDate": "2020-01-02",
"ID57-ExpiryDate": "2022-01-01",
"ID57-Attempts": "0",
"ID57-Progression": null,
...
})

The list below showcases the values of the JSON response above. If a course is not completed, these values will be set to NULL

Getting a course export

You can query the API to recieve course completions in a JSONP response. Start by constructing an authorization window URL below. In addition to your account credentials, you will need to replace {Course} with your desired course ID. You can find the full course reference list below in this tutorial.

Since responses are formatted in JSONP, all queries require a callback. We suggest that you always make callbacks unique, preventing information from being cached by your device. Replace {CALL} with your unique numerical callback.

https://api.valelearning.ca/auth?
client_id={CLIENT_ID}
&client_secret={ACCESS_TOKEN}
&scope=course_export
&value={Course}
&response_type=json
&callback={CALL}

If the course ID is valid, you will get the similar JSON response to the one below. Course exports showcase the most recent completions in the JSON object. In the example below, our callback was 123.

123 ([{
"id": 123456,
"RecordUpdated": "2020-03-30",
"FirstName": "Luke",
"LastName": "Skywalker",
"ValeID": "654321",
"CourseID": "57",
"CourseStatus": "PASS",
"CourseCompleted": "2020-11-21",
"CourseExpiry": "2022-11-21"
}, {
"id": 1234567,
"RecordUpdated": "2020-03-30",
"FirstName": "Han",
"LastName": "Solo",
"ValeID": "7654321",
"CourseID": "57",
"CourseStatus": "PASS",
"CourseCompleted": "2020-10-01",
"CourseExpiry": "2022-10-01"
},
... ])

The list below showcases the values of the JSON response above.

CSV exports

If your application does not require JSONP, you can request the data in a downloadable CSV format for use in Microsoft Excel or simular applications.

A list of supported CSV export scopes are:

To request the CSV export, change the {Type} object to equal "csv" like in the Course Export example below.

https://api.valelearning.ca/auth?
client_id={CLIENT_ID}
&client_secret={ACCESS_TOKEN}
&scope=course_export
&value={Course}
&response_type={Type}
&callback={CALL}

Request Limits

The ValeLearning API has query limits in place to gaurantee data flow accross all Vale operations.

A list of system limits are:

If you need these limits increased, please contact the system administrator.

Training Index.

Course reference list

Below is the full course offerings from ValeLearning.ca. If a new course is added, it will be recorded below. Course selections that are not currently within the ValeLearning.ca training umbrella are listed as depreciated. Users may contain records associated with these courses due to them completing modules before their removal from our selection of course offerings.

Administrator Login Designed by ota.studio
By using our site, you acknowledge that you have read and understand our Terms of Use and User Policy statements.