Read a Lesson
GET
https://api.motar.io/edu/v1/lesson
Retrieves a single lesson by ID.
Query Parameters
200 Returns the course.
Copy {
"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
GET
https://api.motar.io/edu/v1/lesson/course
Lists all lessons belonging to a course.
Query Parameters
200 List of lessons belonging to the specified course.
Copy {
"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
GET
https://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
200 List of lessons belonging to this app and class.
Copy [ {"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
GET
https://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
200 Lesson progress is returned. This is an example of an in-progress lesson. If the student has completed the lesson and the scores have been updated, you will see a data in the "completed" attribute.
Note that lesson progress defaults to pass: false. 404 The API will return a 404 if the user has not started the lesson yet.
Copy { "studentId": "793278a6e6449530a8c46cf98463945965212801cf38051a8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonResultId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585b",
"pass" : false ,
"score" : null ,
"answers" : null ,
"started" : "2019-11-07T16:45:34.273Z" ,
"completed" : null ,
"progressIntervals" : [{ "start" : "2019-11-07T16:45:34.273Z" , "end" : null }] ,
"idleIntervals" : [] }
Copy { error_code : 4042 ,
error_description : "User has not started that lesson yet." }
Read Student's Progress History
GET
https://api.motar.io/edu/v1/lesson/progress/history
Returns the all attempts for the specified lesson either for the logged in user or a specified user.
Query Parameters
200 Returns a list of the user's attempts at this lesson for this class.
Note that the "answers" object structure is arbitrary and is set by the API user. See "Update Student's Progress" below.
Copy [{ "studentId": "793278a6e6449530a8c46cf98463945965212801cf38051a8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonResultId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585b",
"pass" : false ,
"score" : null ,
"answers" : null ,
"started" : "2019-11-07T16:45:34.273Z" ,
"completed" : null ,
"progressIntervals" : [
{ "start" : "2019-11-07T16:45:34.273Z" , "end" : null }
] ,
"idleIntervals" : [] } ,
{ "studentId": "793278a6e6449530a8c46cf98463945965212801cf38051a8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonResultId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585c",
"pass" : false ,
"score" : 0 ,
"answers" : [{ "question" : "What is Batman's secret identity?" , "studentAnswer" : "Clark Kent" }] ,
"started" : "2019-11-06T12:21:54.185Z" ,
"completed" : "2019-11-06T17:42:32.221Z" ,
"progressIntervals" : [
{ "start" : "2019-11-07T16:45:34.273Z" , "end" : "2019-11-07T16:45:39.146Z" } ,
{ "start" : "2019-11-07T16:55:42.287Z" , "end" : "2019-11-06T17:42:32.221Z" }
] ,
"idleIntervals" : [
{ "start" : "2019-11-07T17:01:11.107Z" , "end" : "2019-11-07T17:12:32.091Z" }
]
}]
Read Lesson's Lock Status
GET
https://api.motar.io/edu/v1/lesson/progress/lock
Checks whether or not the specified lesson is currently locked or unlocked.
Query Parameters
200 List of lessons for that student and their lock status.
Copy [{
"lessonId" : "" ,
"locked" : false ,
"childLessons" : []
} , {
"lessonId" : "" ,
"locked" : false ,
"childLessons" : [{
"lessonId" : "" ,
"locked" : false
} , {
"lessonId" : "" ,
"locked" : true
}]
} , {
"lessonId" : "" ,
"locked" : true ,
"childLessons" : []
}]
Start a Lesson
POST
https://api.motar.io/edu/v1/lesson/progress/start
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
200 Indicates the user has started the lesson, with a "started" attribute indicating when the API recorded the start event. 409 Returned when the user has already started this lesson but not completed it.
Copy { "studentId": "793278a6e6449530a8c46cf98463945965212801cf38051a8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonResultId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585b",
"pass" : false ,
"score" : null ,
"answers" : null ,
"started" : "2019-11-07T16:45:34.273Z" ,
"completed" : null ,
"progressIntervals" : [{ "start" : "2019-11-07T16:45:34.273Z" , "end" : null }] ,
"idleIntervals" : [] }
Copy { "error_code" : 4091 ,
"error_description": "User has already started that lesson. Please complete previous lesson session before starting a new one." }
Pause a Lesson
POST
https://api.motar.io/edu/v1/lesson/progress/pause
Indicates that a student has paused progress on a lesson.
Query Parameters
200 Indicates that the student's progress is temporarily paused. The "progressIntervals" attribute will be updated with the previous start time and an end time of the current time.
Copy { "studentId": "793278a6e6449530a8c46cf98463945965212801cf38051a8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonResultId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585b",
"pass" : false ,
"score" : null ,
"answers" : null ,
"started" : "2019-11-07T16:45:34.273Z" ,
"completed" : null ,
"progressIntervals" : [
{ "start" : "2019-11-07T16:45:34.273Z" , "end" : "2019-11-07T16:45:39.146Z" }
] ,
"idleIntervals" : [] }
Resume a Lesson
POST
https://api.motar.io/edu/v1/lesson/progress/resume
Indicates that a student has resumed progress on a paused lesson.
Query Parameters
200
Copy { "studentId": "793278a6e6449530a8c46cf98463945965212801cf38051a8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonResultId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585b",
"pass" : false ,
"score" : null ,
"answers" : null ,
"started" : "2019-11-07T16:45:34.273Z" ,
"completed" : null ,
"progressIntervals" : [
{ "start" : "2019-11-07T16:45:34.273Z" , "end" : "2019-11-07T16:45:39.146Z" } ,
{ "start" : "2019-11-07T16:55:42.287Z" , "end" : null }
] ,
"idleIntervals" : [] }
Start Idle Time for a Lesson
POST
https://api.motar.io/edu/v1/lesson/progress/idle
Indicates that a student has become idle during lesson progress.
Query Parameters
200 Indicates that the student's progress is temporarily paused. The "idleIntervals" attribute will be updated with the previous start time and an end time of the current time.
Copy { "studentId": "793278a6e6449530a8c46cf98463945965212801cf38051a8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonResultId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585b",
"pass" : false ,
"score" : null ,
"answers" : null ,
"started" : "2019-11-07T16:45:34.273Z" ,
"completed" : null ,
"progressIntervals" : [
{ "start" : "2019-11-07T16:45:34.273Z" , "end" : "2019-11-07T16:45:39.146Z" } ,
{ "start" : "2019-11-07T16:55:42.287Z" , "end" : null }
] ,
"idleIntervals" : [
{ "start" : "2019-11-07T17:01:11.107Z" , "end" : null }
] }
End Idle Time for a Lesson
POST
https://api.motar/edu/v1/lesson/progress/active
Indicates that a student has ended idle time.
Query Parameters
200
Copy { "studentId": "793278a6e6449530a8c46cf98463945965212801cf38051a8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonResultId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585b",
"pass" : false ,
"score" : null ,
"answers" : null ,
"started" : "2019-11-07T16:45:34.273Z" ,
"completed" : null ,
"progressIntervals" : [
{ "start" : "2019-11-07T16:45:34.273Z" , "end" : "2019-11-07T16:45:39.146Z" } ,
{ "start" : "2019-11-07T16:55:42.287Z" , "end" : null }
] ,
"idleIntervals" : [
{ "start" : "2019-11-07T17:01:11.107Z" , "end" : "2019-11-07T17:12:32.091Z" }
] }
Update Student's Lesson Progress
POST
https://api.motar.io/edu/v1/lesson/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
Request Body
200 Progress updated.
Copy { "studentId": "793278a6e6449530a8c46cf98463945965212801cf38051a8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585a",
"lessonResultId": "793278a6e6449537a8c46cf98463945965212801cf38074e8e3d8493dc470658291be1b88d884feafe79db39515a85e9bc5c02e9c68e8dff2012bc0e11bdb474098b5b33d04b0fb55aa661abf59573919d$e1e08bd810b80f6993588ff1089a585b",
"pass" : false ,
"score" : 0 ,
"answers" : [{ "question" : "What is Batman's secret identity?" , "studentAnswer" : "Clark Kent" }] ,
"started" : "2019-11-06T12:21:54.185Z" ,
"completed" : "2019-11-06T17:42:32.221Z" ,
"progressIntervals" : [
{ "start" : "2019-11-07T16:45:34.273Z" , "end" : "2019-11-07T16:45:39.146Z" } ,
{ "start" : "2019-11-07T16:55:42.287Z" , "end" : "2019-11-06T17:42:32.221Z" }
] ,
"idleIntervals" : [
{ "start" : "2019-11-07T17:01:11.107Z" , "end" : "2019-11-07T17:12:32.091Z" }
] }
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.
Update Student's Objective Score
POST
https://api.motar.io/edu/v1/lesson/progress/objective
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
Request Body