Courses & Curricula
The Learning APIs allow you to manage training content and student progression. Use these endpoints to retrieve details for courses and curricula, and to programmatically enroll students into specific learning paths.
What you'll learn:
- Retrieve course and curriculum metadata
- Enroll students programmatically
- Track enrollment status and completion
Use course.ashx for courses, curriculum.ashx for curricula, and add enrollment endpoints to manage student access.
- An authenticated session (
sid,sky,uid) — see Authentication
Course Details
Retrieve comprehensive metadata for specific courses. This includes passing requirements, duration, and associated presentation data.
Request
| Method | Endpoint | Description |
|---|---|---|
| GET | /brainshark/webservices_mobile/course.ashx | Retrieves detailed information for specific courses. |
Parameters
| Parameter | Type | Description |
|---|---|---|
sid, sky, uid | - | Standard session identifiers. |
cid | string | A single Course ID or a comma-separated list of IDs. If omitted, the API returns courses authored by the user associated with the uid. |
sortby | string | Sets the sort criteria for the returned list. Values: title, desc, id, author |
sortdir | string | Sets the sort direction. Values: asc, desc |
offset | integer | Number of results to skip. Use with perpage for pagination. |
perpage | integer | Maximum number of results to return per page. |
Q | string | Search query string to filter courses by title. |
Response Fields
| Field | Type | Description |
|---|---|---|
PassingScore | integer | The minimum score required to pass the course. |
RequiredAudioPercentage | integer | The percentage of audio that must be heard to complete the course. |
EnrollmentType | integer | Indicates if the course is Open (1) or Limited (2). |
ViewingUrl | string (uri) | The direct link to view the course content. |
Course Enrollment
Use this endpoint to retrieve a user's enrollment status or to enroll a student into a new course.
Request
| Method | Endpoint | Description |
|---|---|---|
| GET | /brainshark/webservices_mobile/courseenrollment.ashx | Manages student enrollments for courses. |
Parameters
| Parameter | Type | Description |
|---|---|---|
sid, sky, uid | - | Standard session identifiers. |
enroll | integer | Set to 1 to perform a new enrollment. |
enrolleeid | integer | Required for enrollment. The Brainshark User ID of the student being enrolled. |
courseid | integer | Required for enrollment. The ID of the course. |
cid | string | Filters results to enrollments for a specific Course ID. |
sortby | string | Sets the sort criteria. Values: title, id, date |
offset | integer | Number of results to skip. Use with perpage for pagination. |
perpage | integer | Maximum number of results to return per page. |
Q | string | Search query string to filter enrollments. |
Example request (Enroll Student)
- cURL
- JavaScript
- Python
curl -X GET "https://www.brainshark.com/brainshark/webservices_mobile/courseenrollment.ashx?enroll=1&enrolleeid=1162335&courseid=1898&sid=987654321&sky=x9y8z7w6v5u4t3s2r1q0&uid=2548390"
const params = new URLSearchParams({
enroll: 1,
enrolleeid: 1162335,
courseid: 1898,
sid: '987654321',
sky: 'x9y8z7w6v5u4t3s2r1q0',
uid: 2548390,
});
const response = await fetch(
`https://www.brainshark.com/brainshark/webservices_mobile/courseenrollment.ashx?${params}`
);
const data = await response.json();
console.log(data);
import requests
url = "https://www.brainshark.com/brainshark/webservices_mobile/courseenrollment.ashx"
params = {
"enroll": 1,
"enrolleeid": 1162335,
"courseid": 1898,
"sid": "987654321",
"sky": "x9y8z7w6v5u4t3s2r1q0",
"uid": 2548390
}
response = requests.get(url, params=params)
print(response.json())
Example response
{
"EnrollmentId": 98765432,
"CourseId": 1898,
"UserId": 1162335,
"EnrollmentDate": "27009360",
"Status": "Enrolled"
}
Curriculum Details
Retrieve structure and metadata for Brainshark curricula, which are collections of related courses.
Request
| Method | Endpoint | Description |
|---|---|---|
| GET | /brainshark/webservices_mobile/curriculum.ashx | Retrieves detailed data for specified curricula. |
Parameters
| Parameter | Type | Description |
|---|---|---|
sid, sky, uid | - | Standard session identifiers. |
cid | string | A single Curriculum ID or a comma-separated list of IDs. |
perpage | integer | Sets the number of results per page. Default: 10 |
sortby | string | Sets the sort criteria. Values: title, id |
sortdir | string | Sets the sort direction. Values: asc, desc |
offset | integer | Number of results to skip. Use with perpage for pagination. |
Response Example
{
"Results": [
{
"CurriculumId": 621978036,
"Title": "Onboarding Curriculum",
"Credits": 5,
"EnrollmentType": 1
}
],
"TotalRows": 1,
"Done": true
}
Curriculum Enrollment
Retrieve enrollment and completion data for a student's assigned curricula.
Request
| Method | Endpoint | Description |
|---|---|---|
| GET | /brainshark/webservices_mobile/curriculumenrollment.ashx | Returns status and progress data for curricula. |
Parameters
| Parameter | Type | Description |
|---|---|---|
sid, sky, uid | - | Standard session identifiers. |
sortby | string | Sets the sort criteria. Values: title, id |
offset | integer | Number of results to skip. Use with perpage for pagination. |
perpage | integer | Maximum number of results to return per page. |
Completion dates in the response are returned as minutes since January 1, 1970. See the date format warning in Reports for conversion examples.
Next steps
Need to analyze course completion data at scale? See the Learning Activity report example in Reports for how to query completion data with filters for specific folders, date ranges, and statuses.
Was this page helpful?