Pearson
Always Learning

API Group: 

Retrieves an array of all users enrolled in the specified course, along with the date they were enrolled and user role information. This API returns all active users in the course: instructors, teaching assistants, and students.



Supported Roles and Authentication Protocols

Type Supported Values
Authentication Protocols OAuth 1.0a, OAuth 2.0
Valid for Roles (OAuth 2): Professor, Teaching Assistant, Administrator

API Request

API Endpoints

HTTP Verbs and URIs

GET /courses/{courseId}/enrolledUsers{.format}
  • Retrieves an array of user information for users enrolled in a course.

Parameters

Parameter Description Valid Values
{courseId} LearningStudio Course ID or relevant course overload.
  • Numeric ID issued by LearningStudio
  • ccn={callNumber}
{.format} Desired format of response data. See Response Formats. .json , .xml , or Blank

Query String Parameters

None

Request Body

None

API Response

Response Header

This API returns the standard HTTP Status Codes used by the LearningStudio APIs. There are no special headers returned by the API.

Response Body

Format

{
  "enrolledUsers":[{
    "id":{userId},
    "enrollmentDate": "{dateTime}",
    "user": {
      "id":{userId},
      "firstName":"{userFirstName}",
      "lastName":"{userLastName}",
      "emailAddress":"{userEmail}",
      "links":[{
        "href":"https://api.learningstudio.com/users/{userId}",
        "rel":"related"
        }]
      }
      "role": {
        "id": "{roleId}",
        "type": "{roleType}",
        "name": "{roleName}",
        }
      },
    {
    "id":{userId},
    "enrollmentDate": "{dateTime}",
    "user": {
      "id":{userId},
      "firstName":"{userFirstName}",
      "lastName":"{userLastName}",
      "emailAddress":"{userEmail}",
      "links":[{
        "href":"https://api.learningstudio.com/users/{userId}",
        "rel":"related"
        }]
      }
      "role": {
        "id": "{roleId}",
        "type": "{roleType}",
        "name": "{roleName}",
        }
    }]
}

Property Descriptions

Name Description Valid Values
{userId} LearningStudio user Id.
{dateTime} Date and time when the user enrolled in the course.
{userFirstName} First name of user.
{userLastName} Last name of user.
href Link to user resource for the specified user.
{roleId} Id of the role for the user in this specific course. Note: The same user may have different roles for each enrolled course. For example, a user may be a Student in one course and a Teaching Assistant in another course.
{roleType} Type of the role.
  • PROF - Professor.
  • TAST - Teaching Assistant.
  • STUD - Student.
{roleName} Name of the role as defined by the institution.

Examples

Request

Endpoint

GET /courses/1234/enrolledUsers

Response

Body

{
  "enrolledUsers": [{
    "id": 5678,
    "enrollmentDate": "2010-04-12T13:23:00Z",
    "user": {
      "id": 5678,
      "firstName": "John",
      "lastName": "Smith",
      "emailAddress": "jsmith@ciu.edu"
    },
    "role": {
      "id": 1,
      "type": "PROF",
      "name": "CIU Professor"
    }
  },
  {
    "id": 9012,
    "enrollmentDate": "2010-05-08T06:59:00Z",
    "user": {
      "id": 9012,
      "firstName": "Jane",
      "lastName": "Doe",
      "emailAddress": "jdoe@ciu.edu"
    },
    "role": {
      "id": 2,
      "type": "STUD",
      "name": "CIU Student"
    }
  }]
}
1176 reads
Always Learning
Pearson