Data Analysis The Data analysis scope is currently in Beta.
This API is currently in Beta . If you would like to make suggestions for this API, please contact a MOTAR customer support representative.
This API routes are for teacher (instructor) users. Using these endpoints as a student user will likely not return any data.
Reminder: if you are using an app/client ID in sandbox , you must use sandbox.motar.io
as the endpoint for your requests. Requests to api.motar.io
with a sandbox client ID will fail!
These routes all require the "data analysis" scope to be registered for the app you are making requests from. This scope requires special permission from MOTAR administrators.
Get teacher courses
GET
https://api.motar.io/edu/v1/teacher/courses
Retrieves a paginated list of course belonging to an authenticated teacher user
Query Parameters
Name Type Description Page number. Defaults to 1 if not provided.
Number of results per page. Defaults to 10 if not provided.
Name Type Description Auth token generated by SSO, provided as a Bearer token.
200: OK Paginated list of courses.
Copy {
"docs" : [
{
"courseId": "610140fbc4206ecd3f6ac52a589dd5560f69ddee86f85ddb5904a32ac746610012a3e790d1beb5e6d77e20f57ac3b13d57dfbfc2ea867e12d8bdd707499353e9d5ae037444c271349c5761b55c03b5e043$e3039ced169799b21a054595fd4ffe9d",
"name" : "Test Course" ,
"description" : "A test course" ,
"profilePic" : "63612df89ce540836565d4ba" ,
"coverPhoto" : "63612df89ce540836565d4bc"
}
] ,
"total" : 1 ,
"limit" : 10 ,
"page" : 1 ,
"pages" : 1
}
Get teacher classes
GET
https://api.motar.io/edu/v1/teacher/classes
Retrieves a paginated list of classes (a group of students taking a course) belonging to an authenticated teacher user.
Query Parameters
Name Type Description Page number. Defaults to 1 if not provided.
Number of results per page. Defaults to 10 if not provided.
If "true", the "courseId" property in the returned documents will be replaced with a full course document.
Name Type Description Auth token generated by SSO, provided as a Bearer token.
200: OK Paginated list of classes. 200: OK Courses with "includeCourse=true"
Copy {
"page" : 1 ,
"limit" : 10 ,
"pages" : 1 ,
"total" : 1 ,
"docs" : [
{
"name" : "Test Class" ,
"leadTeacherUserId": "610140fbc4206ecd3f6ac52a589dd5560f69ddee86f95dd95904a32ac746610012a2ecc686e9e0bad52e21a57cc4b43a05d2eec5bb827f12d5bed5071d9e57e98ea3047411ca2b68cd0737b45c0fb3e24b$e3039ced169799b21a054595fd4ffe9d",
"classId": "610140fbc4206ecd3f6ac52a589dd5560f69ddee86f95bde5904a32ac746610012a2ecc686e9e0bad52e21a57cc4b43a05d2eec5bb827f12d5bed5071d9e57e98ea3047411ca2b68cd0737b45c0fb3e24b$e3039ced169799b21a054595fd4ffe9d",
"courseId": "610140fbc4206ecd3f6ac52a589dd5560f69ddee86f95a8b5904a32ac746610012a2ecc686e9e0bad52e21a57cc4b43a05d2eec5bb827f12d5bed5071d9e57e98ea3047411ca2b68cd0737b45c0fb3e24b$e3039ced169799b21a054595fd4ffe9d"
}
]
}
Copy {
"page" : 1 ,
"limit" : 10 ,
"pages" : 1 ,
"total" : 1 ,
"docs" : [
{
"name" : "Test Class" ,
"leadTeacherUserId": "1f147af552d2235ab579c17395c60f8cbec355401696c06210705563c83f77f63ba7601a1cc472a130ae79f875c72995e7a6b22b4a02ca58e616952231ce859a6d202eabbda785805c3d8dab88f16396c3$84119f7ae79291ca7840627f0a6fc98e",
"classId": "1f147af552d2235ab579c17395c60f8cbec355401696993010705563c83f77f63ba7601a1cc472a130ae79f875c72995e7a6b22b4a02ca58e616952231ce859a6d202eabbda785805c3d8dab88f16396c3$84119f7ae79291ca7840627f0a6fc98e",
"course" : {
"courseId": "1f147af552d2235ab579c17395c60f8cbec355401696c13410705563c83f77f63ba7601a1cc472a130ae79f875c72995e7a6b22b4a02ca58e616952231ce859a6d202eabbda785805c3d8dab88f16396c3$84119f7ae79291ca7840627f0a6fc98e",
"name" : "Test Course" ,
"description" : "A test course" ,
"profilePic" : "63d94de7293df726ceb74d96" ,
"coverPhoto" : "63d94de7293df726ceb74d98"
}
}
]
}
Get students in a class or course
GET
https://api.motar.io/edu/v1/teacher/students
Retrieves a paginated list of students in a class, or across all classes using a supplied course.
Query Parameters
Name Type Description Page number. Defaults to 1 if not provided.
Number of results per page. Defaults to 10 if not provided.
A unique identifier for a MOTAR course. Required if classId is not supplied.
A unique identifier for a MOTAR class. Required if courseId is not supplied.
Name Type Description Auth token generated by SSO, provided as a Bearer token.
200: OK Paginated list of students
Copy {
"page" : 1 ,
"limit" : 10 ,
"pages" : 1 ,
"total" : 1 ,
"docs" : [
{
"user" : {
"handle" : "@testadult-testerby" ,
"firstName" : "Penny" ,
"lastName" : "Testerby" ,
"userType" : "adult" ,
"accountType" : "Adult" ,
"country" : "US" ,
"profilePic" : "63612df99ce540836565d6de" ,
"coverPhoto" : "63612df99ce540836565d6e0" ,
"userId": "610140fbc4206ecc3f6ac52a589dd5560f69ddee86fa5bdf5904a32ac746610012a4b0c086ebb3b0d62a2ef129c3b0620583bdc2b9df7e41d9ef83014cc55ab1d9ff55204d907f349d5631e10b0fb5e21d$e3039ced169799b21a054595fd4ffe9d",
"anonymous" : false ,
"position" : null ,
"role" : null ,
"organizationRoles" : {}
} ,
"studentId": "610140fbc4206ecc3f6ac52a589dd5560f69ddee86fb0edb5904a32ac746610012a4b0c086ebb3b0d62a2ef129c3b0620583bdc2b9df7e41d9ef83014cc55ab1d9ff55204d907f349d5631e10b0fb5e21d$e3039ced169799b21a054595fd4ffe9d",
"classId": "34535b2549f9e74abbe61fa22c4252d85c3904645f2381545904a32ac746610012a4b0c086ebb3b0d62a2ef129c3b0620583bdc2b9df7e41d9ef83014cc55ab1d9ff55204d907f349d5631e10b0fb5e21d$e3039ced169799b21a054595fd4ffe9d"
}
]
}
Get student lesson attempts
GET
https://api.motar.io/edu/v1/teacher/student/results
Retrieves a paginated list of MOTAR lessons, each including a list of attempts by the specified student.
Query Parameters
Name Type Description Page number. Defaults to 1 if not provided.
Number of results per page. Defaults to 10 if not provided.
Unique identifier for a student. Note that a student ID is distinct from user ID. You must use a student ID in this request.
Name Type Description Auth token generated by SSO, provided as a Bearer token.
200: OK Paginated list of lessons, with attempts.
Copy {
"page" : 1 ,
"limit" : 10 ,
"pages" : 1 ,
"total" : 1 ,
"docs" : [
{
"lessonId": "610140fbc4206ecc3f6ac52a589dd5560f69ddee86f50c8a5904a32ac746610012f9e0c2d3ebe0e2d1227ca07798bc390583ea95eddf2e40d2efd4524e9351ed8fff042310c228699f5163e15659e7b11f$e3039ced169799b21a054595fd4ffe9d",
"name" : "Test Lesson" ,
"attempts" : [
{
"lessonResultId": "610140fbc4206ecc3f6ac52a589dd5560f69ddee86f50dde5904a32ac746610012f9e0c2d3ebe0e2d1227ca07798bc390583ea95eddf2e40d2efd4524e9351ed8fff042310c228699f5163e15659e7b11f$e3039ced169799b21a054595fd4ffe9d",
"pass" : true ,
"score" : 100 ,
"started" : "2022-11-01T14:26:33.849Z" ,
"completed" : "2022-11-01T14:32:25.852Z"
}
]
}
]
}
Last updated 7 months ago