In MOTAR, a "lesson" is the individual education model that students interact with. A lesson can either be standalone or part of a course.
Read a Lesson
GEThttps://api.motar.io/edu/v1/lesson
Retrieves a single lesson by ID.
Query Parameters
Name
Type
Description
lessonId
string
The ID of the requested lesson.
Headers
Name
Type
Description
Authorization
string
Auth token generated by user login.
{"lessonId": "ac5f1ba630fe00c39a1c938a22e80a8ba402e1e98b67597a7d4b66a670c510075639ebca09d275cd700f615f956512718ad53c561bb1ec697c5896386c31a850aafc865c1352981453e1d0e45a5ccbba13$0992712e1be6dfe76c4b32368531c523","courseId": "ac5f1ba630fe00c39a1c938a22e80a8ba402e1e98b6758297d4b66a670c510075639ebca09d275cd700f615f956512718ad53c561bb1ec697c5896386c31a850aafc865c1352981453e1d0e45a5ccbba13$0992712e1be6dfe76c4b32368531c523","name": "Test Lesson","description": "A test lesson","profilePic": "5dc48016a104378253bb1afe","coverPhoto": "5dc48016a104378253bb1aff","media": "http://www.google.com","isAssessment": false,"expectedCompletionTime": 120,"instructorGraded": false,"childLessons": [],"public": true,"launchParameters": ["extLessonId=sp101"],"locked": false}
Lists Lessons in a Course
GEThttps://api.motar.io/edu/v1/lesson/course
Lists all lessons belonging to a course.
Query Parameters
Name
Type
Description
courseId
string
ID of the course.
limit
number
Page size.
page
number
Results page to return.
Headers
Name
Type
Description
Authorization
string
Auth token generated by user login.
{"docs": [ {"lessonId":"ac5f1ba630fe00c29a1c938a22e80a8ba402e1e98b675c7c7d4b66a670c51007566eed9855d125cb270a6b5e963e447688da39561ab4bd3d200c903e3b67fb00afa8dd5a10569c490ab387b75f04c9b217$0992712e1be6dfe76c4b32368531c523","courseId":"ac5f1ba630fe00c29a1c938a22e80a8ba402e1e98b675c787d4b66a670c51007566eed9855d125cb270a6b5e963e447688da39561ab4bd3d200c903e3b67fb00afa8dd5a10569c490ab387b75f04c9b217$0992712e1be6dfe76c4b32368531c523","name":"Test Lesson","description":"A test lesson","profilePic":"5dc48017a104378253bb1b34","coverPhoto":"5dc48017a104378253bb1b35","media":"http://www.google.com","expectedCompletionTime":120,"instructorGraded":false,"childLessons": [],"public":true,"launchParameters": ["extLessonId=sp101"],"locked":false }, {"lessonId":"ac5f1ba630fe00c29a1c938a22e80a8ba402e1e98b675c7d7d4b66a670c51007566eed9855d125cb270a6b5e963e447688da39561ab4bd3d200c903e3b67fb00afa8dd5a10569c490ab387b75f04c9b217$0992712e1be6dfe76c4b32368531c523","courseId":"ac5f1ba630fe00c29a1c938a22e80a8ba402e1e98b675c787d4b66a670c51007566eed9855d125cb270a6b5e963e447688da39561ab4bd3d200c903e3b67fb00afa8dd5a10569c490ab387b75f04c9b217$0992712e1be6dfe76c4b32368531c523","name":"Another Test Lesson","description":"Another test lesson","profilePic":"5dc48017a104378253bb1b34","coverPhoto":"5dc48017a104378253bb1b35","media":"5dc48017a104378253bb1b5c","expectedCompletionTime":240,"instructorGraded":true,"childLessons": [],"public":true,,"launchParameters": ["extLessonId=sp102"],"locked":false } ],"total": 2,"limit": 10,"page": 1,"pages": 1}
Read App Lessons
GEThttps://api.motar.io/edu/v1/lesson/app
Returns all lessons that belong to the app the user is currently logged into, filtered by a provided class.
Query Parameters
Name
Type
Description
classId
string
Class to which the requested lessons are assigned.
Headers
Name
Type
Description
Authorization
string
Auth token generated by user login.
[ {"lessonId":"43c82706de8d3391a1c1e4cd2a1b9660176fdc9afd3d18103be3befb57b913328d4005f800f0696db8e2b35523b37bebef1ac0c36bc7a96ace56922583ec0b999149b234db0aad5253e7ee31cb777c426f$f6a8b1e4ff02ca6332582dc16ece8ad2","courseId":"43c82706de8d3391a1c1e4cd2a1b9660176fdc9afd3d18173be3befb57b913328d4005f800f0696db8e2b35523b37bebef1ac0c36bc7a96ace56922583ec0b999149b234db0aad5253e7ee31cb777c426f$f6a8b1e4ff02ca6332582dc16ece8ad2","name":"Another Test Lesson","description":"Another test lesson","profilePic":"5dc47fbf0145ce8246b2a4b3","coverPhoto":"5dc47fbf0145ce8246b2a4b4","media":"5dc47fbf0145ce8246b2a4db","expectedCompletionTime":240,"instructorGraded":true,"childLessons": [],"public":true,"launchParameters": ["extLessonId=sp102"],"locked":true } ]
Read Student's Progress
GEThttps://api.motar.io/edu/v1/lesson/progress
Returns the current (or latest) progress for the specified lesson either for the logged in user or a specified user.
Query Parameters
Name
Type
Description
classId
string
Lesson progress is tracked on a class-by-class basis. This parameter is the ID of the student's class for which you would like to retrieve progress in this lesson for.
Returns the all attempts for the specified lesson either for the logged in user or a specified user.
Query Parameters
Name
Type
Description
classId
string
Lesson progress is tracked on a class-by-class basis. This parameter is the ID of the student's class for which you would like to retrieve progress in this lesson for.
Checks whether or not the specified lesson is currently locked or unlocked.
Query Parameters
Name
Type
Description
classId
string
Lesson progress is tracked on a class-by-class basis. This parameter is the ID of the student's class for which you would like to retrieve progress in this lesson for.
Indicates a student has started taking a lesson, updating the "start" date in the lesson's progress. If the user has previous started the lesson but not completed it, this method with throw an error.
Note that all query parameters in this request can optionally be included in the POST body rather than the query if so desired. Body parameters must be in the body, they cannot be included in the query string.
Query Parameters
Name
Type
Description
classId
string
Lesson progress is tracked on a class-by-class basis. This parameter is the ID of the student's class for which you would like to update progress.
Indicates that a student has paused progress on a lesson.
Query Parameters
Name
Type
Description
lessonId
string
ID of the lesson.
classId
string
Lesson progress is tracked on a class-by-class basis. This parameter is the ID of the student's class for which you would like to update the student's progress.
Indicates that a student has resumed progress on a paused lesson.
Query Parameters
Name
Type
Description
lessonId
string
ID of the lesson.
classId
string
Lesson progress is tracked on a class-by-class basis. This parameter is the ID of the student's class for which you would like to update the student's progress.
Indicates that a student has become idle during lesson progress.
Query Parameters
Name
Type
Description
lessonId
string
ID of the lesson.
classId
string
Lesson progress is tracked on a class-by-class basis. This parameter is the ID of the student's class for which you would like to update the student's progress.
Lesson progress is tracked on a class-by-class basis. This parameter is the ID of the student's class for which you would like to update the student's progress.
Updates a student's progress for a lesson in a class with a score, answers, and a pass/fail result.
Note that all query parameters in this request can optionally be included in the POST body rather than the query if so desired. Body parameters must be in the body, they cannot be included in the query string.
Query Parameters
Name
Type
Description
classId
string
Lesson progress is tracked on a class-by-class basis. This parameter is the ID of the student's class for which you would like to retrieve progress in this lesson for.
lessonId
string
ID of the lesson.
Headers
Name
Type
Description
Authorization
string
Auth token generated by user login.
Request Body
Name
Type
Description
startTime
string
A parseable date to mark the start of the student's session. Suggested format is ISO date, eg. 2020-01-07T21:45:35.649Z.
endTime
string
A parseable date to mark the end of the student's session. Suggested format is ISO date, eg. 2020-01-07T21:45:35.649Z.
complete
boolean
If true, the lesson's "complete" attribute will be set to the current date/time, indicating the student has finished the lesson.
score
number
A numeric score for the lesson. If using Point-based scoring, send in the number correct, eg. Point-based score pass = 40/50, then 'score' is a number 0-50. Not required for Pass/Fail scored lessons.
There are two types of scoring for lessons: Pass/Fail and Point-based Score.
Point-based Score lessons: To show PASS on the dashboard, it needs to have the lesson set to complete, a passing score, AND have pass=true. To show FAIL, it needs to be complete, pass=false, and have a score reported lower than the threshold.
Pass/Fail lessons: To show PASS on the dashboard, it needs to have the lesson set to complete AND pass=true. To show FAIL, it needs to be complete and have pass=false.
Updates a student's objective score for a lesson, if the objective score is different than the student's overall lesson score.
Note that a student must have a lesson attempt started (or completed) before objective scores can be recorded for any objectives linked to that lesson.
This endpoint can be used by instructors or students. If used by an instructor, you must include a studentId parameter and the instructor must be assigned to the class in question. You may omit the classId parameter in this case.
Query Parameters
Name
Type
Description
classId
string
Lesson progress is tracked on a class-by-class basis. This parameter is the ID of the student's class for which you would like to retrieve progress in this lesson for. If the reporting user is the student, this parameter is required.
lessonId*
string
ID of the lesson.
studentId
string
The ID of the student whose progress is being reported. If the reporting user is an instructor, this parameter is required.