You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Method: getEnrollments

You can get a list of enrollments for the entire account, for certain learners, for certain courses, or for both latter parameters.

Permissions to Run the Request

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

Department Administrators and users with a custom role can get information about enrollments assigned to users from the departments they manage and their sub-departments.

Parameters

ParameterTypeDescription
token (required)stringAccess token. You can obtain a token by making a request
courseIds  (optional)arrayThe IDs of the courses which enrollments you would like to get
learnerIds  (optional)arrayThe IDs of the users whose enrollments you would like to get

Return Value

After the request has been successfully processed, the system returns an object with the following properties:

ParameterTypeDescription
enrollmentarray

An array containing the xml data with the following values: enrollmentId, courseId, accessDate, dueDate, expirationDate, shouldLockAfterDueDate

enrollmentId
The ID of the enrollment
courseId
The ID of the course
learnerId
The ID of the user enrolled in the course
accessDate
The date the learner is supposed to start studying the course
dueDate
Course completion date. This parameter appears in the response if a due date is specified
expirationDate

Course completion date. This parameter appears in the response if a due date is specified and shouldLockAfterDueDate is equal to 1

shouldLockAfterDueDate

Possible values:

0 means that access is granted

1 means that access is denied

issuedCertificateId
The certificate ID (token) from the list of enrollments
certIssueDatedateThe date the certificate was issued
certExpiryDatedateThe certificate’s expiration date
enrollmentTypeGroupint32Possible values:

0 — assigned by an administrator

1 — added from the catalog

The date of issue and expiration of the certificate can only be received for active enrollments. When using this method, you cannot get the data for archived or deleted enrollments.

Sample Call

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="https://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
      <GetEnrollmentsRequest>
         <credentials>
           <token>p-1sJDjmULL5DdpXPJTcbm4jVIaWVHvNmrjAxATRbNE</token>
         </credentials>
         <courseIds>
            <id>146ac240-d54f-11e9-9b88-0a580af40973</id>
         </courseIds>
         <learnerIds>
           <id>8363b098-e031-11e9-89cf-0a580af40b0f</id>
         </learnerIds>
      </GetEnrollmentsRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sample Response

?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="https://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="https://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
      <GetEnrollmentsResult>
         <enrollment>
            <enrollmentId>fc1fc35c-040d-11ed-a2ba-b6f58d6fa7b5</enrollmentId>
            <courseId>1cf62af4-02c3-11ed-8874-3ebfbdfaeb70</courseId>
            <learnerId>d9261766-040d-11ed-ae50-da994e0c8f89</learnerId>
            <accessDate>2022-07-14</accessDate>
            <enrollmentTypeGroup>0</enrollmentTypeGroup>
            <shouldLockAfterDueDate>0</shouldLockAfterDueDate>
            <certificate>
                <issuedCertificateId>66b4ed00-040e-11ed-a8a2-b6f58d6fa7b5</issuedCertificateId>
                <issueDate>2022-07-15T07:19:00+00:00</issueDate>
                <expiryDate>2022-07-15T07:21:00+00:00</expiryDate>
            </certificate>
         </enrollment>
          ...
      </GetEnrollmentsResult>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  • No labels