Learner - Courses API

WARNING: The index API has been deprecated in favor of the Learner - Learning Items controller.

This API controls learner interaction with courses and live courses.

Interfaces

Object Synopses

LearnerCourseResponse

  • id Integer

    The course id

  • is_enrolled Boolean

    Enrollment status of learner in this course.

  • progress Integer

    Current slide number.

  • slide_total Integer

    Total number of slides.

  • time_remaining Integer

    Estimated time to finish course in minutes.

  • location String

    Location of live training. Null for all other types of courses.

  • sessions_count Integer

    Number of future sessions offered for live training course. Null for other types of courses

  • next_session_start_at DateTime

    Date and time of next scheduled live training session. Null for other course types.

  • deleted_at DateTime

    Date and time at which course was deleted. Null if not deleted.

  • program_title String

    Program through which learner is enrolled in course. Null if learner is not enrolled through a program.

  • index_of_program Integer

    Position of this course within the program. Null if not enrolled though a program.

  • program_course_count Integer

    Total number of courses in program. Null if not enrolled through a program.

  • open_book Boolean

    Indicates if learners can navigate the course during quizzes.

  • completed_at DateTime

    Date and time when course was completed. Null if not completed.

  • end_at DateTime

    Date and time by which this course is due. Null if no due date was assigned.

  • estimated_time Integer

    Estimated length of course in minutes.

  • passing_threshold Integer

    Required score (out of 100) to pass.

  • required Boolean

    Indicates if course is required or optional.

  • score Integer

    Learners score (out of 100) in this course. Null for live trainings.

  • state String

    State of enrollment in course.

  • title String

    Course title.

  • has_certificate Boolean

    Indicates if course issues certificate when successfully completed.

  • course_type String

    Indicates course type. May be native bridge, SCORM, or live training.

  • attachments_count Integer

    Indicates the number of attachments the course has.

List courses

GET /api/learner/courses

Lists all courses in which the current learner is enrolled.

Response Codes

  • 200 OK

Example Response

{
  "courses": [
    "{API::LearnerCourseResponse}"
  ],
  "meta": {}
}

Course preview

GET /api/learner/courses/:id/preview

Returns course information for previewing

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Course id.

Example Response

{
  "courses": [
    "{API::LearnerCourseResponse}"
  ],
  "meta": {}
}

Show course

GET /api/learner/courses/:id

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. A course id.

Example Response

{
  "courses": [
    "{API::LearnerCourseResponse}"
  ],
  "meta": {}
}

Complete Course

POST /api/learner/courses/:id/complete

A POST action for completing current_enrollment’s current attempt.

Response Codes

  • 200 OK
  • 401 Unauthorized

Parameters

  • id Integer Required

    Path parameter. Enrollment id.

Example Response

{
  "linked": {},
  "courses": [
    "{API::LearnerCourseResponse}"
  ],
  "meta": {}
}

Leave a Course

DELETE /api/learner/courses/:id

Learner may only leave optional courses.

Response Codes

  • 204 No Content

Parameters

  • id Integer Required

    Path parameter. Enrollment id.

Launch Url

GET|POST /api/learner/courses/:course_id/launch_url

Used to get the url to launch an external course.

Response Codes

  • 200 OK

Parameters

  • id Integer Required

    Path parameter. Enrollment id.

Example Response

{
  "url": "http://rebellion.bridgeapp.com/api/learner/courses/83/slides/current"
}

Mobile Scorm Launch Url

GET /api/learner/courses/:course_id/mobile_scorm_launch_url

Used to redirect mobile app directly to scorm course

Response Codes

  • 302 Found
  • 400 Bad Request

Parameters

  • id Integer Required

    Path parameter. Enrollment id.

External course info

GET /api/learner/courses/:id/external_info

Returns with all the external information for the course.

Response Codes

  • 400 Bad Request
  • 404 Not Found

Parameters

  • id Integer Required

    Path parameter. Enrollment id.