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

NameTypeDescription

page

string

Page number. Defaults to 1 if not provided.

limit

string

Number of results per page. Defaults to 10 if not provided.

Headers

NameTypeDescription

Authorization*

string

Auth token generated by SSO, provided as a Bearer token.

{
  "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

NameTypeDescription

page

string

Page number. Defaults to 1 if not provided.

limit

string

Number of results per page. Defaults to 10 if not provided.

includeCourses

boolean

If "true", the "courseId" property in the returned documents will be replaced with a full course document.

Headers

NameTypeDescription

Authorization*

string

Auth token generated by SSO, provided as a Bearer token.

{
  "page": 1,
  "limit": 10,
  "pages": 1,
  "total": 1,
  "docs": [
    {
      "name": "Test Class",
      "leadTeacherUserId": "610140fbc4206ecd3f6ac52a589dd5560f69ddee86f95dd95904a32ac746610012a2ecc686e9e0bad52e21a57cc4b43a05d2eec5bb827f12d5bed5071d9e57e98ea3047411ca2b68cd0737b45c0fb3e24b$e3039ced169799b21a054595fd4ffe9d",
      "classId": "610140fbc4206ecd3f6ac52a589dd5560f69ddee86f95bde5904a32ac746610012a2ecc686e9e0bad52e21a57cc4b43a05d2eec5bb827f12d5bed5071d9e57e98ea3047411ca2b68cd0737b45c0fb3e24b$e3039ced169799b21a054595fd4ffe9d",
      "courseId": "610140fbc4206ecd3f6ac52a589dd5560f69ddee86f95a8b5904a32ac746610012a2ecc686e9e0bad52e21a57cc4b43a05d2eec5bb827f12d5bed5071d9e57e98ea3047411ca2b68cd0737b45c0fb3e24b$e3039ced169799b21a054595fd4ffe9d"
    }
  ]
}

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

NameTypeDescription

page

string

Page number. Defaults to 1 if not provided.

limit

string

Number of results per page. Defaults to 10 if not provided.

courseId

string

A unique identifier for a MOTAR course. Required if classId is not supplied.

classId

string

A unique identifier for a MOTAR class. Required if courseId is not supplied.

Headers

NameTypeDescription

Authorization

string

Auth token generated by SSO, provided as a Bearer token.

{
  "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

NameTypeDescription

page

string

Page number. Defaults to 1 if not provided.

limit

string

Number of results per page. Defaults to 10 if not provided.

studentId*

string

Unique identifier for a student. Note that a student ID is distinct from user ID. You must use a student ID in this request.

Headers

NameTypeDescription

Authorization

string

Auth token generated by SSO, provided as a Bearer token.

{
  "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