Page tree
Skip to end of metadata
Go to start of metadata

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, Publishersor custom roles

Department Administrators, Publishers, 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
credentials (required)credentialsRead the description of the Credentials object.
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.

Sample Call

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="http://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
      <GetEnrollmentsRequest>
         <credentials>
          <accountUrl>http://myaccount.ispringlearn.com</accountUrl>
          <email>email@email.com</email>
          <password>password</password>
         </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="http://schemas.xmlsoap.org/soap/envelope/"
                   xmlns="http://ispringlearn.com/go/services/api/soap">
  <SOAP-ENV:Body>
      <GetEnrollmentsResult>
         <enrollment>
            <enrollmentId>c8bbdd64-e031-11e9-8f79-0a580af40b0f</enrollmentId>
            <courseId>146ac240-d54f-11e9-9b88-0a580af40973</courseId>
            <learnerId>8363b098-e031-11e9-89cf-0a580af40b0f</learnerId>
            <accessDate>2019-09-25</accessDate>
            <dueDate>2019-09-30</dueDate>
            <expirationDate>2019-09-30</expirationDate>
            <shouldLockAfterDueDate>true</shouldLockAfterDueDate>
         </enrollment>
          ...
      </GetEnrollmentsResult>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  • No labels