Skip to main content
||

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
TL;DR

Use course.ashx for courses, curriculum.ashx for curricula, and add enrollment endpoints to manage student access.

Prerequisites

Course Details​

Retrieve comprehensive metadata for specific courses. This includes passing requirements, duration, and associated presentation data.

Request​

MethodEndpointDescription
GET/brainshark/webservices_mobile/course.ashxRetrieves detailed information for specific courses.

Parameters​

ParameterTypeDescription
sid, sky, uid-Standard session identifiers.
cidstringA single Course ID or a comma-separated list of IDs. If omitted, the API returns courses authored by the user associated with the uid.
sortbystringSets the sort criteria for the returned list. Values: title, desc, id, author
sortdirstringSets the sort direction. Values: asc, desc
offsetintegerNumber of results to skip. Use with perpage for pagination.
perpageintegerMaximum number of results to return per page.
QstringSearch query string to filter courses by title.

Response Fields​

FieldTypeDescription
PassingScoreintegerThe minimum score required to pass the course.
RequiredAudioPercentageintegerThe percentage of audio that must be heard to complete the course.
EnrollmentTypeintegerIndicates if the course is Open (1) or Limited (2).
ViewingUrlstring (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​

MethodEndpointDescription
GET/brainshark/webservices_mobile/courseenrollment.ashxManages student enrollments for courses.

Parameters​

ParameterTypeDescription
sid, sky, uid-Standard session identifiers.
enrollintegerSet to 1 to perform a new enrollment.
enrolleeidintegerRequired for enrollment. The Brainshark User ID of the student being enrolled.
courseidintegerRequired for enrollment. The ID of the course.
cidstringFilters results to enrollments for a specific Course ID.
sortbystringSets the sort criteria. Values: title, id, date
offsetintegerNumber of results to skip. Use with perpage for pagination.
perpageintegerMaximum number of results to return per page.
QstringSearch query string to filter enrollments.

Example request (Enroll Student)​

curl -X GET "https://www.brainshark.com/brainshark/webservices_mobile/courseenrollment.ashx?enroll=1&enrolleeid=1162335&courseid=1898&sid=987654321&sky=x9y8z7w6v5u4t3s2r1q0&uid=2548390"

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​

MethodEndpointDescription
GET/brainshark/webservices_mobile/curriculum.ashxRetrieves detailed data for specified curricula.

Parameters​

ParameterTypeDescription
sid, sky, uid-Standard session identifiers.
cidstringA single Curriculum ID or a comma-separated list of IDs.
perpageintegerSets the number of results per page. Default: 10
sortbystringSets the sort criteria. Values: title, id
sortdirstringSets the sort direction. Values: asc, desc
offsetintegerNumber 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​

MethodEndpointDescription
GET/brainshark/webservices_mobile/curriculumenrollment.ashxReturns status and progress data for curricula.

Parameters​

ParameterTypeDescription
sid, sky, uid-Standard session identifiers.
sortbystringSets the sort criteria. Values: title, id
offsetintegerNumber of results to skip. Use with perpage for pagination.
perpageintegerMaximum number of results to return per page.
note

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?