Request: GET /learners/results

You can retrieve results for the entire account, for certain learners and courses, specify the statuses of users and courses, start, completion, and due dates.

Permissions to Run the Request

 Account Owner, Account Administrators, Department Administrators, or custom roles

Department Administrators and users with a custom role can get users belonging to the departments they manage and their sub-departments.

Request Headers

Header

Description

Authorization (required)Access token. You can obtain a token by making a request

Request Parameters

Parameter

Description

enrollmentIds (optional)

The ID of an enrollment you want to get information on

userIds (optional)

An array of IDs of the users whose results you want to retrieve

courseIds (optional)An array of IDs of the courses which results you want to retrieve
accessDate[startDate], accessDate[endDate] (optional)

The time range for course assignment date. This parameter can be limited only by one point

dueDate[startDate], dueDate[endDate] (optional)The time range for course due date. This parameter can be limited only by one point
completionDate[startDate], completionDate[endDate] (optional)The time range for course completion date. This parameter can be limited only by one point
completionStatuses (optional)

The statuses of courses which results you would like to retrieve. Possible values are: not_started, in_progress, pending, complete, passed, accepted, incomplete, failed, declined

departmentIds (optional)An array of IDs of the departments whose results you want to retrieve
userStatuses (optional)The user status. Possible values are:  1 — active, 3 — blocked. By default, the response shows data on active users
pageSize (optional)The number of entries per page. If not indicated, equal to 1000
pageToken (optional)The token to continue to the next page

Response Parameters

ParameterDescription
learnerResultAn array with data about user results
userIdThe user ID
courseIdThe course ID
courseTitleThe course title
sessionId

The session ID

This parameter appears if there is a training in the course

enrollmentIdThe enrollment ID
accessDateStart date of the course
dueDateCourse completion date. This parameter is specified in the response if the course completion date has been defined
expirationDateCourse completion date. This parameter is specified in the response if access to the course will be closed after the completion date
completionDateCourse completion date
durationIf users are enrolled in a video or training session, this parameter will appear if the course has a recommended duration
timeSpentTime taken to complete the course
completionStatus

Course completion status

Possible values:

not_started,
in_progress,
pending,
complete,
passed,
accepted,
incomplete,
failed,
declined

progressCourse progress
awardedScoreScore awarded for the course
isOverdue

Whether or not the course has expired

Possible values:

0 — the course has not expired
1 — the course has expired

viewsCountNumber of times a user has viewed a course

Response Codes

Code

Text

Description

200OKThe request has been successfully processed
400Bad RequestA request error
401UnauthorizedAn authorization error
403Permission DeniedThe user doesn't have enough permissions to user results

Sample Request

GET/learners/results?userIds[]=85077abc-2639-11ea-8e3f-0a580af40c09&courseIds[]=f0e7400a-ca31-11e9-b6fc-0a580af40a22&accessDate[startDate]=2019-12-24T21:00:00Z&accessDate[endDate]=2020-12-30T03:00:00Z&dueDate[startDate]=2019-08-30T03:00:00Z&dueDate[endDate]=2019-12-30T03:00:00Z&completionDate[startDate]=2019-08-30T03:00:00Z&completionDate[endDate]=2019-12-30T03:00:00Z&completionStatus=failed&departmentIds[]=f0b2d3c0-aded-11e9-bfe6-0a580af40906&userStatuses[]=1&pageSize=33&pageToken=MmEzZTBiMjAtYmNmYi0xMWU5LTk2ODUtMGE1ODBhZjQwOTVj

https/1.1
Host: api-learn.ispringlearn.com
Authorization: p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE

Sample Response

https/1.1 200 OK

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <results>
        <result>
            <userId>114dba08-a75e-11eb-b4e5-0242ac13002a</userId>
            <courseId>1852f94e-a75e-11eb-92c3-0242ac13002a</courseId>
            <courseTitle>Course 1</courseTitle>
            <enrollmentId>b9b41af0-f062-11eb-a99d-0242ac190033</enrollmentId>
            <accessDate>2021-07-28T21:00:00+00:00</accessDate>
            <timeSpent>10</timeSpent>
            <completionStatus>in_progress</completionStatus>
            <progress>9.09</progress>
            <isOverdue>0</isOverdue>
        </result>
        <result>
            <userId>114dba08-a75e-11eb-b4e5-0242ac13002a</userId>
            <courseId>401df18c-f37f-11eb-a842-0242ac130033</courseId>
            <courseTitle>Course 2</courseTitle>
            <enrollmentId>b44e7392-f389-11eb-b462-0242ac130033</enrollmentId>
            <accessDate>2021-08-01T21:00:00+00:00</accessDate>
            <dueDate>2021-08-03T21:00:00+00:00</dueDate>
            <timeSpent>0</timeSpent>
            <completionStatus>not_started</completionStatus>
            <isOverdue>1</isOverdue>
        </result>
        <result>
            <userId>114dba08-a75e-11eb-b4e5-0242ac13002a</userId>
            <courseId>1a6bc896-aec2-11e9-8955-0a580af406a3</courseId>
            <courseTitle>Course 3</courseTitle>
            <enrollmentId>296bdbd8-aec2-11e9-aee5-0a580af402ea</enrollmentId>
            <accessDate>2019-07-25T00:00:00+00:00</accessDate>
            <completionDate>2019-07-25T09:55:37+00:00</completionDate>
            <timeSpent>37</timeSpent>
            <completionStatus>complete</completionStatus>
            <progress>100</progress>
            <isOverdue>false</isOverdue>
        </result>
    </results>
</response>
  • No labels